ARM: cache: Allow SPL to build cache-pl310.c
authorPhilip Oberfichtner <pro@denx.de>
Wed, 17 Aug 2022 13:07:13 +0000 (15:07 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 1 Sep 2022 21:18:42 +0000 (17:18 -0400)
commitb6664eace8a26f0850ffa0a3e349ca2ffa960f2a
treed46c74ac77aaec0ad1076a71122039f3a8bc62ad
parent111688839ab4bc35fbc2a92c5696a0d246838da6
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>
arch/arm/Kconfig
arch/arm/lib/Makefile