summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/armv7.h
diff options
context:
space:
mode:
authorValentine Barshak <valentine.barshak@cogentembedded.com>2015-03-20 15:16:17 (GMT)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2015-04-16 11:53:26 (GMT)
commit9ba379ade789e41cc4132d622315f3f021a47b9b (patch)
tree9591843c0f8f3166760f6c07c1d0fe83e49d8e4e /arch/arm/include/asm/armv7.h
parent82f681d67d3545cbc2250bdf7ecf2d06e7369e2b (diff)
downloadu-boot-fsl-qoriq-9ba379ade789e41cc4132d622315f3f021a47b9b.tar.xz
ARM: cpu: Add ARMv7 barrier operations support
This enables ARMv7 barrier operations support when march=armv7-a is enabled. Using CP15 barriers causes U-Boot bootm command crash when transferring control to the loaded image on Renesas R8A7794 Cortex A7 CPU. Using ARMv7 barrier operations instead of the deprecated CP15 barriers helps to avoid these issues. Signed-off-by: Valentine Barshak <valentine.barshak+renesas@cogentembedded.com> Signed-off-by: Vladimir Barinov <vladimir.barinov+renesas@cogentembedded.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Diffstat (limited to 'arch/arm/include/asm/armv7.h')
-rw-r--r--arch/arm/include/asm/armv7.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/include/asm/armv7.h b/arch/arm/include/asm/armv7.h
index 58d8b16..cbe7dc1 100644
--- a/arch/arm/include/asm/armv7.h
+++ b/arch/arm/include/asm/armv7.h
@@ -70,6 +70,16 @@
#define CP15DSB asm volatile ("mcr p15, 0, %0, c7, c10, 4" : : "r" (0))
#define CP15DMB asm volatile ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0))
+#ifdef __ARM_ARCH_7A__
+#define ISB asm volatile ("isb" : : : "memory")
+#define DSB asm volatile ("dsb" : : : "memory")
+#define DMB asm volatile ("dmb" : : : "memory")
+#else
+#define ISB CP15ISB
+#define DSB CP15DSB
+#define DMB CP15DMB
+#endif
+
/*
* Workaround for ARM errata # 798870
* Set L2ACTLR[7] to reissue any memory transaction in the L2 that has been