summaryrefslogtreecommitdiffstats
path: root/board/ti/ks2_evm/board.c
diff options
context:
space:
mode:
authorVitaly Andrianov <vitalya@ti.com>2015-02-11 14:07:58 -0500
committerTom Rini <trini@ti.com>2015-02-16 12:41:41 -0500
commit66c98a0c3807720a32ce49c9ba2a5808555062d7 (patch)
treef529bcd2aad0df100e358b6555885027a33868f8 /board/ti/ks2_evm/board.c
parentbba379d498b4ed408e79f7aec6dc23a3572c37e7 (diff)
downloadblackbird-obmc-uboot-66c98a0c3807720a32ce49c9ba2a5808555062d7.tar.gz
blackbird-obmc-uboot-66c98a0c3807720a32ce49c9ba2a5808555062d7.zip
keystone2: ddr3: eliminate using global ddr3_size variable
KS2 ddr3 initialization uses ddr3_size global variable before u-boot relocation. Even if the variable is not being used after relocation, writing to it corrupts relocation table. This patch removes the global ddr3_size variable and uses local one instead. Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Tested-by: Nishanth Menon <nm@ti.com>
Diffstat (limited to 'board/ti/ks2_evm/board.c')
-rw-r--r--board/ti/ks2_evm/board.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c
index 04ec675103..8892a2843d 100644
--- a/board/ti/ks2_evm/board.c
+++ b/board/ti/ks2_evm/board.c
@@ -35,12 +35,14 @@ static struct aemif_config aemif_configs[] = {
int dram_init(void)
{
- ddr3_init();
+ u32 ddr3_size;
+
+ ddr3_size = ddr3_init();
gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
CONFIG_MAX_RAM_BANK_SIZE);
aemif_init(ARRAY_SIZE(aemif_configs), aemif_configs);
- ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE);
+ ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE, ddr3_size);
return 0;
}
OpenPOWER on IntegriCloud