aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/tg3.c24
-rw-r--r--drivers/net/tg3.h26
2 files changed, 49 insertions, 1 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 1c53250e4007..53a193e0d45c 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -6589,6 +6589,30 @@ static int tg3_chip_reset(struct tg3 *tp)
6589 6589
6590 tg3_mdio_start(tp); 6590 tg3_mdio_start(tp);
6591 6591
6592 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780) {
6593 u8 phy_addr;
6594
6595 phy_addr = tp->phy_addr;
6596 tp->phy_addr = TG3_PHY_PCIE_ADDR;
6597
6598 tg3_writephy(tp, TG3_PCIEPHY_BLOCK_ADDR,
6599 TG3_PCIEPHY_TXB_BLK << TG3_PCIEPHY_BLOCK_SHIFT);
6600 val = TG3_PCIEPHY_TX0CTRL1_TXOCM | TG3_PCIEPHY_TX0CTRL1_RDCTL |
6601 TG3_PCIEPHY_TX0CTRL1_TXCMV | TG3_PCIEPHY_TX0CTRL1_TKSEL |
6602 TG3_PCIEPHY_TX0CTRL1_NB_EN;
6603 tg3_writephy(tp, TG3_PCIEPHY_TX0CTRL1, val);
6604 udelay(10);
6605
6606 tg3_writephy(tp, TG3_PCIEPHY_BLOCK_ADDR,
6607 TG3_PCIEPHY_XGXS_BLK1 << TG3_PCIEPHY_BLOCK_SHIFT);
6608 val = TG3_PCIEPHY_PWRMGMT4_LOWPWR_EN |
6609 TG3_PCIEPHY_PWRMGMT4_L1PLLPD_EN;
6610 tg3_writephy(tp, TG3_PCIEPHY_PWRMGMT4, val);
6611 udelay(10);
6612
6613 tp->phy_addr = phy_addr;
6614 }
6615
6592 if ((tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) && 6616 if ((tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) &&
6593 tp->pci_chip_rev_id != CHIPREV_ID_5750_A0 && 6617 tp->pci_chip_rev_id != CHIPREV_ID_5750_A0 &&
6594 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5785 && 6618 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5785 &&
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index 40501cb3b359..530c36b23e80 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -1953,10 +1953,34 @@
1953#define NIC_SRAM_MBUF_POOL_BASE5705 0x00010000 1953#define NIC_SRAM_MBUF_POOL_BASE5705 0x00010000
1954#define NIC_SRAM_MBUF_POOL_SIZE5705 0x0000e000 1954#define NIC_SRAM_MBUF_POOL_SIZE5705 0x0000e000
1955 1955
1956
1956/* Currently this is fixed. */ 1957/* Currently this is fixed. */
1958#define TG3_PHY_PCIE_ADDR 0x00
1957#define TG3_PHY_MII_ADDR 0x01 1959#define TG3_PHY_MII_ADDR 0x01
1958 1960
1959/* Tigon3 specific PHY MII registers. */ 1961
1962/*** Tigon3 specific PHY PCIE registers. ***/
1963
1964#define TG3_PCIEPHY_BLOCK_ADDR 0x1f
1965#define TG3_PCIEPHY_XGXS_BLK1 0x0801
1966#define TG3_PCIEPHY_TXB_BLK 0x0861
1967#define TG3_PCIEPHY_BLOCK_SHIFT 4
1968
1969/* TG3_PCIEPHY_TXB_BLK */
1970#define TG3_PCIEPHY_TX0CTRL1 0x15
1971#define TG3_PCIEPHY_TX0CTRL1_TXOCM 0x0003
1972#define TG3_PCIEPHY_TX0CTRL1_RDCTL 0x0008
1973#define TG3_PCIEPHY_TX0CTRL1_TXCMV 0x0030
1974#define TG3_PCIEPHY_TX0CTRL1_TKSEL 0x0040
1975#define TG3_PCIEPHY_TX0CTRL1_NB_EN 0x0400
1976
1977/* TG3_PCIEPHY_XGXS_BLK1 */
1978#define TG3_PCIEPHY_PWRMGMT4 0x1a
1979#define TG3_PCIEPHY_PWRMGMT4_L1PLLPD_EN 0x0038
1980#define TG3_PCIEPHY_PWRMGMT4_LOWPWR_EN 0x4000
1981
1982
1983/*** Tigon3 specific PHY MII registers. ***/
1960#define TG3_BMCR_SPEED1000 0x0040 1984#define TG3_BMCR_SPEED1000 0x0040
1961 1985
1962#define MII_TG3_CTRL 0x09 /* 1000-baseT control register */ 1986#define MII_TG3_CTRL 0x09 /* 1000-baseT control register */