public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V6 10/11] ARM: OMAP3: Enable workaround for ARM errata 454179, 430973, 621766
Date: Mon, 9 Mar 2015 17:12:08 -0500	[thread overview]
Message-ID: <1425939129-308-11-git-send-email-nm@ti.com> (raw)
In-Reply-To: <1425939129-308-1-git-send-email-nm@ti.com>

Enable the OMAP3 specific errata code for 454179, 430973, 621766
and while at it, remove legacy non-revision checked errata logic.

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/cpu/armv7/omap3/board.c   |   31 ++++++++++---------------------
 include/configs/am3517_crane.h     |    4 ++++
 include/configs/am3517_evm.h       |    4 ++++
 include/configs/cm_t35.h           |    4 ++++
 include/configs/cm_t3517.h         |    4 ++++
 include/configs/dig297.h           |    4 ++++
 include/configs/mcx.h              |    4 ++++
 include/configs/omap3_evm_common.h |    4 ++++
 include/configs/omap3_logic.h      |    4 ++++
 include/configs/omap3_mvblx.h      |    4 ++++
 include/configs/omap3_pandora.h    |    4 ++++
 include/configs/omap3_sdp3430.h    |    4 ++++
 include/configs/tam3517-common.h   |    4 ++++
 include/configs/tao3530.h          |    4 ++++
 include/configs/ti_omap3_common.h  |    5 +++++
 include/configs/tricorder.h        |    4 ++++
 16 files changed, 71 insertions(+), 21 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c
index 6e6a95762b8d..51a1c5816c3e 100644
--- a/arch/arm/cpu/armv7/omap3/board.c
+++ b/arch/arm/cpu/armv7/omap3/board.c
@@ -35,7 +35,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 /* Declarations */
 extern omap3_sysinfo sysinfo;
-static void omap3_setup_aux_cr(void);
 #ifndef CONFIG_SYS_L2CACHE_OFF
 static void omap3_invalidate_l2_cache_secure(void);
 #endif
@@ -244,9 +243,6 @@ void s_init(void)
 
 	try_unlock_memory();
 
-	/* Errata workarounds */
-	omap3_setup_aux_cr();
-
 #ifndef CONFIG_SYS_L2CACHE_OFF
 	/* Invalidate L2-cache from secure mode */
 	omap3_invalidate_l2_cache_secure();
@@ -419,15 +415,9 @@ static void omap3_emu_romcode_call(u32 service_id, u32 *parameters)
 	do_omap3_emu_romcode_call(service_id, OMAP3_PUBLIC_SRAM_SCRATCH_AREA);
 }
 
-static void omap3_update_aux_cr_secure(u32 set_bits, u32 clear_bits)
+void v7_arch_cp15_set_acr(u32 acr, u32 cpu_midr, u32 cpu_rev_comb,
+			  u32 cpu_variant, u32 cpu_rev)
 {
-	u32 acr;
-
-	/* Read ACR */
-	asm volatile ("mrc p15, 0, %0, c1, c0, 1" : "=r" (acr));
-	acr &= ~clear_bits;
-	acr |= set_bits;
-
 	if (get_device_type() == GP_DEVICE) {
 		omap_smc1(OMAP3_GP_ROMCODE_API_WRITE_ACR, acr);
 	} else {
@@ -439,16 +429,15 @@ static void omap3_update_aux_cr_secure(u32 set_bits, u32 clear_bits)
 	}
 }
 
-static void omap3_setup_aux_cr(void)
+static void omap3_update_aux_cr_secure(u32 set_bits, u32 clear_bits)
 {
-	/* Workaround for Cortex-A8 errata: #454179 #430973
-	 *	Set "IBE" bit
-	 *	Set "Disable Branch Size Mispredicts" bit
-	 * Workaround for erratum #621766
-	 *	Enable L1NEON bit
-	 * ACR |= (IBE | DBSM | L1NEON) => ACR |= 0xE0
-	 */
-	omap3_update_aux_cr_secure(0xE0, 0);
+	u32 acr;
+
+	/* Read ACR */
+	asm volatile ("mrc p15, 0, %0, c1, c0, 1" : "=r" (acr));
+	acr &= ~clear_bits;
+	acr |= set_bits;
+	v7_arch_cp15_set_acr(acr, 0, 0, 0, 0);
 }
 
 #ifndef CONFIG_SYS_L2CACHE_OFF
diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
index 87c850e05df1..c3c9169d0555 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -19,6 +19,10 @@
 #define CONFIG_OMAP		1	/* in a TI OMAP core */
 #define CONFIG_OMAP3_AM3517CRANE	1	/* working with CRANEBOARD */
 #define CONFIG_OMAP_COMMON
