mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <dev@lynxeye.de>
To: barebox@lists.infradead.org
Subject: [PATCH 4/4] arm: tegra: enable ARM errata workarounds
Date: Wed, 25 Jun 2014 09:18:21 +0200	[thread overview]
Message-ID: <1403680701-10494-4-git-send-email-dev@lynxeye.de> (raw)
In-Reply-To: <1403680701-10494-1-git-send-email-dev@lynxeye.de>

From: Lucas Stach <l.stach@pengutronix.de>

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 arch/arm/mach-tegra/tegra_maincomplex_init.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-tegra/tegra_maincomplex_init.c b/arch/arm/mach-tegra/tegra_maincomplex_init.c
index 17490a4..4a362dd 100644
--- a/arch/arm/mach-tegra/tegra_maincomplex_init.c
+++ b/arch/arm/mach-tegra/tegra_maincomplex_init.c
@@ -18,6 +18,7 @@
 #include <sizes.h>
 #include <asm/barebox-arm-head.h>
 #include <asm/barebox-arm.h>
+#include <asm/errata.h>
 #include <mach/lowlevel.h>
 #include <mach/tegra20-pmc.h>
 #include <mach/tegra20-car.h>
@@ -30,6 +31,23 @@ void tegra_maincomplex_entry(void)
 
 	arm_cpu_lowlevel_init();
 
+	chiptype = tegra_get_chiptype();
+
+	/* enable ARM errata workarounds early */
+	switch (chiptype) {
+	case TEGRA20:
+		enable_arm_errata_716044_war();
+		enable_arm_errata_742230_war();
+		enable_arm_errata_751472_war();
+		break;
+	case TEGRA30:
+		enable_arm_errata_743622_war();
+		enable_arm_errata_751472_war();
+		break;
+	default:
+		break;
+	}
+
 	/* switch to PLLX */
 	writel(CRC_CCLK_BURST_POLICY_SYS_STATE_RUN <<
 	       CRC_CCLK_BURST_POLICY_SYS_STATE_SHIFT |
@@ -38,8 +56,6 @@ void tegra_maincomplex_entry(void)
 	       TEGRA_CLK_RESET_BASE + CRC_CCLK_BURST_POLICY);
 	writel(CRC_SUPER_CDIV_ENB, TEGRA_CLK_RESET_BASE + CRC_SUPER_CCLK_DIV);
 
-	chiptype = tegra_get_chiptype();
-
 	if (chiptype >= TEGRA114) {
 		asm("mrc p15, 1, %0, c9, c0, 2" : : "r" (reg));
 		reg &= ~7;
@@ -51,6 +67,7 @@ void tegra_maincomplex_entry(void)
 	case TEGRA20:
 		rambase = 0x0;
 		ramsize = tegra20_get_ramsize();
+
 		break;
 	case TEGRA30:
 	case TEGRA124:
-- 
1.9.3


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

  parent reply	other threads:[~2014-06-25  7:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-25  7:18 [PATCH 1/4] arm: add " Lucas Stach
2014-06-25  7:18 ` [PATCH 2/4] arm: imx6: add cpu lowlevel init function Lucas Stach
2014-06-25  7:18 ` [PATCH 3/4] arm: imx6: use imx6 specific cpu " Lucas Stach
2014-06-25  7:18 ` Lucas Stach [this message]
2014-06-26  6:05 ` [PATCH 1/4] arm: add errata workarounds Sascha Hauer

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=1403680701-10494-4-git-send-email-dev@lynxeye.de \
    --to=dev@lynxeye.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