aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv/cpu/c9xx/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/cpu/c9xx/cpu.c')
-rw-r--r--arch/riscv/cpu/c9xx/cpu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/riscv/cpu/c9xx/cpu.c b/arch/riscv/cpu/c9xx/cpu.c
index a7f9b3ea..ba370cfb 100644
--- a/arch/riscv/cpu/c9xx/cpu.c
+++ b/arch/riscv/cpu/c9xx/cpu.c
@@ -122,6 +122,7 @@ void invalid_dcache_range(unsigned long start, unsigned long end)
void icache_enable(void)
{
+#ifdef CONFIG_SPL_BUILD
#ifdef CONFIG_SPL_RISCV_MMODE
#ifdef CONFIG_TARGET_LIGHT_C910
asm volatile (
@@ -131,10 +132,12 @@ void icache_enable(void)
);
#endif
#endif
+#endif
}
void dcache_enable(void)
{
+#ifdef CONFIG_SPL_BUILD
#ifdef CONFIG_SPL_RISCV_MMODE
#ifdef CONFIG_TARGET_LIGHT_C910
asm volatile (
@@ -143,4 +146,5 @@ void dcache_enable(void)
);
#endif
#endif
+#endif
}