diff options
author | Simon Glass <sjg@chromium.org> | 2024-06-27 09:29:47 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-06-28 13:54:52 -0600 |
commit | 024767e66dbe18971e4439b804de96f85462b3e4 (patch) | |
tree | 297b19bb6ff1c7ecfa9f3f8b4f387b6e66eddddd /common/spl | |
parent | ac91baea6d8292295aeb63c40ec4261d7c47217e (diff) | |
download | u-boot-024767e66dbe18971e4439b804de96f85462b3e4.zip u-boot-024767e66dbe18971e4439b804de96f85462b3e4.tar.gz u-boot-024767e66dbe18971e4439b804de96f85462b3e4.tar.bz2 |
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>
Diffstat (limited to 'common/spl')
-rw-r--r-- | common/spl/spl_atf.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ static void __noreturn bl31_entry(uintptr_t bl31_entry, uintptr_t bl32_entry, 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); } |