diff options
author | Patrice Chotard <patrice.chotard@st.com> | 2021-02-24 13:53:27 +0100 |
---|---|---|
committer | Patrice Chotard <patrice.chotard@foss.st.com> | 2021-03-12 10:58:55 +0100 |
commit | 23e20b2fa61029d9767a84bb76b786775779da8b (patch) | |
tree | ceabfec093c99f5dc2a22fd6388144c8b9733c0b /arch | |
parent | 729fa17f065ff0cb652bee55b08d8d83b594ff3e (diff) | |
download | u-boot-23e20b2fa61029d9767a84bb76b786775779da8b.tar.gz u-boot-23e20b2fa61029d9767a84bb76b786775779da8b.tar.xz u-boot-23e20b2fa61029d9767a84bb76b786775779da8b.zip |
arm: stm32mp: Fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled
Fix following compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS
are enabled :
arch/arm/mach-stm32mp/cpu.c: In function ‘early_enable_caches’:
arch/arm/mach-stm32mp/cpu.c:223:10: error: ‘volatile struct arch_global_data’ has no member named ‘tlb_size’
223 | gd->arch.tlb_size = PGTABLE_SIZE;
| ^
arch/arm/mach-stm32mp/cpu.c:224:10: error: ‘volatile struct arch_global_data’ has no member named ‘tlb_addr’
224 | gd->arch.tlb_addr = (unsigned long)&early_tlb;
| ^
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-stm32mp/cpu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c index 9a76b5633b..bc2db535be 100644 --- a/arch/arm/mach-stm32mp/cpu.c +++ b/arch/arm/mach-stm32mp/cpu.c @@ -223,8 +223,10 @@ static void early_enable_caches(void) if (CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) return; - gd->arch.tlb_size = PGTABLE_SIZE; - gd->arch.tlb_addr = (unsigned long)&early_tlb; + 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; + } dcache_enable(); |