Skip to content
Snippets Groups Projects
Commit f73b2d64 authored by Chuanhong Guo's avatar Chuanhong Guo Committed by Daniel Golle
Browse files

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: default avatarChuanhong Guo <gch981213@gmail.com>
parent e7aa4c0d
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment