ARM: cache: Allow SPL to build cache-pl310.c
Introduce the new Kconfig symbol CONFIG_SPL_SYS_L2_PL310 to allow the
SPL to build cache-pl310.c.
Before this commit, the SPL could enable the PL310 L2 cache [1], but the
cache maintenance functions from cache-pl310.c were only useable for
non-SPL builds.
After enabling the cache one must be able to flush it, too. Thus this
commit allows cache-pl310.c to be included in the SPL build.
[1] See for example arch/arm/mach-imx/cache.c: v7_outer_cache_enable()
Signed-off-by: Philip Oberfichtner <pro@denx.de>
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 456a7fa..d6c5658 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -493,6 +493,11 @@
help
Enable support for ARM PL310 L2 cache controller in U-Boot
+config SPL_SYS_L2_PL310
+ bool "ARM PL310 L2 cache controller in SPL"
+ help
+ Enable support for ARM PL310 L2 cache controller in SPL
+
config SYS_L2CACHE_OFF
bool "L2cache off"
help