diff mbox

[U-Boot,v3,2/9] OMAP3: twister : get MAC address from EEPROM

Message ID 1346239327-26483-3-git-send-email-sbabic@denx.de
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Stefano Babic Aug. 29, 2012, 11:22 a.m. UTC
Signed-off-by: Stefano Babic <sbabic@denx.de>
---

 board/technexion/twister/twister.c |   10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox

Patch

diff --git a/board/technexion/twister/twister.c b/board/technexion/twister/twister.c
index c2b10ac..7429e93 100644
--- a/board/technexion/twister/twister.c
+++ b/board/technexion/twister/twister.c
@@ -100,8 +100,18 @@  int board_init(void)
 
 int misc_init_r(void)
 {
+	char *eth_addr;
+
 	dieid_num_r();
 
+	eth_addr = getenv("ethaddr");
+	if (eth_addr)
+		return 0;
+
+#ifndef CONFIG_SPL_BUILD
+	TAM3517_READ_MAC_FROM_EEPROM;
+#endif
+
 	return 0;
 }