mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: Add errata support
@ 2013-01-20 10:22 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2013-01-20 10:22 UTC (permalink / raw)
  To: barebox

Recently the Kernel disabled some errata fixups for multiplatform
support, these have to be done in the bootloader now. This adds
support for fixups for errata 743622 and 751472 present on i.MX6
and enables them for this SoC.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/include/asm/errata.h |   28 ++++++++++++++++++++++++++++
 arch/arm/mach-imx/imx6.c      |    4 ++++
 2 files changed, 32 insertions(+)
 create mode 100644 arch/arm/include/asm/errata.h

diff --git a/arch/arm/include/asm/errata.h b/arch/arm/include/asm/errata.h
new file mode 100644
index 0000000..e7d0d6b
--- /dev/null
+++ b/arch/arm/include/asm/errata.h
@@ -0,0 +1,28 @@
+#ifndef __ARM_ERRATA_H
+#define __ARM_ERRATA_H
+
+static inline void arm_errata_743622(void)
+{
+	__asm__ __volatile__(
+		"mrc	p15, 0, r0, c15, c0, 1;"	/* read diagnostic register */
+		"orr	r0, r0, #1 << 6;"		/* set bit #6 */
+		"mcr	p15, 0, r0, c15, c0, 1;"	/* write diagnostic register */
+		:
+		:
+		: "r0"
+	);
+}
+
+static inline void arm_errata_751472(void)
+{
+	__asm__ __volatile__(
+		"mrc	p15, 0, r0, c15, c0, 1;"	/* read diagnostic register */
+		"orr	r0, r0, #1 << 11;"		/* set bit #11 */
+		"mcr	p15, 0, r0, c15, c0, 1;"	/* write diagnostic register */
+		:
+		:
+		: "r0"
+	);
+}
+
+#endif /* __ARM_ERRATA_H */
diff --git a/arch/arm/mach-imx/imx6.c b/arch/arm/mach-imx/imx6.c
index 37ee5d8..5c35732 100644
--- a/arch/arm/mach-imx/imx6.c
+++ b/arch/arm/mach-imx/imx6.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <io.h>
 #include <sizes.h>
+#include <asm/errata.h>
 #include <mach/generic.h>
 #include <mach/imx6-regs.h>
 
@@ -23,6 +24,9 @@ void imx6_init_lowlevel(void)
 	void __iomem *aips1 = (void *)MX6_AIPS1_ON_BASE_ADDR;
 	void __iomem *aips2 = (void *)MX6_AIPS2_ON_BASE_ADDR;
 
+	arm_errata_743622();
+	arm_errata_751472();
+
 	/*
 	 * Set all MPROTx to be non-bufferable, trusted for R/W,
 	 * not forced to user-mode.
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-20 10:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-20 10:22 [PATCH] ARM: Add errata support Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox