summaryrefslogtreecommitdiffstats
path: root/lib_blackfin
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-11-03 22:30:05 -0500
committerMike Frysinger <vapier@gentoo.org>2009-02-02 12:24:43 -0500
commit84c5f0dc47d17593fd81206614891bdc94f6d51c (patch)
tree01eb0c725aa36bce90646e91e3f3e9a676e3bb37 /lib_blackfin
parent40599239e7875b39e2a5c12e6545992041c72c52 (diff)
downloadu-boot-84c5f0dc47d17593fd81206614891bdc94f6d51c.tar.gz
u-boot-84c5f0dc47d17593fd81206614891bdc94f6d51c.tar.xz
u-boot-84c5f0dc47d17593fd81206614891bdc94f6d51c.zip
Blackfin: setup bi_enetaddr for single nets
For systems with CONFIG_NET_MULTI disabled, bi_enetaddr does not get setup based on $ethaddr, so set it up. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'lib_blackfin')
-rw-r--r--lib_blackfin/board.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c
index 4aa859593e..03553ab841 100644
--- a/lib_blackfin/board.c
+++ b/lib_blackfin/board.c
@@ -391,10 +391,19 @@ void board_init_r(gd_t * id, ulong dest_addr)
#ifdef CONFIG_CMD_NET
printf("Net: ");
eth_initialize(gd->bd);
- if (getenv("ethaddr"))
+ if ((s = getenv("ethaddr"))) {
+# ifndef CONFIG_NET_MULTI
+ size_t i;
+ char *e;
+ for (i = 0; i < 6; ++i) {
+ bd->bi_enetaddr[i] = simple_strtoul(s, &e, 16);
+ s = (*e) ? e + 1 : e;
+ }
+# endif
printf("MAC: %02X:%02X:%02X:%02X:%02X:%02X\n",
bd->bi_enetaddr[0], bd->bi_enetaddr[1], bd->bi_enetaddr[2],
bd->bi_enetaddr[3], bd->bi_enetaddr[4], bd->bi_enetaddr[5]);
+ }
#endif
display_global_data();