]> git.sur5r.net Git - u-boot/blobdiff - board/davinci/da8xxevm/da830evm.c
powerpc/p2041rdb: add more ddr frequencies support
[u-boot] / board / davinci / da8xxevm / da830evm.c
index 6baa8603f1758d7baed009a25af04b49be19a4c7..06506537b2972bbb020c81bebcc27656dbbcb5d4 100644 (file)
@@ -40,8 +40,7 @@
 #include <asm/arch/emif_defs.h>
 #include <asm/arch/emac_defs.h>
 #include <asm/io.h>
-#include "../common/misc.h"
-#include "common.h"
+#include <asm/arch/davinci_misc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -196,19 +195,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 +219,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 */