aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/broadcom.c
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2009-11-02 09:30:40 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-03 02:39:11 -0500
commit63a14ce449dd6d647de2725809159eb072b2c44f (patch)
treed4db22459a237188aefc2c5bc3ee35374443fe1e /drivers/net/phy/broadcom.c
parent8649f13d2d810406da444a6101906041b796fbde (diff)
tg3 / broadcom: Add PHY_BRCM_CLEAR_RGMII_MODE flag
Broadcom 50610M parts changed the default definitions of the RGMII mode shadow register. The 5785 needs the RGMII mode selection bits [4:3] cleared. The default value of the remaining bits in this register are zero. Rather than unnecessarily burn an extra bit in the dev_flags member in an attempt to enumerate all possible combinations, this patch take a more course grained approach and labels the option as "clear all bits". Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/broadcom.c')
-rw-r--r--drivers/net/phy/broadcom.c6
1 files changed, 6 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;