spl: Allow ATF to work when dcache is disabled
The dcache may not be enabled in SPL. Add a check to avoid trying to
use an undefined function.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c
index 3bdd013..9afe645 100644
--- a/common/spl/spl_atf.c
+++ b/common/spl/spl_atf.c
@@ -204,7 +204,8 @@
fdt_addr);
raw_write_daif(SPSR_EXCEPTION_MASK);
- dcache_disable();
+ if (!CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
+ dcache_disable();
atf_entry(bl31_params, (void *)fdt_addr);
}