generic: ar8216: move sleep out of the loop
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 9 Feb 2013 13:26:04 +0000 (13:26 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 9 Feb 2013 13:26:04 +0000 (13:26 +0000)
It is enough to sleep once after ANEG is enabled on
all PHYs. This reduces boot time on boards with
AR8316 switch.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35532 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/generic/files/drivers/net/phy/ar8216.c

index e6a4607..4547f7c 100644 (file)
@@ -833,9 +833,10 @@ ar8316_hw_init(struct ar8216_priv *priv)
                        ADVERTISE_ALL | ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM);
                mdiobus_write(bus, i, MII_CTRL1000, ADVERTISE_1000FULL);
                mdiobus_write(bus, i, MII_BMCR, BMCR_RESET | BMCR_ANENABLE);
-               msleep(1000);
        }
 
+       msleep(1000);
+
 out:
        priv->initialized = true;
        return 0;