+/* Common ARM Erratas */
+#define CONFIG_ARM_ERRATA_454179
+#define CONFIG_ARM_ERRATA_430973
+#define CONFIG_ARM_ERRATA_621766
 
 #define CONFIG_EMIF4	/* The chip has EMIF4 controller */
 
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index c4e19e79b95a..31e758d81bdd 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -19,6 +19,10 @@
 #define CONFIG_OMAP		1	/* in a TI OMAP core */
 #define CONFIG_OMAP3_AM3517EVM	1	/* working with AM3517EVM */
 #define CONFIG_OMAP_COMMON
+/* Common ARM Erratas */
+#define CONFIG_ARM_ERRATA_454179
+#define CONFIG_ARM_ERRATA_430973
+#define CONFIG_ARM_ERRATA_621766
 
 #define CONFIG_EMIF4	/* The chip has EMIF4 controller */
 
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index e2d5bbb0955d..3eb7886eb69e 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -26,6 +26,10 @@
 #define CONFIG_CM_T3X	/* working with CM-T35 and CM-T3730 */
 #define CONFIG_OMAP_COMMON
 #define CONFIG_SYS_GENERIC_BOARD
+/* Common ARM Erratas */
+#define CONFIG_ARM_ERRATA_454179
+#define CONFIG_ARM_ERRATA_430973
+#define CONFIG_ARM_ERRATA_621766
 
 #define CONFIG_SDRC	/* The chip has SDRC controller */
 
diff --git a/include/configs/cm_t3517.h b/include/configs/cm_t3517.h
index ee1b7a0cb5a7..8c6313832250 100644
--- a/include/configs/cm_t3517.h
+++ b/include/configs/cm_t3517.h
@@ -17,6 +17,10 @@
 #define CONFIG_CM_T3517	/* working with CM-T3517 */
 #define CONFIG_OMAP_COMMON
 #define CONFIG_SYS_GENERIC_BOARD
+/* Common ARM Erratas */
+#define CONFIG_ARM_ERRATA_454179
+#define CONFIG_ARM_ERRATA_430973
+#define CONFIG_ARM_ERRATA_621766
 
 #define CONFIG_SYS_TEXT_BASE	0x80008000
 
diff --git a/include/configs/dig297.h b/include/configs/dig297.h
index 8791199fc61d..932640112b3a 100644
--- a/include/configs/dig297.h
+++ b/include/configs/dig297.h
@@ -23,6 +23,10 @@
 #define MACH_TYPE_OMAP3_CPS 2751
 #endif
 #define CONFIG_MACH_TYPE MACH_TYPE_OMAP3_CPS
+/* Common ARM Erratas */
+#define CONFIG_ARM_ERRATA_454179
+#define CONFIG_ARM_ERRATA_430973
+#define CONFIG_ARM_ERRATA_621766
 
 /*
  * High Level Configuration Options
diff --git a/include/configs/mcx.h b/include/configs/mcx.h
index 2cf66c40d6fe..3fd31842451d 100644
--- a/include/configs/mcx.h
+++ b/include/configs/mcx.h
@@ -16,6 +16,10 @@
 #define CONFIG_OMAP3_MCX		/* working with mcx */
 #define CONFIG_OMAP_GPIO
 #define CONFIG_OMAP_COMMON
+/* Common ARM Erratas */
+#define CONFIG_ARM_ERRATA_454179
+#define CONFIG_ARM_ERRATA_430973
+#define CONFIG_ARM_ERRATA_621766
 
 #define MACH_TYPE_MCX			3656
 #define CONFIG_MACH_TYPE	MACH_TYPE_MCX
diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h
index e7df15400d37..370f21e3ee6d 100644
--- a/include/configs/omap3_evm_common.h
+++ b/include/configs/omap3_evm_common.h
@@ -15,6 +15,10 @@
 #define CONFIG_OMAP			/* This is TI OMAP core */
 #define CONFIG_OMAP_GPIO
 #define CONFIG_OMAP_COMMON
+/* Common ARM Erratas */
+#define CONFIG_ARM_ERRATA_454179
+#define CONFIG_ARM_ERRATA_430973
+#define CONFIG_ARM_ERRATA_621766
 
 #define CONFIG_SDRC			/* The chip has SDRC controller */
 
diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h
index fcef46735835..13cd35b16a03 100644
--- a/include/configs/omap3_logic.h
+++ b/include/configs/omap3_logic.h
@@ -18,6 +18,10 @@
 #define CONFIG_OMAP3_LOGIC		/* working with Logic OMAP boards */
 #define CONFIG_OMAP_GPIO
 #define CONFIG_OMAP_COMMON
