Commit dd9a122a authored by Esben Haabendal's avatar Esben Haabendal Committed by David S. Miller

net: phy: marvell: Enable interrupt function on LED2 pin

The LED2[2]/INTn pin on Marvell 88E1318S as well as 88E1510/12/14/18 needs
to be configured to be usable as interrupt not only when WOL is enabled,
but whenever we rely on interrupts from the PHY.
Signed-off-by: default avatarEsben Haabendal <eha@deif.com>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent eb192480
...@@ -828,6 +828,22 @@ static int m88e1121_config_init(struct phy_device *phydev) ...@@ -828,6 +828,22 @@ static int m88e1121_config_init(struct phy_device *phydev)
return marvell_config_init(phydev); return marvell_config_init(phydev);
} }
static int m88e1318_config_init(struct phy_device *phydev)
{
if (phy_interrupt_is_valid(phydev)) {
int err = phy_modify_paged(
phydev, MII_MARVELL_LED_PAGE,
MII_88E1318S_PHY_LED_TCR,
MII_88E1318S_PHY_LED_TCR_FORCE_INT,
MII_88E1318S_PHY_LED_TCR_INTn_ENABLE |
MII_88E1318S_PHY_LED_TCR_INT_ACTIVE_LOW);
if (err < 0)
return err;
}
return m88e1121_config_init(phydev);
}
static int m88e1510_config_init(struct phy_device *phydev) static int m88e1510_config_init(struct phy_device *phydev)
{ {
int err; int err;
...@@ -870,7 +886,7 @@ static int m88e1510_config_init(struct phy_device *phydev) ...@@ -870,7 +886,7 @@ static int m88e1510_config_init(struct phy_device *phydev)
phydev->advertising &= ~pause; phydev->advertising &= ~pause;
} }
return m88e1121_config_init(phydev); return m88e1318_config_init(phydev);
} }
static int m88e1118_config_aneg(struct phy_device *phydev) static int m88e1118_config_aneg(struct phy_device *phydev)
...@@ -2086,7 +2102,7 @@ static struct phy_driver marvell_drivers[] = { ...@@ -2086,7 +2102,7 @@ static struct phy_driver marvell_drivers[] = {
.features = PHY_GBIT_FEATURES, .features = PHY_GBIT_FEATURES,
.flags = PHY_HAS_INTERRUPT, .flags = PHY_HAS_INTERRUPT,
.probe = marvell_probe, .probe = marvell_probe,
.config_init = &m88e1121_config_init, .config_init = &m88e1318_config_init,
.config_aneg = &m88e1318_config_aneg, .config_aneg = &m88e1318_config_aneg,
.read_status = &marvell_read_status, .read_status = &marvell_read_status,
.ack_interrupt = &marvell_ack_interrupt, .ack_interrupt = &marvell_ack_interrupt,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment