summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-12-19 19:10:14 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-19 19:10:14 -0500
commit4742e7808ab4bfdb386526c1a2b3ae09372236c3 (patch)
treed1e30f9d0941602c58e71bb17f4ab39c67650f88
parent9ddffb8a1103e9c716b152a80e46c95cba1ca6b2 (diff)
parent4174ecd78f6591a3d1ec04738ef7bc900a11f5ce (diff)
downloadlinux-4742e7808ab4bfdb386526c1a2b3ae09372236c3.tar.gz
linux-4742e7808ab4bfdb386526c1a2b3ae09372236c3.tar.bz2
linux-4742e7808ab4bfdb386526c1a2b3ae09372236c3.zip
Merge branch 'sh_eth'
Sergei Shtylyov says: ==================== Add PHY IRQ support to the 'sh_eth' driver This patchset adds support for passing PHY's IRQ to the 'sh_eth' driver from the platform code and removes now useless code that hinders the PHY IRQ handing by philib. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/renesas/sh_eth.c11
-rw-r--r--include/linux/sh_eth.h1
2 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index 8601d0c638cc..ca742e1f704e 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -1685,8 +1685,8 @@ static int sh_eth_phy_init(struct net_device *ndev)
return PTR_ERR(phydev);
}
- dev_info(&ndev->dev, "attached phy %i to driver %s\n",
- phydev->addr, phydev->drv->name);
+ dev_info(&ndev->dev, "attached PHY %d (IRQ %d) to driver %s\n",
+ phydev->addr, phydev->irq, phydev->drv->name);
mdp->phydev = phydev;
@@ -1703,11 +1703,6 @@ static int sh_eth_phy_start(struct net_device *ndev)
if (ret)
return ret;
- /* reset phy - this also wakes it from PDOWN */
- ret = phy_init_hw(mdp->phydev);
- if (ret)
- return ret;
-
phy_start(mdp->phydev);
return 0;
@@ -2544,6 +2539,8 @@ static int sh_mdio_init(struct net_device *ndev, int id,
for (i = 0; i < PHY_MAX_ADDR; i++)
mdp->mii_bus->irq[i] = PHY_POLL;
+ if (pd->phy_irq > 0)
+ mdp->mii_bus->irq[pd->phy] = pd->phy_irq;
/* register mdio bus */
ret = mdiobus_register(mdp->mii_bus);
diff --git a/include/linux/sh_eth.h b/include/linux/sh_eth.h
index 90b5e30c2f22..8c9131db2b25 100644
--- a/include/linux/sh_eth.h
+++ b/include/linux/sh_eth.h
@@ -8,6 +8,7 @@ enum {EDMAC_LITTLE_ENDIAN, EDMAC_BIG_ENDIAN};
struct sh_eth_plat_data {
int phy;
+ int phy_irq;
int edmac_endian;
phy_interface_t phy_interface;
void (*set_mdio_gate)(void *addr);