ar8216: decrease page switch wait time
[openwrt/svn-archive/archive.git] / target / linux / generic / files / drivers / net / phy / ar8216.c
index 130ebf7126df04398e1651c5a374b0e9f4396af1..8a40a322b59d604fa6daee5d55b00476e68862b3 100644 (file)
@@ -260,7 +260,7 @@ ar8xxx_read(struct ar8xxx_priv *priv, int reg)
        mutex_lock(&bus->mdio_lock);
 
        bus->write(bus, 0x18, 0, page);
-       usleep_range(1000, 2000); /* wait for the page switch to propagate */
+       wait_for_page_switch();
        val = mii_read32(priv, 0x10 | r2, r1);
 
        mutex_unlock(&bus->mdio_lock);
@@ -279,7 +279,7 @@ ar8xxx_write(struct ar8xxx_priv *priv, int reg, u32 val)
        mutex_lock(&bus->mdio_lock);
 
        bus->write(bus, 0x18, 0, page);
-       usleep_range(1000, 2000); /* wait for the page switch to propagate */
+       wait_for_page_switch();
        mii_write32(priv, 0x10 | r2, r1, val);
 
        mutex_unlock(&bus->mdio_lock);
@@ -297,7 +297,7 @@ ar8xxx_rmw(struct ar8xxx_priv *priv, int reg, u32 mask, u32 val)
        mutex_lock(&bus->mdio_lock);
 
        bus->write(bus, 0x18, 0, page);
-       usleep_range(1000, 2000); /* wait for the page switch to propagate */
+       wait_for_page_switch();
 
        ret = mii_read32(priv, 0x10 | r2, r1);
        ret &= ~mask;