summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-08-15 08:24:40 -0500
committerWolfgang Denk <wd@denx.de>2008-08-26 23:38:48 +0200
commite906cfae08e8cc2447f59b1bc4c22ab9c3c286d2 (patch)
tree8417e544ba93769e760e6e562e67afe4e5805a82 /common
parent54f9c86691309b2f919f567f9255b8bcad2c7651 (diff)
downloadu-boot-imx-e906cfae08e8cc2447f59b1bc4c22ab9c3c286d2.zip
u-boot-imx-e906cfae08e8cc2447f59b1bc4c22ab9c3c286d2.tar.gz
u-boot-imx-e906cfae08e8cc2447f59b1bc4c22ab9c3c286d2.tar.bz2
bootm: move lmb into the bootm_headers_t structure
To allow for persistent state between future bootm subcommands we need the lmb to exist in a global state. Moving it into the bootm_headers_t allows us to do that. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_bootm.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 022cef8..dc88e63 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -168,20 +168,17 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
phys_size_t mem_size;
int ret;
- struct lmb lmb;
-
memset ((void *)&images, 0, sizeof (images));
images.verify = getenv_yesno ("verify");
- images.lmb = &lmb;
- lmb_init(&lmb);
+ lmb_init(&images.lmb);
mem_start = getenv_bootm_low();
mem_size = getenv_bootm_size();
- lmb_add(&lmb, (phys_addr_t)mem_start, mem_size);
+ lmb_add(&images.lmb, (phys_addr_t)mem_start, mem_size);
- board_lmb_reserve(&lmb);
+ board_lmb_reserve(&images.lmb);
/* get kernel image header, start address and length */
os_hdr = boot_get_kernel (cmdtp, flag, argc, argv,
@@ -387,7 +384,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
show_boot_progress (8);
- lmb_reserve(&lmb, load_start, (load_end - load_start));
+ lmb_reserve(&images.lmb, load_start, (load_end - load_start));
switch (os) {
default: /* handled by (original) Linux case */