Message ID | 20231027144304.1002307-2-patrice.chotard@foss.st.com |
---|---|
State | Accepted |
Commit | 2f9886c66864ffc52f6a7ab5be9be97fec47ef1d |
Delegated to: | Patrick Delaunay |
Headers | show |
Series | Add STM32MP2 SoCs and STM32MP257F-EV board support | expand |
Hi, On 10/27/23 16:42, Patrice Chotard wrote: > This fixes the following compilation error in ARM64: > arch/arm/mach-stm32mp/dram_init.c: In function ‘board_get_usable_ram_top’: > arch/arm/mach-stm32mp/dram_init.c:59:45: error: ‘DCACHE_DEFAULT_OPTION’ undeclared (first use in this function) > 59 | mmu_set_region_dcache_behaviour(reg, size, DCACHE_DEFAULT_OPTION); > | ^~~~~~~~~~~~~~~~~~~~~ > > Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> > --- > > arch/arm/include/asm/system.h | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h > index 0eae857e73a..43f7503571d 100644 > --- a/arch/arm/include/asm/system.h > +++ b/arch/arm/include/asm/system.h > @@ -513,14 +513,6 @@ enum dcache_option { > }; > #endif > > -#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH) > -#define DCACHE_DEFAULT_OPTION DCACHE_WRITETHROUGH > -#elif defined(CONFIG_SYS_ARM_CACHE_WRITEALLOC) > -#define DCACHE_DEFAULT_OPTION DCACHE_WRITEALLOC > -#elif defined(CONFIG_SYS_ARM_CACHE_WRITEBACK) > -#define DCACHE_DEFAULT_OPTION DCACHE_WRITEBACK > -#endif > - > /* Size of an MMU section */ > enum { > #ifdef CONFIG_ARMV7_LPAE > @@ -578,6 +570,14 @@ void psci_system_reset(void); > > #endif /* CONFIG_ARM64 */ > > +#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH) > +#define DCACHE_DEFAULT_OPTION DCACHE_WRITETHROUGH > +#elif defined(CONFIG_SYS_ARM_CACHE_WRITEALLOC) > +#define DCACHE_DEFAULT_OPTION DCACHE_WRITEALLOC > +#elif defined(CONFIG_SYS_ARM_CACHE_WRITEBACK) > +#define DCACHE_DEFAULT_OPTION DCACHE_WRITEBACK > +#endif > + > #ifndef __ASSEMBLY__ > /** > * save_boot_params() - Save boot parameters before starting reset sequence Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Thanks Patrick
On 11/9/23 10:11, Patrick DELAUNAY wrote: > Hi, > > On 10/27/23 16:42, Patrice Chotard wrote: >> This fixes the following compilation error in ARM64: >> arch/arm/mach-stm32mp/dram_init.c: In function ‘board_get_usable_ram_top’: >> arch/arm/mach-stm32mp/dram_init.c:59:45: error: ‘DCACHE_DEFAULT_OPTION’ undeclared (first use in this function) >> 59 | mmu_set_region_dcache_behaviour(reg, size, DCACHE_DEFAULT_OPTION); >> | ^~~~~~~~~~~~~~~~~~~~~ >> >> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> >> --- >> >> arch/arm/include/asm/system.h | 16 ++++++++-------- >> 1 file changed, 8 insertions(+), 8 deletions(-) >> >> diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h >> index 0eae857e73a..43f7503571d 100644 >> --- a/arch/arm/include/asm/system.h >> +++ b/arch/arm/include/asm/system.h >> @@ -513,14 +513,6 @@ enum dcache_option { >> }; >> #endif >> -#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH) >> -#define DCACHE_DEFAULT_OPTION DCACHE_WRITETHROUGH >> -#elif defined(CONFIG_SYS_ARM_CACHE_WRITEALLOC) >> -#define DCACHE_DEFAULT_OPTION DCACHE_WRITEALLOC >> -#elif defined(CONFIG_SYS_ARM_CACHE_WRITEBACK) >> -#define DCACHE_DEFAULT_OPTION DCACHE_WRITEBACK >> -#endif >> - >> /* Size of an MMU section */ >> enum { >> #ifdef CONFIG_ARMV7_LPAE >> @@ -578,6 +570,14 @@ void psci_system_reset(void); >> #endif /* CONFIG_ARM64 */ >> +#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH) >> +#define DCACHE_DEFAULT_OPTION DCACHE_WRITETHROUGH >> +#elif defined(CONFIG_SYS_ARM_CACHE_WRITEALLOC) >> +#define DCACHE_DEFAULT_OPTION DCACHE_WRITEALLOC >> +#elif defined(CONFIG_SYS_ARM_CACHE_WRITEBACK) >> +#define DCACHE_DEFAULT_OPTION DCACHE_WRITEBACK >> +#endif >> + >> #ifndef __ASSEMBLY__ >> /** >> * save_boot_params() - Save boot parameters before starting reset sequence > > > > Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> > > Thanks > Patrick > > Applied to u-boot-stm32/next Thanks Patrice
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 0eae857e73a..43f7503571d 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -513,14 +513,6 @@ enum dcache_option { }; #endif -#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH) -#define DCACHE_DEFAULT_OPTION DCACHE_WRITETHROUGH -#elif defined(CONFIG_SYS_ARM_CACHE_WRITEALLOC) -#define DCACHE_DEFAULT_OPTION DCACHE_WRITEALLOC -#elif defined(CONFIG_SYS_ARM_CACHE_WRITEBACK) -#define DCACHE_DEFAULT_OPTION DCACHE_WRITEBACK -#endif - /* Size of an MMU section */ enum { #ifdef CONFIG_ARMV7_LPAE @@ -578,6 +570,14 @@ void psci_system_reset(void); #endif /* CONFIG_ARM64 */ +#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH) +#define DCACHE_DEFAULT_OPTION DCACHE_WRITETHROUGH +#elif defined(CONFIG_SYS_ARM_CACHE_WRITEALLOC) +#define DCACHE_DEFAULT_OPTION DCACHE_WRITEALLOC +#elif defined(CONFIG_SYS_ARM_CACHE_WRITEBACK) +#define DCACHE_DEFAULT_OPTION DCACHE_WRITEBACK +#endif + #ifndef __ASSEMBLY__ /** * save_boot_params() - Save boot parameters before starting reset sequence
This fixes the following compilation error in ARM64: arch/arm/mach-stm32mp/dram_init.c: In function ‘board_get_usable_ram_top’: arch/arm/mach-stm32mp/dram_init.c:59:45: error: ‘DCACHE_DEFAULT_OPTION’ undeclared (first use in this function) 59 | mmu_set_region_dcache_behaviour(reg, size, DCACHE_DEFAULT_OPTION); | ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> --- arch/arm/include/asm/system.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)