@@ -128,7 +128,17 @@ static void am3517_disable_ethernet_int(void)
static void am3517_evm_ethernet_init(struct emac_platform_data *pdata)
{
- unsigned int regval;
+ u32 regval, mac_lo, mac_hi;
+
+ mac_lo = omap_ctrl_readl(AM35XX_CONTROL_FUSE_EMAC_LSB);
+ mac_hi = omap_ctrl_readl(AM35XX_CONTROL_FUSE_EMAC_MSB);
+
+ pdata->mac_addr[0] = (u_int8_t)((mac_hi & 0xFF0000) >> 16);
+ pdata->mac_addr[1] = (u_int8_t)((mac_hi & 0xFF00) >> 8);
+ pdata->mac_addr[2] = (u_int8_t)((mac_hi & 0xFF) >> 0);
+ pdata->mac_addr[3] = (u_int8_t)((mac_lo & 0xFF0000) >> 16);
+ pdata->mac_addr[4] = (u_int8_t)((mac_lo & 0xFF00) >> 8);
+ pdata->mac_addr[5] = (u_int8_t)((mac_lo & 0xFF) >> 0);
pdata->ctrl_reg_offset = AM35XX_EMAC_CNTRL_OFFSET;
pdata->ctrl_mod_reg_offset = AM35XX_EMAC_CNTRL_MOD_OFFSET;
@@ -198,6 +198,8 @@
/* AM35XX only CONTROL_GENERAL register offsets */
#define AM35XX_CONTROL_MSUSPENDMUX_6 (OMAP2_CONTROL_GENERAL + 0x0038)
+#define AM35XX_CONTROL_FUSE_EMAC_LSB (OMAP2_CONTROL_GENERAL + 0x0110)
+#define AM35XX_CONTROL_FUSE_EMAC_MSB (OMAP2_CONTROL_GENERAL + 0x0114)
#define AM35XX_CONTROL_DEVCONF2 (OMAP2_CONTROL_GENERAL + 0x0310)
#define AM35XX_CONTROL_DEVCONF3 (OMAP2_CONTROL_GENERAL + 0x0314)
#define AM35XX_CONTROL_CBA_PRIORITY (OMAP2_CONTROL_GENERAL + 0x0320)