sunxi: fix SUNIV build when enabling D-Cache
authorIcenowy Zheng <uwu@icenowy.me>
Thu, 13 Oct 2022 13:26:44 +0000 (21:26 +0800)
committerAndre Przywara <andre.przywara@arm.com>
Wed, 19 Oct 2022 13:15:02 +0000 (14:15 +0100)
The enable_caches function in architecture-specific board code is only
necessary for V7A CPUs, code for both V8A and ARM926 have already
declared this function.

Only provide our implementation of enable_caches() for V7A CPUs.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
arch/arm/mach-sunxi/board.c

index 62bb40b..60ccf90 100644 (file)
@@ -488,7 +488,7 @@ void reset_cpu(void)
 }
 #endif
 
-#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && !defined(CONFIG_ARM64)
+#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && defined(CONFIG_CPU_V7A)
 void enable_caches(void)
 {
        /* Enable D-cache. I-cache is already enabled in start.S */