mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
board_f: Only reserve memory for U-Boot if we're going to relocate
In case of no relocation we'll just waste some space at the very end of usable memory area. If target device has very limited amount of memory (for example 256 kB) this loss will be pretty inconvenient. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Heiko Schocher <hs@denx.de> Cc: York Sun <york.sun@nxp.com> Cc: Stefan Roese <sr@denx.de>
This commit is contained in:
@ -394,6 +394,7 @@ static int reserve_trace(void)
|
||||
|
||||
static int reserve_uboot(void)
|
||||
{
|
||||
if (!(gd->flags & GD_FLG_SKIP_RELOC)) {
|
||||
/*
|
||||
* reserve memory for U-Boot code, data & bss
|
||||
* round down to next 4 kB limit
|
||||
@ -405,8 +406,9 @@ static int reserve_uboot(void)
|
||||
gd->relocaddr &= ~(65536 - 1);
|
||||
#endif
|
||||
|
||||
debug("Reserving %ldk for U-Boot at: %08lx\n", gd->mon_len >> 10,
|
||||
gd->relocaddr);
|
||||
debug("Reserving %ldk for U-Boot at: %08lx\n",
|
||||
gd->mon_len >> 10, gd->relocaddr);
|
||||
}
|
||||
|
||||
gd->start_addr_sp = gd->relocaddr;
|
||||
|
||||
|
Reference in New Issue
Block a user