[U-Boot] [PATCH 06/10] microblaze: Use getenv_ulong() in place of getenv(), strtoul

Simon Glass sjg at chromium.org
Fri Oct 14 02:43:10 CEST 2011


This changes the board code to use the new getenv_ulong() function.

Signed-off-by: Simon Glass <sjg at chromium.org>
---
 arch/microblaze/lib/board.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
index d97543b..c595cb9 100644
--- a/arch/microblaze/lib/board.c
+++ b/arch/microblaze/lib/board.c
@@ -160,10 +160,8 @@ void board_init (void)
 	/* Initialize stdio devices */
 	stdio_init ();
 
-	if ((s = getenv ("loadaddr")) != NULL) {
-		load_addr = simple_strtoul (s, NULL, 16);
-	}
-
+	/* Initialize from environment */
+	load_addr = getenv_ulong("loadaddr", 16, load_addr);
 #if defined(CONFIG_CMD_NET)
 	/* IP Address */
 	bd->bi_ip_addr = getenv_IPaddr("ipaddr");
-- 
1.7.3.1



More information about the U-Boot mailing list