]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/net/davinci_emac.c
arm920t/at91: add at91rm9200_devices.c
[karo-tx-uboot.git] / drivers / net / davinci_emac.c
index 2642a5aaf0d71738697a0c9231f7cad96bb1eb71..66c0d13c2bd9ec42ba2eab1ffca39f6349430fcd 100644 (file)
@@ -247,10 +247,10 @@ static int gen_get_link_speed(int phy_addr)
                        (tmp & 0x04)) {
 #if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII) && \
                defined(CONFIG_MACH_DAVINCI_DA850_EVM)
-               davinci_eth_phy_read(phy_addr, PHY_ANLPAR, &tmp);
+               davinci_eth_phy_read(phy_addr, MII_LPA, &tmp);
 
                /* Speed doesn't matter, there is no setting for it in EMAC. */
-               if (tmp & (PHY_ANLPAR_TXFD | PHY_ANLPAR_10FD)) {
+               if (tmp & (LPA_100FULL | LPA_10FULL)) {
                        /* set EMAC for Full Duplex  */
                        writel(EMAC_MACCONTROL_MIIEN_ENABLE |
                                        EMAC_MACCONTROL_FULLDUPLEX_ENABLE,
@@ -261,7 +261,7 @@ static int gen_get_link_speed(int phy_addr)
                                        &adap_emac->MACCONTROL);
                }
 
-               if (tmp & (PHY_ANLPAR_TXFD | PHY_ANLPAR_TX))
+               if (tmp & (LPA_100FULL | LPA_100HALF))
                        writel(readl(&adap_emac->MACCONTROL) |
                                        EMAC_MACCONTROL_RMIISPEED_100,
                                         &adap_emac->MACCONTROL);
@@ -667,6 +667,7 @@ int davinci_emac_initialize(void)
                return -1;
 
        memset(dev, 0, sizeof *dev);
+       sprintf(dev->name, "DaVinci-EMAC");
 
        dev->iobase = 0;
        dev->init = davinci_eth_open;
@@ -724,6 +725,13 @@ int davinci_emac_initialize(void)
                        phy.get_link_speed = dp83848_get_link_speed;
                        phy.auto_negotiate = dp83848_auto_negotiate;
                        break;
+               case PHY_ET1011C:
+                       sprintf(phy.name, "ET1011C @ 0x%02x", active_phy_addr);
+                       phy.init = gen_init_phy;
+                       phy.is_phy_connected = gen_is_phy_connected;
+                       phy.get_link_speed = et1011c_get_link_speed;
+                       phy.auto_negotiate = gen_auto_negotiate;
+                       break;
                default:
                        sprintf(phy.name, "GENERIC @ 0x%02x", active_phy_addr);
                        phy.init = gen_init_phy;