]> git.sur5r.net Git - u-boot/blobdiff - board/ti/dra7xx/evm.c
drivers: net: cpsw: add support to have phy address from cpsw platform data
[u-boot] / board / ti / dra7xx / evm.c
index 9ae88c57a41a717fd0d58b709b836791505593ab..7990e7990d41ef8d4b631bff61ec93ad6ba4f32a 100644 (file)
@@ -12,6 +12,7 @@
  */
 #include <common.h>
 #include <palmas.h>
+#include <sata.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/sata.h>
@@ -80,7 +81,7 @@ int board_init(void)
 
 int board_late_init(void)
 {
-       omap_sata_init();
+       init_sata(0);
        return 0;
 }
 
@@ -148,12 +149,12 @@ static struct cpsw_slave_data cpsw_slaves[] = {
        {
                .slave_reg_ofs  = 0x208,
                .sliver_reg_ofs = 0xd80,
-               .phy_id         = 0,
+               .phy_addr       = 2,
        },
        {
                .slave_reg_ofs  = 0x308,
                .sliver_reg_ofs = 0xdc0,
-               .phy_id         = 1,
+               .phy_addr       = 3,
        },
 };
 
@@ -202,12 +203,12 @@ int board_eth_init(bd_t *bis)
        /* try reading mac address from efuse */
        mac_lo = readl((*ctrl)->control_core_mac_id_0_lo);
        mac_hi = readl((*ctrl)->control_core_mac_id_0_hi);
-       mac_addr[0] = mac_hi & 0xFF;
+       mac_addr[0] = (mac_hi & 0xFF0000) >> 16;
        mac_addr[1] = (mac_hi & 0xFF00) >> 8;
-       mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
-       mac_addr[3] = mac_lo & 0xFF;
+       mac_addr[2] = mac_hi & 0xFF;
+       mac_addr[3] = (mac_lo & 0xFF0000) >> 16;
        mac_addr[4] = (mac_lo & 0xFF00) >> 8;
-       mac_addr[5] = (mac_lo & 0xFF0000) >> 16;
+       mac_addr[5] = mac_lo & 0xFF;
 
        if (!getenv("ethaddr")) {
                printf("<ethaddr> not set. Validating first E-fuse MAC\n");