[PATCH 32/40] stm32mp: do not add lmb memory before relocation
Sughosh Ganu
sughosh.ganu at linaro.org
Wed Jul 24 08:02:16 CEST 2024
The LMB memory map is now being handled through data structures which
need heap memory to be operational. Moreover, the LMB memory map is
initialised as part of the board boot after relocation as part of
platform agnostic code. Remove addition of LMB memory before
relocation for the stm32mp platforms.
Signed-off-by: Sughosh Ganu <sughosh.ganu at linaro.org>
---
Changes since rfc: New patch
arch/arm/mach-stm32mp/dram_init.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-stm32mp/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c
index 97d894d05f..32f2a95ed8 100644
--- a/arch/arm/mach-stm32mp/dram_init.c
+++ b/arch/arm/mach-stm32mp/dram_init.c
@@ -57,15 +57,8 @@ phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
*/
gd->ram_top = clamp_val(gd->ram_top, 0, SZ_4G - 1);
- /* found enough not-reserved memory to relocated U-Boot */
- lmb_add(gd->ram_base, gd->ram_top - gd->ram_base, LMB_NONE);
- boot_fdt_add_mem_rsv_regions((void *)gd->fdt_blob);
- /* add 8M for reserved memory for display, fdt, gd,... */
- size = ALIGN(SZ_8M + CONFIG_SYS_MALLOC_LEN + total_size, MMU_SECTION_SIZE),
- reg = lmb_alloc(size, MMU_SECTION_SIZE, LMB_NONE);
-
- if (!reg)
- reg = gd->ram_top - size;
+ size = ALIGN(SZ_8M + CONFIG_SYS_MALLOC_LEN + total_size, MMU_SECTION_SIZE);
+ reg = gd->ram_top - size;
/* before relocation, mark the U-Boot memory as cacheable by default */
if (!(gd->flags & GD_FLG_RELOC))
--
2.34.1
More information about the U-Boot
mailing list