hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/net/phy/vitesse.c
....@@ -1,15 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0+
12 /*
23 * Driver for Vitesse PHYs
34 *
45 * Author: Kriston Carson
5
- *
6
- * Copyright (c) 2005, 2009, 2011 Freescale Semiconductor, Inc.
7
- *
8
- * This program is free software; you can redistribute it and/or modify it
9
- * under the terms of the GNU General Public License as published by the
10
- * Free Software Foundation; either version 2 of the License, or (at your
11
- * option) any later version.
12
- *
136 */
147
158 #include <linux/kernel.h>
....@@ -68,9 +61,7 @@
6861
6962 #define PHY_ID_VSC8234 0x000fc620
7063 #define PHY_ID_VSC8244 0x000fc6c0
71
-#define PHY_ID_VSC8514 0x00070670
7264 #define PHY_ID_VSC8572 0x000704d0
73
-#define PHY_ID_VSC8574 0x000704a0
7465 #define PHY_ID_VSC8601 0x00070420
7566 #define PHY_ID_VSC7385 0x00070450
7667 #define PHY_ID_VSC7388 0x00070480
....@@ -206,7 +197,7 @@
206197
207198 vsc73xx_config_init(phydev);
208199
209
- return genphy_config_init(phydev);
200
+ return 0;
210201 }
211202
212203 static int vsc739x_config_init(struct phy_device *phydev)
....@@ -238,7 +229,7 @@
238229
239230 vsc73xx_config_init(phydev);
240231
241
- return genphy_config_init(phydev);
232
+ return 0;
242233 }
243234
244235 static int vsc73xx_config_aneg(struct phy_device *phydev)
....@@ -276,7 +267,7 @@
276267 if (ret < 0)
277268 return ret;
278269
279
- return genphy_config_init(phydev);
270
+ return 0;
280271 }
281272
282273 static int vsc824x_ack_interrupt(struct phy_device *phydev)
....@@ -301,9 +292,7 @@
301292 err = phy_write(phydev, MII_VSC8244_IMASK,
302293 (phydev->drv->phy_id == PHY_ID_VSC8234 ||
303294 phydev->drv->phy_id == PHY_ID_VSC8244 ||
304
- phydev->drv->phy_id == PHY_ID_VSC8514 ||
305295 phydev->drv->phy_id == PHY_ID_VSC8572 ||
306
- phydev->drv->phy_id == PHY_ID_VSC8574 ||
307296 phydev->drv->phy_id == PHY_ID_VSC8601) ?
308297 MII_VSC8244_IMASK_MASK :
309298 MII_VSC8221_IMASK_MASK);
....@@ -398,8 +387,7 @@
398387 .phy_id = PHY_ID_VSC8234,
399388 .name = "Vitesse VSC8234",
400389 .phy_id_mask = 0x000ffff0,
401
- .features = PHY_GBIT_FEATURES,
402
- .flags = PHY_HAS_INTERRUPT,
390
+ /* PHY_GBIT_FEATURES */
403391 .config_init = &vsc824x_config_init,
404392 .config_aneg = &vsc82x4_config_aneg,
405393 .ack_interrupt = &vsc824x_ack_interrupt,
....@@ -408,18 +396,7 @@
408396 .phy_id = PHY_ID_VSC8244,
409397 .name = "Vitesse VSC8244",
410398 .phy_id_mask = 0x000fffc0,
411
- .features = PHY_GBIT_FEATURES,
412
- .flags = PHY_HAS_INTERRUPT,
413
- .config_init = &vsc824x_config_init,
414
- .config_aneg = &vsc82x4_config_aneg,
415
- .ack_interrupt = &vsc824x_ack_interrupt,
416
- .config_intr = &vsc82xx_config_intr,
417
-}, {
418
- .phy_id = PHY_ID_VSC8514,
419
- .name = "Vitesse VSC8514",
420
- .phy_id_mask = 0x000ffff0,
421
- .features = PHY_GBIT_FEATURES,
422
- .flags = PHY_HAS_INTERRUPT,
399
+ /* PHY_GBIT_FEATURES */
423400 .config_init = &vsc824x_config_init,
424401 .config_aneg = &vsc82x4_config_aneg,
425402 .ack_interrupt = &vsc824x_ack_interrupt,
....@@ -428,18 +405,7 @@
428405 .phy_id = PHY_ID_VSC8572,
429406 .name = "Vitesse VSC8572",
430407 .phy_id_mask = 0x000ffff0,
431
- .features = PHY_GBIT_FEATURES,
432
- .flags = PHY_HAS_INTERRUPT,
433
- .config_init = &vsc824x_config_init,
434
- .config_aneg = &vsc82x4_config_aneg,
435
- .ack_interrupt = &vsc824x_ack_interrupt,
436
- .config_intr = &vsc82xx_config_intr,
437
-}, {
438
- .phy_id = PHY_ID_VSC8574,
439
- .name = "Vitesse VSC8574",
440
- .phy_id_mask = 0x000ffff0,
441
- .features = PHY_GBIT_FEATURES,
442
- .flags = PHY_HAS_INTERRUPT,
408
+ /* PHY_GBIT_FEATURES */
443409 .config_init = &vsc824x_config_init,
444410 .config_aneg = &vsc82x4_config_aneg,
445411 .ack_interrupt = &vsc824x_ack_interrupt,
....@@ -448,8 +414,7 @@
448414 .phy_id = PHY_ID_VSC8601,
449415 .name = "Vitesse VSC8601",
450416 .phy_id_mask = 0x000ffff0,
451
- .features = PHY_GBIT_FEATURES,
452
- .flags = PHY_HAS_INTERRUPT,
417
+ /* PHY_GBIT_FEATURES */
453418 .config_init = &vsc8601_config_init,
454419 .ack_interrupt = &vsc824x_ack_interrupt,
455420 .config_intr = &vsc82xx_config_intr,
....@@ -457,7 +422,7 @@
457422 .phy_id = PHY_ID_VSC7385,
458423 .name = "Vitesse VSC7385",
459424 .phy_id_mask = 0x000ffff0,
460
- .features = PHY_GBIT_FEATURES,
425
+ /* PHY_GBIT_FEATURES */
461426 .config_init = vsc738x_config_init,
462427 .config_aneg = vsc73xx_config_aneg,
463428 .read_page = vsc73xx_read_page,
....@@ -466,7 +431,7 @@
466431 .phy_id = PHY_ID_VSC7388,
467432 .name = "Vitesse VSC7388",
468433 .phy_id_mask = 0x000ffff0,
469
- .features = PHY_GBIT_FEATURES,
434
+ /* PHY_GBIT_FEATURES */
470435 .config_init = vsc738x_config_init,
471436 .config_aneg = vsc73xx_config_aneg,
472437 .read_page = vsc73xx_read_page,
....@@ -475,7 +440,7 @@
475440 .phy_id = PHY_ID_VSC7395,
476441 .name = "Vitesse VSC7395",
477442 .phy_id_mask = 0x000ffff0,
478
- .features = PHY_GBIT_FEATURES,
443
+ /* PHY_GBIT_FEATURES */
479444 .config_init = vsc739x_config_init,
480445 .config_aneg = vsc73xx_config_aneg,
481446 .read_page = vsc73xx_read_page,
....@@ -484,7 +449,7 @@
484449 .phy_id = PHY_ID_VSC7398,
485450 .name = "Vitesse VSC7398",
486451 .phy_id_mask = 0x000ffff0,
487
- .features = PHY_GBIT_FEATURES,
452
+ /* PHY_GBIT_FEATURES */
488453 .config_init = vsc739x_config_init,
489454 .config_aneg = vsc73xx_config_aneg,
490455 .read_page = vsc73xx_read_page,
....@@ -493,8 +458,7 @@
493458 .phy_id = PHY_ID_VSC8662,
494459 .name = "Vitesse VSC8662",
495460 .phy_id_mask = 0x000ffff0,
496
- .features = PHY_GBIT_FEATURES,
497
- .flags = PHY_HAS_INTERRUPT,
461
+ /* PHY_GBIT_FEATURES */
498462 .config_init = &vsc824x_config_init,
499463 .config_aneg = &vsc82x4_config_aneg,
500464 .ack_interrupt = &vsc824x_ack_interrupt,
....@@ -504,8 +468,7 @@
504468 .phy_id = PHY_ID_VSC8221,
505469 .phy_id_mask = 0x000ffff0,
506470 .name = "Vitesse VSC8221",
507
- .features = PHY_GBIT_FEATURES,
508
- .flags = PHY_HAS_INTERRUPT,
471
+ /* PHY_GBIT_FEATURES */
509472 .config_init = &vsc8221_config_init,
510473 .ack_interrupt = &vsc824x_ack_interrupt,
511474 .config_intr = &vsc82xx_config_intr,
....@@ -514,8 +477,7 @@
514477 .phy_id = PHY_ID_VSC8211,
515478 .phy_id_mask = 0x000ffff0,
516479 .name = "Vitesse VSC8211",
517
- .features = PHY_GBIT_FEATURES,
518
- .flags = PHY_HAS_INTERRUPT,
480
+ /* PHY_GBIT_FEATURES */
519481 .config_init = &vsc8221_config_init,
520482 .ack_interrupt = &vsc824x_ack_interrupt,
521483 .config_intr = &vsc82xx_config_intr,
....@@ -526,9 +488,7 @@
526488 static struct mdio_device_id __maybe_unused vitesse_tbl[] = {
527489 { PHY_ID_VSC8234, 0x000ffff0 },
528490 { PHY_ID_VSC8244, 0x000fffc0 },
529
- { PHY_ID_VSC8514, 0x000ffff0 },
530491 { PHY_ID_VSC8572, 0x000ffff0 },
531
- { PHY_ID_VSC8574, 0x000ffff0 },
532492 { PHY_ID_VSC7385, 0x000ffff0 },
533493 { PHY_ID_VSC7388, 0x000ffff0 },
534494 { PHY_ID_VSC7395, 0x000ffff0 },