If CONFIG_SYS_ICACHE_OFF and CONFIG_SYS_DCACHE_OFF are set, we see the
following errors while compiling u-boot:
arch/arm/cpu/armv8/cpu.c:60: undefined reference to `icache_disable'
aarch64-linux-gnu-ld.bfd: arch/arm/cpu/armv8/cpu.c:68: undefined reference to
`dcache_disable'
aarch64-linux-gnu-ld.bfd: arch/arm/cpu/armv8/cpu.c:69: undefined reference to
`invalidate_dcache_all'
aarch64-linux-gnu-ld.bfd: arch/arm/cpu/armv8/exception_level.o: in function
`entry_non_secure':
arch/arm/cpu/armv8/exception_level.c:29: undefined reference to
`dcache_enable'
aarch64-linux-gnu-ld.bfd: arch/arm/cpu/armv8/exception_level.o: in function
`switch_to_non_secure_mode':
arch/arm/cpu/armv8/exception_level.c:52: undefined reference to
`dcache_disable'
aarch64-linux-gnu-ld.bfd: arch/arm/lib/relocate_64.o: in function
`relocate_done':
arch/arm/lib/relocate_64.S:92: undefined reference to
`__asm_flush_dcache_range'
aarch64-linux-gnu-ld.bfd: arch/arm/lib/relocate_64.S:93: undefined reference
to `__asm_flush_l3_dcache'
aarch64-linux-gnu-ld.bfd: arch/arm/lib/bootm.o: in function
`do_nonsec_virt_switch':
arch/arm/lib/bootm.c:191: undefined reference to `dcache_disable'
aarch64-linux-gnu-ld.bfd: boot/bootm_os.o: in function `do_bootm_qnxelf':
boot/bootm_os.c:392: undefined reference to `dcache_status'
aarch64-linux-gnu-ld.bfd: boot/bootm_os.c:394: undefined reference to
`dcache_disable'
aarch64-linux-gnu-ld.bfd: boot/bootm_os.c:399: undefined reference to
`dcache_enable'
aarch64-linux-gnu-ld.bfd: cmd/elf.o: in function `do_bootvx':
cmd/elf.c:280: undefined reference to `dcache_disable'
While the following error message is expected when SYS_DCACHE_OFF is
set:
arch/arm/cpu/armv8/cache_v8.c:697:2: error:
#error Please describe your MMU layout in CONFIG_SYS_MEM_MAP and enable
dcache.
the rest of the compilation errors should be fixed.
Cc: Tom Rini <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Peng Fan <[email protected]>
Signed-off-by: Bhupesh Sharma <[email protected]>
---
arch/arm/cpu/armv8/Makefile | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile
index bba4f570db..6168032ffb 100644
--- a/arch/arm/cpu/armv8/Makefile
+++ b/arch/arm/cpu/armv8/Makefile
@@ -5,14 +5,12 @@
extra-y := start.o
+obj-y += cache_v8.o
+obj-y += cache.o
obj-y += cpu.o
ifndef CONFIG_$(SPL_TPL_)TIMER
obj-$(CONFIG_SYS_ARCH_TIMER) += generic_timer.o
endif
-ifndef CONFIG_$(SPL_)SYS_DCACHE_OFF
-obj-y += cache_v8.o
-obj-y += cache.o
-endif
ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_ARMV8_SPL_EXCEPTION_VECTORS) += exceptions.o
else
--
2.38.1