boards: move board_get_enetaddr() into board-specific init
The environment is the canonical storage location of the mac address, so we're killing off the global data location and moving everything to querying the env directly. Rather than have the common ppc code have board-specific hooks, move the board_get_enetaddr() function into the board-specific init functions. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
committed by
Wolfgang Denk
parent
f11e6ff5b1
commit
d8d21e699d
@@ -223,6 +223,18 @@ int board_early_init_r(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern void board_get_enetaddr(uchar *enetaddr);
|
||||
int misc_init_r(void)
|
||||
{
|
||||
uchar enetaddr[6];
|
||||
|
||||
if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
|
||||
board_get_enetaddr(enetaddr);
|
||||
eth_putenv_enetaddr("ethaddr", enetaddr);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_RESET)
|
||||
void init_ide_reset(void)
|
||||
|
||||
Reference in New Issue
Block a user