diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2010-10-14 06:37:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-17 16:57:44 -0400 |
commit | 52b02d04c801fff51ca49ad033210846d1713253 (patch) | |
tree | 719c03990321d703b192caf38186e30bb999885e /drivers/net/tg3.h | |
parent | ddfc87bfd16f370904c6ff7d23738335dd68d0ce (diff) |
tg3: Add EEE support
This patch adds Energy Efficient Ethernet (EEE) support for the 5718
device ID and the 57765 B0 asic revision.
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.h')
-rw-r--r-- | drivers/net/tg3.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 99fc30680217..8342190df0ff 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -1091,7 +1091,26 @@ | |||
1091 | #define CPMU_MUTEX_GNT_DRIVER 0x00001000 | 1091 | #define CPMU_MUTEX_GNT_DRIVER 0x00001000 |
1092 | #define TG3_CPMU_PHY_STRAP 0x00003664 | 1092 | #define TG3_CPMU_PHY_STRAP 0x00003664 |
1093 | #define TG3_CPMU_PHY_STRAP_IS_SERDES 0x00000020 | 1093 | #define TG3_CPMU_PHY_STRAP_IS_SERDES 0x00000020 |
1094 | /* 0x3664 --> 0x3800 unused */ | 1094 | /* 0x3664 --> 0x36b0 unused */ |
1095 | |||
1096 | #define TG3_CPMU_EEE_MODE 0x000036b0 | ||
1097 | #define TG3_CPMU_EEEMD_ERLY_L1_XIT_DET 0x00000008 | ||
1098 | #define TG3_CPMU_EEEMD_LPI_ENABLE 0x00000080 | ||
1099 | #define TG3_CPMU_EEEMD_LPI_IN_TX 0x00000100 | ||
1100 | #define TG3_CPMU_EEEMD_LPI_IN_RX 0x00000200 | ||
1101 | #define TG3_CPMU_EEEMD_EEE_ENABLE 0x00100000 | ||
1102 | /* 0x36b4 --> 0x36b8 unused */ | ||
1103 | |||
1104 | #define TG3_CPMU_EEE_LNKIDL_CTRL 0x000036bc | ||
1105 | #define TG3_CPMU_EEE_LNKIDL_PCIE_NL0 0x01000000 | ||
1106 | #define TG3_CPMU_EEE_LNKIDL_UART_IDL 0x00000004 | ||
1107 | /* 0x36c0 --> 0x36d0 unused */ | ||
1108 | |||
1109 | #define TG3_CPMU_EEE_CTRL 0x000036d0 | ||
1110 | #define TG3_CPMU_EEE_CTRL_EXIT_16_5_US 0x0000019d | ||
1111 | #define TG3_CPMU_EEE_CTRL_EXIT_36_US 0x00000384 | ||
1112 | #define TG3_CPMU_EEE_CTRL_EXIT_20_1_US 0x000001f8 | ||
1113 | /* 0x36d4 --> 0x3800 unused */ | ||
1095 | 1114 | ||
1096 | /* Mbuf cluster free registers */ | 1115 | /* Mbuf cluster free registers */ |
1097 | #define MBFREE_MODE 0x00003800 | 1116 | #define MBFREE_MODE 0x00003800 |
@@ -2082,6 +2101,8 @@ | |||
2082 | #define MII_TG3_DSP_TAP1 0x0001 | 2101 | #define MII_TG3_DSP_TAP1 0x0001 |
2083 | #define MII_TG3_DSP_TAP1_AGCTGT_DFLT 0x0007 | 2102 | #define MII_TG3_DSP_TAP1_AGCTGT_DFLT 0x0007 |
2084 | #define MII_TG3_DSP_AADJ1CH0 0x001f | 2103 | #define MII_TG3_DSP_AADJ1CH0 0x001f |
2104 | #define MII_TG3_DSP_CH34TP2 0x4022 | ||
2105 | #define MII_TG3_DSP_CH34TP2_HIBW01 0x0010 | ||
2085 | #define MII_TG3_DSP_AADJ1CH3 0x601f | 2106 | #define MII_TG3_DSP_AADJ1CH3 0x601f |
2086 | #define MII_TG3_DSP_AADJ1CH3_ADCCKADJ 0x0002 | 2107 | #define MII_TG3_DSP_AADJ1CH3_ADCCKADJ 0x0002 |
2087 | #define MII_TG3_DSP_EXP1_INT_STAT 0x0f01 | 2108 | #define MII_TG3_DSP_EXP1_INT_STAT 0x0f01 |
@@ -2148,6 +2169,14 @@ | |||
2148 | #define MII_TG3_TEST1_TRIM_EN 0x0010 | 2169 | #define MII_TG3_TEST1_TRIM_EN 0x0010 |
2149 | #define MII_TG3_TEST1_CRC_EN 0x8000 | 2170 | #define MII_TG3_TEST1_CRC_EN 0x8000 |
2150 | 2171 | ||
2172 | /* Clause 45 expansion registers */ | ||
2173 | #define TG3_CL45_D7_EEEADV_CAP 0x003c | ||
2174 | #define TG3_CL45_D7_EEEADV_CAP_100TX 0x0002 | ||
2175 | #define TG3_CL45_D7_EEEADV_CAP_1000T 0x0004 | ||
2176 | #define TG3_CL45_D7_EEERES_STAT 0x803e | ||
2177 | #define TG3_CL45_D7_EEERES_STAT_LP_100TX 0x0002 | ||
2178 | #define TG3_CL45_D7_EEERES_STAT_LP_1000T 0x0004 | ||
2179 | |||
2151 | 2180 | ||
2152 | /* Fast Ethernet Tranceiver definitions */ | 2181 | /* Fast Ethernet Tranceiver definitions */ |
2153 | #define MII_TG3_FET_PTEST 0x17 | 2182 | #define MII_TG3_FET_PTEST 0x17 |
@@ -2992,9 +3021,11 @@ struct tg3 { | |||
2992 | #define TG3_PHYFLG_BER_BUG 0x00008000 | 3021 | #define TG3_PHYFLG_BER_BUG 0x00008000 |
2993 | #define TG3_PHYFLG_SERDES_PREEMPHASIS 0x00010000 | 3022 | #define TG3_PHYFLG_SERDES_PREEMPHASIS 0x00010000 |
2994 | #define TG3_PHYFLG_PARALLEL_DETECT 0x00020000 | 3023 | #define TG3_PHYFLG_PARALLEL_DETECT 0x00020000 |
3024 | #define TG3_PHYFLG_EEE_CAP 0x00040000 | ||
2995 | 3025 | ||
2996 | u32 led_ctrl; | 3026 | u32 led_ctrl; |
2997 | u32 phy_otp; | 3027 | u32 phy_otp; |
3028 | u32 setlpicnt; | ||
2998 | 3029 | ||
2999 | #define TG3_BPN_SIZE 24 | 3030 | #define TG3_BPN_SIZE 24 |
3000 | char board_part_number[TG3_BPN_SIZE]; | 3031 | char board_part_number[TG3_BPN_SIZE]; |