summaryrefslogtreecommitdiffstats
path: root/board/ti/ks2_evm/board.c
diff options
context:
space:
mode:
authorVitaly Andrianov <vitalya@ti.com>2014-10-22 17:47:58 +0300
committerTom Rini <trini@ti.com>2014-10-23 11:27:29 -0400
commit89f44bb0ceda8ba6b96f16d84a0a8a014f251e6e (patch)
tree73ddf2d3c066e9a52aad7b5312c651e266092bc9 /board/ti/ks2_evm/board.c
parent079da2d514a447626a81f9df45c9f57e2f512a77 (diff)
downloadblackbird-obmc-uboot-89f44bb0ceda8ba6b96f16d84a0a8a014f251e6e.tar.gz
blackbird-obmc-uboot-89f44bb0ceda8ba6b96f16d84a0a8a014f251e6e.zip
keystone2: ecc: add ddr3 error detection and correction support
This patch adds the DDR3 ECC support to enable ECC in the DDR3 EMIF controller for Keystone II devices. By default, ECC will only be enabled if RMW is supported in the DDR EMIF controller. The entire DDR memory will be scrubbed to zero using an EDMA channel after ECC is enabled and before u-boot is re-located to DDR memory. An ecc_test environment variable is added for ECC testing. If ecc_test is set to 0, a detection of 2-bit error will reset the device, if ecc_test is set to 1, 2-bit error detection will not reset the device, user can still boot the kernel to check the ECC error handling in kernel. Signed-off-by: Hao Zhang <hzhang@ti.com> Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Diffstat (limited to 'board/ti/ks2_evm/board.c')
-rw-r--r--board/ti/ks2_evm/board.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c
index 8991786063..4029493452 100644
--- a/board/ti/ks2_evm/board.c
+++ b/board/ti/ks2_evm/board.c
@@ -40,6 +40,7 @@ int dram_init(void)
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);
return 0;
}
@@ -254,5 +255,7 @@ void ft_board_setup_ex(void *blob, bd_t *bd)
reserve_start += 2;
}
}
+
+ ddr3_check_ecc_int(KS2_DDR3A_EMIF_CTRL_BASE);
}
#endif
OpenPOWER on IntegriCloud