summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp/dram_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-stm32mp/dram_init.c')
-rw-r--r--arch/arm/mach-stm32mp/dram_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-stm32mp/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c
index b06105768b3..34b958d7afd 100644
--- a/arch/arm/mach-stm32mp/dram_init.c
+++ b/arch/arm/mach-stm32mp/dram_init.c
@@ -81,7 +81,7 @@ phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
/* add 8M for U-Boot reserved memory: display, fdt, gd,... */
size = ALIGN(SZ_8M + CONFIG_SYS_MALLOC_LEN + total_size, MMU_SECTION_SIZE);
- reg = gd->ram_top - size;
+ reg = ALIGN(gd->ram_top - size, MMU_SECTION_SIZE);
/* Reserved memory for OP-TEE at END of DDR for STM32MP1 SoC */
if (IS_ENABLED(CONFIG_STM32MP13X) || IS_ENABLED(CONFIG_STM32MP15X)) {