diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2010-01-20 11:58:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-20 22:20:57 -0500 |
commit | 614b05900ec3516b835cd06f848ef6bc915beeea (patch) | |
tree | be57c5d34fda094682c1ad5ff74378f40ed76113 /drivers/net/tg3.c | |
parent | 7981d6f6b280d28779343cff4a88029fe53d1b47 (diff) |
tg3: Enable PLL PD when CLKREQ disabled for 5717A0
PCIe PLL power down cannot be used if CLKREQ is enabled because data
corruption will occur. If CLKREQ is disabled though, enabling PCIE P1
PLL power-down saves some power.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@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 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index b0630cd093a3..b80e7eef8af9 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -7569,6 +7569,20 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) | |||
7569 | tw32(TG3_PCIE_LNKCTL, val | TG3_PCIE_LNKCTL_L1_PLL_PD_DIS); | 7569 | tw32(TG3_PCIE_LNKCTL, val | TG3_PCIE_LNKCTL_L1_PLL_PD_DIS); |
7570 | } | 7570 | } |
7571 | 7571 | ||
7572 | if (tp->tg3_flags3 & TG3_FLG3_L1PLLPD_EN) { | ||
7573 | u32 grc_mode = tr32(GRC_MODE); | ||
7574 | |||
7575 | /* Access the lower 1K of PL PCIE block registers. */ | ||
7576 | val = grc_mode & ~GRC_MODE_PCIE_PORT_MASK; | ||
7577 | tw32(GRC_MODE, val | GRC_MODE_PCIE_PL_SEL); | ||
7578 | |||
7579 | val = tr32(TG3_PCIE_TLDLPL_PORT + TG3_PCIE_PL_LO_PHYCTL1); | ||
7580 | tw32(TG3_PCIE_TLDLPL_PORT + TG3_PCIE_PL_LO_PHYCTL1, | ||
7581 | val | TG3_PCIE_PL_LO_PHYCTL1_L1PLLPD_EN); | ||
7582 | |||
7583 | tw32(GRC_MODE, grc_mode); | ||
7584 | } | ||
7585 | |||
7572 | /* This works around an issue with Athlon chipsets on | 7586 | /* This works around an issue with Athlon chipsets on |
7573 | * B3 tigon3 silicon. This bit has no effect on any | 7587 | * B3 tigon3 silicon. This bit has no effect on any |
7574 | * other revision. But do not set this on PCI Express | 7588 | * other revision. But do not set this on PCI Express |
@@ -13096,6 +13110,8 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
13096 | tp->pci_chip_rev_id == CHIPREV_ID_57780_A0 || | 13110 | tp->pci_chip_rev_id == CHIPREV_ID_57780_A0 || |
13097 | tp->pci_chip_rev_id == CHIPREV_ID_57780_A1) | 13111 | tp->pci_chip_rev_id == CHIPREV_ID_57780_A1) |
13098 | tp->tg3_flags3 |= TG3_FLG3_CLKREQ_BUG; | 13112 | tp->tg3_flags3 |= TG3_FLG3_CLKREQ_BUG; |
13113 | } else if (tp->pci_chip_rev_id == CHIPREV_ID_5717_A0) { | ||
13114 | tp->tg3_flags3 |= TG3_FLG3_L1PLLPD_EN; | ||
13099 | } | 13115 | } |
13100 | } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785) { | 13116 | } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785) { |
13101 | tp->tg3_flags2 |= TG3_FLG2_PCI_EXPRESS; | 13117 | tp->tg3_flags2 |= TG3_FLG2_PCI_EXPRESS; |