arm: stm32mp: correct the ALIGN macro usage
Subsystems (3)
PATCH 1/1 arm: stm32mp: correct the ALIGN macro usage
Correct the ALIGN macro usage in mmu_set_region_dcache_behaviour
call: the address must use ALIGN_DOWN and size can use ALIGN macro.
With STM32_SYSRAM_BASE=0x2FFC0000 and MMU_SECTION_SIZE=0x100000 for STM32MP15x the computed address was 30000000 instead of 2ff00000.
---
arch/arm/mach-stm32mp/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-stm32mp/cpu.c +2 -2
@@ -226,8 +226,8 @@ static void early_enable_caches(void)if (IS_ENABLED (CONFIG_SPL_BUILD ))mmu_set_region_dcache_behaviour ( -ALIGN (STM32_SYSRAM_BASE ,MMU_SECTION_SIZE ), -round_up (STM32_SYSRAM_SIZE ,MMU_SECTION_SIZE ), +ALIGN_DOWN (STM32_SYSRAM_BASE ,MMU_SECTION_SIZE ), +ALIGN (STM32_SYSRAM_SIZE ,MMU_SECTION_SIZE ),DCACHE_DEFAULT_OPTION );else mmu_set_region_dcache_behaviour(STM32_DDR_BASE,
Signature · 1 line
2.17.1
PATCH 1/1 arm: stm32mp: correct the ALIGN macro usage
Hi,
Quoted 10 lines
From: Patrick DELAUNAY <[email protected]>
Sent: mercredi 4 novembre 2020 09:22Correct the ALIGN macro usage in
mmu_set_region_dcache_behaviour
call: the address must useALIGN_DOWNand size can use ALIGN macro.With STM32_SYSRAM_BASE=0x2FFC0000 and MMU_SECTION_SIZE=0x100000 for STM32MP15x the computed address was 30000000 instead of
2ff00000.
Quoted 7 lines
Fixes 43fe9d2fda24 ("stm32mp1: mmu_set_region_dcache_behaviour")Signed-off-by Patrick Delaunay <[email protected]>---
arch/arm/mach-stm32mp/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to u-boot-stm/master, thanks!
Thanks
Patrick