ARM: Migrate errata to Kconfig
This moves all of the current ARM errata from various header files and in to
Kconfig. This allows for a minor amount of cleanup as we had some instances
where both a general common header file was enabling errata as well as the
board config. We now just select these once at the higher level in Kconfig
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 7022e2a..0a05662 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -19,6 +19,72 @@
config HAS_THUMB2
bool
+# If set, the workarounds for these ARM errata are applied early during U-Boot
+# startup. Note that in general these options force the workarounds to be
+# applied; no CPU-type/version detection exists, unlike the similar options in
+# the Linux kernel. Do not set these options unless they apply! Also note that
+# the following can be machine specific errata. These do have ability to
+# provide rudimentary version and machine specific checks, but expect no
+# product checks:
+# CONFIG_ARM_ERRATA_430973
+# CONFIG_ARM_ERRATA_454179
+# CONFIG_ARM_ERRATA_621766
+# CONFIG_ARM_ERRATA_798870
+# CONFIG_ARM_ERRATA_801819
+config ARM_ERRATA_430973
+ bool
+
+config ARM_ERRATA_454179
+ bool
+
+config ARM_ERRATA_621766
+ bool
+
+config ARM_ERRATA_716044
+ bool
+
+config ARM_ERRATA_742230
+ bool
+
+config ARM_ERRATA_743622
+ bool
+
+config ARM_ERRATA_751472
+ bool
+
+config ARM_ERRATA_761320
+ bool
+
+config ARM_ERRATA_773022
+ bool
+
+config ARM_ERRATA_774769
+ bool
+
+config ARM_ERRATA_794072
+ bool
+
+config ARM_ERRATA_798870
+ bool
+
+config ARM_ERRATA_801819
+ bool
+
+config ARM_ERRATA_826974
+ bool
+
+config ARM_ERRATA_828024
+ bool
+
+config ARM_ERRATA_829520
+ bool
+
+config ARM_ERRATA_833069
+ bool
+
+config ARM_ERRATA_833471
+ bool
+
config CPU_ARM720T
bool
select SYS_CACHE_SHIFT_5
@@ -569,6 +635,9 @@
config OMAP34XX
bool "OMAP34XX SoC"
select ARCH_OMAP2
+ select ARM_ERRATA_430973
+ select ARM_ERRATA_454179
+ select ARM_ERRATA_621766
select USE_TINY_PRINTF
imply SPL_EXT_SUPPORT
imply SPL_FAT_SUPPORT
@@ -602,6 +671,7 @@
config OMAP54XX
bool "OMAP54XX SoC"
select ARCH_OMAP2
+ select ARM_ERRATA_798870
imply SPL_DISPLAY_PRINT
imply SPL_ENV_SUPPORT
imply SPL_EXT_SUPPORT
diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig
index 19cc1f6..744d67a 100644
--- a/arch/arm/cpu/armv7/mx6/Kconfig
+++ b/arch/arm/cpu/armv7/mx6/Kconfig
@@ -3,6 +3,10 @@
config MX6
bool
default y
+ select ARM_ERRATA_743622 if !MX6UL
+ select ARM_ERRATA_751472 if !MX6UL
+ select ARM_ERRATA_761320 if !MX6UL
+ select ARM_ERRATA_794072 if !MX6UL
config MX6D
bool
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
index adccdf1..b5609ff 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
@@ -49,6 +49,10 @@
config ARCH_LS2080A
bool
select ARMV8_SET_SMPEN
+ select ARM_ERRATA_826974
+ select ARM_ERRATA_828024
+ select ARM_ERRATA_829520
+ select ARM_ERRATA_833471
select FSL_LSCH3
select SYS_FSL_DDR
select SYS_FSL_DDR_LE
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/config.h b/arch/arm/include/asm/arch-fsl-layerscape/config.h
index 83f5501..586ce17 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/config.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/config.h
@@ -114,12 +114,6 @@
#define CONFIG_SYS_FSL_ERRATUM_A008751
-/* ARM A57 CORE ERRATA */
-#define CONFIG_ARM_ERRATA_826974
-#define CONFIG_ARM_ERRATA_828024
-#define CONFIG_ARM_ERRATA_829520
-#define CONFIG_ARM_ERRATA_833471
-
#define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
#elif defined(CONFIG_FSL_LSCH2)
#define CONFIG_SYS_FSL_OCRAM_BASE 0x10000000 /* initial RAM */
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 9bd8ba5..46981a5 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -82,6 +82,8 @@
config TARGET_ARNDALE
bool "Exynos5250 Arndale board"
+ select ARM_ERRATA_773022
+ select ARM_ERRATA_774769
select CPU_V7_HAS_NONSEC
select CPU_V7_HAS_VIRT
select SUPPORT_SPL
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index c9f2380..c67ffa5 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -65,10 +65,15 @@
config TEGRA20
bool "Tegra20 family"
+ select ARM_ERRATA_716044
+ select ARM_ERRATA_742230
+ select ARM_ERRATA_751472
select TEGRA_ARMV7_COMMON
config TEGRA30
bool "Tegra30 family"
+ select ARM_ERRATA_743622
+ select ARM_ERRATA_751472
select TEGRA_ARMV7_COMMON
config TEGRA114