]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/freescale/mpc8349emds/mpc8349emds.c
board_f: Drop return value from initdram()
[people/ms/u-boot.git] / board / freescale / mpc8349emds / mpc8349emds.c
index 3bcfe03065b3715ecd52f91958df0369ae725ebc..595bce16d10b958745f29661cf799011ade38a18 100644 (file)
@@ -22,6 +22,8 @@
 #include <libfdt.h>
 #endif
 
+DECLARE_GLOBAL_DATA_PTR;
+
 int fixed_sdram(void);
 void sdram_init(void);
 
@@ -46,13 +48,13 @@ int board_early_init_f (void)
 
 #define ns2clk(ns) (ns / (1000000000 / CONFIG_8349_CLKIN) + 1)
 
-phys_size_t initdram(void)
+int initdram(void)
 {
        volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        phys_size_t msize = 0;
 
        if ((im->sysconf.immrbar & IMMRBAR_BASE_ADDR) != (u32)im)
-               return -1;
+               return -ENXIO;
 
        /* DDR SDRAM - Main SODIMM */
        im->sysconf.ddrlaw[0].bar = CONFIG_SYS_DDR_BASE & LAWBAR_BAR;
@@ -73,8 +75,10 @@ phys_size_t initdram(void)
         */
        sdram_init();
 
-       /* return total bus SDRAM size(bytes)  -- DDR */
-       return msize;
+       /* set total bus SDRAM size(bytes)  -- DDR */
+       gd->ram_size = msize;
+
+       return 0;
 }
 
 #if !defined(CONFIG_SPD_EEPROM)