diff options
Diffstat (limited to 'drivers/net/phy/icplus.c')
-rw-r--r-- | drivers/net/phy/icplus.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c index 0856e1b7a849..5ac46f5226f3 100644 --- a/drivers/net/phy/icplus.c +++ b/drivers/net/phy/icplus.c | |||
@@ -40,6 +40,7 @@ MODULE_LICENSE("GPL"); | |||
40 | #define IP1001_PHASE_SEL_MASK 3 /* IP1001 RX/TXPHASE_SEL */ | 40 | #define IP1001_PHASE_SEL_MASK 3 /* IP1001 RX/TXPHASE_SEL */ |
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 | 44 | ||
44 | static int ip175c_config_init(struct phy_device *phydev) | 45 | static int ip175c_config_init(struct phy_device *phydev) |
45 | { | 46 | { |
@@ -162,7 +163,8 @@ static int ip101a_g_config_init(struct phy_device *phydev) | |||
162 | /* Enable Auto Power Saving mode */ | 163 | /* Enable Auto Power Saving mode */ |
163 | c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS); | 164 | c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS); |
164 | c |= IP101A_G_APS_ON; | 165 | c |= IP101A_G_APS_ON; |
165 | return c; | 166 | |
167 | return phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c); | ||
166 | } | 168 | } |
167 | 169 | ||
168 | static int ip175c_read_status(struct phy_device *phydev) | 170 | static int ip175c_read_status(struct phy_device *phydev) |
@@ -184,6 +186,15 @@ static int ip175c_config_aneg(struct phy_device *phydev) | |||
184 | return 0; | 186 | return 0; |
185 | } | 187 | } |
186 | 188 | ||
189 | static int ip101a_g_ack_interrupt(struct phy_device *phydev) | ||
190 | { | ||
191 | int err = phy_read(phydev, IP101A_G_IRQ_CONF_STATUS); | ||
192 | if (err < 0) | ||
193 | return err; | ||
194 | |||
195 | return 0; | ||
196 | } | ||
197 | |||
187 | static struct phy_driver ip175c_driver = { | 198 | static struct phy_driver ip175c_driver = { |
188 | .phy_id = 0x02430d80, | 199 | .phy_id = 0x02430d80, |
189 | .name = "ICPlus IP175C", | 200 | .name = "ICPlus IP175C", |
@@ -203,7 +214,6 @@ static struct phy_driver ip1001_driver = { | |||
203 | .phy_id_mask = 0x0ffffff0, | 214 | .phy_id_mask = 0x0ffffff0, |
204 | .features = PHY_GBIT_FEATURES | SUPPORTED_Pause | | 215 | .features = PHY_GBIT_FEATURES | SUPPORTED_Pause | |
205 | SUPPORTED_Asym_Pause, | 216 | SUPPORTED_Asym_Pause, |
206 | .flags = PHY_HAS_INTERRUPT, | ||
207 | .config_init = &ip1001_config_init, | 217 | .config_init = &ip1001_config_init, |
208 | .config_aneg = &genphy_config_aneg, | 218 | .config_aneg = &genphy_config_aneg, |
209 | .read_status = &genphy_read_status, | 219 | .read_status = &genphy_read_status, |
@@ -219,6 +229,7 @@ static struct phy_driver ip101a_g_driver = { | |||
219 | .features = PHY_BASIC_FEATURES | SUPPORTED_Pause | | 229 | .features = PHY_BASIC_FEATURES | SUPPORTED_Pause | |
220 | SUPPORTED_Asym_Pause, | 230 | SUPPORTED_Asym_Pause, |
221 | .flags = PHY_HAS_INTERRUPT, | 231 | .flags = PHY_HAS_INTERRUPT, |
232 | .ack_interrupt = ip101a_g_ack_interrupt, | ||
222 | .config_init = &ip101a_g_config_init, | 233 | .config_init = &ip101a_g_config_init, |
223 | .config_aneg = &genphy_config_aneg, | 234 | .config_aneg = &genphy_config_aneg, |
224 | .read_status = &genphy_read_status, | 235 | .read_status = &genphy_read_status, |