提交 18be099b 编写于 作者: S Sergei Shtylyov 提交者: David S. Miller

sh_eth: add PHY IRQ to platform data

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: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9ddffb8a
...@@ -1685,8 +1685,8 @@ static int sh_eth_phy_init(struct net_device *ndev) ...@@ -1685,8 +1685,8 @@ static int sh_eth_phy_init(struct net_device *ndev)
return PTR_ERR(phydev); return PTR_ERR(phydev);
} }
dev_info(&ndev->dev, "attached phy %i to driver %s\n", dev_info(&ndev->dev, "attached PHY %d (IRQ %d) to driver %s\n",
phydev->addr, phydev->drv->name); phydev->addr, phydev->irq, phydev->drv->name);
mdp->phydev = phydev; mdp->phydev = phydev;
...@@ -2544,6 +2544,8 @@ static int sh_mdio_init(struct net_device *ndev, int id, ...@@ -2544,6 +2544,8 @@ static int sh_mdio_init(struct net_device *ndev, int id,
for (i = 0; i < PHY_MAX_ADDR; i++) for (i = 0; i < PHY_MAX_ADDR; i++)
mdp->mii_bus->irq[i] = PHY_POLL; mdp->mii_bus->irq[i] = PHY_POLL;
if (pd->phy_irq > 0)
mdp->mii_bus->irq[pd->phy] = pd->phy_irq;
/* register mdio bus */ /* register mdio bus */
ret = mdiobus_register(mdp->mii_bus); ret = mdiobus_register(mdp->mii_bus);
......
...@@ -8,6 +8,7 @@ enum {EDMAC_LITTLE_ENDIAN, EDMAC_BIG_ENDIAN}; ...@@ -8,6 +8,7 @@ enum {EDMAC_LITTLE_ENDIAN, EDMAC_BIG_ENDIAN};
struct sh_eth_plat_data { struct sh_eth_plat_data {
int phy; int phy;
int phy_irq;
int edmac_endian; int edmac_endian;
phy_interface_t phy_interface; phy_interface_t phy_interface;
void (*set_mdio_gate)(void *addr); void (*set_mdio_gate)(void *addr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册