diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-12-11 12:21:15 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2009-12-11 12:21:15 +0000 |
commit | d38fd20cb7d2a6e5d38858dc341cedc2b0a6aec1 (patch) | |
tree | 155f473d2536e61c4a8e6dd186d1fc124cd90b71 /target/linux/ar71xx/files/drivers | |
parent | ac40715c5f60cb334ae34cd05d96603db7e79378 (diff) | |
download | mtk-20170518-d38fd20cb7d2a6e5d38858dc341cedc2b0a6aec1.zip mtk-20170518-d38fd20cb7d2a6e5d38858dc341cedc2b0a6aec1.tar.gz mtk-20170518-d38fd20cb7d2a6e5d38858dc341cedc2b0a6aec1.tar.bz2 |
ar71xx: move mdio_bus reset code
SVN-Revision: 18749
Diffstat (limited to 'target/linux/ar71xx/files/drivers')
-rw-r--r-- | target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c | 7 | ||||
-rw-r--r-- | target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c | 5 |
2 files changed, 5 insertions, 7 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c index 88edb2f..be8db3e 100644 --- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c +++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c @@ -917,13 +917,6 @@ static int __init ag71xx_probe(struct platform_device *pdev) ag71xx_dump_regs(ag); - /* Reset the mdio bus explicitly */ - if (ag->mii_bus) { - mutex_lock(&ag->mii_bus->mdio_lock); - ag->mii_bus->reset(ag->mii_bus); - mutex_unlock(&ag->mii_bus->mdio_lock); - } - platform_set_drvdata(pdev, dev); return 0; diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c index 0db0a4b..547f72e 100644 --- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c +++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c @@ -308,6 +308,11 @@ int ag71xx_phy_connect(struct ag71xx *ag) return -ENODEV; } + /* Reset the mdio bus explicitly */ + mutex_lock(&ag->mii_bus->mdio_lock); + ag->mii_bus->reset(ag->mii_bus); + mutex_unlock(&ag->mii_bus->mdio_lock); + if (pdata->phy_mask) return ag71xx_phy_connect_multi(ag); |