summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/arch-keystone/ddr3.h
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 /arch/arm/include/asm/arch-keystone/ddr3.h
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 'arch/arm/include/asm/arch-keystone/ddr3.h')
-rw-r--r--arch/arm/include/asm/arch-keystone/ddr3.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-keystone/ddr3.h b/arch/arm/include/asm/arch-keystone/ddr3.h
index 6bf35d3543..b044d6f18f 100644
--- a/arch/arm/include/asm/arch-keystone/ddr3.h
+++ b/arch/arm/include/asm/arch-keystone/ddr3.h
@@ -49,8 +49,14 @@ struct ddr3_emif_config {
};
void ddr3_init(void);
+int ddr3_get_size(void);
void ddr3_reset_ddrphy(void);
+void ddr3_init_ecc(u32 base);
+void ddr3_disable_ecc(u32 base);
+void ddr3_check_ecc_int(u32 base);
+int ddr3_ecc_support_rmw(u32 base);
void ddr3_err_reset_workaround(void);
+void ddr3_enable_ecc(u32 base, int test);
void ddr3_init_ddrphy(u32 base, struct ddr3_phy_config *phy_cfg);
void ddr3_init_ddremif(u32 base, struct ddr3_emif_config *emif_cfg);
OpenPOWER on IntegriCloud