summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorIlias Apalodimas <[email protected]>2024-12-18 09:02:32 +0200
committerTom Rini <[email protected]>2024-12-30 13:21:55 -0600
commit900a8951c3b6035c25632438ebc7240cbc77883c (patch)
tree92cc6937f3ecd135ef4022caa7288ac45db5feac /boot
parent3d56c06551d7a54870cfdf8c639b3ff35521b87f (diff)
lmb: Remove lmb_reserve_flags()
lmb_reserve() is just calling lmb_reserve_flags() with LMB_NONE. There's not much we gain from this abstraction. So let's remove the latter, add the flags argument to lmb_reserve() and make the code a bit easier to follow. Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Sam Protsenko <[email protected]> Tested-by: Sam Protsenko <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'boot')
-rw-r--r--boot/bootm.c3
-rw-r--r--boot/image-board.c2
-rw-r--r--boot/image-fdt.c6
3 files changed, 6 insertions, 5 deletions
diff --git a/boot/bootm.c b/boot/bootm.c
index 16a43d519a8..854ac7ec738 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -696,7 +696,8 @@ static int bootm_load_os(struct bootm_headers *images, int boot_progress)
}
if (CONFIG_IS_ENABLED(LMB))
- lmb_reserve(images->os.load, (load_end - images->os.load));
+ lmb_reserve(images->os.load, (load_end - images->os.load),
+ LMB_NONE);
return 0;
}
diff --git a/boot/image-board.c b/boot/image-board.c
index b726bd6b303..070ada00718 100644
--- a/boot/image-board.c
+++ b/boot/image-board.c
@@ -562,7 +562,7 @@ int boot_ramdisk_high(ulong rd_data, ulong rd_len, ulong *initrd_start,
debug(" in-place initrd\n");
*initrd_start = rd_data;
*initrd_end = rd_data + rd_len;
- lmb_reserve(rd_data, rd_len);
+ lmb_reserve(rd_data, rd_len, LMB_NONE);
} else {
if (initrd_high)
*initrd_start = (ulong)lmb_alloc_base(rd_len,
diff --git a/boot/image-fdt.c b/boot/image-fdt.c
index cda7c3aa9e3..d717f669072 100644
--- a/boot/image-fdt.c
+++ b/boot/image-fdt.c
@@ -72,7 +72,7 @@ static void boot_fdt_reserve_region(u64 addr, u64 size, u32 flags)
{
long ret;
- ret = lmb_reserve_flags(addr, size, flags);
+ ret = lmb_reserve(addr, size, flags);
if (!ret) {
debug(" reserving fdt memory region: addr=%llx size=%llx flags=%x\n",
(unsigned long long)addr,
@@ -184,7 +184,7 @@ int boot_relocate_fdt(char **of_flat_tree, ulong *of_size)
if (desired_addr == ~0UL) {
/* All ones means use fdt in place */
of_start = fdt_blob;
- lmb_reserve(map_to_sysmem(of_start), of_len);
+ 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);
@@ -675,7 +675,7 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob, bool lmb)
/* Create a new LMB reservation */
if (CONFIG_IS_ENABLED(LMB) && lmb)
- lmb_reserve(map_to_sysmem(blob), of_size);
+ lmb_reserve(map_to_sysmem(blob), of_size, LMB_NONE);
#if defined(CONFIG_ARCH_KEYSTONE)
if (IS_ENABLED(CONFIG_OF_BOARD_SETUP))