aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorJohn Rigby <john.rigby@linaro.org>2011-10-23 22:55:22 -0600
committerJohn Rigby <john.rigby@linaro.org>2012-12-06 12:16:44 -0700
commitc2232c71a01a2483f966b3618b30477583e75c71 (patch)
tree067a63c28c1277141e2bb14ae341deaf24c76e16 /board
parent2f493573627169f1d01f88239811815d5dd61125 (diff)
downloadu-boot-linaro-stable-c2232c71a01a2483f966b3618b30477583e75c71.tar.gz
OMAP3: Beagle: set mac addr from dieid
TODO: share dieid<-->mac addr code between OMAP3 and OMAP4 Signed-off-by: John Rigby <john.rigby@linaro.org>
Diffstat (limited to 'board')
-rw-r--r--board/ti/beagle/beagle.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 6175e1d1a..4e80d6488 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -100,6 +100,29 @@ int board_init(void)
}
/*
+ * Beagle-xM has a usb nic with no ethernet rom so generate a macaddr
+ * from the SOC die-id and set the usbethaddr env var to that
+ * value.
+ */
+int board_eth_init(bd_t *bis)
+{
+ u8 macaddr[6];
+ char usbethaddr[20];
+
+ /*
+ * NB: The 1 here has been found to generate an address
+ * consistent with the kernel.
+ */
+ omap3_die_id_to_ethernet_mac(macaddr, 1);
+ sprintf (usbethaddr, "%02X:%02X:%02X:%02X:%02X:%02X",
+ macaddr[0], macaddr[1],
+ macaddr[2], macaddr[3],
+ macaddr[4], macaddr[5]) ;
+ setenv ("usbethaddr", usbethaddr);
+ return 0;
+}
+
+/*
* Routine: get_board_revision
* Description: Detect if we are running on a Beagle revision Ax/Bx,
* C1/2/3, C4 or xM. This can be done by reading