mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 21:51:31 +00:00
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>
This commit is contained in:
parent
40599239e7
commit
84c5f0dc47
1 changed files with 10 additions and 1 deletions
|
@ -391,10 +391,19 @@ void board_init_r(gd_t * id, ulong dest_addr)
|
||||||
#ifdef CONFIG_CMD_NET
|
#ifdef CONFIG_CMD_NET
|
||||||
printf("Net: ");
|
printf("Net: ");
|
||||||
eth_initialize(gd->bd);
|
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",
|
printf("MAC: %02X:%02X:%02X:%02X:%02X:%02X\n",
|
||||||
bd->bi_enetaddr[0], bd->bi_enetaddr[1], bd->bi_enetaddr[2],
|
bd->bi_enetaddr[0], bd->bi_enetaddr[1], bd->bi_enetaddr[2],
|
||||||
bd->bi_enetaddr[3], bd->bi_enetaddr[4], bd->bi_enetaddr[5]);
|
bd->bi_enetaddr[3], bd->bi_enetaddr[4], bd->bi_enetaddr[5]);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
display_global_data();
|
display_global_data();
|
||||||
|
|
Loading…
Add table
Reference in a new issue