aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/sky2.h178
1 files changed, 177 insertions, 1 deletions
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
index ed54129698b4..e13da94d19a3 100644
--- a/drivers/net/sky2.h
+++ b/drivers/net/sky2.h
@@ -16,6 +16,13 @@ enum {
16 PCI_DEV_REG5 = 0x88, 16 PCI_DEV_REG5 = 0x88,
17 PCI_CFG_REG_0 = 0x90, 17 PCI_CFG_REG_0 = 0x90,
18 PCI_CFG_REG_1 = 0x94, 18 PCI_CFG_REG_1 = 0x94,
19
20 PSM_CONFIG_REG0 = 0x98,
21 PSM_CONFIG_REG1 = 0x9C,
22 PSM_CONFIG_REG2 = 0x160,
23 PSM_CONFIG_REG3 = 0x164,
24 PSM_CONFIG_REG4 = 0x168,
25
19}; 26};
20 27
21/* Yukon-2 */ 28/* Yukon-2 */
@@ -48,6 +55,37 @@ enum pci_dev_reg_2 {
48 PCI_USEDATA64 = 1<<0, /* Use 64Bit Data bus ext */ 55 PCI_USEDATA64 = 1<<0, /* Use 64Bit Data bus ext */
49}; 56};
50 57
58/* PCI_OUR_REG_3 32 bit Our Register 3 (Yukon-ECU only) */
59enum pci_dev_reg_3 {
60 P_CLK_ASF_REGS_DIS = 1<<18,/* Disable Clock ASF (Yukon-Ext.) */
61 P_CLK_COR_REGS_D0_DIS = 1<<17,/* Disable Clock Core Regs D0 */
62 P_CLK_MACSEC_DIS = 1<<17,/* Disable Clock MACSec (Yukon-Ext.) */
63 P_CLK_PCI_REGS_D0_DIS = 1<<16,/* Disable Clock PCI Regs D0 */
64 P_CLK_COR_YTB_ARB_DIS = 1<<15,/* Disable Clock YTB Arbiter */
65 P_CLK_MAC_LNK1_D3_DIS = 1<<14,/* Disable Clock MAC Link1 D3 */
66 P_CLK_COR_LNK1_D0_DIS = 1<<13,/* Disable Clock Core Link1 D0 */
67 P_CLK_MAC_LNK1_D0_DIS = 1<<12,/* Disable Clock MAC Link1 D0 */
68 P_CLK_COR_LNK1_D3_DIS = 1<<11,/* Disable Clock Core Link1 D3 */
69 P_CLK_PCI_MST_ARB_DIS = 1<<10,/* Disable Clock PCI Master Arb. */
70 P_CLK_COR_REGS_D3_DIS = 1<<9, /* Disable Clock Core Regs D3 */
71 P_CLK_PCI_REGS_D3_DIS = 1<<8, /* Disable Clock PCI Regs D3 */
72 P_CLK_REF_LNK1_GM_DIS = 1<<7, /* Disable Clock Ref. Link1 GMAC */
73 P_CLK_COR_LNK1_GM_DIS = 1<<6, /* Disable Clock Core Link1 GMAC */
74 P_CLK_PCI_COMMON_DIS = 1<<5, /* Disable Clock PCI Common */
75 P_CLK_COR_COMMON_DIS = 1<<4, /* Disable Clock Core Common */
76 P_CLK_PCI_LNK1_BMU_DIS = 1<<3, /* Disable Clock PCI Link1 BMU */
77 P_CLK_COR_LNK1_BMU_DIS = 1<<2, /* Disable Clock Core Link1 BMU */
78 P_CLK_PCI_LNK1_BIU_DIS = 1<<1, /* Disable Clock PCI Link1 BIU */
79 P_CLK_COR_LNK1_BIU_DIS = 1<<0, /* Disable Clock Core Link1 BIU */
80 PCIE_OUR3_WOL_D3_COLD_SET = P_CLK_ASF_REGS_DIS |
81 P_CLK_COR_REGS_D0_DIS |
82 P_CLK_COR_LNK1_D0_DIS |
83 P_CLK_MAC_LNK1_D0_DIS |
84 P_CLK_PCI_MST_ARB_DIS |
85 P_CLK_COR_COMMON_DIS |
86 P_CLK_COR_LNK1_BMU_DIS,
87};
88
51/* PCI_OUR_REG_4 32 bit Our Register 4 (Yukon-ECU only) */ 89/* PCI_OUR_REG_4 32 bit Our Register 4 (Yukon-ECU only) */
52enum pci_dev_reg_4 { 90enum pci_dev_reg_4 {
53 /* (Link Training & Status State Machine) */ 91 /* (Link Training & Status State Machine) */
@@ -114,7 +152,7 @@ enum pci_dev_reg_5 {
114 P_GAT_PCIE_RX_EL_IDLE, 152 P_GAT_PCIE_RX_EL_IDLE,
115}; 153};
116 154
117#/* PCI_CFG_REG_1 32 bit Config Register 1 (Yukon-Ext only) */ 155/* PCI_CFG_REG_1 32 bit Config Register 1 (Yukon-Ext only) */
118enum pci_cfg_reg1 { 156enum pci_cfg_reg1 {
119 P_CF1_DIS_REL_EVT_RST = 1<<24, /* Dis. Rel. Event during PCIE reset */ 157 P_CF1_DIS_REL_EVT_RST = 1<<24, /* Dis. Rel. Event during PCIE reset */
120 /* Bit 23..21: Release Clock on Event */ 158 /* Bit 23..21: Release Clock on Event */
@@ -145,6 +183,72 @@ enum pci_cfg_reg1 {
145 P_CF1_ENA_TXBMU_WR_IDLE, 183 P_CF1_ENA_TXBMU_WR_IDLE,
146}; 184};
147 185
186/* Yukon-Optima */
187enum {
188 PSM_CONFIG_REG1_AC_PRESENT_STATUS = 1<<31, /* AC Present Status */
189
190 PSM_CONFIG_REG1_PTP_CLK_SEL = 1<<29, /* PTP Clock Select */
191 PSM_CONFIG_REG1_PTP_MODE = 1<<28, /* PTP Mode */
192
193 PSM_CONFIG_REG1_MUX_PHY_LINK = 1<<27, /* PHY Energy Detect Event */
194
195 PSM_CONFIG_REG1_EN_PIN63_AC_PRESENT = 1<<26, /* Enable LED_DUPLEX for ac_present */
196 PSM_CONFIG_REG1_EN_PCIE_TIMER = 1<<25, /* Enable PCIe Timer */
197 PSM_CONFIG_REG1_EN_SPU_TIMER = 1<<24, /* Enable SPU Timer */
198 PSM_CONFIG_REG1_POLARITY_AC_PRESENT = 1<<23, /* AC Present Polarity */
199
200 PSM_CONFIG_REG1_EN_AC_PRESENT = 1<<21, /* Enable AC Present */
201
202 PSM_CONFIG_REG1_EN_GPHY_INT_PSM = 1<<20, /* Enable GPHY INT for PSM */
203 PSM_CONFIG_REG1_DIS_PSM_TIMER = 1<<19, /* Disable PSM Timer */
204};
205
206/* Yukon-Supreme */
207enum {
208 PSM_CONFIG_REG1_GPHY_ENERGY_STS = 1<<31, /* GPHY Energy Detect Status */
209
210 PSM_CONFIG_REG1_UART_MODE_MSK = 3<<29, /* UART_Mode */
211 PSM_CONFIG_REG1_CLK_RUN_ASF = 1<<28, /* Enable Clock Free Running for ASF Subsystem */
212 PSM_CONFIG_REG1_UART_CLK_DISABLE= 1<<27, /* Disable UART clock */
213 PSM_CONFIG_REG1_VAUX_ONE = 1<<26, /* Tie internal Vaux to 1'b1 */
214 PSM_CONFIG_REG1_UART_FC_RI_VAL = 1<<25, /* Default value for UART_RI_n */
215 PSM_CONFIG_REG1_UART_FC_DCD_VAL = 1<<24, /* Default value for UART_DCD_n */
216 PSM_CONFIG_REG1_UART_FC_DSR_VAL = 1<<23, /* Default value for UART_DSR_n */
217 PSM_CONFIG_REG1_UART_FC_CTS_VAL = 1<<22, /* Default value for UART_CTS_n */
218 PSM_CONFIG_REG1_LATCH_VAUX = 1<<21, /* Enable Latch current Vaux_avlbl */
219 PSM_CONFIG_REG1_FORCE_TESTMODE_INPUT= 1<<20, /* Force Testmode pin as input PAD */
220 PSM_CONFIG_REG1_UART_RST = 1<<19, /* UART_RST */
221 PSM_CONFIG_REG1_PSM_PCIE_L1_POL = 1<<18, /* PCIE L1 Event Polarity for PSM */
222 PSM_CONFIG_REG1_TIMER_STAT = 1<<17, /* PSM Timer Status */
223 PSM_CONFIG_REG1_GPHY_INT = 1<<16, /* GPHY INT Status */
224 PSM_CONFIG_REG1_FORCE_TESTMODE_ZERO= 1<<15, /* Force internal Testmode as 1'b0 */
225 PSM_CONFIG_REG1_EN_INT_ASPM_CLKREQ = 1<<14, /* ENABLE INT for CLKRUN on ASPM and CLKREQ */
226 PSM_CONFIG_REG1_EN_SND_TASK_ASPM_CLKREQ = 1<<13, /* ENABLE Snd_task for CLKRUN on ASPM and CLKREQ */
227 PSM_CONFIG_REG1_DIS_CLK_GATE_SND_TASK = 1<<12, /* Disable CLK_GATE control snd_task */
228 PSM_CONFIG_REG1_DIS_FF_CHIAN_SND_INTA = 1<<11, /* Disable flip-flop chain for sndmsg_inta */
229
230 PSM_CONFIG_REG1_DIS_LOADER = 1<<9, /* Disable Loader SM after PSM Goes back to IDLE */
231 PSM_CONFIG_REG1_DO_PWDN = 1<<8, /* Do Power Down, Start PSM Scheme */
232 PSM_CONFIG_REG1_DIS_PIG = 1<<7, /* Disable Plug-in-Go SM after PSM Goes back to IDLE */
233 PSM_CONFIG_REG1_DIS_PERST = 1<<6, /* Disable Internal PCIe Reset after PSM Goes back to IDLE */
234 PSM_CONFIG_REG1_EN_REG18_PD = 1<<5, /* Enable REG18 Power Down for PSM */
235 PSM_CONFIG_REG1_EN_PSM_LOAD = 1<<4, /* Disable EEPROM Loader after PSM Goes back to IDLE */
236 PSM_CONFIG_REG1_EN_PSM_HOT_RST = 1<<3, /* Enable PCIe Hot Reset for PSM */
237 PSM_CONFIG_REG1_EN_PSM_PERST = 1<<2, /* Enable PCIe Reset Event for PSM */
238 PSM_CONFIG_REG1_EN_PSM_PCIE_L1 = 1<<1, /* Enable PCIe L1 Event for PSM */
239 PSM_CONFIG_REG1_EN_PSM = 1<<0, /* Enable PSM Scheme */
240};
241
242/* PSM_CONFIG_REG4 0x0168 PSM Config Register 4 */
243enum {
244 /* PHY Link Detect Timer */
245 PSM_CONFIG_REG4_TIMER_PHY_LINK_DETECT_MSK = 0xf<<4,
246 PSM_CONFIG_REG4_TIMER_PHY_LINK_DETECT_BASE = 4,
247
248 PSM_CONFIG_REG4_DEBUG_TIMER = 1<<1, /* Debug Timer */
249 PSM_CONFIG_REG4_RST_PHY_LINK_DETECT = 1<<0, /* Reset GPHY Link Detect */
250};
251
148 252
149#define PCI_STATUS_ERROR_BITS (PCI_STATUS_DETECTED_PARITY | \ 253#define PCI_STATUS_ERROR_BITS (PCI_STATUS_DETECTED_PARITY | \
150 PCI_STATUS_SIG_SYSTEM_ERROR | \ 254 PCI_STATUS_SIG_SYSTEM_ERROR | \
@@ -197,6 +301,9 @@ enum csr_regs {
197 B2_I2C_IRQ = 0x0168, 301 B2_I2C_IRQ = 0x0168,
198 B2_I2C_SW = 0x016c, 302 B2_I2C_SW = 0x016c,
199 303
304 Y2_PEX_PHY_DATA = 0x0170,
305 Y2_PEX_PHY_ADDR = 0x0172,
306
200 B3_RAM_ADDR = 0x0180, 307 B3_RAM_ADDR = 0x0180,
201 B3_RAM_DATA_LO = 0x0184, 308 B3_RAM_DATA_LO = 0x0184,
202 B3_RAM_DATA_HI = 0x0188, 309 B3_RAM_DATA_HI = 0x0188,
@@ -317,6 +424,10 @@ enum {
317 Y2_IS_CHK_TXS2 = 1<<9, /* Descriptor error TXS 2 */ 424 Y2_IS_CHK_TXS2 = 1<<9, /* Descriptor error TXS 2 */
318 Y2_IS_CHK_TXA2 = 1<<8, /* Descriptor error TXA 2 */ 425 Y2_IS_CHK_TXA2 = 1<<8, /* Descriptor error TXA 2 */
319 426
427 Y2_IS_PSM_ACK = 1<<7, /* PSM Acknowledge (Yukon-Optima only) */
428 Y2_IS_PTP_TIST = 1<<6, /* PTP Time Stamp (Yukon-Optima only) */
429 Y2_IS_PHY_QLNK = 1<<5, /* PHY Quick Link (Yukon-Optima only) */
430
320 Y2_IS_IRQ_PHY1 = 1<<4, /* Interrupt from PHY 1 */ 431 Y2_IS_IRQ_PHY1 = 1<<4, /* Interrupt from PHY 1 */
321 Y2_IS_IRQ_MAC1 = 1<<3, /* Interrupt from MAC 1 */ 432 Y2_IS_IRQ_MAC1 = 1<<3, /* Interrupt from MAC 1 */
322 Y2_IS_CHK_RX1 = 1<<2, /* Descriptor error Rx 1 */ 433 Y2_IS_CHK_RX1 = 1<<2, /* Descriptor error Rx 1 */
@@ -435,6 +546,7 @@ enum {
435 CHIP_ID_YUKON_FE_P = 0xb8, /* YUKON-2 FE+ */ 546 CHIP_ID_YUKON_FE_P = 0xb8, /* YUKON-2 FE+ */
436 CHIP_ID_YUKON_SUPR = 0xb9, /* YUKON-2 Supreme */ 547 CHIP_ID_YUKON_SUPR = 0xb9, /* YUKON-2 Supreme */
437 CHIP_ID_YUKON_UL_2 = 0xba, /* YUKON-2 Ultra 2 */ 548 CHIP_ID_YUKON_UL_2 = 0xba, /* YUKON-2 Ultra 2 */
549 CHIP_ID_YUKON_OPT = 0xbc, /* YUKON-2 Optima */
438}; 550};
439enum yukon_ec_rev { 551enum yukon_ec_rev {
440 CHIP_REV_YU_EC_A1 = 0, /* Chip Rev. for Yukon-EC A1/A0 */ 552 CHIP_REV_YU_EC_A1 = 0, /* Chip Rev. for Yukon-EC A1/A0 */
@@ -459,6 +571,8 @@ enum yukon_ex_rev {
459}; 571};
460enum yukon_supr_rev { 572enum yukon_supr_rev {
461 CHIP_REV_YU_SU_A0 = 0, 573 CHIP_REV_YU_SU_A0 = 0,
574 CHIP_REV_YU_SU_B0 = 1,
575 CHIP_REV_YU_SU_B1 = 3,
462}; 576};
463 577
464 578
@@ -513,6 +627,12 @@ enum {
513 TIM_T_STEP = 1<<0, /* Test step */ 627 TIM_T_STEP = 1<<0, /* Test step */
514}; 628};
515 629
630/* Y2_PEX_PHY_ADDR/DATA PEX PHY address and data reg (Yukon-2 only) */
631enum {
632 PEX_RD_ACCESS = 1<<31, /* Access Mode Read = 1, Write = 0 */
633 PEX_DB_ACCESS = 1<<30, /* Access to debug register */
634};
635
516/* B3_RAM_ADDR 32 bit RAM Address, to read or write */ 636/* B3_RAM_ADDR 32 bit RAM Address, to read or write */
517 /* Bit 31..19: reserved */ 637 /* Bit 31..19: reserved */
518#define RAM_ADR_RAN 0x0007ffffL /* Bit 18.. 0: RAM Address Range */ 638#define RAM_ADR_RAN 0x0007ffffL /* Bit 18.. 0: RAM Address Range */
@@ -754,6 +874,42 @@ enum {
754 BMU_TX_CLR_IRQ_TCP = 1<<11, /* Clear IRQ on TCP segment length mismatch */ 874 BMU_TX_CLR_IRQ_TCP = 1<<11, /* Clear IRQ on TCP segment length mismatch */
755}; 875};
756 876
877/* TBMU_TEST 0x06B8 Transmit BMU Test Register */
878enum {
879 TBMU_TEST_BMU_TX_CHK_AUTO_OFF = 1<<31, /* BMU Tx Checksum Auto Calculation Disable */
880 TBMU_TEST_BMU_TX_CHK_AUTO_ON = 1<<30, /* BMU Tx Checksum Auto Calculation Enable */
881 TBMU_TEST_HOME_ADD_PAD_FIX1_EN = 1<<29, /* Home Address Paddiing FIX1 Enable */
882 TBMU_TEST_HOME_ADD_PAD_FIX1_DIS = 1<<28, /* Home Address Paddiing FIX1 Disable */
883 TBMU_TEST_ROUTING_ADD_FIX_EN = 1<<27, /* Routing Address Fix Enable */
884 TBMU_TEST_ROUTING_ADD_FIX_DIS = 1<<26, /* Routing Address Fix Disable */
885 TBMU_TEST_HOME_ADD_FIX_EN = 1<<25, /* Home address checksum fix enable */
886 TBMU_TEST_HOME_ADD_FIX_DIS = 1<<24, /* Home address checksum fix disable */
887
888 TBMU_TEST_TEST_RSPTR_ON = 1<<22, /* Testmode Shadow Read Ptr On */
889 TBMU_TEST_TEST_RSPTR_OFF = 1<<21, /* Testmode Shadow Read Ptr Off */
890 TBMU_TEST_TESTSTEP_RSPTR = 1<<20, /* Teststep Shadow Read Ptr */
891
892 TBMU_TEST_TEST_RPTR_ON = 1<<18, /* Testmode Read Ptr On */
893 TBMU_TEST_TEST_RPTR_OFF = 1<<17, /* Testmode Read Ptr Off */
894 TBMU_TEST_TESTSTEP_RPTR = 1<<16, /* Teststep Read Ptr */
895
896 TBMU_TEST_TEST_WSPTR_ON = 1<<14, /* Testmode Shadow Write Ptr On */
897 TBMU_TEST_TEST_WSPTR_OFF = 1<<13, /* Testmode Shadow Write Ptr Off */
898 TBMU_TEST_TESTSTEP_WSPTR = 1<<12, /* Teststep Shadow Write Ptr */
899
900 TBMU_TEST_TEST_WPTR_ON = 1<<10, /* Testmode Write Ptr On */
901 TBMU_TEST_TEST_WPTR_OFF = 1<<9, /* Testmode Write Ptr Off */
902 TBMU_TEST_TESTSTEP_WPTR = 1<<8, /* Teststep Write Ptr */
903
904 TBMU_TEST_TEST_REQ_NB_ON = 1<<6, /* Testmode Req Nbytes/Addr On */
905 TBMU_TEST_TEST_REQ_NB_OFF = 1<<5, /* Testmode Req Nbytes/Addr Off */
906 TBMU_TEST_TESTSTEP_REQ_NB = 1<<4, /* Teststep Req Nbytes/Addr */
907
908 TBMU_TEST_TEST_DONE_IDX_ON = 1<<2, /* Testmode Done Index On */
909 TBMU_TEST_TEST_DONE_IDX_OFF = 1<<1, /* Testmode Done Index Off */
910 TBMU_TEST_TESTSTEP_DONE_IDX = 1<<0, /* Teststep Done Index */
911};
912
757/* Queue Prefetch Unit Offsets, use Y2_QADDR() to address (Yukon-2 only)*/ 913/* Queue Prefetch Unit Offsets, use Y2_QADDR() to address (Yukon-2 only)*/
758/* PREF_UNIT_CTRL 32 bit Prefetch Control register */ 914/* PREF_UNIT_CTRL 32 bit Prefetch Control register */
759enum { 915enum {
@@ -1674,6 +1830,12 @@ enum {
1674 1830
1675/* RX_GMF_CTRL_T 32 bit Rx GMAC FIFO Control/Test */ 1831/* RX_GMF_CTRL_T 32 bit Rx GMAC FIFO Control/Test */
1676enum { 1832enum {
1833 RX_GCLKMAC_ENA = 1<<31, /* RX MAC Clock Gating Enable */
1834 RX_GCLKMAC_OFF = 1<<30,
1835
1836 RX_STFW_DIS = 1<<29, /* RX Store and Forward Enable */
1837 RX_STFW_ENA = 1<<28,
1838
1677 RX_TRUNC_ON = 1<<27, /* enable packet truncation */ 1839 RX_TRUNC_ON = 1<<27, /* enable packet truncation */
1678 RX_TRUNC_OFF = 1<<26, /* disable packet truncation */ 1840 RX_TRUNC_OFF = 1<<26, /* disable packet truncation */
1679 RX_VLAN_STRIP_ON = 1<<25, /* enable VLAN stripping */ 1841 RX_VLAN_STRIP_ON = 1<<25, /* enable VLAN stripping */
@@ -1711,6 +1873,20 @@ enum {
1711 GMF_RX_CTRL_DEF = GMF_OPER_ON | GMF_RX_F_FL_ON, 1873 GMF_RX_CTRL_DEF = GMF_OPER_ON | GMF_RX_F_FL_ON,
1712}; 1874};
1713 1875
1876/* RX_GMF_FL_CTRL 16 bit Rx GMAC FIFO Flush Control (Yukon-Supreme) */
1877enum {
1878 RX_IPV6_SA_MOB_ENA = 1<<9, /* IPv6 SA Mobility Support Enable */
1879 RX_IPV6_SA_MOB_DIS = 1<<8, /* IPv6 SA Mobility Support Disable */
1880 RX_IPV6_DA_MOB_ENA = 1<<7, /* IPv6 DA Mobility Support Enable */
1881 RX_IPV6_DA_MOB_DIS = 1<<6, /* IPv6 DA Mobility Support Disable */
1882 RX_PTR_SYNCDLY_ENA = 1<<5, /* Pointers Delay Synch Enable */
1883 RX_PTR_SYNCDLY_DIS = 1<<4, /* Pointers Delay Synch Disable */
1884 RX_ASF_NEWFLAG_ENA = 1<<3, /* RX ASF Flag New Logic Enable */
1885 RX_ASF_NEWFLAG_DIS = 1<<2, /* RX ASF Flag New Logic Disable */
1886 RX_FLSH_MISSPKT_ENA = 1<<1, /* RX Flush Miss-Packet Enable */
1887 RX_FLSH_MISSPKT_DIS = 1<<0, /* RX Flush Miss-Packet Disable */
1888};
1889
1714/* TX_GMF_EA 32 bit Tx GMAC FIFO End Address */ 1890/* TX_GMF_EA 32 bit Tx GMAC FIFO End Address */
1715enum { 1891enum {
1716 TX_DYN_WM_ENA = 3, /* Yukon-FE+ specific */ 1892 TX_DYN_WM_ENA = 3, /* Yukon-FE+ specific */