aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/phy/broadcom.c6
-rw-r--r--drivers/net/tg3.c1
-rw-r--r--include/linux/brcmphy.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
index ace0ccc87a00..5d2a2e90aba8 100644
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -105,6 +105,7 @@
105#define BCM5482_SHD_LEDS1_LED3(src) ((src & 0xf) << 4) 105#define BCM5482_SHD_LEDS1_LED3(src) ((src & 0xf) << 4)
106 /* LED1 / ~LINKSPD[1] selector */ 106 /* LED1 / ~LINKSPD[1] selector */
107#define BCM5482_SHD_LEDS1_LED1(src) ((src & 0xf) << 0) 107#define BCM5482_SHD_LEDS1_LED1(src) ((src & 0xf) << 0)
108#define BCM54XX_SHD_RGMII_MODE 0x0b /* 01011: RGMII Mode Selector */
108#define BCM5482_SHD_SSD 0x14 /* 10100: Secondary SerDes control */ 109#define BCM5482_SHD_SSD 0x14 /* 10100: Secondary SerDes control */
109#define BCM5482_SHD_SSD_LEDM 0x0008 /* SSD LED Mode enable */ 110#define BCM5482_SHD_SSD_LEDM 0x0008 /* SSD LED Mode enable */
110#define BCM5482_SHD_SSD_EN 0x0001 /* SSD enable */ 111#define BCM5482_SHD_SSD_EN 0x0001 /* SSD enable */
@@ -330,6 +331,11 @@ static int bcm54xx_config_init(struct phy_device *phydev)
330 if (err < 0) 331 if (err < 0)
331 return err; 332 return err;
332 333
334 if ((BRCM_PHY_MODEL(phydev) == PHY_ID_BCM50610 ||
335 BRCM_PHY_MODEL(phydev) == PHY_ID_BCM50610M) &&
336 (phydev->dev_flags & PHY_BRCM_CLEAR_RGMII_MODE))
337 bcm54xx_shadow_write(phydev, BCM54XX_SHD_RGMII_MODE, 0);
338
333 bcm54xx_phydsp_config(phydev); 339 bcm54xx_phydsp_config(phydev);
334 340
335 return 0; 341 return 0;
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 0aecd07d3f6b..e7128f6ae2d8 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -1100,6 +1100,7 @@ static int tg3_mdio_init(struct tg3 *tp)
1100 break; 1100 break;
1101 case TG3_PHY_ID_BCM50610: 1101 case TG3_PHY_ID_BCM50610:
1102 case TG3_PHY_ID_BCM50610M: 1102 case TG3_PHY_ID_BCM50610M:
1103 phydev->dev_flags |= PHY_BRCM_CLEAR_RGMII_MODE;
1103 if (tp->tg3_flags3 & TG3_FLG3_RGMII_STD_IBND_DISABLE) 1104 if (tp->tg3_flags3 & TG3_FLG3_RGMII_STD_IBND_DISABLE)
1104 phydev->dev_flags |= PHY_BRCM_STD_IBND_DISABLE; 1105 phydev->dev_flags |= PHY_BRCM_STD_IBND_DISABLE;
1105 if (tp->tg3_flags3 & TG3_FLG3_RGMII_EXT_IBND_RX_EN) 1106 if (tp->tg3_flags3 & TG3_FLG3_RGMII_EXT_IBND_RX_EN)
diff --git a/include/linux/brcmphy.h b/include/linux/brcmphy.h
index daa1480fcf49..6e7ffcee9c80 100644
--- a/include/linux/brcmphy.h
+++ b/include/linux/brcmphy.h
@@ -8,4 +8,5 @@
8#define PHY_BRCM_STD_IBND_DISABLE 0x00000800 8#define PHY_BRCM_STD_IBND_DISABLE 0x00000800
9#define PHY_BRCM_EXT_IBND_RX_ENABLE 0x00001000 9#define PHY_BRCM_EXT_IBND_RX_ENABLE 0x00001000
10#define PHY_BRCM_EXT_IBND_TX_ENABLE 0x00002000 10#define PHY_BRCM_EXT_IBND_TX_ENABLE 0x00002000
11#define PHY_BRCM_CLEAR_RGMII_MODE 0x00004000
11#define PHY_BCM_FLAGS_VALID 0x80000000 12#define PHY_BCM_FLAGS_VALID 0x80000000