X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Ffreescale%2Fmpc832xemds%2Fmpc832xemds.c;h=869538feb922681b37a7e0b11985f4a5dea6eccf;hb=b460b889e28379014a7f951c08d93a151116b1ad;hp=adf425486e1edb92e9ccc89a84d245c413fffa51;hpb=f2ffe7da7fcc266f8c9cb557031066cfd5eb2a03;p=u-boot diff --git a/board/freescale/mpc832xemds/mpc832xemds.c b/board/freescale/mpc832xemds/mpc832xemds.c index adf425486e..869538feb9 100644 --- a/board/freescale/mpc832xemds/mpc832xemds.c +++ b/board/freescale/mpc832xemds/mpc832xemds.c @@ -1,9 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2006 Freescale Semiconductor, Inc. * * Dave Liu - * - * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -17,12 +16,14 @@ #endif #include #if defined(CONFIG_OF_LIBFDT) -#include +#include #endif #if defined(CONFIG_PQ_MDS_PIB) #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 +89,23 @@ int board_early_init_r(void) int fixed_sdram(void); -phys_size_t initdram(int board_type) +int dram_init(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; } /*************************************************************************