diff options
Diffstat (limited to 'board/freescale/mpc8349emds/mpc8349emds.c')
-rw-r--r-- | board/freescale/mpc8349emds/mpc8349emds.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/board/freescale/mpc8349emds/mpc8349emds.c b/board/freescale/mpc8349emds/mpc8349emds.c index 3bcfe03065..595bce16d1 100644 --- a/board/freescale/mpc8349emds/mpc8349emds.c +++ b/board/freescale/mpc8349emds/mpc8349emds.c @@ -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) |