diff options
author | Simon Glass <sjg@chromium.org> | 2011-10-13 14:43:08 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-10-23 23:33:18 +0200 |
commit | c1f485a1e8fc6ca14aceb1c5ddf94c1638d40909 (patch) | |
tree | 0d5f9673e27f70821abf6d9aee2f8c8d20171acc /arch | |
parent | eb68b41d5a72abf8b0edb6d1128f4b94c21cd576 (diff) | |
download | u-boot-c1f485a1e8fc6ca14aceb1c5ddf94c1638d40909.zip u-boot-c1f485a1e8fc6ca14aceb1c5ddf94c1638d40909.tar.gz u-boot-c1f485a1e8fc6ca14aceb1c5ddf94c1638d40909.tar.bz2 |
blackfin: Use getenv_ulong() in place of getenv(), strtoul
This changes the board code to use the new getenv_ulong() function.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/blackfin/lib/board.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c index bfdb586..a70473c 100644 --- a/arch/blackfin/lib/board.c +++ b/arch/blackfin/lib/board.c @@ -62,11 +62,7 @@ static int display_banner(void) static int init_baudrate(void) { - char baudrate[15]; - int i = getenv_f("baudrate", baudrate, sizeof(baudrate)); - gd->bd->bi_baudrate = gd->baudrate = (i > 0) - ? simple_strtoul(baudrate, NULL, 10) - : CONFIG_BAUDRATE; + gd->baudrate = getenv_ulong("baudrate", 10, CONFIG_BAUDRATE); return 0; } @@ -374,8 +370,7 @@ void board_init_r(gd_t * id, ulong dest_addr) #endif /* Initialize from environment */ - if ((s = getenv("loadaddr")) != NULL) - load_addr = simple_strtoul(s, NULL, 16); + load_addr = getenv_ulong("loadaddr", 16, load_addr); #if defined(CONFIG_MISC_INIT_R) /* miscellaneous platform dependent initialisations */ |