summaryrefslogtreecommitdiff
path: root/board/freescale/mpc832xemds/mpc832xemds.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/freescale/mpc832xemds/mpc832xemds.c')
-rw-r--r--board/freescale/mpc832xemds/mpc832xemds.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/board/freescale/mpc832xemds/mpc832xemds.c b/board/freescale/mpc832xemds/mpc832xemds.c
index d66ad33bf5..907ad09dc8 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;
}
/*************************************************************************