aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorChuanhong Guo <gch981213@gmail.com>2018-12-14 23:38:49 +0800
committerDaniel Golle <daniel@makrotopia.org>2019-03-05 03:02:34 +0100
commitf73b2d64ed56c1ba41c1ef906ef292d07f839def (patch)
tree861b3e90b463bb51c5e7ae2dc3113bf9492d9bab /target
parente7aa4c0db7eb3e81163682f570a9aecbb9fa8aed (diff)
downloadupstream-f73b2d64ed56c1ba41c1ef906ef292d07f839def.tar.gz
upstream-f73b2d64ed56c1ba41c1ef906ef292d07f839def.tar.bz2
upstream-f73b2d64ed56c1ba41c1ef906ef292d07f839def.zip
ath79: ag71xx: replace ag71xx_get_phy_if_mode_name() with phy_modes()
phy_modes() in phy.h can convert PHY modes to string with supports for all available PHY modes. Also add a space in mode printing to make it look better. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target')
-rw-r--r--target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c24
1 files changed, 2 insertions, 22 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 d809bbee80..0ac2c3d7a2 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
@@ -1318,26 +1318,6 @@ static const struct net_device_ops ag71xx_netdev_ops = {
#endif
};
-static const char *ag71xx_get_phy_if_mode_name(phy_interface_t mode)
-{
- switch (mode) {
- case PHY_INTERFACE_MODE_MII:
- return "MII";
- case PHY_INTERFACE_MODE_GMII:
- return "GMII";
- case PHY_INTERFACE_MODE_RMII:
- return "RMII";
- case PHY_INTERFACE_MODE_RGMII:
- return "RGMII";
- case PHY_INTERFACE_MODE_SGMII:
- return "SGMII";
- default:
- break;
- }
-
- return "unknown";
-}
-
static int ag71xx_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
@@ -1549,9 +1529,9 @@ static int ag71xx_probe(struct platform_device *pdev)
goto err_phy_disconnect;
}
- pr_info("%s: Atheros AG71xx at 0x%08lx, irq %d, mode:%s\n",
+ pr_info("%s: Atheros AG71xx at 0x%08lx, irq %d, mode: %s\n",
dev->name, (unsigned long) ag->mac_base, dev->irq,
- ag71xx_get_phy_if_mode_name(ag->phy_if_mode));
+ phy_modes(ag->phy_if_mode));
return 0;