Commit dcd07be3 authored by Anatolij Gustschin's avatar Anatolij Gustschin Committed by David S. Miller

phylib: Add interrupt source check function to M88E1121R driver

Add did_interrupt() function to check if a PHY port
really caused an interrupt. This is needed in the case
of shared PHY interrupt pin configuration to stop
interrupt event processing for PHY ports which didn't
cause an interrupt.
Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a8729eb3
...@@ -458,6 +458,18 @@ static int marvell_read_status(struct phy_device *phydev) ...@@ -458,6 +458,18 @@ static int marvell_read_status(struct phy_device *phydev)
return 0; return 0;
} }
static int m88e1121_did_interrupt(struct phy_device *phydev)
{
int imask;
imask = phy_read(phydev, MII_M1011_IEVENT);
if (imask & MII_M1011_IMASK_INIT)
return 1;
return 0;
}
static struct phy_driver marvell_drivers[] = { static struct phy_driver marvell_drivers[] = {
{ {
.phy_id = 0x01410c60, .phy_id = 0x01410c60,
...@@ -520,6 +532,7 @@ static struct phy_driver marvell_drivers[] = { ...@@ -520,6 +532,7 @@ static struct phy_driver marvell_drivers[] = {
.read_status = &marvell_read_status, .read_status = &marvell_read_status,
.ack_interrupt = &marvell_ack_interrupt, .ack_interrupt = &marvell_ack_interrupt,
.config_intr = &marvell_config_intr, .config_intr = &marvell_config_intr,
.did_interrupt = &m88e1121_did_interrupt,
.driver = { .owner = THIS_MODULE }, .driver = { .owner = THIS_MODULE },
}, },
{ {
......
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