summaryrefslogtreecommitdiff
path: root/board/xilinx/zynqmp
diff options
context:
space:
mode:
authorAshok Reddy Soma <ashok.reddy.soma@xilinx.com>2022-07-07 10:45:37 +0200
committerMichal Simek <michal.simek@amd.com>2022-07-26 08:23:54 +0200
commit65168910adaae3a4ac91fd5acf30941a28facc0e (patch)
treef358cb9e735ce8793b4c612fd605d1b84bfd1556 /board/xilinx/zynqmp
parent7c1860fce4e369bdcabc1f574feb6b9af19999a3 (diff)
downloadu-boot-65168910adaae3a4ac91fd5acf30941a28facc0e.tar.gz
u-boot-65168910adaae3a4ac91fd5acf30941a28facc0e.tar.bz2
u-boot-65168910adaae3a4ac91fd5acf30941a28facc0e.zip
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 'board/xilinx/zynqmp')
-rw-r--r--board/xilinx/zynqmp/zynqmp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 106c3953e1..f7c6e3ed4e 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -253,6 +253,7 @@ int dram_init(void)
return 0;
}
+#if defined(CONFIG_LMB)
ulong board_get_usable_ram_top(ulong total_size)
{
phys_size_t size;
@@ -277,6 +278,8 @@ ulong board_get_usable_ram_top(ulong total_size)
return reg + size;
}
+#endif
+
#else
int dram_init_banksize(void)
{