From 1271e77538429ba33fed0a1d95aafb6b1cc6d3e9 Mon Sep 17 00:00:00 2001 From: Yangbo Lu Date: Mon, 25 Jan 2021 17:22:24 +0800 Subject: nxp: soc-ls1046: fix errata workaround applying The errata workaround of ls1046a hasn't been applied, since wrong macros were used. (ERRATA_SOC_* should be used, not ERRATA_PLAT_*) One erratum A-010539 was causing kernel SD UHS-I card failed to work. This patch is to fix the issue. Signed-off-by: Yangbo Lu --- plat/nxp/soc-ls1046/erratas_soc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/plat/nxp/soc-ls1046/erratas_soc.c b/plat/nxp/soc-ls1046/erratas_soc.c index b84931687..bd26c4174 100644 --- a/plat/nxp/soc-ls1046/erratas_soc.c +++ b/plat/nxp/soc-ls1046/erratas_soc.c @@ -7,10 +7,15 @@ #include #include +#include +#include +#include +#include +#include void erratum_a008850_early(void) { -#ifdef ERRATA_PLAT_A008850 +#ifdef ERRATA_SOC_A008850 /* part 1 of 2 */ uintptr_t cci_base = NXP_CCI_ADDR; uint32_t val = mmio_read_32(cci_base + CTRL_OVERRIDE_REG); @@ -24,7 +29,7 @@ void erratum_a008850_early(void) void erratum_a008850_post(void) { -#ifdef ERRATA_PLAT_A008850 +#ifdef ERRATA_SOC_A008850 /* part 2 of 2 */ uintptr_t cci_base = NXP_CCI_ADDR; uint32_t val = mmio_read_32(cci_base + CTRL_OVERRIDE_REG); @@ -42,7 +47,7 @@ void erratum_a008850_post(void) void erratum_a010539(void) { -#ifdef ERRATA_PLAT_A010539 +#ifdef ERRATA_SOC_A010539 #if POLICY_OTA /* * For POLICY_OTA Bootstrap, BOOT_DEVICE_EMMC is used to get FIP and @@ -57,8 +62,8 @@ void erratum_a010539(void) uint32_t val; val = (gur_in32(porsr1) & ~PORSR1_RCW_MASK); - out_be32((void *)(NXP_DCSR_DCFG_ADDR + DCFG_DCSR_PORCR1_OFFSET), val); - out_be32((void *)(NXP_SCFG_ADDR + 0x1a8), 0xffffffff); + gur_out32((void *)(NXP_DCSR_DCFG_ADDR + DCFG_DCSR_PORCR1_OFFSET), val); + scfg_out32((void *)(NXP_SCFG_ADDR + 0x1a8), 0xffffffff); } #endif -- cgit v1.2.3