+/* Common ARM Erratas */
+#define CONFIG_ARM_ERRATA_454179
+#define CONFIG_ARM_ERRATA_430973
+#define CONFIG_ARM_ERRATA_621766
 
 #define CONFIG_SYS_TEXT_BASE	0x80400000
 
diff --git a/include/configs/omap3_mvblx.h b/include/configs/omap3_mvblx.h
index 20ec3ad15439..b61297f9ee94 100644
--- a/include/configs/omap3_mvblx.h
+++ b/include/configs/omap3_mvblx.h
@@ -23,6 +23,10 @@
 #define CONFIG_MACH_TYPE	MACH_TYPE_MVBLX
 #define CONFIG_OMAP_GPIO
 #define CONFIG_OMAP_COMMON
+/* Common ARM Erratas */
+#define CONFIG_ARM_ERRATA_454179
+#define CONFIG_ARM_ERRATA_430973
+#define CONFIG_ARM_ERRATA_621766
 
 #define CONFIG_SDRC	/* The chip has SDRC controller */
 
diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h
index b92d67abccf9..11d7b86eb10d 100644
--- a/include/configs/omap3_pandora.h
+++ b/include/configs/omap3_pandora.h
@@ -17,6 +17,10 @@
 #define CONFIG_OMAP3_PANDORA	1	/* working with pandora */
 #define CONFIG_OMAP_GPIO
 #define CONFIG_OMAP_COMMON
+/* Common ARM Erratas */
+#define CONFIG_ARM_ERRATA_454179
+#define CONFIG_ARM_ERRATA_430973
+#define CONFIG_ARM_ERRATA_621766
 
 #define CONFIG_SDRC	/* The chip has SDRC controller */
 
diff --git a/include/configs/omap3_sdp3430.h b/include/configs/omap3_sdp3430.h
index bf5c7a8faf77..1ca79d4ee4dd 100644
--- a/include/configs/omap3_sdp3430.h
+++ b/include/configs/omap3_sdp3430.h
@@ -23,6 +23,10 @@
 #define CONFIG_OMAP		1	/* in a TI OMAP core */
 #define CONFIG_OMAP3_3430SDP	1	/* working with SDP Rev2 */
 #define CONFIG_OMAP_COMMON
+/* Common ARM Erratas */
+#define CONFIG_ARM_ERRATA_454179
+#define CONFIG_ARM_ERRATA_430973
+#define CONFIG_ARM_ERRATA_621766
 
 #define CONFIG_SDRC	/* The chip has SDRC controller */
 
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index dea4044d9fbb..2d12e86566cd 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -17,6 +17,10 @@
 #define CONFIG_OMAP_GPIO
 #define CONFIG_OMAP_COMMON
 #define CONFIG_SYS_GENERIC_BOARD
+/* Common ARM Erratas */
+#define CONFIG_ARM_ERRATA_454179
+#define CONFIG_ARM_ERRATA_430973
+#define CONFIG_ARM_ERRATA_621766
 
 #define CONFIG_SYS_TEXT_BASE 0x80008000
 
diff --git a/include/configs/tao3530.h b/include/configs/tao3530.h
index f3e0088d5a00..49ed79ffbc0b 100644
--- a/include/configs/tao3530.h
+++ b/include/configs/tao3530.h
@@ -21,6 +21,10 @@
 #define CONFIG_OMAP_GPIO
 #define CONFIG_OMAP_COMMON
 #define CONFIG_SYS_GENERIC_BOARD
+/* Common ARM Erratas */
+#define CONFIG_ARM_ERRATA_454179
+#define CONFIG_ARM_ERRATA_430973
+#define CONFIG_ARM_ERRATA_621766
 
 #define MACH_TYPE_OMAP3_TAO3530		2836
 
diff --git a/include/configs/ti_omap3_common.h b/include/configs/ti_omap3_common.h
index 4b4f10410543..429b109afa23 100644
--- a/include/configs/ti_omap3_common.h
+++ b/include/configs/ti_omap3_common.h
@@ -22,6 +22,11 @@
 # define CONFIG_OMAP_SERIAL
 #endif
 
+/* Common ARM Erratas */
+#define CONFIG_ARM_ERRATA_454179
+#define CONFIG_ARM_ERRATA_430973
+#define CONFIG_ARM_ERRATA_621766
+
 /* The chip has SDRC controller */
 #define CONFIG_SDRC
 
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index b105ffd9f18b..7426bde8a0c2 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -19,6 +19,10 @@
 /* High Level Configuration Options */
 #define CONFIG_OMAP			/* in a TI OMAP core */
 #define CONFIG_OMAP_COMMON
