diff options
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/Kconfig | 22 | ||||
-rw-r--r-- | drivers/net/phy/davicom.c | 34 |
2 files changed, 32 insertions, 24 deletions
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index c0d3101eb6a0..09b6f259eb92 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig | |||
@@ -2,70 +2,61 @@ | |||
2 | # PHY Layer Configuration | 2 | # PHY Layer Configuration |
3 | # | 3 | # |
4 | 4 | ||
5 | menu "PHY device support" | 5 | menuconfig PHYLIB |
6 | depends on !S390 | ||
7 | |||
8 | config PHYLIB | ||
9 | tristate "PHY Device support and infrastructure" | 6 | tristate "PHY Device support and infrastructure" |
7 | depends on !S390 | ||
10 | depends on NET_ETHERNET && (BROKEN || !S390) | 8 | depends on NET_ETHERNET && (BROKEN || !S390) |
11 | help | 9 | help |
12 | Ethernet controllers are usually attached to PHY | 10 | Ethernet controllers are usually attached to PHY |
13 | devices. This option provides infrastructure for | 11 | devices. This option provides infrastructure for |
14 | managing PHY devices. | 12 | managing PHY devices. |
15 | 13 | ||
14 | if PHYLIB | ||
15 | |||
16 | comment "MII PHY device drivers" | 16 | comment "MII PHY device drivers" |
17 | depends on PHYLIB | ||
18 | 17 | ||
19 | config MARVELL_PHY | 18 | config MARVELL_PHY |
20 | tristate "Drivers for Marvell PHYs" | 19 | tristate "Drivers for Marvell PHYs" |
21 | depends on PHYLIB | ||
22 | ---help--- | 20 | ---help--- |
23 | Currently has a driver for the 88E1011S | 21 | Currently has a driver for the 88E1011S |
24 | 22 | ||
25 | config DAVICOM_PHY | 23 | config DAVICOM_PHY |
26 | tristate "Drivers for Davicom PHYs" | 24 | tristate "Drivers for Davicom PHYs" |
27 | depends on PHYLIB | ||
28 | ---help--- | 25 | ---help--- |
29 | Currently supports dm9161e and dm9131 | 26 | Currently supports dm9161e and dm9131 |
30 | 27 | ||
31 | config QSEMI_PHY | 28 | config QSEMI_PHY |
32 | tristate "Drivers for Quality Semiconductor PHYs" | 29 | tristate "Drivers for Quality Semiconductor PHYs" |
33 | depends on PHYLIB | ||
34 | ---help--- | 30 | ---help--- |
35 | Currently supports the qs6612 | 31 | Currently supports the qs6612 |
36 | 32 | ||
37 | config LXT_PHY | 33 | config LXT_PHY |
38 | tristate "Drivers for the Intel LXT PHYs" | 34 | tristate "Drivers for the Intel LXT PHYs" |
39 | depends on PHYLIB | ||
40 | ---help--- | 35 | ---help--- |
41 | Currently supports the lxt970, lxt971 | 36 | Currently supports the lxt970, lxt971 |
42 | 37 | ||
43 | config CICADA_PHY | 38 | config CICADA_PHY |
44 | tristate "Drivers for the Cicada PHYs" | 39 | tristate "Drivers for the Cicada PHYs" |
45 | depends on PHYLIB | ||
46 | ---help--- | 40 | ---help--- |
47 | Currently supports the cis8204 | 41 | Currently supports the cis8204 |
42 | |||
48 | config VITESSE_PHY | 43 | config VITESSE_PHY |
49 | tristate "Drivers for the Vitesse PHYs" | 44 | tristate "Drivers for the Vitesse PHYs" |
50 | depends on PHYLIB | ||
51 | ---help--- | 45 | ---help--- |
52 | Currently supports the vsc8244 | 46 | Currently supports the vsc8244 |
53 | 47 | ||
54 | config SMSC_PHY | 48 | config SMSC_PHY |
55 | tristate "Drivers for SMSC PHYs" | 49 | tristate "Drivers for SMSC PHYs" |
56 | depends on PHYLIB | ||
57 | ---help--- | 50 | ---help--- |
58 | Currently supports the LAN83C185 PHY | 51 | Currently supports the LAN83C185 PHY |
59 | 52 | ||
60 | config BROADCOM_PHY | 53 | config BROADCOM_PHY |
61 | tristate "Drivers for Broadcom PHYs" | 54 | tristate "Drivers for Broadcom PHYs" |
62 | depends on PHYLIB | ||
63 | ---help--- | 55 | ---help--- |
64 | Currently supports the BCM5411, BCM5421 and BCM5461 PHYs. | 56 | Currently supports the BCM5411, BCM5421 and BCM5461 PHYs. |
65 | 57 | ||
66 | config FIXED_PHY | 58 | config FIXED_PHY |
67 | tristate "Drivers for PHY emulation on fixed speed/link" | 59 | tristate "Drivers for PHY emulation on fixed speed/link" |
68 | depends on PHYLIB | ||
69 | ---help--- | 60 | ---help--- |
70 | Adds the driver to PHY layer to cover the boards that do not have any PHY bound, | 61 | Adds the driver to PHY layer to cover the boards that do not have any PHY bound, |
71 | but with the ability to manipulate the speed/link in software. The relevant MII | 62 | but with the ability to manipulate the speed/link in software. The relevant MII |
@@ -80,5 +71,4 @@ config FIXED_MII_100_FDX | |||
80 | bool "Emulation for 100M Fdx fixed PHY behavior" | 71 | bool "Emulation for 100M Fdx fixed PHY behavior" |
81 | depends on FIXED_PHY | 72 | depends on FIXED_PHY |
82 | 73 | ||
83 | endmenu | 74 | endif # PHYLIB |
84 | |||
diff --git a/drivers/net/phy/davicom.c b/drivers/net/phy/davicom.c index 519baa38be8d..7ed632db00d7 100644 --- a/drivers/net/phy/davicom.c +++ b/drivers/net/phy/davicom.c | |||
@@ -139,7 +139,7 @@ static int dm9161_ack_interrupt(struct phy_device *phydev) | |||
139 | return (err < 0) ? err : 0; | 139 | return (err < 0) ? err : 0; |
140 | } | 140 | } |
141 | 141 | ||
142 | static struct phy_driver dm9161_driver = { | 142 | static struct phy_driver dm9161e_driver = { |
143 | .phy_id = 0x0181b880, | 143 | .phy_id = 0x0181b880, |
144 | .name = "Davicom DM9161E", | 144 | .name = "Davicom DM9161E", |
145 | .phy_id_mask = 0x0ffffff0, | 145 | .phy_id_mask = 0x0ffffff0, |
@@ -147,7 +147,18 @@ static struct phy_driver dm9161_driver = { | |||
147 | .config_init = dm9161_config_init, | 147 | .config_init = dm9161_config_init, |
148 | .config_aneg = dm9161_config_aneg, | 148 | .config_aneg = dm9161_config_aneg, |
149 | .read_status = genphy_read_status, | 149 | .read_status = genphy_read_status, |
150 | .driver = { .owner = THIS_MODULE,}, | 150 | .driver = { .owner = THIS_MODULE,}, |
151 | }; | ||
152 | |||
153 | static struct phy_driver dm9161a_driver = { | ||
154 | .phy_id = 0x0181b8a0, | ||
155 | .name = "Davicom DM9161A", | ||
156 | .phy_id_mask = 0x0ffffff0, | ||
157 | .features = PHY_BASIC_FEATURES, | ||
158 | .config_init = dm9161_config_init, | ||
159 | .config_aneg = dm9161_config_aneg, | ||
160 | .read_status = genphy_read_status, | ||
161 | .driver = { .owner = THIS_MODULE,}, | ||
151 | }; | 162 | }; |
152 | 163 | ||
153 | static struct phy_driver dm9131_driver = { | 164 | static struct phy_driver dm9131_driver = { |
@@ -160,31 +171,38 @@ static struct phy_driver dm9131_driver = { | |||
160 | .read_status = genphy_read_status, | 171 | .read_status = genphy_read_status, |
161 | .ack_interrupt = dm9161_ack_interrupt, | 172 | .ack_interrupt = dm9161_ack_interrupt, |
162 | .config_intr = dm9161_config_intr, | 173 | .config_intr = dm9161_config_intr, |
163 | .driver = { .owner = THIS_MODULE,}, | 174 | .driver = { .owner = THIS_MODULE,}, |
164 | }; | 175 | }; |
165 | 176 | ||
166 | static int __init davicom_init(void) | 177 | static int __init davicom_init(void) |
167 | { | 178 | { |
168 | int ret; | 179 | int ret; |
169 | 180 | ||
170 | ret = phy_driver_register(&dm9161_driver); | 181 | ret = phy_driver_register(&dm9161e_driver); |
171 | if (ret) | 182 | if (ret) |
172 | goto err1; | 183 | goto err1; |
173 | 184 | ||
174 | ret = phy_driver_register(&dm9131_driver); | 185 | ret = phy_driver_register(&dm9161a_driver); |
175 | if (ret) | 186 | if (ret) |
176 | goto err2; | 187 | goto err2; |
188 | |||
189 | ret = phy_driver_register(&dm9131_driver); | ||
190 | if (ret) | ||
191 | goto err3; | ||
177 | return 0; | 192 | return 0; |
178 | 193 | ||
179 | err2: | 194 | err3: |
180 | phy_driver_unregister(&dm9161_driver); | 195 | phy_driver_unregister(&dm9161a_driver); |
196 | err2: | ||
197 | phy_driver_unregister(&dm9161e_driver); | ||
181 | err1: | 198 | err1: |
182 | return ret; | 199 | return ret; |
183 | } | 200 | } |
184 | 201 | ||
185 | static void __exit davicom_exit(void) | 202 | static void __exit davicom_exit(void) |
186 | { | 203 | { |
187 | phy_driver_unregister(&dm9161_driver); | 204 | phy_driver_unregister(&dm9161e_driver); |
205 | phy_driver_unregister(&dm9161a_driver); | ||
188 | phy_driver_unregister(&dm9131_driver); | 206 | phy_driver_unregister(&dm9131_driver); |
189 | } | 207 | } |
190 | 208 | ||