Skip to content

Commit

Permalink
sh_eth: add PHY IRQ to platform data
Browse files Browse the repository at this point in the history
Allow the platform code to pass PHY's IRQ to the driver.  Print this IRQ along
with the other PHY datails in sh_eth_phy_init().

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sergei Shtylyov authored and David S. Miller committed Dec 20, 2013
1 parent 9ddffb8 commit 18be099
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/renesas/sh_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -2544,6 +2544,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);
Expand Down
1 change: 1 addition & 0 deletions include/linux/sh_eth.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 18be099

Please sign in to comment.