Patchwork [U-Boot] load_addr: move to common env code

login
register
mail settings
Submitter Mike Frysinger
Date Dec. 21, 2010, 7:08 p.m.
Message ID <1292958507-5584-1-git-send-email-vapier@gentoo.org>
Download mbox | patch
Permalink /patch/76317/
State Accepted
Commit 558605cf4fe9558dff9b8ea2241fbeb526dc353d
Delegated to: Wolfgang Denk
Headers show

Comments

Mike Frysinger - Dec. 21, 2010, 7:08 p.m.
Rather than keep the load_addr definition with the bootm code (which
just happens to use this), move it to the common env code.  This way
we can disable bootm support completely while retaining load_addr
usage with many other commands.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 common/cmd_bootm.c  |    1 -
 common/cmd_nvedit.c |    2 ++
 2 files changed, 2 insertions(+), 1 deletions(-)
Wolfgang Denk - Jan. 9, 2011, 5:02 p.m.
Dear Mike Frysinger,

In message <1292958507-5584-1-git-send-email-vapier@gentoo.org> you wrote:
> Rather than keep the load_addr definition with the bootm code (which
> just happens to use this), move it to the common env code.  This way
> we can disable bootm support completely while retaining load_addr
> usage with many other commands.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
>  common/cmd_bootm.c  |    1 -
>  common/cmd_nvedit.c |    2 ++
>  2 files changed, 2 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 1a024f1..b7f96c2 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -157,7 +157,6 @@  static boot_os_fn *boot_os[] = {
 #endif
 };
 
-ulong load_addr = CONFIG_SYS_LOAD_ADDR;	/* Default Load Address */
 static bootm_headers_t images;		/* pointers to os/initrd/fdt images */
 
 /* Allow for arch specific config before we boot */
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index dcc93c1..e9d3d1b 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -76,6 +76,8 @@  SPI_FLASH|MG_DISK|NVRAM|MMC|NOWHERE}
  */
 #define	MAX_ENV_SIZE	(1 << 20)	/* 1 MiB */
 
+ulong load_addr = CONFIG_SYS_LOAD_ADDR;	/* Default Load Address */
+
 /*
  * Table with supported baudrates (defined in config_xyz.h)
  */