return E1000_SUCCESS;
}
-#ifndef CONFIG_DM_ETH
/******************************************************************************
* e1000_write_eeprom_srwr - Write to Shadow Ram using EEWR
* @hw: pointer to the HW structure
out:
return ret_val;
}
-#endif
/******************************************************************************
* Verifies that the EEPROM has a valid checksum
return len ? 1 : 0;
}
+#endif /* !CONFIG_DM_ETH */
+#ifdef CONFIG_DM_ETH
+static int e1000_write_hwaddr(struct udevice *dev)
+#else
static int e1000_write_hwaddr(struct eth_device *dev)
+#endif
{
#ifndef CONFIG_E1000_NO_NVM
- unsigned char *mac = dev->enetaddr;
unsigned char current_mac[6];
+#ifdef CONFIG_DM_ETH
+ struct eth_pdata *plat = dev_get_plat(dev);
+ struct e1000_hw *hw = dev_get_priv(dev);
+ u8 *mac = plat->enetaddr;
+#else
struct e1000_hw *hw = dev->priv;
+ u8 *mac = dev->enetaddr;
+#endif
uint16_t data[3];
int ret_val, i;
#endif
}
+#ifndef CONFIG_DM_ETH
/**************************************************************************
PROBE - Look for an adapter, this routine's visible to the outside
You should omit the last argument struct pci_device * for a non-PCI NIC
.recv = e1000_eth_recv,
.stop = e1000_eth_stop,
.free_pkt = e1000_free_pkt,
+ .write_hwaddr = e1000_write_hwaddr,
};
static const struct udevice_id e1000_eth_ids[] = {