board: sama5d4_xplained: Set mac address from eeprom
[platform/kernel/u-boot.git] / board / atmel / sama5d4_xplained / sama5d4_xplained.c
index 854afcb..248a31b 100644 (file)
@@ -192,6 +192,18 @@ int board_early_init_f(void)
 }
 #endif
 
+#define AT24MAC_MAC_OFFSET     0x9a
+
+#ifdef CONFIG_MISC_INIT_R
+int misc_init_r(void)
+{
+#ifdef CONFIG_I2C_EEPROM
+       at91_set_ethaddr(AT24MAC_MAC_OFFSET);
+#endif
+       return 0;
+}
+#endif
+
 int board_init(void)
 {
        /* adress of boot parameters */