aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-12-25 18:45:29 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-12-25 18:45:29 +0000
commit17bb18be18bd5d88146d893d0f8ac63833f3f2c8 (patch)
treefc6f5e046705691510a39e45d5aa1fd4f7a6c50d /target/linux/ar71xx
parentde0a8def83570858b0665dde16afbe9d777f7395 (diff)
downloadupstream-17bb18be18bd5d88146d893d0f8ac63833f3f2c8.tar.gz
upstream-17bb18be18bd5d88146d893d0f8ac63833f3f2c8.tar.bz2
upstream-17bb18be18bd5d88146d893d0f8ac63833f3f2c8.zip
ar71xx: ag71xx: show PHY interface mode in dmesg
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34880 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
index 6dadf94a40..2eeb269439 100644
--- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
+++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
@@ -1056,6 +1056,27 @@ static const struct net_device_ops ag71xx_netdev_ops = {
#endif
};
+static __devinit 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 __devinit ag71xx_probe(struct platform_device *pdev)
{
struct net_device *dev;
@@ -1149,8 +1170,9 @@ static int __devinit ag71xx_probe(struct platform_device *pdev)
goto err_free_desc;
}
- pr_info("%s: Atheros AG71xx at 0x%08lx, irq %d\n",
- dev->name, dev->base_addr, dev->irq);
+ pr_info("%s: Atheros AG71xx at 0x%08lx, irq %d, mode:%s\n",
+ dev->name, dev->base_addr, dev->irq,
+ ag71xx_get_phy_if_mode_name(pdata->phy_if_mode));
ag71xx_dump_regs(ag);