From 65168910adaae3a4ac91fd5acf30941a28facc0e Mon Sep 17 00:00:00 2001 From: Ashok Reddy Soma Date: Thu, 7 Jul 2022 10:45:37 +0200 Subject: zynqmp: Run board_get_usable_ram_top() only on main U-Boot With commit ce39ee28ec31 ("zynqmp: Do not place u-boot to reserved memory location"), the function board_get_usable_ram_top() is allocating MMU_SECTION_SIZE of about 2MB using lmb_alloc(). But we dont have this much memory in case of mini U-Boot. Keep these functions which use lmb under CONFIG_LMB so that they are compiled and used only when LMB is enabled. Signed-off-by: Ashok Reddy Soma Signed-off-by: Michal Simek Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/75e52def75f573e554a6b177a78504c128cb0c4a.1657183534.git.michal.simek@amd.com --- arch/m68k/lib/bootm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'arch/m68k') diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c index 27729db67e..9cade92954 100644 --- a/arch/m68k/lib/bootm.c +++ b/arch/m68k/lib/bootm.c @@ -60,9 +60,11 @@ int do_bootm_linux(int flag, int argc, char *const argv[], } set_clocks_in_mhz(kbd); - ret = image_setup_linux(images); - if (ret) - goto error; + if (CONFIG_IS_ENABLED(LMB)) { + ret = image_setup_linux(images); + if (ret) + goto error; + } kernel = (void (*)(struct bd_info *, ulong, ulong, ulong, ulong))images->ep; -- cgit v1.2.3