mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] ARM: Add errata support
Date: Sun, 20 Jan 2013 11:22:00 +0100	[thread overview]
Message-ID: <1358677320-24306-1-git-send-email-s.hauer@pengutronix.de> (raw)

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

                 reply	other threads:[~2013-01-20 10:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358677320-24306-1-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox