]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
feat(lx2): enable OCRAM ECC
authorJiafei Pan <Jiafei.Pan@nxp.com>
Tue, 11 Oct 2022 06:58:18 +0000 (14:58 +0800)
committerJiafei Pan <Jiafei.Pan@nxp.com>
Tue, 6 Dec 2022 14:46:10 +0000 (22:46 +0800)
Fix OCRAM ECC for lx2 platform.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Ic46de7a40c611764a6f24400663da50e6b477ae5

plat/nxp/soc-lx2160a/soc.c
plat/nxp/soc-lx2160a/soc.def

index d8f13f3c81d484d6f75a95c92bf9fce7b64bf76b..df313935ce608eee267298576f8feb6ee3c8c034 100644 (file)
@@ -37,6 +37,9 @@
 
 #include <errata.h>
 #include <ls_interrupt_mgmt.h>
+#ifdef CONFIG_OCRAM_ECC_EN
+#include <ocram.h>
+#endif
 #include "plat_common.h"
 #ifdef NXP_NV_SW_MAINT_LAST_EXEC_DATA
 #include <plat_nv_storage.h>
@@ -238,6 +241,9 @@ void soc_preload_setup(void)
  ******************************************************************************/
 void soc_early_init(void)
 {
+#ifdef CONFIG_OCRAM_ECC_EN
+       ocram_init(NXP_OCRAM_ADDR, NXP_OCRAM_SIZE);
+#endif
        dcfg_init(&dcfg_init_data);
 #ifdef POLICY_FUSE_PROVISION
        gpio_init(&gpio_init_data);
index 81d6744aed70d4bd29929dc8aad7ff1d9a046a22..0442962951dbaf87835da192b40e8d192709cb3f 100644 (file)
@@ -114,3 +114,6 @@ ERRATA_DDR_A050958  := 1
 
 # enable dynamic memory mapping
 PLAT_XLAT_TABLES_DYNAMIC :=    1
+
+# OCRAM ECC Enabled
+OCRAM_ECC_EN            :=      yes