diff options
Diffstat (limited to 'drivers/net/tg3.h')
-rw-r--r-- | drivers/net/tg3.h | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 0404f93baa29..df07842172b7 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -128,6 +128,7 @@ | |||
128 | #define ASIC_REV_USE_PROD_ID_REG 0x0f | 128 | #define ASIC_REV_USE_PROD_ID_REG 0x0f |
129 | #define ASIC_REV_5784 0x5784 | 129 | #define ASIC_REV_5784 0x5784 |
130 | #define ASIC_REV_5761 0x5761 | 130 | #define ASIC_REV_5761 0x5761 |
131 | #define ASIC_REV_5785 0x5785 | ||
131 | #define GET_CHIP_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 8) | 132 | #define GET_CHIP_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 8) |
132 | #define CHIPREV_5700_AX 0x70 | 133 | #define CHIPREV_5700_AX 0x70 |
133 | #define CHIPREV_5700_BX 0x71 | 134 | #define CHIPREV_5700_BX 0x71 |
@@ -528,7 +529,23 @@ | |||
528 | #define MAC_SERDES_CFG 0x00000590 | 529 | #define MAC_SERDES_CFG 0x00000590 |
529 | #define MAC_SERDES_CFG_EDGE_SELECT 0x00001000 | 530 | #define MAC_SERDES_CFG_EDGE_SELECT 0x00001000 |
530 | #define MAC_SERDES_STAT 0x00000594 | 531 | #define MAC_SERDES_STAT 0x00000594 |
531 | /* 0x598 --> 0x5b0 unused */ | 532 | /* 0x598 --> 0x5a0 unused */ |
533 | #define MAC_PHYCFG1 0x000005a0 | ||
534 | #define MAC_PHYCFG1_RGMII_INT 0x00000001 | ||
535 | #define MAC_PHYCFG1_RGMII_EXT_RX_DEC 0x02000000 | ||
536 | #define MAC_PHYCFG1_RGMII_SND_STAT_EN 0x04000000 | ||
537 | #define MAC_PHYCFG1_TXC_DRV 0x20000000 | ||
538 | #define MAC_PHYCFG2 0x000005a4 | ||
539 | #define MAC_PHYCFG2_INBAND_ENABLE 0x00000001 | ||
540 | #define MAC_EXT_RGMII_MODE 0x000005a8 | ||
541 | #define MAC_RGMII_MODE_TX_ENABLE 0x00000001 | ||
542 | #define MAC_RGMII_MODE_TX_LOWPWR 0x00000002 | ||
543 | #define MAC_RGMII_MODE_TX_RESET 0x00000004 | ||
544 | #define MAC_RGMII_MODE_RX_INT_B 0x00000100 | ||
545 | #define MAC_RGMII_MODE_RX_QUALITY 0x00000200 | ||
546 | #define MAC_RGMII_MODE_RX_ACTIVITY 0x00000400 | ||
547 | #define MAC_RGMII_MODE_RX_ENG_DET 0x00000800 | ||
548 | /* 0x5ac --> 0x5b0 unused */ | ||
532 | #define SERDES_RX_CTRL 0x000005b0 /* 5780/5714 only */ | 549 | #define SERDES_RX_CTRL 0x000005b0 /* 5780/5714 only */ |
533 | #define SERDES_RX_SIG_DETECT 0x00000400 | 550 | #define SERDES_RX_SIG_DETECT 0x00000400 |
534 | #define SG_DIG_CTRL 0x000005b0 | 551 | #define SG_DIG_CTRL 0x000005b0 |
@@ -1109,6 +1126,7 @@ | |||
1109 | #define WDMAC_MODE_FIFOOREAD_ENAB 0x00000100 | 1126 | #define WDMAC_MODE_FIFOOREAD_ENAB 0x00000100 |
1110 | #define WDMAC_MODE_LNGREAD_ENAB 0x00000200 | 1127 | #define WDMAC_MODE_LNGREAD_ENAB 0x00000200 |
1111 | #define WDMAC_MODE_RX_ACCEL 0x00000400 | 1128 | #define WDMAC_MODE_RX_ACCEL 0x00000400 |
1129 | #define WDMAC_MODE_STATUS_TAG_FIX 0x20000000 | ||
1112 | #define WDMAC_STATUS 0x00004c04 | 1130 | #define WDMAC_STATUS 0x00004c04 |
1113 | #define WDMAC_STATUS_TGTABORT 0x00000004 | 1131 | #define WDMAC_STATUS_TGTABORT 0x00000004 |
1114 | #define WDMAC_STATUS_MSTABORT 0x00000008 | 1132 | #define WDMAC_STATUS_MSTABORT 0x00000008 |
@@ -1713,6 +1731,12 @@ | |||
1713 | #define NIC_SRAM_DATA_CFG_3 0x00000d3c | 1731 | #define NIC_SRAM_DATA_CFG_3 0x00000d3c |
1714 | #define NIC_SRAM_ASPM_DEBOUNCE 0x00000002 | 1732 | #define NIC_SRAM_ASPM_DEBOUNCE 0x00000002 |
1715 | 1733 | ||
1734 | #define NIC_SRAM_DATA_CFG_4 0x00000d60 | ||
1735 | #define NIC_SRAM_GMII_MODE 0x00000002 | ||
1736 | #define NIC_SRAM_RGMII_STD_IBND_DISABLE 0x00000004 | ||
1737 | #define NIC_SRAM_RGMII_EXT_IBND_RX_EN 0x00000008 | ||
1738 | #define NIC_SRAM_RGMII_EXT_IBND_TX_EN 0x00000010 | ||
1739 | |||
1716 | #define NIC_SRAM_RX_MINI_BUFFER_DESC 0x00001000 | 1740 | #define NIC_SRAM_RX_MINI_BUFFER_DESC 0x00001000 |
1717 | 1741 | ||
1718 | #define NIC_SRAM_DMA_DESC_POOL_BASE 0x00002000 | 1742 | #define NIC_SRAM_DMA_DESC_POOL_BASE 0x00002000 |
@@ -2204,6 +2228,7 @@ struct tg3_link_config { | |||
2204 | u16 orig_speed; | 2228 | u16 orig_speed; |
2205 | u8 orig_duplex; | 2229 | u8 orig_duplex; |
2206 | u8 orig_autoneg; | 2230 | u8 orig_autoneg; |
2231 | u32 orig_advertising; | ||
2207 | }; | 2232 | }; |
2208 | 2233 | ||
2209 | struct tg3_bufmgr_config { | 2234 | struct tg3_bufmgr_config { |
@@ -2479,6 +2504,13 @@ struct tg3 { | |||
2479 | #define TG3_FLG3_ENABLE_APE 0x00000002 | 2504 | #define TG3_FLG3_ENABLE_APE 0x00000002 |
2480 | #define TG3_FLG3_5761_5784_AX_FIXES 0x00000004 | 2505 | #define TG3_FLG3_5761_5784_AX_FIXES 0x00000004 |
2481 | #define TG3_FLG3_5701_DMA_BUG 0x00000008 | 2506 | #define TG3_FLG3_5701_DMA_BUG 0x00000008 |
2507 | #define TG3_FLG3_USE_PHYLIB 0x00000010 | ||
2508 | #define TG3_FLG3_MDIOBUS_INITED 0x00000020 | ||
2509 | #define TG3_FLG3_MDIOBUS_PAUSED 0x00000040 | ||
2510 | #define TG3_FLG3_PHY_CONNECTED 0x00000080 | ||
2511 | #define TG3_FLG3_RGMII_STD_IBND_DISABLE 0x00000100 | ||
2512 | #define TG3_FLG3_RGMII_EXT_IBND_RX_EN 0x00000200 | ||
2513 | #define TG3_FLG3_RGMII_EXT_IBND_TX_EN 0x00000400 | ||
2482 | 2514 | ||
2483 | struct timer_list timer; | 2515 | struct timer_list timer; |
2484 | u16 timer_counter; | 2516 | u16 timer_counter; |
@@ -2519,6 +2551,9 @@ struct tg3 { | |||
2519 | int msi_cap; | 2551 | int msi_cap; |
2520 | int pcix_cap; | 2552 | int pcix_cap; |
2521 | 2553 | ||
2554 | struct mii_bus mdio_bus; | ||
2555 | int mdio_irq[PHY_MAX_ADDR]; | ||
2556 | |||
2522 | /* PHY info */ | 2557 | /* PHY info */ |
2523 | u32 phy_id; | 2558 | u32 phy_id; |
2524 | #define PHY_ID_MASK 0xfffffff0 | 2559 | #define PHY_ID_MASK 0xfffffff0 |
@@ -2546,6 +2581,9 @@ struct tg3 { | |||
2546 | #define PHY_REV_BCM5401_B2 0x3 | 2581 | #define PHY_REV_BCM5401_B2 0x3 |
2547 | #define PHY_REV_BCM5401_C0 0x6 | 2582 | #define PHY_REV_BCM5401_C0 0x6 |
2548 | #define PHY_REV_BCM5411_X0 0x1 /* Found on Netgear GA302T */ | 2583 | #define PHY_REV_BCM5411_X0 0x1 /* Found on Netgear GA302T */ |
2584 | #define TG3_PHY_ID_BCM50610 0x143bd60 | ||
2585 | #define TG3_PHY_ID_BCMAC131 0x143bc70 | ||
2586 | |||
2549 | 2587 | ||
2550 | u32 led_ctrl; | 2588 | u32 led_ctrl; |
2551 | u32 phy_otp; | 2589 | u32 phy_otp; |