diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-07-05 08:26:39 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-07-05 08:26:39 +0000 |
commit | 4ecbabb00bf0e1a9c4408def5320cdfe37a1a3c3 (patch) | |
tree | 2e3e847c882f7f82541e3fc570f61afd700de76f /target/linux/generic/files/drivers/net/phy | |
parent | 59677232f8f4c09809cddfa65a4b2efac5cc238c (diff) | |
download | master-187ad058-4ecbabb00bf0e1a9c4408def5320cdfe37a1a3c3.tar.gz master-187ad058-4ecbabb00bf0e1a9c4408def5320cdfe37a1a3c3.tar.bz2 master-187ad058-4ecbabb00bf0e1a9c4408def5320cdfe37a1a3c3.zip |
generic: ar8216: start aneg on each PHY of the AR8327
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32604 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/ar8216.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 698d92dd7d..4df2dbbdb5 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -734,6 +734,7 @@ ar8327_hw_init(struct ar8216_priv *priv) { struct ar8327_platform_data *pdata; struct ar8327_led_cfg *led_cfg; + struct mii_bus *bus; u32 pos, new_pos; u32 t; int i; @@ -770,9 +771,20 @@ ar8327_hw_init(struct ar8216_priv *priv) priv->write(priv, AR8327_REG_POWER_ON_STRIP, new_pos); } - for (i = 0; i < AR8327_NUM_PHYS; i++) + bus = priv->phy->bus; + for (i = 0; i < AR8327_NUM_PHYS; i++) { ar8327_phy_fixup(priv, i); + /* start aneg on the PHY */ + mdiobus_write(bus, i, MII_ADVERTISE, 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); + return 0; } |