diff options
Diffstat (limited to 'board/freescale/mpc8323erdb/mpc8323erdb.c')
-rw-r--r-- | board/freescale/mpc8323erdb/mpc8323erdb.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/board/freescale/mpc8323erdb/mpc8323erdb.c b/board/freescale/mpc8323erdb/mpc8323erdb.c index f9f9a410c53..e7d8b99738c 100644 --- a/board/freescale/mpc8323erdb/mpc8323erdb.c +++ b/board/freescale/mpc8323erdb/mpc8323erdb.c @@ -21,6 +21,8 @@ #endif #include <asm/mmu.h> +DECLARE_GLOBAL_DATA_PTR; + const qe_iop_conf_t qe_iop_conf_tab[] = { /* UCC3 */ {1, 0, 1, 0, 1}, /* TxD0 */ @@ -68,21 +70,23 @@ const qe_iop_conf_t qe_iop_conf_tab[] = { int fixed_sdram(void); -phys_size_t initdram(void) +int initdram(void) { volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR; u32 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; msize = fixed_sdram(); - /* return total bus SDRAM size(bytes) -- DDR */ - return (msize * 1024 * 1024); + /* set total bus SDRAM size(bytes) -- DDR */ + gd->ram_size = msize * 1024 * 1024; + + return 0; } /************************************************************************* |