aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorKim Phillips <kim.phillips@freescale.com>2007-05-10 16:16:04 -0400
committerJeff Garzik <jeff@garzik.org>2007-05-11 17:53:43 -0400
commit12414db11da8789d9a6b549c4899250f6e116630 (patch)
treecb419ff60a952922f988618e7b397e8d77d72e77 /drivers/net
parentf30cac6fbf30d92d517768fdbd616cd196b43d1d (diff)
Add support for the Davicom DM9161A PHY
Distinguish between the Davicom DM9161A PHY and the DM9161E. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/phy/davicom.c34
1 files changed, 26 insertions, 8 deletions
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
142static struct phy_driver dm9161_driver = { 142static 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
153static 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
153static struct phy_driver dm9131_driver = { 164static 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
166static int __init davicom_init(void) 177static 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
185static void __exit davicom_exit(void) 202static 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