summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/start.S
diff options
context:
space:
mode:
authorNisal Menuka <nisalmenuka23@gmail.com>2017-04-26 16:18:01 -0500
committerTom Rini <trini@konsulko.com>2017-05-08 11:57:36 -0400
commit8776350d87c6aa02644a345f2fad04f3f952e48a (patch)
treebe7d1528cef55d9681c516ec598a57de662c13dd /arch/arm/cpu/armv7/start.S
parentd5c16d00932f819fa161b156c237a56683608078 (diff)
downloadu-boot-8776350d87c6aa02644a345f2fad04f3f952e48a.tar.gz
Add ARM errata workaround 852421 and 852423 for Cortex-A17
ARM errata 852421 and 852423 applies to r1p0, r1p1 and r1p2 revisions of Cortex-A17 processors. These workarounds exist in Linux kernel and I thought it would be better to add them in to U-Boot. Signed-off-by: Nisal Menuka <nisalmenuka23@gmail.com>
Diffstat (limited to 'arch/arm/cpu/armv7/start.S')
-rw-r--r--arch/arm/cpu/armv7/start.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index 1a6aee9442..f06fd28940 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -283,6 +283,18 @@ skip_errata_621766:
skip_errata_725233:
#endif
+#ifdef CONFIG_ARM_ERRATA_852421
+ mrc p15, 0, r0, c15, c0, 1 @ read diagnostic register
+ orr r0, r0, #1 << 24 @ set bit #24
+ mcr p15, 0, r0, c15, c0, 1 @ write diagnostic register
+#endif
+
+#ifdef CONFIG_ARM_ERRATA_852423
+ mrc p15, 0, r0, c15, c0, 1 @ read diagnostic register
+ orr r0, r0, #1 << 12 @ set bit #12
+ mcr p15, 0, r0, c15, c0, 1 @ write diagnostic register
+#endif
+
mov pc, r5 @ back to my caller
ENDPROC(cpu_init_cp15)