aboutsummaryrefslogtreecommitdiffstats
path: root/boot
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2024-12-18 09:02:36 +0200
committerTom Rini <trini@konsulko.com>2024-12-30 13:21:55 -0600
commit3075708017dc2d1b735ed7c9556da6ff5070f14f (patch)
treec5dc6997a16545ae73033f3cacb19e6fd61e7152 /boot
parent15e0c5e390ffac7682193b7e1a615898b569deb1 (diff)
downloadu-boot-3075708017dc2d1b735ed7c9556da6ff5070f14f.tar.gz
lmb: Remove lmb_alloc_base_flags()
lmb_alloc_base() is just calling lmb_alloc_base_flags() with LMB_NONE. There's not much we gain from this abstraction, so let's remove the former add the flags argument to lmb_alloc_base() and make the code a bit easier to follow. Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Tested-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'boot')
-rw-r--r--boot/image-board.c18
-rw-r--r--boot/image-fdt.c5
2 files changed, 14 insertions, 9 deletions
diff --git a/boot/image-board.c b/boot/image-board.c
index 070ada00718..4e86a9a2271 100644
--- a/boot/image-board.c
+++ b/boot/image-board.c
@@ -565,9 +565,11 @@ int boot_ramdisk_high(ulong rd_data, ulong rd_len, ulong *initrd_start,
lmb_reserve(rd_data, rd_len, LMB_NONE);
} else {
if (initrd_high)
- *initrd_start = (ulong)lmb_alloc_base(rd_len,
- 0x1000,
- initrd_high);
+ *initrd_start =
+ (ulong)lmb_alloc_base(rd_len,
+ 0x1000,
+ initrd_high,
+ LMB_NONE);
else
*initrd_start = (ulong)lmb_alloc(rd_len,
0x1000);
@@ -839,7 +841,8 @@ int boot_get_cmdline(ulong *cmd_start, ulong *cmd_end)
barg = IF_ENABLED_INT(CONFIG_SYS_BOOT_GET_CMDLINE, CONFIG_SYS_BARGSIZE);
cmdline = (char *)(ulong)lmb_alloc_base(barg, 0xf,
- env_get_bootm_mapsize() + env_get_bootm_low());
+ env_get_bootm_mapsize() + env_get_bootm_low(),
+ LMB_NONE);
if (!cmdline)
return -1;
@@ -872,9 +875,10 @@ int boot_get_cmdline(ulong *cmd_start, ulong *cmd_end)
int boot_get_kbd(struct bd_info **kbd)
{
*kbd = (struct bd_info *)(ulong)lmb_alloc_base(sizeof(struct bd_info),
- 0xf,
- env_get_bootm_mapsize() +
- env_get_bootm_low());
+ 0xf,
+ env_get_bootm_mapsize() +
+ env_get_bootm_low(),
+ LMB_NONE);
if (!*kbd)
return -1;
diff --git a/boot/image-fdt.c b/boot/image-fdt.c
index d717f669072..9d1598b1a93 100644
--- a/boot/image-fdt.c
+++ b/boot/image-fdt.c
@@ -187,7 +187,8 @@ int boot_relocate_fdt(char **of_flat_tree, ulong *of_size)
lmb_reserve(map_to_sysmem(of_start), of_len, LMB_NONE);
disable_relocation = 1;
} else if (desired_addr) {
- addr = lmb_alloc_base(of_len, 0x1000, desired_addr);
+ addr = lmb_alloc_base(of_len, 0x1000, desired_addr,
+ LMB_NONE);
of_start = map_sysmem(addr, of_len);
if (of_start == NULL) {
puts("Failed using fdt_high value for Device Tree");
@@ -216,7 +217,7 @@ int boot_relocate_fdt(char **of_flat_tree, ulong *of_size)
* for LMB allocation.
*/
usable = min(start + size, low + mapsize);
- addr = lmb_alloc_base(of_len, 0x1000, usable);
+ addr = lmb_alloc_base(of_len, 0x1000, usable, LMB_NONE);
of_start = map_sysmem(addr, of_len);
/* Allocation succeeded, use this block. */
if (of_start != NULL)