]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spl: Allow ATF to work when dcache is disabled
authorSimon Glass <sjg@chromium.org>
Thu, 27 Jun 2024 08:29:47 +0000 (09:29 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 28 Jun 2024 19:54:52 +0000 (13:54 -0600)
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>
common/spl/spl_atf.c

index 3bdd013a35fe138e43cf4d2bf8bfd27f6ceb0c87..9afe6456bc4709dab664f4a2a749ff951ead10b4 100644 (file)
@@ -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);
 }