aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
diff options
context:
space:
mode:
authorChuanhong Guo <gch981213@gmail.com>2018-07-17 17:09:13 +0800
committerJohn Crispin <john@phrozen.org>2018-07-30 10:43:33 +0200
commit83d2dbc59924c90dd865de113a55d60826ac0c04 (patch)
tree2fb028041fcffa2e1de5342fa6f9a98462da5e48 /target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
parent24cbe27bb7ff83b9bb3a2640904bced1a2d14a8d (diff)
downloadupstream-83d2dbc59924c90dd865de113a55d60826ac0c04.tar.gz
upstream-83d2dbc59924c90dd865de113a55d60826ac0c04.tar.bz2
upstream-83d2dbc59924c90dd865de113a55d60826ac0c04.zip
ath79: ag71xx: Split mdio driver into an independent platform device.
We need to have mdio1 belonging to gmac1 initialized before gmac0. Split it into a separated mdio device to get both mdios ready before probing gmac. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c')
-rw-r--r--target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
index 72cfd6cf15..e741bdfa7b 100644
--- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
+++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
@@ -1438,11 +1438,10 @@ static int ag71xx_probe(struct platform_device *pdev)
ag71xx_wr(ag, AG71XX_REG_MAC_CFG1, 0);
ag71xx_hw_init(ag);
- ag71xx_mdio_init(ag);
err = ag71xx_phy_connect(ag);
if (err)
- goto err_mdio_free;
+ goto err_free;
err = ag71xx_debugfs_init(ag);
if (err)
@@ -1466,8 +1465,6 @@ static int ag71xx_probe(struct platform_device *pdev)
err_phy_disconnect:
ag71xx_phy_disconnect(ag);
-err_mdio_free:
- ag71xx_mdio_cleanup(ag);
err_free:
free_netdev(dev);
return err;
@@ -1484,7 +1481,6 @@ static int ag71xx_remove(struct platform_device *pdev)
ag = netdev_priv(dev);
ag71xx_debugfs_exit(ag);
ag71xx_phy_disconnect(ag);
- ag71xx_mdio_cleanup(ag);
unregister_netdev(dev);
free_irq(dev->irq, dev);
iounmap(ag->mac_base);