summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@linaro.org>2011-03-28 09:58:34 +0000
committerGerald Van Baren <gvb@unssw.com>2011-04-25 21:11:19 -0400
commit590d3cacb98cb377b127869b58507d2afe9c904a (patch)
treecf9affb045d88ab6c1c9a00fa44744d6fb25e2a1 /arch
parenta01ebd9679f07421ec5abfda5dc0ab76c7202d3b (diff)
downloadu-boot-imx-590d3cacb98cb377b127869b58507d2afe9c904a.zip
u-boot-imx-590d3cacb98cb377b127869b58507d2afe9c904a.tar.gz
u-boot-imx-590d3cacb98cb377b127869b58507d2afe9c904a.tar.bz2
Stop passing around bootmem_base value.
For the calls to boot_relocate_fdt(), boot_get_cmdline(), and boot_get_kbd(), the value of bootmem_base is always obtained by calling getenv_bootm_low(). Since the value always comes from the same source, the calling signature for those functions can be simplified by making them call getenv_bootm_low() directly. Signed-off-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/lib/bootm.c3
-rw-r--r--arch/m68k/lib/bootm.c7
-rw-r--r--arch/powerpc/lib/bootm.c9
3 files changed, 6 insertions, 13 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 7734953..aba13f4 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -178,7 +178,6 @@ static int bootm_linux_fdt(int machid, bootm_headers_t *images)
{
ulong rd_len;
void (*kernel_entry)(int zero, int dt_machid, void *dtblob);
- ulong bootmap_base = getenv_bootm_low();
ulong of_size = images->ft_len;
char **of_flat_tree = &images->ft_addr;
ulong *initrd_start = &images->initrd_start;
@@ -194,7 +193,7 @@ static int bootm_linux_fdt(int machid, bootm_headers_t *images)
if (ret)
return ret;
- ret = boot_relocate_fdt(lmb, bootmap_base, of_flat_tree, &of_size);
+ ret = boot_relocate_fdt(lmb, of_flat_tree, &of_size);
if (ret)
return ret;
diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c
index 76a2fb2..1229ac7 100644
--- a/arch/m68k/lib/bootm.c
+++ b/arch/m68k/lib/bootm.c
@@ -71,7 +71,6 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
int ret;
ulong cmd_start, cmd_end;
- ulong bootmap_base;
bd_t *kbd;
void (*kernel) (bd_t *, ulong, ulong, ulong, ulong);
struct lmb *lmb = &images->lmb;
@@ -79,17 +78,15 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
return 1;
- bootmap_base = getenv_bootm_low();
-
/* allocate space and init command line */
- ret = boot_get_cmdline (lmb, &cmd_start, &cmd_end, bootmap_base);
+ ret = boot_get_cmdline (lmb, &cmd_start, &cmd_end);
if (ret) {
puts("ERROR with allocation of cmdline\n");
goto error;
}
/* allocate space for kernel copy of board info */
- ret = boot_get_kbd (lmb, &kbd, bootmap_base);
+ ret = boot_get_kbd (lmb, &kbd);
if (ret) {
puts("ERROR with allocation of kernel bd\n");
goto error;
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index c7f3d08..6e2a81b 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -186,7 +186,6 @@ static void boot_prep_linux(void)
static int boot_cmdline_linux(bootm_headers_t *images)
{
- ulong bootmap_base = getenv_bootm_low();
ulong of_size = images->ft_len;
struct lmb *lmb = &images->lmb;
ulong *cmd_start = &images->cmdline_start;
@@ -196,7 +195,7 @@ static int boot_cmdline_linux(bootm_headers_t *images)
if (!of_size) {
/* allocate space and init command line */
- ret = boot_get_cmdline (lmb, cmd_start, cmd_end, bootmap_base);
+ ret = boot_get_cmdline (lmb, cmd_start, cmd_end);
if (ret) {
puts("ERROR with allocation of cmdline\n");
return ret;
@@ -208,7 +207,6 @@ static int boot_cmdline_linux(bootm_headers_t *images)
static int boot_bd_t_linux(bootm_headers_t *images)
{
- ulong bootmap_base = getenv_bootm_low();
ulong of_size = images->ft_len;
struct lmb *lmb = &images->lmb;
bd_t **kbd = &images->kbd;
@@ -217,7 +215,7 @@ static int boot_bd_t_linux(bootm_headers_t *images)
if (!of_size) {
/* allocate space for kernel copy of board info */
- ret = boot_get_kbd (lmb, kbd, bootmap_base);
+ ret = boot_get_kbd (lmb, kbd);
if (ret) {
puts("ERROR with allocation of kernel bd\n");
return ret;
@@ -235,7 +233,6 @@ static int boot_body_linux(bootm_headers_t *images)
ulong *initrd_start = &images->initrd_start;
ulong *initrd_end = &images->initrd_end;
#if defined(CONFIG_OF_LIBFDT)
- ulong bootmap_base = getenv_bootm_low();
ulong of_size = images->ft_len;
char **of_flat_tree = &images->ft_addr;
#endif
@@ -258,7 +255,7 @@ static int boot_body_linux(bootm_headers_t *images)
return ret;
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_SYS_BOOTMAPSZ)
- ret = boot_relocate_fdt(lmb, bootmap_base, of_flat_tree, &of_size);
+ ret = boot_relocate_fdt(lmb, of_flat_tree, &of_size);
if (ret)
return ret;