u-boot/board/xilinx/versal
Michal Simek 9c563e916c xilinx: Handle board_get_usable_ram_top(0) properly
board_get_usable_ram_top() was designed for getting the top most location
for U-Boot allocation that's why function itself supports via total_size
parameter to find out where the right location for U-Boot is.
But function itself is also reused by different (EFI) which is passing
total_size as 0 to find out where the usable ram top is. For this case
doesn't make sense (a waste time) to call any lmb functions.
That's why simply return gd->ram_top.

And gd->ram_top is filled already based on previous call for U-Boot iself.
The same solution is also used by stm32mp by commit 92b611e8b0 ("stm32mp:
correctly handle board_get_usable_ram_top(0)") and commit c8510e397f
("stm32mp: Fix board_get_usable_ram_top()").

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/44470619e74f3e480b70deac24578e3e0d5c907e.1651225945.git.michal.simek@amd.com
2022-05-13 09:10:02 +02:00
..
board.c xilinx: Handle board_get_usable_ram_top(0) properly 2022-05-13 09:10:02 +02:00
cmds.c WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
Kconfig xilinx: versal: Add new versal loadpdi command 2020-08-20 09:49:20 +02:00
MAINTAINERS .mailmap: Start to use new amd.com email address 2022-04-19 14:51:11 -04:00
Makefile xilinx: common: Add Makefile to common folder 2020-10-27 08:13:32 +01:00