078-0006-net-phy-cherry-pick-Broadcom-drivers-updates-from-v4.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
  2. Subject: [PATCH] net: phy: cherry-pick Broadcom drivers updates from v4.15
  3. MIME-Version: 1.0
  4. Content-Type: text/plain; charset=UTF-8
  5. Content-Transfer-Encoding: 8bit
  6. This includes following upstream commits:
  7. 2355a6546a05 net: phy: broadcom: support new device flag for setting master mode
  8. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
  9. ---
  10. --- a/drivers/net/phy/broadcom.c
  11. +++ b/drivers/net/phy/broadcom.c
  12. @@ -43,6 +43,12 @@ static int bcm54210e_config_init(struct
  13. val &= ~BCM54810_SHD_CLK_CTL_GTXCLK_EN;
  14. bcm_phy_write_shadow(phydev, BCM54810_SHD_CLK_CTL, val);
  15. + if (phydev->dev_flags & PHY_BRCM_EN_MASTER_MODE) {
  16. + val = phy_read(phydev, MII_CTRL1000);
  17. + val |= CTL1000_AS_MASTER | CTL1000_ENABLE_MASTER;
  18. + phy_write(phydev, MII_CTRL1000, val);
  19. + }
  20. +
  21. return 0;
  22. }
  23. --- a/include/linux/brcmphy.h
  24. +++ b/include/linux/brcmphy.h
  25. @@ -55,6 +55,7 @@
  26. #define PHY_BRCM_EXT_IBND_TX_ENABLE 0x00002000
  27. #define PHY_BRCM_CLEAR_RGMII_MODE 0x00004000
  28. #define PHY_BRCM_DIS_TXCRXC_NOENRGY 0x00008000
  29. +#define PHY_BRCM_EN_MASTER_MODE 0x00010000
  30. /* Broadcom BCM7xxx specific workarounds */
  31. #define PHY_BRCM_7XXX_REV(x) (((x) >> 8) & 0xff)