]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: stm32mp: Really fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS...
authorBhupesh Sharma <bhupesh.sharma@linaro.org>
Tue, 22 Aug 2023 07:51:11 +0000 (13:21 +0530)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Fri, 10 Nov 2023 12:12:20 +0000 (13:12 +0100)
While 23e20b2fa6 ("arm: stm32mp: Fix compilation issue when
SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled") tried fixing
this issue, fix it really by adding #if checks for SYS_ICACHE_OFF
and SYS_DCACHE_OFF.

Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
arch/arm/mach-stm32mp/cpu.c

index e07abbe21c1acf63ea25157697abda997fe19291..bab318875cb41060b30544e8aadfc629d1a80c18 100644 (file)
@@ -91,10 +91,10 @@ static void early_enable_caches(void)
        if (CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
                return;
 
-       if (!(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))) {
+#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
                gd->arch.tlb_size = PGTABLE_SIZE;
                gd->arch.tlb_addr = (unsigned long)&early_tlb;
-       }
+#endif
 
        /* enable MMU (default configuration) */
        dcache_enable();