+/* Common ARM Erratas */
+#define CONFIG_ARM_ERRATA_454179
+#define CONFIG_ARM_ERRATA_430973
+#define CONFIG_ARM_ERRATA_621766
 
 #define CONFIG_MACH_TYPE		MACH_TYPE_TRICORDER
 /*
-- 
1.7.9.5

  parent reply	other threads:[~2015-03-09 22:12 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09 22:11 [U-Boot] [PATCH V6 00/11] ARM: OMAP3-DRA7: CP15 erratum workarounds and improvements Nishanth Menon
2015-03-09 22:11 ` [U-Boot] [PATCH V6 01/11] ARM: Introduce erratum workaround for 798870 Nishanth Menon
2015-03-11 15:48   ` Tom Rini
2015-03-15 21:50   ` [U-Boot] [U-Boot, V6, " Tom Rini
2015-03-09 22:12 ` [U-Boot] [PATCH V6 02/11] ARM: Introduce erratum workaround for 454179 Nishanth Menon
2015-03-11 15:48   ` Tom Rini
2015-03-15 21:50   ` [U-Boot] [U-Boot, V6, " Tom Rini
2015-03-09 22:12 ` [U-Boot] [PATCH V6 03/11] ARM: Introduce erratum workaround for 430973 Nishanth Menon
2015-03-11 15:48   ` Tom Rini
2015-03-15 21:50   ` [U-Boot] [U-Boot, V6, " Tom Rini
2015-03-09 22:12 ` [U-Boot] [PATCH V6 04/11] ARM: Introduce erratum workaround for 621766 Nishanth Menon
2015-03-11 15:48   ` Tom Rini
2015-03-15 21:50   ` [U-Boot] [U-Boot, V6, " Tom Rini
2015-03-09 22:12 ` [U-Boot] [PATCH V6 05/11] ARM: OMAP: Change set_pl310_ctrl_reg to be generic Nishanth Menon
2015-03-11 15:48   ` Tom Rini
2015-03-15 21:51   ` [U-Boot] [U-Boot, V6, " Tom Rini
2015-03-09 22:12 ` [U-Boot] [PATCH V6 06/11] ARM: OMAP3: Rename omap3.h to omap.h to be generic as all SoCs Nishanth Menon
2015-03-11 15:48   ` Tom Rini
2015-03-15 21:51   ` [U-Boot] [U-Boot, V6, " Tom Rini
2015-03-09 22:12 ` [U-Boot] [PATCH V6 07/11] ARM: OMAP3: Get rid of omap3_gp_romcode_call and replace with omap_smc1 Nishanth Menon
2015-03-11 15:48   ` Tom Rini
2015-03-11 15:53     ` Nishanth Menon
2015-03-11 16:00       ` Tom Rini
2015-03-11 16:04         ` Nishanth Menon
2015-03-11 20:26           ` Paul Kocialkowski
2015-03-11 21:16             ` Tom Rini
2015-03-11 21:33               ` Paul Kocialkowski
2015-03-15 21:51   ` [U-Boot] [U-Boot, V6, " Tom Rini
2015-03-09 22:12 ` [U-Boot] [PATCH V6 08/11] ARM: DRA7 / OMAP5: Add workaround for ARM errata 798870 Nishanth Menon
2015-03-11 15:48   ` Tom Rini
2015-03-15 21:51   ` [U-Boot] [U-Boot, V6, " Tom Rini
2015-03-09 22:12 ` [U-Boot] [PATCH V6 09/11] ARM: OMAP5 / DRA7: Setup L2 Aux Control Register with recommended configuration Nishanth Menon
2015-03-11 15:49   ` Tom Rini
2015-03-15 21:51   ` [U-Boot] [U-Boot, V6, " Tom Rini
2015-03-09 22:12 ` Nishanth Menon [this message]
2015-03-11 15:51   ` [U-Boot] [PATCH V6 10/11] ARM: OMAP3: Enable workaround for ARM errata 454179, 430973, 621766 Tom Rini
2015-03-15 21:51   ` [U-Boot] [U-Boot, V6, " Tom Rini
2015-03-09 22:12 ` [U-Boot] [PATCH V6 11/11] ARM: OMAP3: rx51: " Nishanth Menon
2015-03-11 15:51   ` Tom Rini
2015-03-15 21:51   ` [U-Boot] [U-Boot, V6, " Tom Rini
2015-03-11 15:48 ` [U-Boot] [PATCH V6 00/11] ARM: OMAP3-DRA7: CP15 erratum workarounds and improvements Tom Rini
2015-03-11 15:51   ` Nishanth Menon
2015-03-11 16:00     ` Tom Rini
2015-03-12  0:26       ` Matt Porter

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=1425939129-308-11-git-send-email-nm@ti.com \
    --to=nm@ti.com \
    --cc=u-boot@lists.denx.de \
    /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