summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSughosh Ganu <[email protected]>2024-08-26 17:29:37 +0530
committerTom Rini <[email protected]>2024-09-03 14:08:50 -0600
commitcef34baad10c27cb089c4ab2c61689513467ab82 (patch)
tree6e6d9c738f9d484d631bbd5c1bcc13c3db63e5e5
parent727c4348d3d07d6732bf3e6e60565776444e1cc9 (diff)
zynq: lmb: do not add to lmb map before relocation
The LMB memory is typically not needed very early in the platform's boot. Do not add memory to the LMB map before relocation. Reservation of common areas and adding of memory is done after relocation. Signed-off-by: Sughosh Ganu <[email protected]>
-rw-r--r--board/xilinx/common/board.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index f04c92a70fc..3440402ab46 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -12,7 +12,6 @@
#include <image.h>
#include <init.h>
#include <jffs2/load_kernel.h>
-#include <lmb.h>
#include <log.h>
#include <asm/global_data.h>
#include <asm/sections.h>
@@ -665,36 +664,6 @@ int embedded_dtb_select(void)
}
#endif
-#if IS_ENABLED(CONFIG_LMB)
-
-#ifndef MMU_SECTION_SIZE
-#define MMU_SECTION_SIZE (1 * 1024 * 1024)
-#endif
-
-phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
-{
- phys_size_t size;
- phys_addr_t reg;
-
- if (!total_size)
- return gd->ram_top;
-
- if (!IS_ALIGNED((ulong)gd->fdt_blob, 0x8))
- panic("Not 64bit aligned DT location: %p\n", gd->fdt_blob);
-
- /* found enough not-reserved memory to relocated U-Boot */
- lmb_add(gd->ram_base, gd->ram_size);
- boot_fdt_add_mem_rsv_regions((void *)gd->fdt_blob);
- size = ALIGN(CONFIG_SYS_MALLOC_LEN + total_size, MMU_SECTION_SIZE);
- reg = lmb_alloc(size, MMU_SECTION_SIZE);
-
- if (!reg)
- reg = gd->ram_top - size;
-
- return reg + size;
-}
-#endif
-
#ifdef CONFIG_OF_BOARD_SETUP
#define MAX_RAND_SIZE 8
int ft_board_setup(void *blob, struct bd_info *bd)