12 #include <linux/kernel.h>
13 #include <linux/string.h>
14 #include <linux/errno.h>
19 #include <linux/netdevice.h>
24 #include <linux/module.h>
25 #include <linux/mii.h>
26 #include <linux/ethtool.h>
31 #include <asm/uaccess.h>
38 #define IP10XX_SPEC_CTRL_STATUS 16
39 #define IP1001_SPEC_CTRL_STATUS_2 20
40 #define IP1001_PHASE_SEL_MASK 3
41 #define IP1001_APS_ON 11
42 #define IP101A_G_APS_ON 2
43 #define IP101A_G_IRQ_CONF_STATUS 0x11
44 #define IP101A_G_IRQ_PIN_USED (1<<15)
45 #define IP101A_G_IRQ_DEFAULT IP101A_G_IRQ_PIN_USED
47 static int ip175c_config_init(
struct phy_device *phydev)
50 static int full_reset_performed = 0;
52 if (full_reset_performed == 0) {
76 for (i = 0; i < 5; i++) {
83 for (i = 0; i < 5; i++)
88 full_reset_performed = 1;
91 if (phydev->
addr != 4) {
102 static int ip1xx_reset(
struct phy_device *phydev)
124 static int ip1001_config_init(
struct phy_device *phydev)
128 c = ip1xx_reset(phydev);
162 static int ip101a_g_config_init(
struct phy_device *phydev)
166 c = ip1xx_reset(phydev);
177 static int ip175c_read_status(
struct phy_device *phydev)
179 if (phydev->
addr == 4)
188 static int ip175c_config_aneg(
struct phy_device *phydev)
190 if (phydev->
addr == 4)
196 static int ip101a_g_ack_interrupt(
struct phy_device *phydev)
207 .phy_id = 0x02430d80,
208 .name =
"ICPlus IP175C",
209 .phy_id_mask = 0x0ffffff0,
211 .config_init = &ip175c_config_init,
212 .config_aneg = &ip175c_config_aneg,
213 .read_status = &ip175c_read_status,
218 .phy_id = 0x02430d90,
219 .name =
"ICPlus IP1001",
220 .phy_id_mask = 0x0ffffff0,
223 .config_init = &ip1001_config_init,
230 .phy_id = 0x02430c54,
231 .name =
"ICPlus IP101A/G",
232 .phy_id_mask = 0x0ffffff0,
236 .ack_interrupt = ip101a_g_ack_interrupt,
237 .config_init = &ip101a_g_config_init,
245 static int __init icplus_init(
void)
251 static void __exit icplus_exit(
void)
261 { 0x02430d80, 0x0ffffff0 },
262 { 0x02430d90, 0x0ffffff0 },
263 { 0x02430c54, 0x0ffffff0 },