diff options
author | Ashok Reddy Soma | 2022-07-07 10:45:37 +0200 |
---|---|---|
committer | Michal Simek | 2022-07-26 08:23:54 +0200 |
commit | 65168910adaae3a4ac91fd5acf30941a28facc0e (patch) | |
tree | f358cb9e735ce8793b4c612fd605d1b84bfd1556 /boot/image-board.c | |
parent | 7c1860fce4e369bdcabc1f574feb6b9af19999a3 (diff) |
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 <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/75e52def75f573e554a6b177a78504c128cb0c4a.1657183534.git.michal.simek@amd.com
Diffstat (limited to 'boot/image-board.c')
-rw-r--r-- | boot/image-board.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/boot/image-board.c b/boot/image-board.c index cfc1c658e3a..03c866b5fa8 100644 --- a/boot/image-board.c +++ b/boot/image-board.c @@ -537,6 +537,7 @@ int boot_get_ramdisk(int argc, char *const argv[], bootm_headers_t *images, return 0; } +#if defined(CONFIG_LMB) /** * boot_ramdisk_high - relocate init ramdisk * @lmb: pointer to lmb handle, will be used for memory mgmt @@ -630,6 +631,7 @@ int boot_ramdisk_high(struct lmb *lmb, ulong rd_data, ulong rd_len, error: return -1; } +#endif int boot_get_setup(bootm_headers_t *images, u8 arch, ulong *setup_start, ulong *setup_len) @@ -823,6 +825,7 @@ int boot_get_loadable(int argc, char *const argv[], bootm_headers_t *images, return 0; } +#if defined(CONFIG_LMB) #ifdef CONFIG_SYS_BOOT_GET_CMDLINE /** * boot_get_cmdline - allocate and initialize kernel cmdline @@ -932,6 +935,7 @@ int image_setup_linux(bootm_headers_t *images) return 0; } +#endif void genimg_print_size(uint32_t size) { |