diff options
Diffstat (limited to 'drivers/net/phy/broadcom.c')
-rw-r--r-- | drivers/net/phy/broadcom.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c index e86ea105c802..704537010453 100644 --- a/drivers/net/phy/broadcom.c +++ b/drivers/net/phy/broadcom.c | |||
@@ -92,7 +92,7 @@ static int bcm54612e_config_init(struct phy_device *phydev) | |||
92 | return 0; | 92 | return 0; |
93 | } | 93 | } |
94 | 94 | ||
95 | static int bcm5481x_config(struct phy_device *phydev) | 95 | static int bcm54xx_config_clock_delay(struct phy_device *phydev) |
96 | { | 96 | { |
97 | int rc, val; | 97 | int rc, val; |
98 | 98 | ||
@@ -429,7 +429,7 @@ static int bcm5481_config_aneg(struct phy_device *phydev) | |||
429 | ret = genphy_config_aneg(phydev); | 429 | ret = genphy_config_aneg(phydev); |
430 | 430 | ||
431 | /* Then we can set up the delay. */ | 431 | /* Then we can set up the delay. */ |
432 | bcm5481x_config(phydev); | 432 | bcm54xx_config_clock_delay(phydev); |
433 | 433 | ||
434 | if (of_property_read_bool(np, "enet-phy-lane-swap")) { | 434 | if (of_property_read_bool(np, "enet-phy-lane-swap")) { |
435 | /* Lane Swap - Undocumented register...magic! */ | 435 | /* Lane Swap - Undocumented register...magic! */ |
@@ -442,6 +442,19 @@ static int bcm5481_config_aneg(struct phy_device *phydev) | |||
442 | return ret; | 442 | return ret; |
443 | } | 443 | } |
444 | 444 | ||
445 | static int bcm54616s_config_aneg(struct phy_device *phydev) | ||
446 | { | ||
447 | int ret; | ||
448 | |||
449 | /* Aneg firsly. */ | ||
450 | ret = genphy_config_aneg(phydev); | ||
451 | |||
452 | /* Then we can set up the delay. */ | ||
453 | bcm54xx_config_clock_delay(phydev); | ||
454 | |||
455 | return ret; | ||
456 | } | ||
457 | |||
445 | static int brcm_phy_setbits(struct phy_device *phydev, int reg, int set) | 458 | static int brcm_phy_setbits(struct phy_device *phydev, int reg, int set) |
446 | { | 459 | { |
447 | int val; | 460 | int val; |
@@ -636,6 +649,7 @@ static struct phy_driver broadcom_drivers[] = { | |||
636 | .features = PHY_GBIT_FEATURES, | 649 | .features = PHY_GBIT_FEATURES, |
637 | .flags = PHY_HAS_INTERRUPT, | 650 | .flags = PHY_HAS_INTERRUPT, |
638 | .config_init = bcm54xx_config_init, | 651 | .config_init = bcm54xx_config_init, |
652 | .config_aneg = bcm54616s_config_aneg, | ||
639 | .ack_interrupt = bcm_phy_ack_intr, | 653 | .ack_interrupt = bcm_phy_ack_intr, |
640 | .config_intr = bcm_phy_config_intr, | 654 | .config_intr = bcm_phy_config_intr, |
641 | }, { | 655 | }, { |