OSDN Git Service

net: phy: bcm7xxx: request and manage GPHY clock
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 17 Sep 2020 02:04:13 +0000 (19:04 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 19 Sep 2020 00:21:19 +0000 (17:21 -0700)
commitba4ee3c053659119472135231dbef8f6880ce1fb
tree0c319eec12900a21010485d566a4c429a66bcb0b
parent5f3666e8394580179b81dd90bf8b930efaf5138e
net: phy: bcm7xxx: request and manage GPHY clock

The internal Gigabit PHY on Broadcom STB chips has a digital clock which
drives its MDIO interface among other things, the driver now requests
and manage that clock during .probe() and .remove() accordingly.

Because the PHY driver can be probed with the clocks turned off we need
to apply the dummy BMSR workaround during the driver probe function to
ensure subsequent MDIO read or write towards the PHY will succeed.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/bcm7xxx.c