summaryrefslogtreecommitdiff
path: root/lib_avr32
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2007-11-24 18:15:31 +0100
committerHaavard Skinnemoen <hskinnemoen@atmel.com>2008-01-18 09:53:18 +0100
commite006927a0b9a54e8ee7685d8ac748aaad6801862 (patch)
tree8de3c9c91f267033a0f3e3f6023618b5e5b3003e /lib_avr32
parentf188896c2f1594fe749fdb99bbc8c54023cfab3a (diff)
downloadu-boot-imx-e006927a0b9a54e8ee7685d8ac748aaad6801862.zip
u-boot-imx-e006927a0b9a54e8ee7685d8ac748aaad6801862.tar.gz
u-boot-imx-e006927a0b9a54e8ee7685d8ac748aaad6801862.tar.bz2
AVR32: Initialize ipaddr, loadaddr and bootfile at startup
I don't know why the relevant layers can't do this by itself, but this is what ppc does. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'lib_avr32')
-rw-r--r--lib_avr32/board.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib_avr32/board.c b/lib_avr32/board.c
index 809ee3b..d6423d4 100644
--- a/lib_avr32/board.c
+++ b/lib_avr32/board.c
@@ -264,6 +264,7 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
#ifndef CFG_ENV_IS_NOWHERE
extern char * env_name_spec;
#endif
+ char *s;
cmd_tbl_t *cmdtp;
bd_t *bd;
@@ -336,11 +337,20 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
/* initialize environment */
env_relocate();
+ bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
+
devices_init();
jumptable_init();
console_init_r();
+ s = getenv("loadaddr");
+ if (s)
+ load_addr = simple_strtoul(s, NULL, 16);
+
#if defined(CONFIG_CMD_NET)
+ s = getenv("bootfile");
+ if (s)
+ copy_filename(BootFile, s, sizeof(BootFile));
#if defined(CONFIG_NET_MULTI)
puts("Net: ");
#endif