]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - board/samsung/smdk6400/smdk6400.c
arm: nvidia and smdk6400: use common code for machine type
[karo-tx-uboot.git] / board / samsung / smdk6400 / smdk6400.c
index bd2e45ac200a135e3e0f91a92cd037b053f777b7..c40d1f9b492055f8a9fb1375b1f6c421c64cd17a 100644 (file)
  */
 
 #include <common.h>
-#include <s3c6400.h>
+#include <netdev.h>
+#include <asm/arch/s3c6400.h>
+
+DECLARE_GLOBAL_DATA_PTR;
 
 /* ------------------------------------------------------------------------- */
 #define CS8900_Tacs    0x0     /* 0clk         address set-up          */
@@ -62,8 +65,6 @@ static void cs8900_pre_init(void)
 
 int board_init(void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        cs8900_pre_init();
 
        /* NOR-flash in SROM0 */
@@ -71,18 +72,21 @@ int board_init(void)
        /* Enable WAIT */
        SROM_BW_REG |= 4 | 8 | 1;
 
-       gd->bd->bi_arch_number = MACH_TYPE;
        gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
 
        return 0;
 }
 
-int dram_init(void)
+void dram_init_banksize(void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+}
+
+int dram_init(void)
+{
+       gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
+                               PHYS_SDRAM_1_SIZE);
 
        return 0;
 }
@@ -107,17 +111,6 @@ ulong virt_to_phy_smdk6400(ulong addr)
 }
 #endif
 
-#if defined(CONFIG_CMD_NAND) && defined(CONFIG_SYS_NAND_LEGACY)
-#include <linux/mtd/nand.h>
-extern struct nand_chip nand_dev_desc[CONFIG_SYS_MAX_NAND_DEVICE];
-void nand_init(void)
-{
-       nand_probe(CONFIG_SYS_NAND_BASE);
-       if (nand_dev_desc[0].ChipID != NAND_ChipID_UNKNOWN)
-               print_size(nand_dev_desc[0].totlen, "\n");
-}
-#endif
-
 ulong board_flash_get_legacy (ulong base, int banknum, flash_info_t *info)
 {
        if (banknum == 0) {     /* non-CFI boot flash */
@@ -128,3 +121,14 @@ ulong board_flash_get_legacy (ulong base, int banknum, flash_info_t *info)
        } else
                return 0;
 }
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+       int rc = 0;
+#ifdef CONFIG_CS8900
+       rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
+#endif
+       return rc;
+}
+#endif