diff options
author | Simon Glass | 2017-03-31 08:40:25 -0600 |
---|---|---|
committer | Tom Rini | 2017-04-05 13:59:20 -0400 |
commit | 088454cde245b4d431ce0181be8b3cbceea059d6 (patch) | |
tree | ec86ebe66961c9b06ab4b39ec83fd81d4a86e9be /board/freescale/mpc832xemds | |
parent | 52c411805c090999f015df8bdf8016fb684746d0 (diff) |
board_f: Drop return value from initdram()
At present we cannot use this function as an init sequence call without a
wrapper, since it returns the RAM size. Adjust it to set the RAM size in
global_data instead, and return 0 on success.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/freescale/mpc832xemds')
-rw-r--r-- | board/freescale/mpc832xemds/mpc832xemds.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/board/freescale/mpc832xemds/mpc832xemds.c b/board/freescale/mpc832xemds/mpc832xemds.c index d66ad33bf5e..907ad09dc8e 100644 --- a/board/freescale/mpc832xemds/mpc832xemds.c +++ b/board/freescale/mpc832xemds/mpc832xemds.c @@ -23,6 +23,8 @@ #include "../common/pq-mds-pib.h" #endif +DECLARE_GLOBAL_DATA_PTR; + const qe_iop_conf_t qe_iop_conf_tab[] = { /* ETH3 */ {1, 0, 1, 0, 1}, /* TxD0 */ @@ -88,21 +90,23 @@ int board_early_init_r(void) 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; } /************************************************************************* |