]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/amcc/acadia/memory.c
drivers, block: remove sil680 driver
[people/ms/u-boot.git] / board / amcc / acadia / memory.c
index 61bfea3fab658099e6cb540ed32325beec86a37b..36500da6f4f7ed1c814c13ee4335c3234dac2829 100644 (file)
 #include <asm/io.h>
 #include <asm/ppc4xx-gpio.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 extern void board_pll_init_f(void);
 
-#if !defined(CONFIG_NAND_U_BOOT) || defined(CONFIG_NAND_SPL)
 static void cram_bcr_write(u32 wr_val)
 {
        wr_val <<= 2;
@@ -41,20 +42,9 @@ static void cram_bcr_write(u32 wr_val)
 
        return;
 }
-#endif
 
-phys_size_t initdram(int board_type)
+int dram_init(void)
 {
-#if defined(CONFIG_NAND_SPL)
-       u32 reg;
-
-       /* don't reinit PLL when booting via I2C bootstrap option */
-       mfsdr(SDR0_PINSTP, reg);
-       if (reg != 0xf0000000)
-               board_pll_init_f();
-#endif
-
-#if !defined(CONFIG_NAND_U_BOOT) || defined(CONFIG_NAND_SPL)
        int i;
        u32 val;
 
@@ -88,7 +78,8 @@ phys_size_t initdram(int board_type)
        /* Wait a short while, since for NAND booting this is too fast */
        for (i=0; i<200000; i++)
                ;
-#endif
 
-       return (CONFIG_SYS_MBYTES_RAM << 20);
+       gd->ram_size = CONFIG_SYS_MBYTES_RAM << 20;
+
+       return 0;
 }