* [PATCH] arm: stm32mp: correct the ALIGN macro usage
@ 2020-11-04 8:22 Patrick Delaunay
2020-11-25 9:35 ` Patrick DELAUNAY
0 siblings, 1 reply; 2+ messages in thread
From: Patrick Delaunay @ 2020-11-04 8:22 UTC (permalink / raw)
To: u-boot
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.
Fixes: 43fe9d2fda24 ("stm32mp1: mmu_set_region_dcache_behaviour")
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
arch/arm/mach-stm32mp/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index 6785ab6b58..1520c6eaed 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -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,
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] arm: stm32mp: correct the ALIGN macro usage
2020-11-04 8:22 [PATCH] arm: stm32mp: correct the ALIGN macro usage Patrick Delaunay
@ 2020-11-25 9:35 ` Patrick DELAUNAY
0 siblings, 0 replies; 2+ messages in thread
From: Patrick DELAUNAY @ 2020-11-25 9:35 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: mercredi 4 novembre 2020 09:22
>
> 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.
>
> Fixes: 43fe9d2fda24 ("stm32mp1: mmu_set_region_dcache_behaviour")
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> arch/arm/mach-stm32mp/cpu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Applied to u-boot-stm/master, thanks!
Thanks
Patrick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-25 9:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-04 8:22 [PATCH] arm: stm32mp: correct the ALIGN macro usage Patrick Delaunay
2020-11-25 9:35 ` Patrick DELAUNAY
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.