diff options
author | Giuseppe CAVALLARO <peppe.cavallaro@st.com> | 2012-06-04 01:51:18 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-04 12:02:40 -0400 |
commit | 9ec0db71af04f4560e27a3c2f5a0411ba3155198 (patch) | |
tree | 9361a0d038f515409a1ac105f518967600652cbd /drivers/net | |
parent | 3ab2cdd02850d53d32369e51c0ae2dbcf8a66e55 (diff) |
net: icplus: fix interrupt mask
This patch fixes the interrupt mask for IC101 A/G devices
and now enables the link/speed/duplex interrupts.
This is done by setting the "INTR pin used" bit and cleaning
all the other bits in the Register 17.
Reported-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/phy/icplus.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c index 5ac46f5226f3..47f8e8939266 100644 --- a/drivers/net/phy/icplus.c +++ b/drivers/net/phy/icplus.c | |||
@@ -41,6 +41,8 @@ MODULE_LICENSE("GPL"); | |||
41 | #define IP1001_APS_ON 11 /* IP1001 APS Mode bit */ | 41 | #define IP1001_APS_ON 11 /* IP1001 APS Mode bit */ |
42 | #define IP101A_G_APS_ON 2 /* IP101A/G APS Mode bit */ | 42 | #define IP101A_G_APS_ON 2 /* IP101A/G APS Mode bit */ |
43 | #define IP101A_G_IRQ_CONF_STATUS 0x11 /* Conf Info IRQ & Status Reg */ | 43 | #define IP101A_G_IRQ_CONF_STATUS 0x11 /* Conf Info IRQ & Status Reg */ |
44 | #define IP101A_G_IRQ_PIN_USED (1<<15) /* INTR pin used */ | ||
45 | #define IP101A_G_IRQ_DEFAULT IP101A_G_IRQ_PIN_USED | ||
44 | 46 | ||
45 | static int ip175c_config_init(struct phy_device *phydev) | 47 | static int ip175c_config_init(struct phy_device *phydev) |
46 | { | 48 | { |
@@ -136,6 +138,11 @@ static int ip1001_config_init(struct phy_device *phydev) | |||
136 | if (c < 0) | 138 | if (c < 0) |
137 | return c; | 139 | return c; |
138 | 140 | ||
141 | /* INTR pin used: speed/link/duplex will cause an interrupt */ | ||
142 | c = phy_write(phydev, IP101A_G_IRQ_CONF_STATUS, IP101A_G_IRQ_DEFAULT); | ||
143 | if (c < 0) | ||
144 | return c; | ||
145 | |||
139 | if (phydev->interface == PHY_INTERFACE_MODE_RGMII) { | 146 | if (phydev->interface == PHY_INTERFACE_MODE_RGMII) { |
140 | /* Additional delay (2ns) used to adjust RX clock phase | 147 | /* Additional delay (2ns) used to adjust RX clock phase |
141 | * at RGMII interface */ | 148 | * at RGMII interface */ |