mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-12 18:06:18 +07:00
Merge branch 'net-phy-Better-support-for-BCM54810'
Florian Fainelli says: ==================== net: phy: Better support for BCM54810 This patch series updates the broadcom PHY driver to better support the BCM54810 and allow it to make use of the exiting bcm54xx_adjust_rxrefclk() as well as fix suspend/resume for it. Changes in v2: - added Reviewed-by tags from Andrew for patches #1 and #3 - expanded commit message in #2 to explain the change ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
a779a55a43
@ -194,7 +194,8 @@ static void bcm54xx_adjust_rxrefclk(struct phy_device *phydev)
|
||||
/* Abort if we are using an untested phy. */
|
||||
if (BRCM_PHY_MODEL(phydev) != PHY_ID_BCM57780 &&
|
||||
BRCM_PHY_MODEL(phydev) != PHY_ID_BCM50610 &&
|
||||
BRCM_PHY_MODEL(phydev) != PHY_ID_BCM50610M)
|
||||
BRCM_PHY_MODEL(phydev) != PHY_ID_BCM50610M &&
|
||||
BRCM_PHY_MODEL(phydev) != PHY_ID_BCM54810)
|
||||
return;
|
||||
|
||||
val = bcm_phy_read_shadow(phydev, BCM54XX_SHD_SCR3);
|
||||
@ -272,10 +273,7 @@ static int bcm54xx_config_init(struct phy_device *phydev)
|
||||
(phydev->dev_flags & PHY_BRCM_CLEAR_RGMII_MODE))
|
||||
bcm_phy_write_shadow(phydev, BCM54XX_SHD_RGMII_MODE, 0);
|
||||
|
||||
if ((phydev->dev_flags & PHY_BRCM_RX_REFCLK_UNUSED) ||
|
||||
(phydev->dev_flags & PHY_BRCM_DIS_TXCRXC_NOENRGY) ||
|
||||
(phydev->dev_flags & PHY_BRCM_AUTO_PWRDWN_ENABLE))
|
||||
bcm54xx_adjust_rxrefclk(phydev);
|
||||
bcm54xx_adjust_rxrefclk(phydev);
|
||||
|
||||
if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM54210E) {
|
||||
err = bcm54210e_config_init(phydev);
|
||||
@ -315,6 +313,20 @@ static int bcm54xx_config_init(struct phy_device *phydev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int bcm54xx_resume(struct phy_device *phydev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Writes to register other than BMCR would be ignored
|
||||
* unless we clear the PDOWN bit first
|
||||
*/
|
||||
ret = genphy_resume(phydev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return bcm54xx_config_init(phydev);
|
||||
}
|
||||
|
||||
static int bcm5482_config_init(struct phy_device *phydev)
|
||||
{
|
||||
int err, reg;
|
||||
@ -708,6 +720,8 @@ static struct phy_driver broadcom_drivers[] = {
|
||||
.config_aneg = bcm5481_config_aneg,
|
||||
.ack_interrupt = bcm_phy_ack_intr,
|
||||
.config_intr = bcm_phy_config_intr,
|
||||
.suspend = genphy_suspend,
|
||||
.resume = bcm54xx_resume,
|
||||
}, {
|
||||
.phy_id = PHY_ID_BCM5482,
|
||||
.phy_id_mask = 0xfffffff0,
|
||||
|
Loading…
Reference in New Issue
Block a user