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>
(cherry picked from commit 3075708017)
This commit is contained in:
committed by
Simon Glass
parent
e005799d8f
commit
c20372170e
@@ -580,9 +580,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);
|
||||
@@ -855,7 +857,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;
|
||||
|
||||
@@ -888,9 +891,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;
|
||||
|
||||
|
||||
@@ -190,7 +190,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");
|
||||
@@ -219,7 +220,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)
|
||||
|
||||
Reference in New Issue
Block a user