| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0+ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Driver for Vitesse PHYs |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * 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 | | - * |
|---|
| 13 | 6 | */ |
|---|
| 14 | 7 | |
|---|
| 15 | 8 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 68 | 61 | |
|---|
| 69 | 62 | #define PHY_ID_VSC8234 0x000fc620 |
|---|
| 70 | 63 | #define PHY_ID_VSC8244 0x000fc6c0 |
|---|
| 71 | | -#define PHY_ID_VSC8514 0x00070670 |
|---|
| 72 | 64 | #define PHY_ID_VSC8572 0x000704d0 |
|---|
| 73 | | -#define PHY_ID_VSC8574 0x000704a0 |
|---|
| 74 | 65 | #define PHY_ID_VSC8601 0x00070420 |
|---|
| 75 | 66 | #define PHY_ID_VSC7385 0x00070450 |
|---|
| 76 | 67 | #define PHY_ID_VSC7388 0x00070480 |
|---|
| .. | .. |
|---|
| 206 | 197 | |
|---|
| 207 | 198 | vsc73xx_config_init(phydev); |
|---|
| 208 | 199 | |
|---|
| 209 | | - return genphy_config_init(phydev); |
|---|
| 200 | + return 0; |
|---|
| 210 | 201 | } |
|---|
| 211 | 202 | |
|---|
| 212 | 203 | static int vsc739x_config_init(struct phy_device *phydev) |
|---|
| .. | .. |
|---|
| 238 | 229 | |
|---|
| 239 | 230 | vsc73xx_config_init(phydev); |
|---|
| 240 | 231 | |
|---|
| 241 | | - return genphy_config_init(phydev); |
|---|
| 232 | + return 0; |
|---|
| 242 | 233 | } |
|---|
| 243 | 234 | |
|---|
| 244 | 235 | static int vsc73xx_config_aneg(struct phy_device *phydev) |
|---|
| .. | .. |
|---|
| 276 | 267 | if (ret < 0) |
|---|
| 277 | 268 | return ret; |
|---|
| 278 | 269 | |
|---|
| 279 | | - return genphy_config_init(phydev); |
|---|
| 270 | + return 0; |
|---|
| 280 | 271 | } |
|---|
| 281 | 272 | |
|---|
| 282 | 273 | static int vsc824x_ack_interrupt(struct phy_device *phydev) |
|---|
| .. | .. |
|---|
| 301 | 292 | err = phy_write(phydev, MII_VSC8244_IMASK, |
|---|
| 302 | 293 | (phydev->drv->phy_id == PHY_ID_VSC8234 || |
|---|
| 303 | 294 | phydev->drv->phy_id == PHY_ID_VSC8244 || |
|---|
| 304 | | - phydev->drv->phy_id == PHY_ID_VSC8514 || |
|---|
| 305 | 295 | phydev->drv->phy_id == PHY_ID_VSC8572 || |
|---|
| 306 | | - phydev->drv->phy_id == PHY_ID_VSC8574 || |
|---|
| 307 | 296 | phydev->drv->phy_id == PHY_ID_VSC8601) ? |
|---|
| 308 | 297 | MII_VSC8244_IMASK_MASK : |
|---|
| 309 | 298 | MII_VSC8221_IMASK_MASK); |
|---|
| .. | .. |
|---|
| 398 | 387 | .phy_id = PHY_ID_VSC8234, |
|---|
| 399 | 388 | .name = "Vitesse VSC8234", |
|---|
| 400 | 389 | .phy_id_mask = 0x000ffff0, |
|---|
| 401 | | - .features = PHY_GBIT_FEATURES, |
|---|
| 402 | | - .flags = PHY_HAS_INTERRUPT, |
|---|
| 390 | + /* PHY_GBIT_FEATURES */ |
|---|
| 403 | 391 | .config_init = &vsc824x_config_init, |
|---|
| 404 | 392 | .config_aneg = &vsc82x4_config_aneg, |
|---|
| 405 | 393 | .ack_interrupt = &vsc824x_ack_interrupt, |
|---|
| .. | .. |
|---|
| 408 | 396 | .phy_id = PHY_ID_VSC8244, |
|---|
| 409 | 397 | .name = "Vitesse VSC8244", |
|---|
| 410 | 398 | .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 */ |
|---|
| 423 | 400 | .config_init = &vsc824x_config_init, |
|---|
| 424 | 401 | .config_aneg = &vsc82x4_config_aneg, |
|---|
| 425 | 402 | .ack_interrupt = &vsc824x_ack_interrupt, |
|---|
| .. | .. |
|---|
| 428 | 405 | .phy_id = PHY_ID_VSC8572, |
|---|
| 429 | 406 | .name = "Vitesse VSC8572", |
|---|
| 430 | 407 | .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 */ |
|---|
| 443 | 409 | .config_init = &vsc824x_config_init, |
|---|
| 444 | 410 | .config_aneg = &vsc82x4_config_aneg, |
|---|
| 445 | 411 | .ack_interrupt = &vsc824x_ack_interrupt, |
|---|
| .. | .. |
|---|
| 448 | 414 | .phy_id = PHY_ID_VSC8601, |
|---|
| 449 | 415 | .name = "Vitesse VSC8601", |
|---|
| 450 | 416 | .phy_id_mask = 0x000ffff0, |
|---|
| 451 | | - .features = PHY_GBIT_FEATURES, |
|---|
| 452 | | - .flags = PHY_HAS_INTERRUPT, |
|---|
| 417 | + /* PHY_GBIT_FEATURES */ |
|---|
| 453 | 418 | .config_init = &vsc8601_config_init, |
|---|
| 454 | 419 | .ack_interrupt = &vsc824x_ack_interrupt, |
|---|
| 455 | 420 | .config_intr = &vsc82xx_config_intr, |
|---|
| .. | .. |
|---|
| 457 | 422 | .phy_id = PHY_ID_VSC7385, |
|---|
| 458 | 423 | .name = "Vitesse VSC7385", |
|---|
| 459 | 424 | .phy_id_mask = 0x000ffff0, |
|---|
| 460 | | - .features = PHY_GBIT_FEATURES, |
|---|
| 425 | + /* PHY_GBIT_FEATURES */ |
|---|
| 461 | 426 | .config_init = vsc738x_config_init, |
|---|
| 462 | 427 | .config_aneg = vsc73xx_config_aneg, |
|---|
| 463 | 428 | .read_page = vsc73xx_read_page, |
|---|
| .. | .. |
|---|
| 466 | 431 | .phy_id = PHY_ID_VSC7388, |
|---|
| 467 | 432 | .name = "Vitesse VSC7388", |
|---|
| 468 | 433 | .phy_id_mask = 0x000ffff0, |
|---|
| 469 | | - .features = PHY_GBIT_FEATURES, |
|---|
| 434 | + /* PHY_GBIT_FEATURES */ |
|---|
| 470 | 435 | .config_init = vsc738x_config_init, |
|---|
| 471 | 436 | .config_aneg = vsc73xx_config_aneg, |
|---|
| 472 | 437 | .read_page = vsc73xx_read_page, |
|---|
| .. | .. |
|---|
| 475 | 440 | .phy_id = PHY_ID_VSC7395, |
|---|
| 476 | 441 | .name = "Vitesse VSC7395", |
|---|
| 477 | 442 | .phy_id_mask = 0x000ffff0, |
|---|
| 478 | | - .features = PHY_GBIT_FEATURES, |
|---|
| 443 | + /* PHY_GBIT_FEATURES */ |
|---|
| 479 | 444 | .config_init = vsc739x_config_init, |
|---|
| 480 | 445 | .config_aneg = vsc73xx_config_aneg, |
|---|
| 481 | 446 | .read_page = vsc73xx_read_page, |
|---|
| .. | .. |
|---|
| 484 | 449 | .phy_id = PHY_ID_VSC7398, |
|---|
| 485 | 450 | .name = "Vitesse VSC7398", |
|---|
| 486 | 451 | .phy_id_mask = 0x000ffff0, |
|---|
| 487 | | - .features = PHY_GBIT_FEATURES, |
|---|
| 452 | + /* PHY_GBIT_FEATURES */ |
|---|
| 488 | 453 | .config_init = vsc739x_config_init, |
|---|
| 489 | 454 | .config_aneg = vsc73xx_config_aneg, |
|---|
| 490 | 455 | .read_page = vsc73xx_read_page, |
|---|
| .. | .. |
|---|
| 493 | 458 | .phy_id = PHY_ID_VSC8662, |
|---|
| 494 | 459 | .name = "Vitesse VSC8662", |
|---|
| 495 | 460 | .phy_id_mask = 0x000ffff0, |
|---|
| 496 | | - .features = PHY_GBIT_FEATURES, |
|---|
| 497 | | - .flags = PHY_HAS_INTERRUPT, |
|---|
| 461 | + /* PHY_GBIT_FEATURES */ |
|---|
| 498 | 462 | .config_init = &vsc824x_config_init, |
|---|
| 499 | 463 | .config_aneg = &vsc82x4_config_aneg, |
|---|
| 500 | 464 | .ack_interrupt = &vsc824x_ack_interrupt, |
|---|
| .. | .. |
|---|
| 504 | 468 | .phy_id = PHY_ID_VSC8221, |
|---|
| 505 | 469 | .phy_id_mask = 0x000ffff0, |
|---|
| 506 | 470 | .name = "Vitesse VSC8221", |
|---|
| 507 | | - .features = PHY_GBIT_FEATURES, |
|---|
| 508 | | - .flags = PHY_HAS_INTERRUPT, |
|---|
| 471 | + /* PHY_GBIT_FEATURES */ |
|---|
| 509 | 472 | .config_init = &vsc8221_config_init, |
|---|
| 510 | 473 | .ack_interrupt = &vsc824x_ack_interrupt, |
|---|
| 511 | 474 | .config_intr = &vsc82xx_config_intr, |
|---|
| .. | .. |
|---|
| 514 | 477 | .phy_id = PHY_ID_VSC8211, |
|---|
| 515 | 478 | .phy_id_mask = 0x000ffff0, |
|---|
| 516 | 479 | .name = "Vitesse VSC8211", |
|---|
| 517 | | - .features = PHY_GBIT_FEATURES, |
|---|
| 518 | | - .flags = PHY_HAS_INTERRUPT, |
|---|
| 480 | + /* PHY_GBIT_FEATURES */ |
|---|
| 519 | 481 | .config_init = &vsc8221_config_init, |
|---|
| 520 | 482 | .ack_interrupt = &vsc824x_ack_interrupt, |
|---|
| 521 | 483 | .config_intr = &vsc82xx_config_intr, |
|---|
| .. | .. |
|---|
| 526 | 488 | static struct mdio_device_id __maybe_unused vitesse_tbl[] = { |
|---|
| 527 | 489 | { PHY_ID_VSC8234, 0x000ffff0 }, |
|---|
| 528 | 490 | { PHY_ID_VSC8244, 0x000fffc0 }, |
|---|
| 529 | | - { PHY_ID_VSC8514, 0x000ffff0 }, |
|---|
| 530 | 491 | { PHY_ID_VSC8572, 0x000ffff0 }, |
|---|
| 531 | | - { PHY_ID_VSC8574, 0x000ffff0 }, |
|---|
| 532 | 492 | { PHY_ID_VSC7385, 0x000ffff0 }, |
|---|
| 533 | 493 | { PHY_ID_VSC7388, 0x000ffff0 }, |
|---|
| 534 | 494 | { PHY_ID_VSC7395, 0x000ffff0 }, |
|---|