16 #include <linux/kernel.h>
17 #include <linux/string.h>
18 #include <linux/errno.h>
23 #include <linux/netdevice.h>
28 #include <linux/module.h>
29 #include <linux/mii.h>
30 #include <linux/ethtool.h>
35 #include <asm/uaccess.h>
38 #define MII_CIS8201_EXT_CON1 0x17
39 #define MII_CIS8201_EXTCON1_INIT 0x0000
42 #define MII_CIS8201_IMASK 0x19
43 #define MII_CIS8201_IMASK_IEN 0x8000
44 #define MII_CIS8201_IMASK_SPEED 0x4000
45 #define MII_CIS8201_IMASK_LINK 0x2000
46 #define MII_CIS8201_IMASK_DUPLEX 0x1000
47 #define MII_CIS8201_IMASK_MASK 0xf000
50 #define MII_CIS8201_ISTAT 0x1a
51 #define MII_CIS8201_ISTAT_STATUS 0x8000
52 #define MII_CIS8201_ISTAT_SPEED 0x4000
53 #define MII_CIS8201_ISTAT_LINK 0x2000
54 #define MII_CIS8201_ISTAT_DUPLEX 0x1000
57 #define MII_CIS8201_AUX_CONSTAT 0x1c
58 #define MII_CIS8201_AUXCONSTAT_INIT 0x0004
59 #define MII_CIS8201_AUXCONSTAT_DUPLEX 0x0020
60 #define MII_CIS8201_AUXCONSTAT_SPEED 0x0018
61 #define MII_CIS8201_AUXCONSTAT_GBIT 0x0010
62 #define MII_CIS8201_AUXCONSTAT_100 0x0008
68 static int cis820x_config_init(
struct phy_device *phydev)
84 static int cis820x_ack_interrupt(
struct phy_device *phydev)
88 return (err < 0) ? err : 0;
91 static int cis820x_config_intr(
struct phy_device *phydev)
107 .phy_id = 0x000fc410,
108 .name =
"Cicada Cis8201",
109 .phy_id_mask = 0x000ffff0,
112 .config_init = &cis820x_config_init,
115 .ack_interrupt = &cis820x_ack_interrupt,
116 .config_intr = &cis820x_config_intr,
119 .phy_id = 0x000fc440,
120 .name =
"Cicada Cis8204",
121 .phy_id_mask = 0x000fffc0,
124 .config_init = &cis820x_config_init,
127 .ack_interrupt = &cis820x_ack_interrupt,
128 .config_intr = &cis820x_config_intr,
132 static int __init cicada_init(
void)
138 static void __exit cicada_exit(
void)
148 { 0x000fc410, 0x000ffff0 },
149 { 0x000fc440, 0x000fffc0 },