]> git.sur5r.net Git - u-boot/blobdiff - drivers/net/cpsw.c
mtd: OMAP: Enable GPMC prefetch mode
[u-boot] / drivers / net / cpsw.c
index 8ec5161ec61fac4ab5edc26b4ddcaa2d177f288e..52f8da67e1d9049da108238e8955ae2de3d0fce5 100644 (file)
@@ -235,7 +235,6 @@ struct cpsw_priv {
        struct phy_device               *phydev;
        struct mii_dev                  *bus;
 
-       u32                             mdio_link;
        u32                             phy_mask;
 };
 
@@ -613,19 +612,8 @@ static int cpsw_update_link(struct cpsw_priv *priv)
 
        for_active_slave(slave, priv)
                cpsw_slave_update_link(slave, priv, &link);
-       priv->mdio_link = readl(&mdio_regs->link);
-       return link;
-}
-
-static int cpsw_check_link(struct cpsw_priv *priv)
-{
-       u32 link = 0;
 
-       link = __raw_readl(&mdio_regs->link) & priv->phy_mask;
-       if ((link) && (link == priv->mdio_link))
-               return 1;
-
-       return cpsw_update_link(priv);
+       return link;
 }
 
 static inline u32  cpsw_get_slave_port(struct cpsw_priv *priv, u32 slave_num)
@@ -891,9 +879,6 @@ static int cpsw_send(struct eth_device *dev, void *packet, int length)
        int len;
        int timeout = CPDMA_TIMEOUT;
 
-       if (!cpsw_check_link(priv))
-               return -EIO;
-
        flush_dcache_range((unsigned long)packet,
                           (unsigned long)packet + length);
 
@@ -916,8 +901,6 @@ static int cpsw_recv(struct eth_device *dev)
        void *buffer;
        int len;
 
-       cpsw_check_link(priv);
-
        while (cpdma_process(priv, &priv->rx_chan, &buffer, &len) >= 0) {
                invalidate_dcache_range((unsigned long)buffer,
                                        (unsigned long)buffer + PKTSIZE_ALIGN);