summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYangbo Lu <yangbo.lu@nxp.com>2021-01-25 17:22:24 +0800
committerYangbo Lu <yangbo.lu@nxp.com>2021-01-26 10:12:30 +0800
commit1271e77538429ba33fed0a1d95aafb6b1cc6d3e9 (patch)
treef0dab7544cabf83a85cb00e8a5575b7f1c795413
parent458d2fc0c4c3a7331cbf1ee5733a499dc5cb606a (diff)
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 <yangbo.lu@nxp.com>
-rw-r--r--plat/nxp/soc-ls1046/erratas_soc.c15
1 files 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 <cci.h>
#include <mmio.h>
+#include <soc_default_base_addr.h>
+#include <ls_interconnect.h>
+#include <plat_common.h>
+#include <dcfg.h>
+#include <scfg.h>
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