aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-02-08 09:13:14 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-02-08 09:13:14 +0000
commit9c1f95a4164ac4f1ff254decf8278f910c5f4d57 (patch)
tree4c4bda8fbd9ff01664bd3dd055ab7e6b41a228b2 /target/linux
parent5c8783e02a544544c9b7fe432c8fd248eb11e08f (diff)
downloadupstream-9c1f95a4164ac4f1ff254decf8278f910c5f4d57.tar.gz
upstream-9c1f95a4164ac4f1ff254decf8278f910c5f4d57.tar.bz2
upstream-9c1f95a4164ac4f1ff254decf8278f910c5f4d57.zip
generic: ar8216: don't use mdio bus specific functions in ar8216_id_chip
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 35517
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index c02803b5e0..d980e24ee1 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -1653,7 +1653,7 @@ ar8216_id_chip(struct ar8216_priv *priv)
u16 id;
int i;
- val = ar8216_mii_read(priv, AR8216_REG_CTRL);
+ val = priv->read(priv, AR8216_REG_CTRL);
if (val == ~0)
return -ENODEV;
@@ -1661,7 +1661,7 @@ ar8216_id_chip(struct ar8216_priv *priv)
for (i = 0; i < AR8X16_PROBE_RETRIES; i++) {
u16 t;
- val = ar8216_mii_read(priv, AR8216_REG_CTRL);
+ val = priv->read(priv, AR8216_REG_CTRL);
if (val == ~0)
return -ENODEV;
@@ -1689,10 +1689,8 @@ ar8216_id_chip(struct ar8216_priv *priv)
break;
default:
printk(KERN_DEBUG
- "ar8216: Unknown Atheros device [ver=%d, rev=%d, phy_id=%04x%04x]\n",
- priv->chip_ver, priv->chip_rev,
- mdiobus_read(priv->mii_bus, priv->phy->addr, 2),
- mdiobus_read(priv->mii_bus, priv->phy->addr, 3));
+ "ar8216: Unknown Atheros device [ver=%d, rev=%d]\n",
+ priv->chip_ver, priv->chip_rev);
return -ENODEV;
}
@@ -1784,6 +1782,9 @@ ar8216_config_init(struct phy_device *pdev)
}
priv->mii_bus = pdev->bus;
+ priv->read = ar8216_mii_read;
+ priv->write = ar8216_mii_write;
+
priv->phy = pdev;
ret = ar8216_id_chip(priv);
@@ -1833,8 +1834,6 @@ ar8216_config_init(struct phy_device *pdev)
pdev->advertising = pdev->supported;
mutex_init(&priv->reg_mutex);
- priv->read = ar8216_mii_read;
- priv->write = ar8216_mii_write;
pdev->priv = priv;
@@ -1972,6 +1971,8 @@ ar8216_probe(struct phy_device *pdev)
return -ENOMEM;
priv->mii_bus = pdev->bus;
+ priv->read = ar8216_mii_read;
+ priv->write = ar8216_mii_write;
priv->phy = pdev;
ret = ar8216_id_chip(priv);