summaryrefslogtreecommitdiffstats
path: root/board/davinci/da8xxevm/da830evm.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/davinci/da8xxevm/da830evm.c')
-rw-r--r--board/davinci/da8xxevm/da830evm.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/board/davinci/da8xxevm/da830evm.c b/board/davinci/da8xxevm/da830evm.c
index 6baa8603f1..8a9f9884d6 100644
--- a/board/davinci/da8xxevm/da830evm.c
+++ b/board/davinci/da8xxevm/da830evm.c
@@ -196,19 +196,17 @@ int board_eth_init(bd_t *bis)
{
u_int8_t mac_addr[6];
u_int8_t switch_start_cmd[2] = { 0x01, 0x23 };
+ struct eth_device *dev;
/* Read Ethernet MAC address from EEPROM */
if (dvevm_read_mac_address(mac_addr))
/* set address env if not already set */
- dv_configure_mac_address(mac_addr);
+ davinci_sync_env_enetaddr(mac_addr);
/* read the address back from env */
if (!eth_getenv_enetaddr("ethaddr", mac_addr))
return -1;
- /* provide the resulting addr to the driver */
- davinci_eth_set_mac_addr(mac_addr);
-
/* enable the Ethernet switch in the 3 port PHY */
if (i2c_write(PHY_SW_I2C_ADDR, 0, 0,
switch_start_cmd, sizeof(switch_start_cmd))) {
@@ -222,6 +220,12 @@ int board_eth_init(bd_t *bis)
return -1;
}
+ dev = eth_get_dev();
+
+ /* provide the resulting addr to the driver */
+ memcpy(dev->enetaddr, mac_addr, 6);
+ dev->write_hwaddr(dev);
+
return 0;
}
#endif /* CONFIG_DRIVER_TI_EMAC */
OpenPOWER on IntegriCloud