ARM: mx6: Fix errata workarounds for i.MX6
PATCH v3 1/3 ARM: mx6: Fix errata workarounds for i.MX6
From: Nitin Garg <[email protected]>
Since MX6 is Cortex-A9 r2p10, enable ARM errata
751472, 794072, 761320 only applied to the
following configuration:
This erratum affects configurations with either:
- One processor if the ACP is present
- Two or more processors
i.MX6 family does not have the ACP and thus only the MPCore system will be impacted, which are the i.MX6DQ, i.MX6DL.
---
Changes in v3:
Split the patch as suggested by Fabio.
Changes in v2: None
include/configs/mx6_common.h | 3 +++ 1 file changed, 3 insertions(+)
include/configs/mx6_common.h +3 -0
@@ -18,9 +18,12 @@#define __MX6_COMMON_H#define CONFIG_ARM_ERRATA_743622 +#if (defined(CONFIG_MX6Q ) || defined(CONFIG_MX6DL ) ||\ +defined(CONFIG_MX6QDL )) && !defined(CONFIG_MX6S )#define CONFIG_ARM_ERRATA_751472 #define CONFIG_ARM_ERRATA_794072 #define CONFIG_ARM_ERRATA_761320 +#endif #define CONFIG_BOARD_POSTCLK_INIT #ifndef CONFIG_SYS_L2CACHE_OFF
Signature · 1 line
1.7.9.5
PATCH v3 2/3 ARM: Add workaround for Cortex-A9 errata 845369
From: Nitin Garg <[email protected]>
Under very rare timing circumstances, transition into streaming mode might create a data corruption. Exists on all Cortex-A9 revisions.
---
Changes in v3: None
Changes in v2: None
README | 1 + arch/arm/cpu/armv7/start.S | 5 +++++ 2 files changed, 6 insertions(+)
README +1 -0
@@ -683,6 +683,7 @@ The following options need to be configured: CONFIG_ARM_ERRATA_751472 CONFIG_ARM_ERRATA_794072 CONFIG_ARM_ERRATA_761320 + CONFIG_ARM_ERRATA_845369 If set, the workarounds for these ARM errata are applied early during U-Boot startup. Note that these options force the
arch/arm/cpu/armv7/start.S +5 -0
@@ -164,6 +164,11 @@ ENTRY(cpu_init_cp15) orr r0, r0, #1 << 21 @ set bit #21 mcr p15, 0, r0, c15, c0, 1 @ write diagnostic register #endif +#ifdef CONFIG_ARM_ERRATA_845369 + mrc p15, 0, r0, c15, c0, 1 @ read diagnostic register + orr r0, r0, #1 << 22 @ set bit #22 + mcr p15, 0, r0, c15, c0, 1 @ write diagnostic register +#endif mov r5, lr @ Store my Caller mrc p15, 0, r1, c0, c0, 0 @ r1 has Read Main ID Register (MIDR)
Signature · 1 line
1.7.9.5
PATCH v3 3/3 ARM: mx6: Enable ARM errata workaround for 845369
In reply to nitin.garg at freescale.comFrom: Nitin Garg <[email protected]>
The ARM errata 845369 only applies to one processor if the ACP is present OR two or more processors. i.MX6 family does not have the ACP and thus only the MPCore system will be impacted, which are the i.MX6DQ, i.MX6DL.
---
Changes in v3:
Split the patch as suggested by Fabio.
Changes in v2:
Apply 751472, 794072, 761320, 845369 to i.MX6DQ, i.MX6DL only.
include/configs/mx6_common.h | 1 + 1 file changed, 1 insertion(+)
include/configs/mx6_common.h +1 -0
@@ -23,6 +23,7 @@ defined(CONFIG_MX6QDL)) && !defined(CONFIG_MX6S)#define CONFIG_ARM_ERRATA_751472 #define CONFIG_ARM_ERRATA_794072 #define CONFIG_ARM_ERRATA_761320 +#define CONFIG_ARM_ERRATA_845369 #endif #define CONFIG_BOARD_POSTCLK_INIT
Signature · 1 line
1.7.9.5
PATCH v3 1/3 ARM: mx6: Fix errata workarounds for i.MX6
In reply to nitin.garg at freescale.comQuoted 29 lines · nitin.garg at freescale.com
From: Nitin Garg <[email protected]>
Since MX6 is Cortex-A9 r2p10, enable ARM errata
751472, 794072, 761320 only applied to the
following configuration:This erratum affects configurations with either:
- One processor if the ACP is present
- Two or more processorsi.MX6 family does not have the ACP and thus only the MPCore system will be impacted, which are the i.MX6DQ, i.MX6DL.
Signed-off-by Nitin Garg <[email protected]>---
Changes in v3:
Split the patch as suggested by Fabio.Changes in v2: None
include/configs/mx6_common.h | 3 +++ 1 file changed, 3 insertions(+)include/configs/mx6_common.h +0
-0
include/configs/mx6_common.h line 26
Quoted 9 lines
include/configs/mx6_common.h +3
-0@@ -18,9 +18,12 @@#define __MX6_COMMON_H#define CONFIG_ARM_ERRATA_743622 +#if (defined(CONFIG_MX6Q ) || defined(CONFIG_MX6DL ) ||\ +defined(CONFIG_MX6QDL )) && !defined(CONFIG_MX6S )#define CONFIG_ARM_ERRATA_751472 #define CONFIG_ARM_ERRATA_794072 #define CONFIG_ARM_ERRATA_761320 +#endif
We definitely want to allow 1 binary for CONFIG_MX6DL/ CONFIG_MX6S
so perhaps this needs to be a runtime check ?
Thanks
Troy
PATCH v3 1/3 ARM: mx6: Fix errata workarounds for i.MX6
Hi Troy, Nitin,
Quoted 44 lines · Troy Kisky
Quoted 29 lines · nitin.garg at freescale.com
From: Nitin Garg <[email protected]>
Since MX6 is Cortex-A9 r2p10, enable ARM errata
751472, 794072, 761320 only applied to the
following configuration:This erratum affects configurations with either:
- One processor if the ACP is present
- Two or more processorsi.MX6 family does not have the ACP and thus only the MPCore system will be impacted, which are the i.MX6DQ, i.MX6DL.
Signed-off-by Nitin Garg <[email protected]>---
Changes in v3:
Split the patch as suggested by Fabio.Changes in v2: None
include/configs/mx6_common.h | 3 +++ 1 file changed, 3 insertions(+)include/configs/mx6_common.h +0
-0include/configs/mx6_common.h line 26
Quoted 9 lines
include/configs/mx6_common.h +3
-0@@ -18,9 +18,12 @@#define __MX6_COMMON_H#define CONFIG_ARM_ERRATA_743622 +#if (defined(CONFIG_MX6Q ) || defined(CONFIG_MX6DL ) ||\ +defined(CONFIG_MX6QDL )) && !defined(CONFIG_MX6S )#define CONFIG_ARM_ERRATA_751472 #define CONFIG_ARM_ERRATA_794072 #define CONFIG_ARM_ERRATA_761320 +#endif We definitely want to allow 1 binary for CONFIG_MX6DL/
CONFIG_MX6S
Quoted 2 lines
so perhaps this needs to be a runtime check ?
Indeed. If static options seem to work with most of SOC, this forbids having single binary for MX6. We should use some "quirk" as in kernel to provide SOC specific fixes.
I see that there is already a similar case for cp15, and there is a _weak function for it:
void __weak v7_arch_cp15_set_acr(u32,..
and SOC can have there specialties there. Maybe you can add the fix as weak function in ARM code, and then in arch/arm/cpu/armv7/mx6/soc.c you can do the runtime check.
Best regards,
Stefano Babics
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================