summaryrefslogtreecommitdiff
path: root/board/mbx8xx
diff options
context:
space:
mode:
Diffstat (limited to 'board/mbx8xx')
-rw-r--r--board/mbx8xx/mbx8xx.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/board/mbx8xx/mbx8xx.c b/board/mbx8xx/mbx8xx.c
index af4f57d..a3bf1f7 100644
--- a/board/mbx8xx/mbx8xx.c
+++ b/board/mbx8xx/mbx8xx.c
@@ -241,7 +241,7 @@ static unsigned int get_reffreq (void)
return *((ulong *) packet->data);
}
-void board_get_enetaddr (uchar * addr)
+static void board_get_enetaddr(uchar *addr)
{
int i;
vpd_packet_t *packet;
@@ -251,6 +251,18 @@ void board_get_enetaddr (uchar * addr)
addr[i] = packet->data[i];
}
+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;
+}
+
/*
* Check Board Identity:
*/