diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2009-11-02 09:31:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-03 02:39:13 -0500 |
commit | 32e5a8d651c0dbb02bf82ca954206282e44c4b11 (patch) | |
tree | 7d8508afb30951c46e3e1edab56f9e664e833275 /drivers/net/tg3.c | |
parent | cdd4e09d692bd4f3457b3789279005e112b7696d (diff) |
tg3 / broadcom: Add code to disable rxc refclk
The 5785 does not use the RXC reference clock. Turning it off is
desirable as it saves power.
By default, the 50610 enables the RXC reference clock and the 50610M
disables it. Presumably this is one of the reasons why the hardware
architect chose one over the other.
Adding a "rx reference clock disable" flag is not the ideal way to
describe the option, as it would force the MAC using a 50610M to set
the flag. Ideally we want the flags to represent opt-in behavior that
deviates from hardware defaults. Furthermore, the lack of a
"disable" flag implies that the requester wants the rx reference clock
enabled, which doesn't necessarily follow.
By presenting the option as a passive statement (rx reference clock
unused) rather than a command, I hope to convey an opt-in option to
disable the rx reference clock that falls back to hardware defaults if
not set. A secondary benefit of this is that it keeps the
intelligence about phy defaults in the broadcom module where it belongs
and allows the broadcom module more latitude should a bug arise.
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/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 592b5bf09e40..369ddba95821 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -1100,7 +1100,8 @@ 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 | phydev->dev_flags |= PHY_BRCM_CLEAR_RGMII_MODE | |
1104 | PHY_BRCM_RX_REFCLK_UNUSED; | ||
1104 | if (tp->tg3_flags3 & TG3_FLG3_RGMII_STD_IBND_DISABLE) | 1105 | if (tp->tg3_flags3 & TG3_FLG3_RGMII_STD_IBND_DISABLE) |
1105 | phydev->dev_flags |= PHY_BRCM_STD_IBND_DISABLE; | 1106 | phydev->dev_flags |= PHY_BRCM_STD_IBND_DISABLE; |
1106 | if (tp->tg3_flags3 & TG3_FLG3_RGMII_EXT_IBND_RX_EN) | 1107 | if (tp->tg3_flags3 & TG3_FLG3_RGMII_EXT_IBND_RX_EN) |