summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Walle <michael@walle.cc>2020-05-07 00:11:59 +0200
committerTom Rini <trini@konsulko.com>2020-05-07 11:05:01 -0400
commit8737c65fe4e315af923efde05e5f30041944be08 (patch)
treecbe74a525d8410d3dd8bb62124e5468669a8cba9
parent6333cbb3817ed551cd7d4e92f7359c73ccc567fc (diff)
downloadu-boot-WIP/2020-05-07-atheros-phy-improvements.tar.gz
phy: atheros: consolidate {ar8031|ar8035}_config()WIP/2020-05-07-atheros-phy-improvements
The two functions are now exactly the same, remove one of them. Signed-off-by: Michael Walle <michael@walle.cc> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
-rw-r--r--drivers/net/phy/atheros.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c
index 3142733105..47ff9f8d44 100644
--- a/drivers/net/phy/atheros.c
+++ b/drivers/net/phy/atheros.c
@@ -311,31 +311,7 @@ static int ar803x_of_init(struct phy_device *phydev)
return 0;
}
-static int ar8031_config(struct phy_device *phydev)
-{
- int ret;
-
- ret = ar803x_of_init(phydev);
- if (ret < 0)
- return ret;
-
- ret = ar803x_delay_config(phydev);
- if (ret < 0)
- return ret;
-
- ret = ar803x_regs_config(phydev);
- if (ret < 0)
- return ret;
-
- phydev->supported = phydev->drv->features;
-
- genphy_config_aneg(phydev);
- genphy_restart_aneg(phydev);
-
- return 0;
-}
-
-static int ar8035_config(struct phy_device *phydev)
+static int ar803x_config(struct phy_device *phydev)
{
int ret;
@@ -374,7 +350,7 @@ static struct phy_driver AR8031_driver = {
.uid = AR8031_PHY_ID,
.mask = 0xffffffef,
.features = PHY_GBIT_FEATURES,
- .config = ar8031_config,
+ .config = ar803x_config,
.startup = genphy_startup,
.shutdown = genphy_shutdown,
};
@@ -384,7 +360,7 @@ static struct phy_driver AR8035_driver = {
.uid = AR8035_PHY_ID,
.mask = 0xffffffef,
.features = PHY_GBIT_FEATURES,
- .config = ar8035_config,
+ .config = ar803x_config,
.startup = genphy_startup,
.shutdown = genphy_shutdown,
};