Obtain two MAC addresses from the two EEPROMs and configure the two
available Ethernet interfaces accordingly.
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
return 0;
}
+#define MAC24AA_MAC_OFFSET 0xfa
+
+#if (IS_ENABLED(CONFIG_MISC_INIT_R))
+int misc_init_r(void)
+{
+#if (IS_ENABLED(CONFIG_I2C_EEPROM))
+ at91_set_ethaddr(MAC24AA_MAC_OFFSET);
+ at91_set_eth1addr(MAC24AA_MAC_OFFSET);
+#endif
+ return 0;
+}
+#endif
+
int board_init(void)
{
/* address of boot parameters */
return 0;
}
-int misc_init_r(void)
-{
- return 0;
-}
-