• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  * Support for Solarflare Solarstorm network controllers and boards
3  * Copyright 2010-2012 Solarflare Communications Inc.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 as published
7  * by the Free Software Foundation, incorporated herein by reference.
8  */
9 
10 #include <stdio.h>
11 #include <string.h>
12 #include "internal.h"
13 
14 #ifndef ARRAY_SIZE
15 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
16 #endif
17 
18 /* Falcon architecture register definitions
19  * (from linux/drivers/net/ethernet/sfc/farch_regs.h)
20  */
21 
22 /* ADR_REGION_REG: Address region register */
23 #define	FR_AZ_ADR_REGION 0x00000000
24 #define	FRF_AZ_ADR_REGION3_LBN 96
25 #define	FRF_AZ_ADR_REGION3_WIDTH 18
26 #define	FRF_AZ_ADR_REGION2_LBN 64
27 #define	FRF_AZ_ADR_REGION2_WIDTH 18
28 #define	FRF_AZ_ADR_REGION1_LBN 32
29 #define	FRF_AZ_ADR_REGION1_WIDTH 18
30 #define	FRF_AZ_ADR_REGION0_LBN 0
31 #define	FRF_AZ_ADR_REGION0_WIDTH 18
32 
33 /* INT_EN_REG_KER: Kernel driver Interrupt enable register */
34 #define	FR_AZ_INT_EN_KER 0x00000010
35 #define	FRF_AZ_KER_INT_LEVE_SEL_LBN 8
36 #define	FRF_AZ_KER_INT_LEVE_SEL_WIDTH 6
37 #define	FRF_AZ_KER_INT_CHAR_LBN 4
38 #define	FRF_AZ_KER_INT_CHAR_WIDTH 1
39 #define	FRF_AZ_KER_INT_KER_LBN 3
40 #define	FRF_AZ_KER_INT_KER_WIDTH 1
41 #define	FRF_AZ_DRV_INT_EN_KER_LBN 0
42 #define	FRF_AZ_DRV_INT_EN_KER_WIDTH 1
43 
44 /* INT_EN_REG_CHAR: Char Driver interrupt enable register */
45 #define	FR_BZ_INT_EN_CHAR 0x00000020
46 #define	FRF_BZ_CHAR_INT_LEVE_SEL_LBN 8
47 #define	FRF_BZ_CHAR_INT_LEVE_SEL_WIDTH 6
48 #define	FRF_BZ_CHAR_INT_CHAR_LBN 4
49 #define	FRF_BZ_CHAR_INT_CHAR_WIDTH 1
50 #define	FRF_BZ_CHAR_INT_KER_LBN 3
51 #define	FRF_BZ_CHAR_INT_KER_WIDTH 1
52 #define	FRF_BZ_DRV_INT_EN_CHAR_LBN 0
53 #define	FRF_BZ_DRV_INT_EN_CHAR_WIDTH 1
54 
55 /* INT_ADR_REG_KER: Interrupt host address for Kernel driver */
56 #define	FR_AZ_INT_ADR_KER 0x00000030
57 #define	FRF_AZ_NORM_INT_VEC_DIS_KER_LBN 64
58 #define	FRF_AZ_NORM_INT_VEC_DIS_KER_WIDTH 1
59 #define	FRF_AZ_INT_ADR_KER_LBN 0
60 #define	FRF_AZ_INT_ADR_KER_WIDTH 64
61 
62 /* INT_ADR_REG_CHAR: Interrupt host address for Char driver */
63 #define	FR_BZ_INT_ADR_CHAR 0x00000040
64 #define	FRF_BZ_NORM_INT_VEC_DIS_CHAR_LBN 64
65 #define	FRF_BZ_NORM_INT_VEC_DIS_CHAR_WIDTH 1
66 #define	FRF_BZ_INT_ADR_CHAR_LBN 0
67 #define	FRF_BZ_INT_ADR_CHAR_WIDTH 64
68 
69 /* INT_ACK_KER: Kernel interrupt acknowledge register */
70 #define	FR_AA_INT_ACK_KER 0x00000050
71 #define	FRF_AA_INT_ACK_KER_FIELD_LBN 0
72 #define	FRF_AA_INT_ACK_KER_FIELD_WIDTH 32
73 
74 /* INT_ISR0_REG: Function 0 Interrupt Acknowledge Status register */
75 #define	FR_BZ_INT_ISR0 0x00000090
76 #define	FRF_BZ_INT_ISR_REG_LBN 0
77 #define	FRF_BZ_INT_ISR_REG_WIDTH 64
78 
79 /* HW_INIT_REG: Hardware initialization register */
80 #define	FR_AZ_HW_INIT 0x000000c0
81 #define	FRF_BB_BDMRD_CPLF_FULL_LBN 124
82 #define	FRF_BB_BDMRD_CPLF_FULL_WIDTH 1
83 #define	FRF_BB_PCIE_CPL_TIMEOUT_CTRL_LBN 121
84 #define	FRF_BB_PCIE_CPL_TIMEOUT_CTRL_WIDTH 3
85 #define	FRF_CZ_TX_MRG_TAGS_LBN 120
86 #define	FRF_CZ_TX_MRG_TAGS_WIDTH 1
87 #define	FRF_AB_TRGT_MASK_ALL_LBN 100
88 #define	FRF_AB_TRGT_MASK_ALL_WIDTH 1
89 #define	FRF_AZ_DOORBELL_DROP_LBN 92
90 #define	FRF_AZ_DOORBELL_DROP_WIDTH 8
91 #define	FRF_AB_TX_RREQ_MASK_EN_LBN 76
92 #define	FRF_AB_TX_RREQ_MASK_EN_WIDTH 1
93 #define	FRF_AB_PE_EIDLE_DIS_LBN 75
94 #define	FRF_AB_PE_EIDLE_DIS_WIDTH 1
95 #define	FRF_AA_FC_BLOCKING_EN_LBN 45
96 #define	FRF_AA_FC_BLOCKING_EN_WIDTH 1
97 #define	FRF_BZ_B2B_REQ_EN_LBN 45
98 #define	FRF_BZ_B2B_REQ_EN_WIDTH 1
99 #define	FRF_AA_B2B_REQ_EN_LBN 44
100 #define	FRF_AA_B2B_REQ_EN_WIDTH 1
101 #define	FRF_BB_FC_BLOCKING_EN_LBN 44
102 #define	FRF_BB_FC_BLOCKING_EN_WIDTH 1
103 #define	FRF_AZ_POST_WR_MASK_LBN 40
104 #define	FRF_AZ_POST_WR_MASK_WIDTH 4
105 #define	FRF_AZ_TLP_TC_LBN 34
106 #define	FRF_AZ_TLP_TC_WIDTH 3
107 #define	FRF_AZ_TLP_ATTR_LBN 32
108 #define	FRF_AZ_TLP_ATTR_WIDTH 2
109 #define	FRF_AB_INTB_VEC_LBN 24
110 #define	FRF_AB_INTB_VEC_WIDTH 5
111 #define	FRF_AB_INTA_VEC_LBN 16
112 #define	FRF_AB_INTA_VEC_WIDTH 5
113 #define	FRF_AZ_WD_TIMER_LBN 8
114 #define	FRF_AZ_WD_TIMER_WIDTH 8
115 #define	FRF_AZ_US_DISABLE_LBN 5
116 #define	FRF_AZ_US_DISABLE_WIDTH 1
117 #define	FRF_AZ_TLP_EP_LBN 4
118 #define	FRF_AZ_TLP_EP_WIDTH 1
119 #define	FRF_AZ_ATTR_SEL_LBN 3
120 #define	FRF_AZ_ATTR_SEL_WIDTH 1
121 #define	FRF_AZ_TD_SEL_LBN 1
122 #define	FRF_AZ_TD_SEL_WIDTH 1
123 #define	FRF_AZ_TLP_TD_LBN 0
124 #define	FRF_AZ_TLP_TD_WIDTH 1
125 
126 /* EE_SPI_HCMD_REG: SPI host command register */
127 #define	FR_AB_EE_SPI_HCMD 0x00000100
128 #define	FRF_AB_EE_SPI_HCMD_CMD_EN_LBN 31
129 #define	FRF_AB_EE_SPI_HCMD_CMD_EN_WIDTH 1
130 #define	FRF_AB_EE_WR_TIMER_ACTIVE_LBN 28
131 #define	FRF_AB_EE_WR_TIMER_ACTIVE_WIDTH 1
132 #define	FRF_AB_EE_SPI_HCMD_SF_SEL_LBN 24
133 #define	FRF_AB_EE_SPI_HCMD_SF_SEL_WIDTH 1
134 #define	FRF_AB_EE_SPI_HCMD_DABCNT_LBN 16
135 #define	FRF_AB_EE_SPI_HCMD_DABCNT_WIDTH 5
136 #define	FRF_AB_EE_SPI_HCMD_READ_LBN 15
137 #define	FRF_AB_EE_SPI_HCMD_READ_WIDTH 1
138 #define	FRF_AB_EE_SPI_HCMD_DUBCNT_LBN 12
139 #define	FRF_AB_EE_SPI_HCMD_DUBCNT_WIDTH 2
140 #define	FRF_AB_EE_SPI_HCMD_ADBCNT_LBN 8
141 #define	FRF_AB_EE_SPI_HCMD_ADBCNT_WIDTH 2
142 #define	FRF_AB_EE_SPI_HCMD_ENC_LBN 0
143 #define	FRF_AB_EE_SPI_HCMD_ENC_WIDTH 8
144 
145 /* USR_EV_CFG: User Level Event Configuration register */
146 #define	FR_CZ_USR_EV_CFG 0x00000100
147 #define	FRF_CZ_USREV_DIS_LBN 16
148 #define	FRF_CZ_USREV_DIS_WIDTH 1
149 #define	FRF_CZ_DFLT_EVQ_LBN 0
150 #define	FRF_CZ_DFLT_EVQ_WIDTH 10
151 
152 /* EE_SPI_HADR_REG: SPI host address register */
153 #define	FR_AB_EE_SPI_HADR 0x00000110
154 #define	FRF_AB_EE_SPI_HADR_DUBYTE_LBN 24
155 #define	FRF_AB_EE_SPI_HADR_DUBYTE_WIDTH 8
156 #define	FRF_AB_EE_SPI_HADR_ADR_LBN 0
157 #define	FRF_AB_EE_SPI_HADR_ADR_WIDTH 24
158 
159 /* EE_SPI_HDATA_REG: SPI host data register */
160 #define	FR_AB_EE_SPI_HDATA 0x00000120
161 #define	FRF_AB_EE_SPI_HDATA3_LBN 96
162 #define	FRF_AB_EE_SPI_HDATA3_WIDTH 32
163 #define	FRF_AB_EE_SPI_HDATA2_LBN 64
164 #define	FRF_AB_EE_SPI_HDATA2_WIDTH 32
165 #define	FRF_AB_EE_SPI_HDATA1_LBN 32
166 #define	FRF_AB_EE_SPI_HDATA1_WIDTH 32
167 #define	FRF_AB_EE_SPI_HDATA0_LBN 0
168 #define	FRF_AB_EE_SPI_HDATA0_WIDTH 32
169 
170 /* EE_BASE_PAGE_REG: Expansion ROM base mirror register */
171 #define	FR_AB_EE_BASE_PAGE 0x00000130
172 #define	FRF_AB_EE_EXPROM_MASK_LBN 16
173 #define	FRF_AB_EE_EXPROM_MASK_WIDTH 13
174 #define	FRF_AB_EE_EXP_ROM_WINDOW_BASE_LBN 0
175 #define	FRF_AB_EE_EXP_ROM_WINDOW_BASE_WIDTH 13
176 
177 /* EE_VPD_CFG0_REG: SPI/VPD configuration register 0 */
178 #define	FR_AB_EE_VPD_CFG0 0x00000140
179 #define	FRF_AB_EE_SF_FASTRD_EN_LBN 127
180 #define	FRF_AB_EE_SF_FASTRD_EN_WIDTH 1
181 #define	FRF_AB_EE_SF_CLOCK_DIV_LBN 120
182 #define	FRF_AB_EE_SF_CLOCK_DIV_WIDTH 7
183 #define	FRF_AB_EE_VPD_WIP_POLL_LBN 119
184 #define	FRF_AB_EE_VPD_WIP_POLL_WIDTH 1
185 #define	FRF_AB_EE_EE_CLOCK_DIV_LBN 112
186 #define	FRF_AB_EE_EE_CLOCK_DIV_WIDTH 7
187 #define	FRF_AB_EE_EE_WR_TMR_VALUE_LBN 96
188 #define	FRF_AB_EE_EE_WR_TMR_VALUE_WIDTH 16
189 #define	FRF_AB_EE_VPDW_LENGTH_LBN 80
190 #define	FRF_AB_EE_VPDW_LENGTH_WIDTH 15
191 #define	FRF_AB_EE_VPDW_BASE_LBN 64
192 #define	FRF_AB_EE_VPDW_BASE_WIDTH 15
193 #define	FRF_AB_EE_VPD_WR_CMD_EN_LBN 56
194 #define	FRF_AB_EE_VPD_WR_CMD_EN_WIDTH 8
195 #define	FRF_AB_EE_VPD_BASE_LBN 32
196 #define	FRF_AB_EE_VPD_BASE_WIDTH 24
197 #define	FRF_AB_EE_VPD_LENGTH_LBN 16
198 #define	FRF_AB_EE_VPD_LENGTH_WIDTH 15
199 #define	FRF_AB_EE_VPD_AD_SIZE_LBN 8
200 #define	FRF_AB_EE_VPD_AD_SIZE_WIDTH 5
201 #define	FRF_AB_EE_VPD_ACCESS_ON_LBN 5
202 #define	FRF_AB_EE_VPD_ACCESS_ON_WIDTH 1
203 #define	FRF_AB_EE_VPD_ACCESS_BLOCK_LBN 4
204 #define	FRF_AB_EE_VPD_ACCESS_BLOCK_WIDTH 1
205 #define	FRF_AB_EE_VPD_DEV_SF_SEL_LBN 2
206 #define	FRF_AB_EE_VPD_DEV_SF_SEL_WIDTH 1
207 #define	FRF_AB_EE_VPD_EN_AD9_MODE_LBN 1
208 #define	FRF_AB_EE_VPD_EN_AD9_MODE_WIDTH 1
209 #define	FRF_AB_EE_VPD_EN_LBN 0
210 #define	FRF_AB_EE_VPD_EN_WIDTH 1
211 
212 /* EE_VPD_SW_CNTL_REG: VPD access SW control register */
213 #define	FR_AB_EE_VPD_SW_CNTL 0x00000150
214 #define	FRF_AB_EE_VPD_CYCLE_PENDING_LBN 31
215 #define	FRF_AB_EE_VPD_CYCLE_PENDING_WIDTH 1
216 #define	FRF_AB_EE_VPD_CYC_WRITE_LBN 28
217 #define	FRF_AB_EE_VPD_CYC_WRITE_WIDTH 1
218 #define	FRF_AB_EE_VPD_CYC_ADR_LBN 0
219 #define	FRF_AB_EE_VPD_CYC_ADR_WIDTH 15
220 
221 /* EE_VPD_SW_DATA_REG: VPD access SW data register */
222 #define	FR_AB_EE_VPD_SW_DATA 0x00000160
223 #define	FRF_AB_EE_VPD_CYC_DAT_LBN 0
224 #define	FRF_AB_EE_VPD_CYC_DAT_WIDTH 32
225 
226 /* PBMX_DBG_IADDR_REG: Capture Module address register */
227 #define	FR_CZ_PBMX_DBG_IADDR 0x000001f0
228 #define	FRF_CZ_PBMX_DBG_IADDR_LBN 0
229 #define	FRF_CZ_PBMX_DBG_IADDR_WIDTH 32
230 
231 /* PCIE_CORE_INDIRECT_REG: Indirect Access to PCIE Core registers */
232 #define	FR_BB_PCIE_CORE_INDIRECT 0x000001f0
233 #define	FRF_BB_PCIE_CORE_TARGET_DATA_LBN 32
234 #define	FRF_BB_PCIE_CORE_TARGET_DATA_WIDTH 32
235 #define	FRF_BB_PCIE_CORE_INDIRECT_ACCESS_DIR_LBN 15
236 #define	FRF_BB_PCIE_CORE_INDIRECT_ACCESS_DIR_WIDTH 1
237 #define	FRF_BB_PCIE_CORE_TARGET_REG_ADRS_LBN 0
238 #define	FRF_BB_PCIE_CORE_TARGET_REG_ADRS_WIDTH 12
239 
240 /* PBMX_DBG_IDATA_REG: Capture Module data register */
241 #define	FR_CZ_PBMX_DBG_IDATA 0x000001f8
242 #define	FRF_CZ_PBMX_DBG_IDATA_LBN 0
243 #define	FRF_CZ_PBMX_DBG_IDATA_WIDTH 64
244 
245 /* NIC_STAT_REG: NIC status register */
246 #define	FR_AB_NIC_STAT 0x00000200
247 #define	FRF_BB_AER_DIS_LBN 34
248 #define	FRF_BB_AER_DIS_WIDTH 1
249 #define	FRF_BB_EE_STRAP_EN_LBN 31
250 #define	FRF_BB_EE_STRAP_EN_WIDTH 1
251 #define	FRF_BB_EE_STRAP_LBN 24
252 #define	FRF_BB_EE_STRAP_WIDTH 4
253 #define	FRF_BB_REVISION_ID_LBN 17
254 #define	FRF_BB_REVISION_ID_WIDTH 7
255 #define	FRF_AB_ONCHIP_SRAM_LBN 16
256 #define	FRF_AB_ONCHIP_SRAM_WIDTH 1
257 #define	FRF_AB_SF_PRST_LBN 9
258 #define	FRF_AB_SF_PRST_WIDTH 1
259 #define	FRF_AB_EE_PRST_LBN 8
260 #define	FRF_AB_EE_PRST_WIDTH 1
261 #define	FRF_AB_ATE_MODE_LBN 3
262 #define	FRF_AB_ATE_MODE_WIDTH 1
263 #define	FRF_AB_STRAP_PINS_LBN 0
264 #define	FRF_AB_STRAP_PINS_WIDTH 3
265 
266 /* GPIO_CTL_REG: GPIO control register */
267 #define	FR_AB_GPIO_CTL 0x00000210
268 #define	FRF_AB_GPIO_OUT3_LBN 112
269 #define	FRF_AB_GPIO_OUT3_WIDTH 16
270 #define	FRF_AB_GPIO_IN3_LBN 104
271 #define	FRF_AB_GPIO_IN3_WIDTH 8
272 #define	FRF_AB_GPIO_PWRUP_VALUE3_LBN 96
273 #define	FRF_AB_GPIO_PWRUP_VALUE3_WIDTH 8
274 #define	FRF_AB_GPIO_OUT2_LBN 80
275 #define	FRF_AB_GPIO_OUT2_WIDTH 16
276 #define	FRF_AB_GPIO_IN2_LBN 72
277 #define	FRF_AB_GPIO_IN2_WIDTH 8
278 #define	FRF_AB_GPIO_PWRUP_VALUE2_LBN 64
279 #define	FRF_AB_GPIO_PWRUP_VALUE2_WIDTH 8
280 #define	FRF_AB_GPIO15_OEN_LBN 63
281 #define	FRF_AB_GPIO15_OEN_WIDTH 1
282 #define	FRF_AB_GPIO14_OEN_LBN 62
283 #define	FRF_AB_GPIO14_OEN_WIDTH 1
284 #define	FRF_AB_GPIO13_OEN_LBN 61
285 #define	FRF_AB_GPIO13_OEN_WIDTH 1
286 #define	FRF_AB_GPIO12_OEN_LBN 60
287 #define	FRF_AB_GPIO12_OEN_WIDTH 1
288 #define	FRF_AB_GPIO11_OEN_LBN 59
289 #define	FRF_AB_GPIO11_OEN_WIDTH 1
290 #define	FRF_AB_GPIO10_OEN_LBN 58
291 #define	FRF_AB_GPIO10_OEN_WIDTH 1
292 #define	FRF_AB_GPIO9_OEN_LBN 57
293 #define	FRF_AB_GPIO9_OEN_WIDTH 1
294 #define	FRF_AB_GPIO8_OEN_LBN 56
295 #define	FRF_AB_GPIO8_OEN_WIDTH 1
296 #define	FRF_AB_GPIO15_OUT_LBN 55
297 #define	FRF_AB_GPIO15_OUT_WIDTH 1
298 #define	FRF_AB_GPIO14_OUT_LBN 54
299 #define	FRF_AB_GPIO14_OUT_WIDTH 1
300 #define	FRF_AB_GPIO13_OUT_LBN 53
301 #define	FRF_AB_GPIO13_OUT_WIDTH 1
302 #define	FRF_AB_GPIO12_OUT_LBN 52
303 #define	FRF_AB_GPIO12_OUT_WIDTH 1
304 #define	FRF_AB_GPIO11_OUT_LBN 51
305 #define	FRF_AB_GPIO11_OUT_WIDTH 1
306 #define	FRF_AB_GPIO10_OUT_LBN 50
307 #define	FRF_AB_GPIO10_OUT_WIDTH 1
308 #define	FRF_AB_GPIO9_OUT_LBN 49
309 #define	FRF_AB_GPIO9_OUT_WIDTH 1
310 #define	FRF_AB_GPIO8_OUT_LBN 48
311 #define	FRF_AB_GPIO8_OUT_WIDTH 1
312 #define	FRF_AB_GPIO15_IN_LBN 47
313 #define	FRF_AB_GPIO15_IN_WIDTH 1
314 #define	FRF_AB_GPIO14_IN_LBN 46
315 #define	FRF_AB_GPIO14_IN_WIDTH 1
316 #define	FRF_AB_GPIO13_IN_LBN 45
317 #define	FRF_AB_GPIO13_IN_WIDTH 1
318 #define	FRF_AB_GPIO12_IN_LBN 44
319 #define	FRF_AB_GPIO12_IN_WIDTH 1
320 #define	FRF_AB_GPIO11_IN_LBN 43
321 #define	FRF_AB_GPIO11_IN_WIDTH 1
322 #define	FRF_AB_GPIO10_IN_LBN 42
323 #define	FRF_AB_GPIO10_IN_WIDTH 1
324 #define	FRF_AB_GPIO9_IN_LBN 41
325 #define	FRF_AB_GPIO9_IN_WIDTH 1
326 #define	FRF_AB_GPIO8_IN_LBN 40
327 #define	FRF_AB_GPIO8_IN_WIDTH 1
328 #define	FRF_AB_GPIO15_PWRUP_VALUE_LBN 39
329 #define	FRF_AB_GPIO15_PWRUP_VALUE_WIDTH 1
330 #define	FRF_AB_GPIO14_PWRUP_VALUE_LBN 38
331 #define	FRF_AB_GPIO14_PWRUP_VALUE_WIDTH 1
332 #define	FRF_AB_GPIO13_PWRUP_VALUE_LBN 37
333 #define	FRF_AB_GPIO13_PWRUP_VALUE_WIDTH 1
334 #define	FRF_AB_GPIO12_PWRUP_VALUE_LBN 36
335 #define	FRF_AB_GPIO12_PWRUP_VALUE_WIDTH 1
336 #define	FRF_AB_GPIO11_PWRUP_VALUE_LBN 35
337 #define	FRF_AB_GPIO11_PWRUP_VALUE_WIDTH 1
338 #define	FRF_AB_GPIO10_PWRUP_VALUE_LBN 34
339 #define	FRF_AB_GPIO10_PWRUP_VALUE_WIDTH 1
340 #define	FRF_AB_GPIO9_PWRUP_VALUE_LBN 33
341 #define	FRF_AB_GPIO9_PWRUP_VALUE_WIDTH 1
342 #define	FRF_AB_GPIO8_PWRUP_VALUE_LBN 32
343 #define	FRF_AB_GPIO8_PWRUP_VALUE_WIDTH 1
344 #define	FRF_AB_CLK156_OUT_EN_LBN 31
345 #define	FRF_AB_CLK156_OUT_EN_WIDTH 1
346 #define	FRF_AB_USE_NIC_CLK_LBN 30
347 #define	FRF_AB_USE_NIC_CLK_WIDTH 1
348 #define	FRF_AB_GPIO5_OEN_LBN 29
349 #define	FRF_AB_GPIO5_OEN_WIDTH 1
350 #define	FRF_AB_GPIO4_OEN_LBN 28
351 #define	FRF_AB_GPIO4_OEN_WIDTH 1
352 #define	FRF_AB_GPIO3_OEN_LBN 27
353 #define	FRF_AB_GPIO3_OEN_WIDTH 1
354 #define	FRF_AB_GPIO2_OEN_LBN 26
355 #define	FRF_AB_GPIO2_OEN_WIDTH 1
356 #define	FRF_AB_GPIO1_OEN_LBN 25
357 #define	FRF_AB_GPIO1_OEN_WIDTH 1
358 #define	FRF_AB_GPIO0_OEN_LBN 24
359 #define	FRF_AB_GPIO0_OEN_WIDTH 1
360 #define	FRF_AB_GPIO7_OUT_LBN 23
361 #define	FRF_AB_GPIO7_OUT_WIDTH 1
362 #define	FRF_AB_GPIO6_OUT_LBN 22
363 #define	FRF_AB_GPIO6_OUT_WIDTH 1
364 #define	FRF_AB_GPIO5_OUT_LBN 21
365 #define	FRF_AB_GPIO5_OUT_WIDTH 1
366 #define	FRF_AB_GPIO4_OUT_LBN 20
367 #define	FRF_AB_GPIO4_OUT_WIDTH 1
368 #define	FRF_AB_GPIO3_OUT_LBN 19
369 #define	FRF_AB_GPIO3_OUT_WIDTH 1
370 #define	FRF_AB_GPIO2_OUT_LBN 18
371 #define	FRF_AB_GPIO2_OUT_WIDTH 1
372 #define	FRF_AB_GPIO1_OUT_LBN 17
373 #define	FRF_AB_GPIO1_OUT_WIDTH 1
374 #define	FRF_AB_GPIO0_OUT_LBN 16
375 #define	FRF_AB_GPIO0_OUT_WIDTH 1
376 #define	FRF_AB_GPIO7_IN_LBN 15
377 #define	FRF_AB_GPIO7_IN_WIDTH 1
378 #define	FRF_AB_GPIO6_IN_LBN 14
379 #define	FRF_AB_GPIO6_IN_WIDTH 1
380 #define	FRF_AB_GPIO5_IN_LBN 13
381 #define	FRF_AB_GPIO5_IN_WIDTH 1
382 #define	FRF_AB_GPIO4_IN_LBN 12
383 #define	FRF_AB_GPIO4_IN_WIDTH 1
384 #define	FRF_AB_GPIO3_IN_LBN 11
385 #define	FRF_AB_GPIO3_IN_WIDTH 1
386 #define	FRF_AB_GPIO2_IN_LBN 10
387 #define	FRF_AB_GPIO2_IN_WIDTH 1
388 #define	FRF_AB_GPIO1_IN_LBN 9
389 #define	FRF_AB_GPIO1_IN_WIDTH 1
390 #define	FRF_AB_GPIO0_IN_LBN 8
391 #define	FRF_AB_GPIO0_IN_WIDTH 1
392 #define	FRF_AB_GPIO7_PWRUP_VALUE_LBN 7
393 #define	FRF_AB_GPIO7_PWRUP_VALUE_WIDTH 1
394 #define	FRF_AB_GPIO6_PWRUP_VALUE_LBN 6
395 #define	FRF_AB_GPIO6_PWRUP_VALUE_WIDTH 1
396 #define	FRF_AB_GPIO5_PWRUP_VALUE_LBN 5
397 #define	FRF_AB_GPIO5_PWRUP_VALUE_WIDTH 1
398 #define	FRF_AB_GPIO4_PWRUP_VALUE_LBN 4
399 #define	FRF_AB_GPIO4_PWRUP_VALUE_WIDTH 1
400 #define	FRF_AB_GPIO3_PWRUP_VALUE_LBN 3
401 #define	FRF_AB_GPIO3_PWRUP_VALUE_WIDTH 1
402 #define	FRF_AB_GPIO2_PWRUP_VALUE_LBN 2
403 #define	FRF_AB_GPIO2_PWRUP_VALUE_WIDTH 1
404 #define	FRF_AB_GPIO1_PWRUP_VALUE_LBN 1
405 #define	FRF_AB_GPIO1_PWRUP_VALUE_WIDTH 1
406 #define	FRF_AB_GPIO0_PWRUP_VALUE_LBN 0
407 #define	FRF_AB_GPIO0_PWRUP_VALUE_WIDTH 1
408 
409 /* GLB_CTL_REG: Global control register */
410 #define	FR_AB_GLB_CTL 0x00000220
411 #define	FRF_AB_EXT_PHY_RST_CTL_LBN 63
412 #define	FRF_AB_EXT_PHY_RST_CTL_WIDTH 1
413 #define	FRF_AB_XAUI_SD_RST_CTL_LBN 62
414 #define	FRF_AB_XAUI_SD_RST_CTL_WIDTH 1
415 #define	FRF_AB_PCIE_SD_RST_CTL_LBN 61
416 #define	FRF_AB_PCIE_SD_RST_CTL_WIDTH 1
417 #define	FRF_AA_PCIX_RST_CTL_LBN 60
418 #define	FRF_AA_PCIX_RST_CTL_WIDTH 1
419 #define	FRF_BB_BIU_RST_CTL_LBN 60
420 #define	FRF_BB_BIU_RST_CTL_WIDTH 1
421 #define	FRF_AB_PCIE_STKY_RST_CTL_LBN 59
422 #define	FRF_AB_PCIE_STKY_RST_CTL_WIDTH 1
423 #define	FRF_AB_PCIE_NSTKY_RST_CTL_LBN 58
424 #define	FRF_AB_PCIE_NSTKY_RST_CTL_WIDTH 1
425 #define	FRF_AB_PCIE_CORE_RST_CTL_LBN 57
426 #define	FRF_AB_PCIE_CORE_RST_CTL_WIDTH 1
427 #define	FRF_AB_XGRX_RST_CTL_LBN 56
428 #define	FRF_AB_XGRX_RST_CTL_WIDTH 1
429 #define	FRF_AB_XGTX_RST_CTL_LBN 55
430 #define	FRF_AB_XGTX_RST_CTL_WIDTH 1
431 #define	FRF_AB_EM_RST_CTL_LBN 54
432 #define	FRF_AB_EM_RST_CTL_WIDTH 1
433 #define	FRF_AB_EV_RST_CTL_LBN 53
434 #define	FRF_AB_EV_RST_CTL_WIDTH 1
435 #define	FRF_AB_SR_RST_CTL_LBN 52
436 #define	FRF_AB_SR_RST_CTL_WIDTH 1
437 #define	FRF_AB_RX_RST_CTL_LBN 51
438 #define	FRF_AB_RX_RST_CTL_WIDTH 1
439 #define	FRF_AB_TX_RST_CTL_LBN 50
440 #define	FRF_AB_TX_RST_CTL_WIDTH 1
441 #define	FRF_AB_EE_RST_CTL_LBN 49
442 #define	FRF_AB_EE_RST_CTL_WIDTH 1
443 #define	FRF_AB_CS_RST_CTL_LBN 48
444 #define	FRF_AB_CS_RST_CTL_WIDTH 1
445 #define	FRF_AB_HOT_RST_CTL_LBN 40
446 #define	FRF_AB_HOT_RST_CTL_WIDTH 2
447 #define	FRF_AB_RST_EXT_PHY_LBN 31
448 #define	FRF_AB_RST_EXT_PHY_WIDTH 1
449 #define	FRF_AB_RST_XAUI_SD_LBN 30
450 #define	FRF_AB_RST_XAUI_SD_WIDTH 1
451 #define	FRF_AB_RST_PCIE_SD_LBN 29
452 #define	FRF_AB_RST_PCIE_SD_WIDTH 1
453 #define	FRF_AA_RST_PCIX_LBN 28
454 #define	FRF_AA_RST_PCIX_WIDTH 1
455 #define	FRF_BB_RST_BIU_LBN 28
456 #define	FRF_BB_RST_BIU_WIDTH 1
457 #define	FRF_AB_RST_PCIE_STKY_LBN 27
458 #define	FRF_AB_RST_PCIE_STKY_WIDTH 1
459 #define	FRF_AB_RST_PCIE_NSTKY_LBN 26
460 #define	FRF_AB_RST_PCIE_NSTKY_WIDTH 1
461 #define	FRF_AB_RST_PCIE_CORE_LBN 25
462 #define	FRF_AB_RST_PCIE_CORE_WIDTH 1
463 #define	FRF_AB_RST_XGRX_LBN 24
464 #define	FRF_AB_RST_XGRX_WIDTH 1
465 #define	FRF_AB_RST_XGTX_LBN 23
466 #define	FRF_AB_RST_XGTX_WIDTH 1
467 #define	FRF_AB_RST_EM_LBN 22
468 #define	FRF_AB_RST_EM_WIDTH 1
469 #define	FRF_AB_RST_EV_LBN 21
470 #define	FRF_AB_RST_EV_WIDTH 1
471 #define	FRF_AB_RST_SR_LBN 20
472 #define	FRF_AB_RST_SR_WIDTH 1
473 #define	FRF_AB_RST_RX_LBN 19
474 #define	FRF_AB_RST_RX_WIDTH 1
475 #define	FRF_AB_RST_TX_LBN 18
476 #define	FRF_AB_RST_TX_WIDTH 1
477 #define	FRF_AB_RST_SF_LBN 17
478 #define	FRF_AB_RST_SF_WIDTH 1
479 #define	FRF_AB_RST_CS_LBN 16
480 #define	FRF_AB_RST_CS_WIDTH 1
481 #define	FRF_AB_INT_RST_DUR_LBN 4
482 #define	FRF_AB_INT_RST_DUR_WIDTH 3
483 #define	FRF_AB_EXT_PHY_RST_DUR_LBN 1
484 #define	FRF_AB_EXT_PHY_RST_DUR_WIDTH 3
485 #define	FFE_AB_EXT_PHY_RST_DUR_10240US 7
486 #define	FFE_AB_EXT_PHY_RST_DUR_5120US 6
487 #define	FFE_AB_EXT_PHY_RST_DUR_2560US 5
488 #define	FFE_AB_EXT_PHY_RST_DUR_1280US 4
489 #define	FFE_AB_EXT_PHY_RST_DUR_640US 3
490 #define	FFE_AB_EXT_PHY_RST_DUR_320US 2
491 #define	FFE_AB_EXT_PHY_RST_DUR_160US 1
492 #define	FFE_AB_EXT_PHY_RST_DUR_80US 0
493 #define	FRF_AB_SWRST_LBN 0
494 #define	FRF_AB_SWRST_WIDTH 1
495 
496 /* FATAL_INTR_REG_KER: Fatal interrupt register for Kernel */
497 #define	FR_AZ_FATAL_INTR_KER 0x00000230
498 #define	FRF_CZ_SRAM_PERR_INT_P_KER_EN_LBN 44
499 #define	FRF_CZ_SRAM_PERR_INT_P_KER_EN_WIDTH 1
500 #define	FRF_AB_PCI_BUSERR_INT_KER_EN_LBN 43
501 #define	FRF_AB_PCI_BUSERR_INT_KER_EN_WIDTH 1
502 #define	FRF_CZ_MBU_PERR_INT_KER_EN_LBN 43
503 #define	FRF_CZ_MBU_PERR_INT_KER_EN_WIDTH 1
504 #define	FRF_AZ_SRAM_OOB_INT_KER_EN_LBN 42
505 #define	FRF_AZ_SRAM_OOB_INT_KER_EN_WIDTH 1
506 #define	FRF_AZ_BUFID_OOB_INT_KER_EN_LBN 41
507 #define	FRF_AZ_BUFID_OOB_INT_KER_EN_WIDTH 1
508 #define	FRF_AZ_MEM_PERR_INT_KER_EN_LBN 40
509 #define	FRF_AZ_MEM_PERR_INT_KER_EN_WIDTH 1
510 #define	FRF_AZ_RBUF_OWN_INT_KER_EN_LBN 39
511 #define	FRF_AZ_RBUF_OWN_INT_KER_EN_WIDTH 1
512 #define	FRF_AZ_TBUF_OWN_INT_KER_EN_LBN 38
513 #define	FRF_AZ_TBUF_OWN_INT_KER_EN_WIDTH 1
514 #define	FRF_AZ_RDESCQ_OWN_INT_KER_EN_LBN 37
515 #define	FRF_AZ_RDESCQ_OWN_INT_KER_EN_WIDTH 1
516 #define	FRF_AZ_TDESCQ_OWN_INT_KER_EN_LBN 36
517 #define	FRF_AZ_TDESCQ_OWN_INT_KER_EN_WIDTH 1
518 #define	FRF_AZ_EVQ_OWN_INT_KER_EN_LBN 35
519 #define	FRF_AZ_EVQ_OWN_INT_KER_EN_WIDTH 1
520 #define	FRF_AZ_EVF_OFLO_INT_KER_EN_LBN 34
521 #define	FRF_AZ_EVF_OFLO_INT_KER_EN_WIDTH 1
522 #define	FRF_AZ_ILL_ADR_INT_KER_EN_LBN 33
523 #define	FRF_AZ_ILL_ADR_INT_KER_EN_WIDTH 1
524 #define	FRF_AZ_SRM_PERR_INT_KER_EN_LBN 32
525 #define	FRF_AZ_SRM_PERR_INT_KER_EN_WIDTH 1
526 #define	FRF_CZ_SRAM_PERR_INT_P_KER_LBN 12
527 #define	FRF_CZ_SRAM_PERR_INT_P_KER_WIDTH 1
528 #define	FRF_AB_PCI_BUSERR_INT_KER_LBN 11
529 #define	FRF_AB_PCI_BUSERR_INT_KER_WIDTH 1
530 #define	FRF_CZ_MBU_PERR_INT_KER_LBN 11
531 #define	FRF_CZ_MBU_PERR_INT_KER_WIDTH 1
532 #define	FRF_AZ_SRAM_OOB_INT_KER_LBN 10
533 #define	FRF_AZ_SRAM_OOB_INT_KER_WIDTH 1
534 #define	FRF_AZ_BUFID_DC_OOB_INT_KER_LBN 9
535 #define	FRF_AZ_BUFID_DC_OOB_INT_KER_WIDTH 1
536 #define	FRF_AZ_MEM_PERR_INT_KER_LBN 8
537 #define	FRF_AZ_MEM_PERR_INT_KER_WIDTH 1
538 #define	FRF_AZ_RBUF_OWN_INT_KER_LBN 7
539 #define	FRF_AZ_RBUF_OWN_INT_KER_WIDTH 1
540 #define	FRF_AZ_TBUF_OWN_INT_KER_LBN 6
541 #define	FRF_AZ_TBUF_OWN_INT_KER_WIDTH 1
542 #define	FRF_AZ_RDESCQ_OWN_INT_KER_LBN 5
543 #define	FRF_AZ_RDESCQ_OWN_INT_KER_WIDTH 1
544 #define	FRF_AZ_TDESCQ_OWN_INT_KER_LBN 4
545 #define	FRF_AZ_TDESCQ_OWN_INT_KER_WIDTH 1
546 #define	FRF_AZ_EVQ_OWN_INT_KER_LBN 3
547 #define	FRF_AZ_EVQ_OWN_INT_KER_WIDTH 1
548 #define	FRF_AZ_EVF_OFLO_INT_KER_LBN 2
549 #define	FRF_AZ_EVF_OFLO_INT_KER_WIDTH 1
550 #define	FRF_AZ_ILL_ADR_INT_KER_LBN 1
551 #define	FRF_AZ_ILL_ADR_INT_KER_WIDTH 1
552 #define	FRF_AZ_SRM_PERR_INT_KER_LBN 0
553 #define	FRF_AZ_SRM_PERR_INT_KER_WIDTH 1
554 
555 /* FATAL_INTR_REG_CHAR: Fatal interrupt register for Char */
556 #define	FR_BZ_FATAL_INTR_CHAR 0x00000240
557 #define	FRF_CZ_SRAM_PERR_INT_P_CHAR_EN_LBN 44
558 #define	FRF_CZ_SRAM_PERR_INT_P_CHAR_EN_WIDTH 1
559 #define	FRF_BB_PCI_BUSERR_INT_CHAR_EN_LBN 43
560 #define	FRF_BB_PCI_BUSERR_INT_CHAR_EN_WIDTH 1
561 #define	FRF_CZ_MBU_PERR_INT_CHAR_EN_LBN 43
562 #define	FRF_CZ_MBU_PERR_INT_CHAR_EN_WIDTH 1
563 #define	FRF_BZ_SRAM_OOB_INT_CHAR_EN_LBN 42
564 #define	FRF_BZ_SRAM_OOB_INT_CHAR_EN_WIDTH 1
565 #define	FRF_BZ_BUFID_OOB_INT_CHAR_EN_LBN 41
566 #define	FRF_BZ_BUFID_OOB_INT_CHAR_EN_WIDTH 1
567 #define	FRF_BZ_MEM_PERR_INT_CHAR_EN_LBN 40
568 #define	FRF_BZ_MEM_PERR_INT_CHAR_EN_WIDTH 1
569 #define	FRF_BZ_RBUF_OWN_INT_CHAR_EN_LBN 39
570 #define	FRF_BZ_RBUF_OWN_INT_CHAR_EN_WIDTH 1
571 #define	FRF_BZ_TBUF_OWN_INT_CHAR_EN_LBN 38
572 #define	FRF_BZ_TBUF_OWN_INT_CHAR_EN_WIDTH 1
573 #define	FRF_BZ_RDESCQ_OWN_INT_CHAR_EN_LBN 37
574 #define	FRF_BZ_RDESCQ_OWN_INT_CHAR_EN_WIDTH 1
575 #define	FRF_BZ_TDESCQ_OWN_INT_CHAR_EN_LBN 36
576 #define	FRF_BZ_TDESCQ_OWN_INT_CHAR_EN_WIDTH 1
577 #define	FRF_BZ_EVQ_OWN_INT_CHAR_EN_LBN 35
578 #define	FRF_BZ_EVQ_OWN_INT_CHAR_EN_WIDTH 1
579 #define	FRF_BZ_EVF_OFLO_INT_CHAR_EN_LBN 34
580 #define	FRF_BZ_EVF_OFLO_INT_CHAR_EN_WIDTH 1
581 #define	FRF_BZ_ILL_ADR_INT_CHAR_EN_LBN 33
582 #define	FRF_BZ_ILL_ADR_INT_CHAR_EN_WIDTH 1
583 #define	FRF_BZ_SRM_PERR_INT_CHAR_EN_LBN 32
584 #define	FRF_BZ_SRM_PERR_INT_CHAR_EN_WIDTH 1
585 #define	FRF_CZ_SRAM_PERR_INT_P_CHAR_LBN 12
586 #define	FRF_CZ_SRAM_PERR_INT_P_CHAR_WIDTH 1
587 #define	FRF_BB_PCI_BUSERR_INT_CHAR_LBN 11
588 #define	FRF_BB_PCI_BUSERR_INT_CHAR_WIDTH 1
589 #define	FRF_CZ_MBU_PERR_INT_CHAR_LBN 11
590 #define	FRF_CZ_MBU_PERR_INT_CHAR_WIDTH 1
591 #define	FRF_BZ_SRAM_OOB_INT_CHAR_LBN 10
592 #define	FRF_BZ_SRAM_OOB_INT_CHAR_WIDTH 1
593 #define	FRF_BZ_BUFID_DC_OOB_INT_CHAR_LBN 9
594 #define	FRF_BZ_BUFID_DC_OOB_INT_CHAR_WIDTH 1
595 #define	FRF_BZ_MEM_PERR_INT_CHAR_LBN 8
596 #define	FRF_BZ_MEM_PERR_INT_CHAR_WIDTH 1
597 #define	FRF_BZ_RBUF_OWN_INT_CHAR_LBN 7
598 #define	FRF_BZ_RBUF_OWN_INT_CHAR_WIDTH 1
599 #define	FRF_BZ_TBUF_OWN_INT_CHAR_LBN 6
600 #define	FRF_BZ_TBUF_OWN_INT_CHAR_WIDTH 1
601 #define	FRF_BZ_RDESCQ_OWN_INT_CHAR_LBN 5
602 #define	FRF_BZ_RDESCQ_OWN_INT_CHAR_WIDTH 1
603 #define	FRF_BZ_TDESCQ_OWN_INT_CHAR_LBN 4
604 #define	FRF_BZ_TDESCQ_OWN_INT_CHAR_WIDTH 1
605 #define	FRF_BZ_EVQ_OWN_INT_CHAR_LBN 3
606 #define	FRF_BZ_EVQ_OWN_INT_CHAR_WIDTH 1
607 #define	FRF_BZ_EVF_OFLO_INT_CHAR_LBN 2
608 #define	FRF_BZ_EVF_OFLO_INT_CHAR_WIDTH 1
609 #define	FRF_BZ_ILL_ADR_INT_CHAR_LBN 1
610 #define	FRF_BZ_ILL_ADR_INT_CHAR_WIDTH 1
611 #define	FRF_BZ_SRM_PERR_INT_CHAR_LBN 0
612 #define	FRF_BZ_SRM_PERR_INT_CHAR_WIDTH 1
613 
614 /* DP_CTRL_REG: Datapath control register */
615 #define	FR_BZ_DP_CTRL 0x00000250
616 #define	FRF_BZ_FLS_EVQ_ID_LBN 0
617 #define	FRF_BZ_FLS_EVQ_ID_WIDTH 12
618 
619 /* MEM_STAT_REG: Memory status register */
620 #define	FR_AZ_MEM_STAT 0x00000260
621 #define	FRF_AB_MEM_PERR_VEC_LBN 53
622 #define	FRF_AB_MEM_PERR_VEC_WIDTH 38
623 #define	FRF_AB_MBIST_CORR_LBN 38
624 #define	FRF_AB_MBIST_CORR_WIDTH 15
625 #define	FRF_AB_MBIST_ERR_LBN 0
626 #define	FRF_AB_MBIST_ERR_WIDTH 40
627 #define	FRF_CZ_MEM_PERR_VEC_LBN 0
628 #define	FRF_CZ_MEM_PERR_VEC_WIDTH 35
629 
630 /* CS_DEBUG_REG: Debug register */
631 #define	FR_AZ_CS_DEBUG 0x00000270
632 #define	FRF_AB_GLB_DEBUG2_SEL_LBN 50
633 #define	FRF_AB_GLB_DEBUG2_SEL_WIDTH 3
634 #define	FRF_AB_DEBUG_BLK_SEL2_LBN 47
635 #define	FRF_AB_DEBUG_BLK_SEL2_WIDTH 3
636 #define	FRF_AB_DEBUG_BLK_SEL1_LBN 44
637 #define	FRF_AB_DEBUG_BLK_SEL1_WIDTH 3
638 #define	FRF_AB_DEBUG_BLK_SEL0_LBN 41
639 #define	FRF_AB_DEBUG_BLK_SEL0_WIDTH 3
640 #define	FRF_CZ_CS_PORT_NUM_LBN 40
641 #define	FRF_CZ_CS_PORT_NUM_WIDTH 2
642 #define	FRF_AB_MISC_DEBUG_ADDR_LBN 36
643 #define	FRF_AB_MISC_DEBUG_ADDR_WIDTH 5
644 #define	FRF_AB_SERDES_DEBUG_ADDR_LBN 31
645 #define	FRF_AB_SERDES_DEBUG_ADDR_WIDTH 5
646 #define	FRF_CZ_CS_PORT_FPE_LBN 1
647 #define	FRF_CZ_CS_PORT_FPE_WIDTH 35
648 #define	FRF_AB_EM_DEBUG_ADDR_LBN 26
649 #define	FRF_AB_EM_DEBUG_ADDR_WIDTH 5
650 #define	FRF_AB_SR_DEBUG_ADDR_LBN 21
651 #define	FRF_AB_SR_DEBUG_ADDR_WIDTH 5
652 #define	FRF_AB_EV_DEBUG_ADDR_LBN 16
653 #define	FRF_AB_EV_DEBUG_ADDR_WIDTH 5
654 #define	FRF_AB_RX_DEBUG_ADDR_LBN 11
655 #define	FRF_AB_RX_DEBUG_ADDR_WIDTH 5
656 #define	FRF_AB_TX_DEBUG_ADDR_LBN 6
657 #define	FRF_AB_TX_DEBUG_ADDR_WIDTH 5
658 #define	FRF_AB_CS_BIU_DEBUG_ADDR_LBN 1
659 #define	FRF_AB_CS_BIU_DEBUG_ADDR_WIDTH 5
660 #define	FRF_AZ_CS_DEBUG_EN_LBN 0
661 #define	FRF_AZ_CS_DEBUG_EN_WIDTH 1
662 
663 /* DRIVER_REG: Driver scratch register [0-7] */
664 #define	FR_AZ_DRIVER 0x00000280
665 #define	FR_AZ_DRIVER_STEP 16
666 #define	FR_AZ_DRIVER_ROWS 8
667 #define	FRF_AZ_DRIVER_DW0_LBN 0
668 #define	FRF_AZ_DRIVER_DW0_WIDTH 32
669 
670 /* ALTERA_BUILD_REG: Altera build register */
671 #define	FR_AZ_ALTERA_BUILD 0x00000300
672 #define	FRF_AZ_ALTERA_BUILD_VER_LBN 0
673 #define	FRF_AZ_ALTERA_BUILD_VER_WIDTH 32
674 
675 /* CSR_SPARE_REG: Spare register */
676 #define	FR_AZ_CSR_SPARE 0x00000310
677 #define	FRF_AB_MEM_PERR_EN_LBN 64
678 #define	FRF_AB_MEM_PERR_EN_WIDTH 38
679 #define	FRF_CZ_MEM_PERR_EN_LBN 64
680 #define	FRF_CZ_MEM_PERR_EN_WIDTH 35
681 #define	FRF_AB_MEM_PERR_EN_TX_DATA_LBN 72
682 #define	FRF_AB_MEM_PERR_EN_TX_DATA_WIDTH 2
683 #define	FRF_AZ_CSR_SPARE_BITS_LBN 0
684 #define	FRF_AZ_CSR_SPARE_BITS_WIDTH 32
685 
686 /* PCIE_SD_CTL0123_REG: PCIE SerDes control register 0 to 3 */
687 #define	FR_AB_PCIE_SD_CTL0123 0x00000320
688 #define	FRF_AB_PCIE_TESTSIG_H_LBN 96
689 #define	FRF_AB_PCIE_TESTSIG_H_WIDTH 19
690 #define	FRF_AB_PCIE_TESTSIG_L_LBN 64
691 #define	FRF_AB_PCIE_TESTSIG_L_WIDTH 19
692 #define	FRF_AB_PCIE_OFFSET_LBN 56
693 #define	FRF_AB_PCIE_OFFSET_WIDTH 8
694 #define	FRF_AB_PCIE_OFFSETEN_H_LBN 55
695 #define	FRF_AB_PCIE_OFFSETEN_H_WIDTH 1
696 #define	FRF_AB_PCIE_OFFSETEN_L_LBN 54
697 #define	FRF_AB_PCIE_OFFSETEN_L_WIDTH 1
698 #define	FRF_AB_PCIE_HIVMODE_H_LBN 53
699 #define	FRF_AB_PCIE_HIVMODE_H_WIDTH 1
700 #define	FRF_AB_PCIE_HIVMODE_L_LBN 52
701 #define	FRF_AB_PCIE_HIVMODE_L_WIDTH 1
702 #define	FRF_AB_PCIE_PARRESET_H_LBN 51
703 #define	FRF_AB_PCIE_PARRESET_H_WIDTH 1
704 #define	FRF_AB_PCIE_PARRESET_L_LBN 50
705 #define	FRF_AB_PCIE_PARRESET_L_WIDTH 1
706 #define	FRF_AB_PCIE_LPBKWDRV_H_LBN 49
707 #define	FRF_AB_PCIE_LPBKWDRV_H_WIDTH 1
708 #define	FRF_AB_PCIE_LPBKWDRV_L_LBN 48
709 #define	FRF_AB_PCIE_LPBKWDRV_L_WIDTH 1
710 #define	FRF_AB_PCIE_LPBK_LBN 40
711 #define	FRF_AB_PCIE_LPBK_WIDTH 8
712 #define	FRF_AB_PCIE_PARLPBK_LBN 32
713 #define	FRF_AB_PCIE_PARLPBK_WIDTH 8
714 #define	FRF_AB_PCIE_RXTERMADJ_H_LBN 30
715 #define	FRF_AB_PCIE_RXTERMADJ_H_WIDTH 2
716 #define	FRF_AB_PCIE_RXTERMADJ_L_LBN 28
717 #define	FRF_AB_PCIE_RXTERMADJ_L_WIDTH 2
718 #define	FFE_AB_PCIE_RXTERMADJ_MIN15PCNT 3
719 #define	FFE_AB_PCIE_RXTERMADJ_PL10PCNT 2
720 #define	FFE_AB_PCIE_RXTERMADJ_MIN17PCNT 1
721 #define	FFE_AB_PCIE_RXTERMADJ_NOMNL 0
722 #define	FRF_AB_PCIE_TXTERMADJ_H_LBN 26
723 #define	FRF_AB_PCIE_TXTERMADJ_H_WIDTH 2
724 #define	FRF_AB_PCIE_TXTERMADJ_L_LBN 24
725 #define	FRF_AB_PCIE_TXTERMADJ_L_WIDTH 2
726 #define	FFE_AB_PCIE_TXTERMADJ_MIN15PCNT 3
727 #define	FFE_AB_PCIE_TXTERMADJ_PL10PCNT 2
728 #define	FFE_AB_PCIE_TXTERMADJ_MIN17PCNT 1
729 #define	FFE_AB_PCIE_TXTERMADJ_NOMNL 0
730 #define	FRF_AB_PCIE_RXEQCTL_H_LBN 18
731 #define	FRF_AB_PCIE_RXEQCTL_H_WIDTH 2
732 #define	FRF_AB_PCIE_RXEQCTL_L_LBN 16
733 #define	FRF_AB_PCIE_RXEQCTL_L_WIDTH 2
734 #define	FFE_AB_PCIE_RXEQCTL_OFF_ALT 3
735 #define	FFE_AB_PCIE_RXEQCTL_OFF 2
736 #define	FFE_AB_PCIE_RXEQCTL_MIN 1
737 #define	FFE_AB_PCIE_RXEQCTL_MAX 0
738 #define	FRF_AB_PCIE_HIDRV_LBN 8
739 #define	FRF_AB_PCIE_HIDRV_WIDTH 8
740 #define	FRF_AB_PCIE_LODRV_LBN 0
741 #define	FRF_AB_PCIE_LODRV_WIDTH 8
742 
743 /* PCIE_SD_CTL45_REG: PCIE SerDes control register 4 and 5 */
744 #define	FR_AB_PCIE_SD_CTL45 0x00000330
745 #define	FRF_AB_PCIE_DTX7_LBN 60
746 #define	FRF_AB_PCIE_DTX7_WIDTH 4
747 #define	FRF_AB_PCIE_DTX6_LBN 56
748 #define	FRF_AB_PCIE_DTX6_WIDTH 4
749 #define	FRF_AB_PCIE_DTX5_LBN 52
750 #define	FRF_AB_PCIE_DTX5_WIDTH 4
751 #define	FRF_AB_PCIE_DTX4_LBN 48
752 #define	FRF_AB_PCIE_DTX4_WIDTH 4
753 #define	FRF_AB_PCIE_DTX3_LBN 44
754 #define	FRF_AB_PCIE_DTX3_WIDTH 4
755 #define	FRF_AB_PCIE_DTX2_LBN 40
756 #define	FRF_AB_PCIE_DTX2_WIDTH 4
757 #define	FRF_AB_PCIE_DTX1_LBN 36
758 #define	FRF_AB_PCIE_DTX1_WIDTH 4
759 #define	FRF_AB_PCIE_DTX0_LBN 32
760 #define	FRF_AB_PCIE_DTX0_WIDTH 4
761 #define	FRF_AB_PCIE_DEQ7_LBN 28
762 #define	FRF_AB_PCIE_DEQ7_WIDTH 4
763 #define	FRF_AB_PCIE_DEQ6_LBN 24
764 #define	FRF_AB_PCIE_DEQ6_WIDTH 4
765 #define	FRF_AB_PCIE_DEQ5_LBN 20
766 #define	FRF_AB_PCIE_DEQ5_WIDTH 4
767 #define	FRF_AB_PCIE_DEQ4_LBN 16
768 #define	FRF_AB_PCIE_DEQ4_WIDTH 4
769 #define	FRF_AB_PCIE_DEQ3_LBN 12
770 #define	FRF_AB_PCIE_DEQ3_WIDTH 4
771 #define	FRF_AB_PCIE_DEQ2_LBN 8
772 #define	FRF_AB_PCIE_DEQ2_WIDTH 4
773 #define	FRF_AB_PCIE_DEQ1_LBN 4
774 #define	FRF_AB_PCIE_DEQ1_WIDTH 4
775 #define	FRF_AB_PCIE_DEQ0_LBN 0
776 #define	FRF_AB_PCIE_DEQ0_WIDTH 4
777 
778 /* PCIE_PCS_CTL_STAT_REG: PCIE PCS control and status register */
779 #define	FR_AB_PCIE_PCS_CTL_STAT 0x00000340
780 #define	FRF_AB_PCIE_PRBSERRCOUNT0_H_LBN 52
781 #define	FRF_AB_PCIE_PRBSERRCOUNT0_H_WIDTH 4
782 #define	FRF_AB_PCIE_PRBSERRCOUNT0_L_LBN 48
783 #define	FRF_AB_PCIE_PRBSERRCOUNT0_L_WIDTH 4
784 #define	FRF_AB_PCIE_PRBSERR_LBN 40
785 #define	FRF_AB_PCIE_PRBSERR_WIDTH 8
786 #define	FRF_AB_PCIE_PRBSERRH0_LBN 32
787 #define	FRF_AB_PCIE_PRBSERRH0_WIDTH 8
788 #define	FRF_AB_PCIE_FASTINIT_H_LBN 15
789 #define	FRF_AB_PCIE_FASTINIT_H_WIDTH 1
790 #define	FRF_AB_PCIE_FASTINIT_L_LBN 14
791 #define	FRF_AB_PCIE_FASTINIT_L_WIDTH 1
792 #define	FRF_AB_PCIE_CTCDISABLE_H_LBN 13
793 #define	FRF_AB_PCIE_CTCDISABLE_H_WIDTH 1
794 #define	FRF_AB_PCIE_CTCDISABLE_L_LBN 12
795 #define	FRF_AB_PCIE_CTCDISABLE_L_WIDTH 1
796 #define	FRF_AB_PCIE_PRBSSYNC_H_LBN 11
797 #define	FRF_AB_PCIE_PRBSSYNC_H_WIDTH 1
798 #define	FRF_AB_PCIE_PRBSSYNC_L_LBN 10
799 #define	FRF_AB_PCIE_PRBSSYNC_L_WIDTH 1
800 #define	FRF_AB_PCIE_PRBSERRACK_H_LBN 9
801 #define	FRF_AB_PCIE_PRBSERRACK_H_WIDTH 1
802 #define	FRF_AB_PCIE_PRBSERRACK_L_LBN 8
803 #define	FRF_AB_PCIE_PRBSERRACK_L_WIDTH 1
804 #define	FRF_AB_PCIE_PRBSSEL_LBN 0
805 #define	FRF_AB_PCIE_PRBSSEL_WIDTH 8
806 
807 /* DEBUG_DATA_OUT_REG: Live Debug and Debug 2 out ports */
808 #define	FR_BB_DEBUG_DATA_OUT 0x00000350
809 #define	FRF_BB_DEBUG2_PORT_LBN 25
810 #define	FRF_BB_DEBUG2_PORT_WIDTH 15
811 #define	FRF_BB_DEBUG1_PORT_LBN 0
812 #define	FRF_BB_DEBUG1_PORT_WIDTH 25
813 
814 /* EVQ_RPTR_REGP0: Event queue read pointer register */
815 #define	FR_BZ_EVQ_RPTR_P0 0x00000400
816 #define	FR_BZ_EVQ_RPTR_P0_STEP 8192
817 #define	FR_BZ_EVQ_RPTR_P0_ROWS 1024
818 /* EVQ_RPTR_REG_KER: Event queue read pointer register */
819 #define	FR_AA_EVQ_RPTR_KER 0x00011b00
820 #define	FR_AA_EVQ_RPTR_KER_STEP 4
821 #define	FR_AA_EVQ_RPTR_KER_ROWS 4
822 /* EVQ_RPTR_REG: Event queue read pointer register */
823 #define	FR_BZ_EVQ_RPTR 0x00fa0000
824 #define	FR_BZ_EVQ_RPTR_STEP 16
825 #define	FR_BB_EVQ_RPTR_ROWS 4096
826 #define	FR_CZ_EVQ_RPTR_ROWS 1024
827 /* EVQ_RPTR_REGP123: Event queue read pointer register */
828 #define	FR_BB_EVQ_RPTR_P123 0x01000400
829 #define	FR_BB_EVQ_RPTR_P123_STEP 8192
830 #define	FR_BB_EVQ_RPTR_P123_ROWS 3072
831 #define	FRF_AZ_EVQ_RPTR_VLD_LBN 15
832 #define	FRF_AZ_EVQ_RPTR_VLD_WIDTH 1
833 #define	FRF_AZ_EVQ_RPTR_LBN 0
834 #define	FRF_AZ_EVQ_RPTR_WIDTH 15
835 
836 /* TIMER_COMMAND_REGP0: Timer Command Registers */
837 #define	FR_BZ_TIMER_COMMAND_P0 0x00000420
838 #define	FR_BZ_TIMER_COMMAND_P0_STEP 8192
839 #define	FR_BZ_TIMER_COMMAND_P0_ROWS 1024
840 /* TIMER_COMMAND_REG_KER: Timer Command Registers */
841 #define	FR_AA_TIMER_COMMAND_KER 0x00000420
842 #define	FR_AA_TIMER_COMMAND_KER_STEP 8192
843 #define	FR_AA_TIMER_COMMAND_KER_ROWS 4
844 /* TIMER_COMMAND_REGP123: Timer Command Registers */
845 #define	FR_BB_TIMER_COMMAND_P123 0x01000420
846 #define	FR_BB_TIMER_COMMAND_P123_STEP 8192
847 #define	FR_BB_TIMER_COMMAND_P123_ROWS 3072
848 #define	FRF_CZ_TC_TIMER_MODE_LBN 14
849 #define	FRF_CZ_TC_TIMER_MODE_WIDTH 2
850 #define	FRF_AB_TC_TIMER_MODE_LBN 12
851 #define	FRF_AB_TC_TIMER_MODE_WIDTH 2
852 #define	FRF_CZ_TC_TIMER_VAL_LBN 0
853 #define	FRF_CZ_TC_TIMER_VAL_WIDTH 14
854 #define	FRF_AB_TC_TIMER_VAL_LBN 0
855 #define	FRF_AB_TC_TIMER_VAL_WIDTH 12
856 
857 /* DRV_EV_REG: Driver generated event register */
858 #define	FR_AZ_DRV_EV 0x00000440
859 #define	FRF_AZ_DRV_EV_QID_LBN 64
860 #define	FRF_AZ_DRV_EV_QID_WIDTH 12
861 #define	FRF_AZ_DRV_EV_DATA_LBN 0
862 #define	FRF_AZ_DRV_EV_DATA_WIDTH 64
863 
864 /* EVQ_CTL_REG: Event queue control register */
865 #define	FR_AZ_EVQ_CTL 0x00000450
866 #define	FRF_CZ_RX_EVQ_WAKEUP_MASK_LBN 15
867 #define	FRF_CZ_RX_EVQ_WAKEUP_MASK_WIDTH 10
868 #define	FRF_BB_RX_EVQ_WAKEUP_MASK_LBN 15
869 #define	FRF_BB_RX_EVQ_WAKEUP_MASK_WIDTH 6
870 #define	FRF_AZ_EVQ_OWNERR_CTL_LBN 14
871 #define	FRF_AZ_EVQ_OWNERR_CTL_WIDTH 1
872 #define	FRF_AZ_EVQ_FIFO_AF_TH_LBN 7
873 #define	FRF_AZ_EVQ_FIFO_AF_TH_WIDTH 7
874 #define	FRF_AZ_EVQ_FIFO_NOTAF_TH_LBN 0
875 #define	FRF_AZ_EVQ_FIFO_NOTAF_TH_WIDTH 7
876 
877 /* EVQ_CNT1_REG: Event counter 1 register */
878 #define	FR_AZ_EVQ_CNT1 0x00000460
879 #define	FRF_AZ_EVQ_CNT_PRE_FIFO_LBN 120
880 #define	FRF_AZ_EVQ_CNT_PRE_FIFO_WIDTH 7
881 #define	FRF_AZ_EVQ_CNT_TOBIU_LBN 100
882 #define	FRF_AZ_EVQ_CNT_TOBIU_WIDTH 20
883 #define	FRF_AZ_EVQ_TX_REQ_CNT_LBN 80
884 #define	FRF_AZ_EVQ_TX_REQ_CNT_WIDTH 20
885 #define	FRF_AZ_EVQ_RX_REQ_CNT_LBN 60
886 #define	FRF_AZ_EVQ_RX_REQ_CNT_WIDTH 20
887 #define	FRF_AZ_EVQ_EM_REQ_CNT_LBN 40
888 #define	FRF_AZ_EVQ_EM_REQ_CNT_WIDTH 20
889 #define	FRF_AZ_EVQ_CSR_REQ_CNT_LBN 20
890 #define	FRF_AZ_EVQ_CSR_REQ_CNT_WIDTH 20
891 #define	FRF_AZ_EVQ_ERR_REQ_CNT_LBN 0
892 #define	FRF_AZ_EVQ_ERR_REQ_CNT_WIDTH 20
893 
894 /* EVQ_CNT2_REG: Event counter 2 register */
895 #define	FR_AZ_EVQ_CNT2 0x00000470
896 #define	FRF_AZ_EVQ_UPD_REQ_CNT_LBN 104
897 #define	FRF_AZ_EVQ_UPD_REQ_CNT_WIDTH 20
898 #define	FRF_AZ_EVQ_CLR_REQ_CNT_LBN 84
899 #define	FRF_AZ_EVQ_CLR_REQ_CNT_WIDTH 20
900 #define	FRF_AZ_EVQ_RDY_CNT_LBN 80
901 #define	FRF_AZ_EVQ_RDY_CNT_WIDTH 4
902 #define	FRF_AZ_EVQ_WU_REQ_CNT_LBN 60
903 #define	FRF_AZ_EVQ_WU_REQ_CNT_WIDTH 20
904 #define	FRF_AZ_EVQ_WET_REQ_CNT_LBN 40
905 #define	FRF_AZ_EVQ_WET_REQ_CNT_WIDTH 20
906 #define	FRF_AZ_EVQ_INIT_REQ_CNT_LBN 20
907 #define	FRF_AZ_EVQ_INIT_REQ_CNT_WIDTH 20
908 #define	FRF_AZ_EVQ_TM_REQ_CNT_LBN 0
909 #define	FRF_AZ_EVQ_TM_REQ_CNT_WIDTH 20
910 
911 /* USR_EV_REG: Event mailbox register */
912 #define	FR_CZ_USR_EV 0x00000540
913 #define	FR_CZ_USR_EV_STEP 8192
914 #define	FR_CZ_USR_EV_ROWS 1024
915 #define	FRF_CZ_USR_EV_DATA_LBN 0
916 #define	FRF_CZ_USR_EV_DATA_WIDTH 32
917 
918 /* BUF_TBL_CFG_REG: Buffer table configuration register */
919 #define	FR_AZ_BUF_TBL_CFG 0x00000600
920 #define	FRF_AZ_BUF_TBL_MODE_LBN 3
921 #define	FRF_AZ_BUF_TBL_MODE_WIDTH 1
922 
923 /* SRM_RX_DC_CFG_REG: SRAM receive descriptor cache configuration register */
924 #define	FR_AZ_SRM_RX_DC_CFG 0x00000610
925 #define	FRF_AZ_SRM_CLK_TMP_EN_LBN 21
926 #define	FRF_AZ_SRM_CLK_TMP_EN_WIDTH 1
927 #define	FRF_AZ_SRM_RX_DC_BASE_ADR_LBN 0
928 #define	FRF_AZ_SRM_RX_DC_BASE_ADR_WIDTH 21
929 
930 /* SRM_TX_DC_CFG_REG: SRAM transmit descriptor cache configuration register */
931 #define	FR_AZ_SRM_TX_DC_CFG 0x00000620
932 #define	FRF_AZ_SRM_TX_DC_BASE_ADR_LBN 0
933 #define	FRF_AZ_SRM_TX_DC_BASE_ADR_WIDTH 21
934 
935 /* SRM_CFG_REG: SRAM configuration register */
936 #define	FR_AZ_SRM_CFG 0x00000630
937 #define	FRF_AZ_SRM_OOB_ADR_INTEN_LBN 5
938 #define	FRF_AZ_SRM_OOB_ADR_INTEN_WIDTH 1
939 #define	FRF_AZ_SRM_OOB_BUF_INTEN_LBN 4
940 #define	FRF_AZ_SRM_OOB_BUF_INTEN_WIDTH 1
941 #define	FRF_AZ_SRM_INIT_EN_LBN 3
942 #define	FRF_AZ_SRM_INIT_EN_WIDTH 1
943 #define	FRF_AZ_SRM_NUM_BANK_LBN 2
944 #define	FRF_AZ_SRM_NUM_BANK_WIDTH 1
945 #define	FRF_AZ_SRM_BANK_SIZE_LBN 0
946 #define	FRF_AZ_SRM_BANK_SIZE_WIDTH 2
947 
948 /* BUF_TBL_UPD_REG: Buffer table update register */
949 #define	FR_AZ_BUF_TBL_UPD 0x00000650
950 #define	FRF_AZ_BUF_UPD_CMD_LBN 63
951 #define	FRF_AZ_BUF_UPD_CMD_WIDTH 1
952 #define	FRF_AZ_BUF_CLR_CMD_LBN 62
953 #define	FRF_AZ_BUF_CLR_CMD_WIDTH 1
954 #define	FRF_AZ_BUF_CLR_END_ID_LBN 32
955 #define	FRF_AZ_BUF_CLR_END_ID_WIDTH 20
956 #define	FRF_AZ_BUF_CLR_START_ID_LBN 0
957 #define	FRF_AZ_BUF_CLR_START_ID_WIDTH 20
958 
959 /* SRM_UPD_EVQ_REG: Buffer table update register */
960 #define	FR_AZ_SRM_UPD_EVQ 0x00000660
961 #define	FRF_AZ_SRM_UPD_EVQ_ID_LBN 0
962 #define	FRF_AZ_SRM_UPD_EVQ_ID_WIDTH 12
963 
964 /* SRAM_PARITY_REG: SRAM parity register. */
965 #define	FR_AZ_SRAM_PARITY 0x00000670
966 #define	FRF_CZ_BYPASS_ECC_LBN 3
967 #define	FRF_CZ_BYPASS_ECC_WIDTH 1
968 #define	FRF_CZ_SEC_INT_LBN 2
969 #define	FRF_CZ_SEC_INT_WIDTH 1
970 #define	FRF_CZ_FORCE_SRAM_DOUBLE_ERR_LBN 1
971 #define	FRF_CZ_FORCE_SRAM_DOUBLE_ERR_WIDTH 1
972 #define	FRF_AB_FORCE_SRAM_PERR_LBN 0
973 #define	FRF_AB_FORCE_SRAM_PERR_WIDTH 1
974 #define	FRF_CZ_FORCE_SRAM_SINGLE_ERR_LBN 0
975 #define	FRF_CZ_FORCE_SRAM_SINGLE_ERR_WIDTH 1
976 
977 /* RX_CFG_REG: Receive configuration register */
978 #define	FR_AZ_RX_CFG 0x00000800
979 #define	FRF_CZ_RX_MIN_KBUF_SIZE_LBN 72
980 #define	FRF_CZ_RX_MIN_KBUF_SIZE_WIDTH 14
981 #define	FRF_CZ_RX_HDR_SPLIT_EN_LBN 71
982 #define	FRF_CZ_RX_HDR_SPLIT_EN_WIDTH 1
983 #define	FRF_CZ_RX_HDR_SPLIT_PLD_BUF_SIZE_LBN 62
984 #define	FRF_CZ_RX_HDR_SPLIT_PLD_BUF_SIZE_WIDTH 9
985 #define	FRF_CZ_RX_HDR_SPLIT_HDR_BUF_SIZE_LBN 53
986 #define	FRF_CZ_RX_HDR_SPLIT_HDR_BUF_SIZE_WIDTH 9
987 #define	FRF_CZ_RX_PRE_RFF_IPG_LBN 49
988 #define	FRF_CZ_RX_PRE_RFF_IPG_WIDTH 4
989 #define	FRF_BZ_RX_TCP_SUP_LBN 48
990 #define	FRF_BZ_RX_TCP_SUP_WIDTH 1
991 #define	FRF_BZ_RX_INGR_EN_LBN 47
992 #define	FRF_BZ_RX_INGR_EN_WIDTH 1
993 #define	FRF_BZ_RX_IP_HASH_LBN 46
994 #define	FRF_BZ_RX_IP_HASH_WIDTH 1
995 #define	FRF_BZ_RX_HASH_ALG_LBN 45
996 #define	FRF_BZ_RX_HASH_ALG_WIDTH 1
997 #define	FRF_BZ_RX_HASH_INSRT_HDR_LBN 44
998 #define	FRF_BZ_RX_HASH_INSRT_HDR_WIDTH 1
999 #define	FRF_BZ_RX_DESC_PUSH_EN_LBN 43
1000 #define	FRF_BZ_RX_DESC_PUSH_EN_WIDTH 1
1001 #define	FRF_BZ_RX_RDW_PATCH_EN_LBN 42
1002 #define	FRF_BZ_RX_RDW_PATCH_EN_WIDTH 1
1003 #define	FRF_BB_RX_PCI_BURST_SIZE_LBN 39
1004 #define	FRF_BB_RX_PCI_BURST_SIZE_WIDTH 3
1005 #define	FRF_BZ_RX_OWNERR_CTL_LBN 38
1006 #define	FRF_BZ_RX_OWNERR_CTL_WIDTH 1
1007 #define	FRF_BZ_RX_XON_TX_TH_LBN 33
1008 #define	FRF_BZ_RX_XON_TX_TH_WIDTH 5
1009 #define	FRF_AA_RX_DESC_PUSH_EN_LBN 35
1010 #define	FRF_AA_RX_DESC_PUSH_EN_WIDTH 1
1011 #define	FRF_AA_RX_RDW_PATCH_EN_LBN 34
1012 #define	FRF_AA_RX_RDW_PATCH_EN_WIDTH 1
1013 #define	FRF_AA_RX_PCI_BURST_SIZE_LBN 31
1014 #define	FRF_AA_RX_PCI_BURST_SIZE_WIDTH 3
1015 #define	FRF_BZ_RX_XOFF_TX_TH_LBN 28
1016 #define	FRF_BZ_RX_XOFF_TX_TH_WIDTH 5
1017 #define	FRF_AA_RX_OWNERR_CTL_LBN 30
1018 #define	FRF_AA_RX_OWNERR_CTL_WIDTH 1
1019 #define	FRF_AA_RX_XON_TX_TH_LBN 25
1020 #define	FRF_AA_RX_XON_TX_TH_WIDTH 5
1021 #define	FRF_BZ_RX_USR_BUF_SIZE_LBN 19
1022 #define	FRF_BZ_RX_USR_BUF_SIZE_WIDTH 9
1023 #define	FRF_AA_RX_XOFF_TX_TH_LBN 20
1024 #define	FRF_AA_RX_XOFF_TX_TH_WIDTH 5
1025 #define	FRF_AA_RX_USR_BUF_SIZE_LBN 11
1026 #define	FRF_AA_RX_USR_BUF_SIZE_WIDTH 9
1027 #define	FRF_BZ_RX_XON_MAC_TH_LBN 10
1028 #define	FRF_BZ_RX_XON_MAC_TH_WIDTH 9
1029 #define	FRF_AA_RX_XON_MAC_TH_LBN 6
1030 #define	FRF_AA_RX_XON_MAC_TH_WIDTH 5
1031 #define	FRF_BZ_RX_XOFF_MAC_TH_LBN 1
1032 #define	FRF_BZ_RX_XOFF_MAC_TH_WIDTH 9
1033 #define	FRF_AA_RX_XOFF_MAC_TH_LBN 1
1034 #define	FRF_AA_RX_XOFF_MAC_TH_WIDTH 5
1035 #define	FRF_AZ_RX_XOFF_MAC_EN_LBN 0
1036 #define	FRF_AZ_RX_XOFF_MAC_EN_WIDTH 1
1037 
1038 /* RX_FILTER_CTL_REG: Receive filter control registers */
1039 #define	FR_BZ_RX_FILTER_CTL 0x00000810
1040 #define	FRF_CZ_ETHERNET_WILDCARD_SEARCH_LIMIT_LBN 94
1041 #define	FRF_CZ_ETHERNET_WILDCARD_SEARCH_LIMIT_WIDTH 8
1042 #define	FRF_CZ_ETHERNET_FULL_SEARCH_LIMIT_LBN 86
1043 #define	FRF_CZ_ETHERNET_FULL_SEARCH_LIMIT_WIDTH 8
1044 #define	FRF_CZ_RX_FILTER_ALL_VLAN_ETHERTYPES_LBN 85
1045 #define	FRF_CZ_RX_FILTER_ALL_VLAN_ETHERTYPES_WIDTH 1
1046 #define	FRF_CZ_RX_VLAN_MATCH_ETHERTYPE_LBN 69
1047 #define	FRF_CZ_RX_VLAN_MATCH_ETHERTYPE_WIDTH 16
1048 #define	FRF_CZ_MULTICAST_NOMATCH_Q_ID_LBN 57
1049 #define	FRF_CZ_MULTICAST_NOMATCH_Q_ID_WIDTH 12
1050 #define	FRF_CZ_MULTICAST_NOMATCH_RSS_ENABLED_LBN 56
1051 #define	FRF_CZ_MULTICAST_NOMATCH_RSS_ENABLED_WIDTH 1
1052 #define	FRF_CZ_MULTICAST_NOMATCH_IP_OVERRIDE_LBN 55
1053 #define	FRF_CZ_MULTICAST_NOMATCH_IP_OVERRIDE_WIDTH 1
1054 #define	FRF_CZ_UNICAST_NOMATCH_Q_ID_LBN 43
1055 #define	FRF_CZ_UNICAST_NOMATCH_Q_ID_WIDTH 12
1056 #define	FRF_CZ_UNICAST_NOMATCH_RSS_ENABLED_LBN 42
1057 #define	FRF_CZ_UNICAST_NOMATCH_RSS_ENABLED_WIDTH 1
1058 #define	FRF_CZ_UNICAST_NOMATCH_IP_OVERRIDE_LBN 41
1059 #define	FRF_CZ_UNICAST_NOMATCH_IP_OVERRIDE_WIDTH 1
1060 #define	FRF_BZ_SCATTER_ENBL_NO_MATCH_Q_LBN 40
1061 #define	FRF_BZ_SCATTER_ENBL_NO_MATCH_Q_WIDTH 1
1062 #define	FRF_BZ_UDP_FULL_SRCH_LIMIT_LBN 32
1063 #define	FRF_BZ_UDP_FULL_SRCH_LIMIT_WIDTH 8
1064 #define	FRF_BZ_NUM_KER_LBN 24
1065 #define	FRF_BZ_NUM_KER_WIDTH 2
1066 #define	FRF_BZ_UDP_WILD_SRCH_LIMIT_LBN 16
1067 #define	FRF_BZ_UDP_WILD_SRCH_LIMIT_WIDTH 8
1068 #define	FRF_BZ_TCP_WILD_SRCH_LIMIT_LBN 8
1069 #define	FRF_BZ_TCP_WILD_SRCH_LIMIT_WIDTH 8
1070 #define	FRF_BZ_TCP_FULL_SRCH_LIMIT_LBN 0
1071 #define	FRF_BZ_TCP_FULL_SRCH_LIMIT_WIDTH 8
1072 
1073 /* RX_FLUSH_DESCQ_REG: Receive flush descriptor queue register */
1074 #define	FR_AZ_RX_FLUSH_DESCQ 0x00000820
1075 #define	FRF_AZ_RX_FLUSH_DESCQ_CMD_LBN 24
1076 #define	FRF_AZ_RX_FLUSH_DESCQ_CMD_WIDTH 1
1077 #define	FRF_AZ_RX_FLUSH_DESCQ_LBN 0
1078 #define	FRF_AZ_RX_FLUSH_DESCQ_WIDTH 12
1079 
1080 /* RX_DESC_UPD_REGP0: Receive descriptor update register. */
1081 #define	FR_BZ_RX_DESC_UPD_P0 0x00000830
1082 #define	FR_BZ_RX_DESC_UPD_P0_STEP 8192
1083 #define	FR_BZ_RX_DESC_UPD_P0_ROWS 1024
1084 /* RX_DESC_UPD_REG_KER: Receive descriptor update register. */
1085 #define	FR_AA_RX_DESC_UPD_KER 0x00000830
1086 #define	FR_AA_RX_DESC_UPD_KER_STEP 8192
1087 #define	FR_AA_RX_DESC_UPD_KER_ROWS 4
1088 /* RX_DESC_UPD_REGP123: Receive descriptor update register. */
1089 #define	FR_BB_RX_DESC_UPD_P123 0x01000830
1090 #define	FR_BB_RX_DESC_UPD_P123_STEP 8192
1091 #define	FR_BB_RX_DESC_UPD_P123_ROWS 3072
1092 #define	FRF_AZ_RX_DESC_WPTR_LBN 96
1093 #define	FRF_AZ_RX_DESC_WPTR_WIDTH 12
1094 #define	FRF_AZ_RX_DESC_PUSH_CMD_LBN 95
1095 #define	FRF_AZ_RX_DESC_PUSH_CMD_WIDTH 1
1096 #define	FRF_AZ_RX_DESC_LBN 0
1097 #define	FRF_AZ_RX_DESC_WIDTH 64
1098 
1099 /* RX_DC_CFG_REG: Receive descriptor cache configuration register */
1100 #define	FR_AZ_RX_DC_CFG 0x00000840
1101 #define	FRF_AB_RX_MAX_PF_LBN 2
1102 #define	FRF_AB_RX_MAX_PF_WIDTH 2
1103 #define	FRF_AZ_RX_DC_SIZE_LBN 0
1104 #define	FRF_AZ_RX_DC_SIZE_WIDTH 2
1105 #define	FFE_AZ_RX_DC_SIZE_64 3
1106 #define	FFE_AZ_RX_DC_SIZE_32 2
1107 #define	FFE_AZ_RX_DC_SIZE_16 1
1108 #define	FFE_AZ_RX_DC_SIZE_8 0
1109 
1110 /* RX_DC_PF_WM_REG: Receive descriptor cache pre-fetch watermark register */
1111 #define	FR_AZ_RX_DC_PF_WM 0x00000850
1112 #define	FRF_AZ_RX_DC_PF_HWM_LBN 6
1113 #define	FRF_AZ_RX_DC_PF_HWM_WIDTH 6
1114 #define	FRF_AZ_RX_DC_PF_LWM_LBN 0
1115 #define	FRF_AZ_RX_DC_PF_LWM_WIDTH 6
1116 
1117 /* RX_RSS_TKEY_REG: RSS Toeplitz hash key */
1118 #define	FR_BZ_RX_RSS_TKEY 0x00000860
1119 #define	FRF_BZ_RX_RSS_TKEY_HI_LBN 64
1120 #define	FRF_BZ_RX_RSS_TKEY_HI_WIDTH 64
1121 #define	FRF_BZ_RX_RSS_TKEY_LO_LBN 0
1122 #define	FRF_BZ_RX_RSS_TKEY_LO_WIDTH 64
1123 
1124 /* RX_NODESC_DROP_REG: Receive dropped packet counter register */
1125 #define	FR_AZ_RX_NODESC_DROP 0x00000880
1126 #define	FRF_CZ_RX_NODESC_DROP_CNT_LBN 0
1127 #define	FRF_CZ_RX_NODESC_DROP_CNT_WIDTH 32
1128 #define	FRF_AB_RX_NODESC_DROP_CNT_LBN 0
1129 #define	FRF_AB_RX_NODESC_DROP_CNT_WIDTH 16
1130 
1131 /* RX_SELF_RST_REG: Receive self reset register */
1132 #define	FR_AA_RX_SELF_RST 0x00000890
1133 #define	FRF_AA_RX_ISCSI_DIS_LBN 17
1134 #define	FRF_AA_RX_ISCSI_DIS_WIDTH 1
1135 #define	FRF_AA_RX_SW_RST_REG_LBN 16
1136 #define	FRF_AA_RX_SW_RST_REG_WIDTH 1
1137 #define FRF_AA_RX_NODESC_WAIT_DIS_LBN 9
1138 #define FRF_AA_RX_NODESC_WAIT_DIS_WIDTH 1
1139 #define	FRF_AA_RX_SELF_RST_EN_LBN 8
1140 #define	FRF_AA_RX_SELF_RST_EN_WIDTH 1
1141 #define	FRF_AA_RX_MAX_PF_LAT_LBN 4
1142 #define	FRF_AA_RX_MAX_PF_LAT_WIDTH 4
1143 #define	FRF_AA_RX_MAX_LU_LAT_LBN 0
1144 #define	FRF_AA_RX_MAX_LU_LAT_WIDTH 4
1145 
1146 /* RX_DEBUG_REG: undocumented register */
1147 #define	FR_AZ_RX_DEBUG 0x000008a0
1148 #define	FRF_AZ_RX_DEBUG_LBN 0
1149 #define	FRF_AZ_RX_DEBUG_WIDTH 64
1150 
1151 /* RX_PUSH_DROP_REG: Receive descriptor push dropped counter register */
1152 #define	FR_AZ_RX_PUSH_DROP 0x000008b0
1153 #define	FRF_AZ_RX_PUSH_DROP_CNT_LBN 0
1154 #define	FRF_AZ_RX_PUSH_DROP_CNT_WIDTH 32
1155 
1156 /* RX_RSS_IPV6_REG1: IPv6 RSS Toeplitz hash key low bytes */
1157 #define	FR_CZ_RX_RSS_IPV6_REG1 0x000008d0
1158 #define	FRF_CZ_RX_RSS_IPV6_TKEY_LO_LBN 0
1159 #define	FRF_CZ_RX_RSS_IPV6_TKEY_LO_WIDTH 128
1160 
1161 /* RX_RSS_IPV6_REG2: IPv6 RSS Toeplitz hash key middle bytes */
1162 #define	FR_CZ_RX_RSS_IPV6_REG2 0x000008e0
1163 #define	FRF_CZ_RX_RSS_IPV6_TKEY_MID_LBN 0
1164 #define	FRF_CZ_RX_RSS_IPV6_TKEY_MID_WIDTH 128
1165 
1166 /* RX_RSS_IPV6_REG3: IPv6 RSS Toeplitz hash key upper bytes and IPv6 RSS settings */
1167 #define	FR_CZ_RX_RSS_IPV6_REG3 0x000008f0
1168 #define	FRF_CZ_RX_RSS_IPV6_THASH_ENABLE_LBN 66
1169 #define	FRF_CZ_RX_RSS_IPV6_THASH_ENABLE_WIDTH 1
1170 #define	FRF_CZ_RX_RSS_IPV6_IP_THASH_ENABLE_LBN 65
1171 #define	FRF_CZ_RX_RSS_IPV6_IP_THASH_ENABLE_WIDTH 1
1172 #define	FRF_CZ_RX_RSS_IPV6_TCP_SUPPRESS_LBN 64
1173 #define	FRF_CZ_RX_RSS_IPV6_TCP_SUPPRESS_WIDTH 1
1174 #define	FRF_CZ_RX_RSS_IPV6_TKEY_HI_LBN 0
1175 #define	FRF_CZ_RX_RSS_IPV6_TKEY_HI_WIDTH 64
1176 
1177 /* TX_FLUSH_DESCQ_REG: Transmit flush descriptor queue register */
1178 #define	FR_AZ_TX_FLUSH_DESCQ 0x00000a00
1179 #define	FRF_AZ_TX_FLUSH_DESCQ_CMD_LBN 12
1180 #define	FRF_AZ_TX_FLUSH_DESCQ_CMD_WIDTH 1
1181 #define	FRF_AZ_TX_FLUSH_DESCQ_LBN 0
1182 #define	FRF_AZ_TX_FLUSH_DESCQ_WIDTH 12
1183 
1184 /* TX_DESC_UPD_REGP0: Transmit descriptor update register. */
1185 #define	FR_BZ_TX_DESC_UPD_P0 0x00000a10
1186 #define	FR_BZ_TX_DESC_UPD_P0_STEP 8192
1187 #define	FR_BZ_TX_DESC_UPD_P0_ROWS 1024
1188 /* TX_DESC_UPD_REG_KER: Transmit descriptor update register. */
1189 #define	FR_AA_TX_DESC_UPD_KER 0x00000a10
1190 #define	FR_AA_TX_DESC_UPD_KER_STEP 8192
1191 #define	FR_AA_TX_DESC_UPD_KER_ROWS 8
1192 /* TX_DESC_UPD_REGP123: Transmit descriptor update register. */
1193 #define	FR_BB_TX_DESC_UPD_P123 0x01000a10
1194 #define	FR_BB_TX_DESC_UPD_P123_STEP 8192
1195 #define	FR_BB_TX_DESC_UPD_P123_ROWS 3072
1196 #define	FRF_AZ_TX_DESC_WPTR_LBN 96
1197 #define	FRF_AZ_TX_DESC_WPTR_WIDTH 12
1198 #define	FRF_AZ_TX_DESC_PUSH_CMD_LBN 95
1199 #define	FRF_AZ_TX_DESC_PUSH_CMD_WIDTH 1
1200 #define	FRF_AZ_TX_DESC_LBN 0
1201 #define	FRF_AZ_TX_DESC_WIDTH 95
1202 
1203 /* TX_DC_CFG_REG: Transmit descriptor cache configuration register */
1204 #define	FR_AZ_TX_DC_CFG 0x00000a20
1205 #define	FRF_AZ_TX_DC_SIZE_LBN 0
1206 #define	FRF_AZ_TX_DC_SIZE_WIDTH 2
1207 #define	FFE_AZ_TX_DC_SIZE_32 2
1208 #define	FFE_AZ_TX_DC_SIZE_16 1
1209 #define	FFE_AZ_TX_DC_SIZE_8 0
1210 
1211 /* TX_CHKSM_CFG_REG: Transmit checksum configuration register */
1212 #define	FR_AA_TX_CHKSM_CFG 0x00000a30
1213 #define	FRF_AA_TX_Q_CHKSM_DIS_96_127_LBN 96
1214 #define	FRF_AA_TX_Q_CHKSM_DIS_96_127_WIDTH 32
1215 #define	FRF_AA_TX_Q_CHKSM_DIS_64_95_LBN 64
1216 #define	FRF_AA_TX_Q_CHKSM_DIS_64_95_WIDTH 32
1217 #define	FRF_AA_TX_Q_CHKSM_DIS_32_63_LBN 32
1218 #define	FRF_AA_TX_Q_CHKSM_DIS_32_63_WIDTH 32
1219 #define	FRF_AA_TX_Q_CHKSM_DIS_0_31_LBN 0
1220 #define	FRF_AA_TX_Q_CHKSM_DIS_0_31_WIDTH 32
1221 
1222 /* TX_CFG_REG: Transmit configuration register */
1223 #define	FR_AZ_TX_CFG 0x00000a50
1224 #define	FRF_CZ_TX_CONT_LOOKUP_THRESH_RANGE_LBN 114
1225 #define	FRF_CZ_TX_CONT_LOOKUP_THRESH_RANGE_WIDTH 8
1226 #define	FRF_CZ_TX_FILTER_TEST_MODE_BIT_LBN 113
1227 #define	FRF_CZ_TX_FILTER_TEST_MODE_BIT_WIDTH 1
1228 #define	FRF_CZ_TX_ETH_FILTER_WILD_SEARCH_RANGE_LBN 105
1229 #define	FRF_CZ_TX_ETH_FILTER_WILD_SEARCH_RANGE_WIDTH 8
1230 #define	FRF_CZ_TX_ETH_FILTER_FULL_SEARCH_RANGE_LBN 97
1231 #define	FRF_CZ_TX_ETH_FILTER_FULL_SEARCH_RANGE_WIDTH 8
1232 #define	FRF_CZ_TX_UDPIP_FILTER_WILD_SEARCH_RANGE_LBN 89
1233 #define	FRF_CZ_TX_UDPIP_FILTER_WILD_SEARCH_RANGE_WIDTH 8
1234 #define	FRF_CZ_TX_UDPIP_FILTER_FULL_SEARCH_RANGE_LBN 81
1235 #define	FRF_CZ_TX_UDPIP_FILTER_FULL_SEARCH_RANGE_WIDTH 8
1236 #define	FRF_CZ_TX_TCPIP_FILTER_WILD_SEARCH_RANGE_LBN 73
1237 #define	FRF_CZ_TX_TCPIP_FILTER_WILD_SEARCH_RANGE_WIDTH 8
1238 #define	FRF_CZ_TX_TCPIP_FILTER_FULL_SEARCH_RANGE_LBN 65
1239 #define	FRF_CZ_TX_TCPIP_FILTER_FULL_SEARCH_RANGE_WIDTH 8
1240 #define	FRF_CZ_TX_FILTER_ALL_VLAN_ETHERTYPES_BIT_LBN 64
1241 #define	FRF_CZ_TX_FILTER_ALL_VLAN_ETHERTYPES_BIT_WIDTH 1
1242 #define	FRF_CZ_TX_VLAN_MATCH_ETHERTYPE_RANGE_LBN 48
1243 #define	FRF_CZ_TX_VLAN_MATCH_ETHERTYPE_RANGE_WIDTH 16
1244 #define	FRF_CZ_TX_FILTER_EN_BIT_LBN 47
1245 #define	FRF_CZ_TX_FILTER_EN_BIT_WIDTH 1
1246 #define	FRF_AZ_TX_IP_ID_P0_OFS_LBN 16
1247 #define	FRF_AZ_TX_IP_ID_P0_OFS_WIDTH 15
1248 #define	FRF_AZ_TX_NO_EOP_DISC_EN_LBN 5
1249 #define	FRF_AZ_TX_NO_EOP_DISC_EN_WIDTH 1
1250 #define	FRF_AZ_TX_P1_PRI_EN_LBN 4
1251 #define	FRF_AZ_TX_P1_PRI_EN_WIDTH 1
1252 #define	FRF_AZ_TX_OWNERR_CTL_LBN 2
1253 #define	FRF_AZ_TX_OWNERR_CTL_WIDTH 1
1254 #define	FRF_AA_TX_NON_IP_DROP_DIS_LBN 1
1255 #define	FRF_AA_TX_NON_IP_DROP_DIS_WIDTH 1
1256 #define	FRF_AZ_TX_IP_ID_REP_EN_LBN 0
1257 #define	FRF_AZ_TX_IP_ID_REP_EN_WIDTH 1
1258 
1259 /* TX_PUSH_DROP_REG: Transmit push dropped register */
1260 #define	FR_AZ_TX_PUSH_DROP 0x00000a60
1261 #define	FRF_AZ_TX_PUSH_DROP_CNT_LBN 0
1262 #define	FRF_AZ_TX_PUSH_DROP_CNT_WIDTH 32
1263 
1264 /* TX_RESERVED_REG: Transmit configuration register */
1265 #define	FR_AZ_TX_RESERVED 0x00000a80
1266 #define	FRF_AZ_TX_EVT_CNT_LBN 121
1267 #define	FRF_AZ_TX_EVT_CNT_WIDTH 7
1268 #define	FRF_AZ_TX_PREF_AGE_CNT_LBN 119
1269 #define	FRF_AZ_TX_PREF_AGE_CNT_WIDTH 2
1270 #define	FRF_AZ_TX_RD_COMP_TMR_LBN 96
1271 #define	FRF_AZ_TX_RD_COMP_TMR_WIDTH 23
1272 #define	FRF_AZ_TX_PUSH_EN_LBN 89
1273 #define	FRF_AZ_TX_PUSH_EN_WIDTH 1
1274 #define	FRF_AZ_TX_PUSH_CHK_DIS_LBN 88
1275 #define	FRF_AZ_TX_PUSH_CHK_DIS_WIDTH 1
1276 #define	FRF_AZ_TX_D_FF_FULL_P0_LBN 85
1277 #define	FRF_AZ_TX_D_FF_FULL_P0_WIDTH 1
1278 #define	FRF_AZ_TX_DMAR_ST_P0_LBN 81
1279 #define	FRF_AZ_TX_DMAR_ST_P0_WIDTH 1
1280 #define	FRF_AZ_TX_DMAQ_ST_LBN 78
1281 #define	FRF_AZ_TX_DMAQ_ST_WIDTH 1
1282 #define	FRF_AZ_TX_RX_SPACER_LBN 64
1283 #define	FRF_AZ_TX_RX_SPACER_WIDTH 8
1284 #define	FRF_AZ_TX_DROP_ABORT_EN_LBN 60
1285 #define	FRF_AZ_TX_DROP_ABORT_EN_WIDTH 1
1286 #define	FRF_AZ_TX_SOFT_EVT_EN_LBN 59
1287 #define	FRF_AZ_TX_SOFT_EVT_EN_WIDTH 1
1288 #define	FRF_AZ_TX_PS_EVT_DIS_LBN 58
1289 #define	FRF_AZ_TX_PS_EVT_DIS_WIDTH 1
1290 #define	FRF_AZ_TX_RX_SPACER_EN_LBN 57
1291 #define	FRF_AZ_TX_RX_SPACER_EN_WIDTH 1
1292 #define	FRF_AZ_TX_XP_TIMER_LBN 52
1293 #define	FRF_AZ_TX_XP_TIMER_WIDTH 5
1294 #define	FRF_AZ_TX_PREF_SPACER_LBN 44
1295 #define	FRF_AZ_TX_PREF_SPACER_WIDTH 8
1296 #define	FRF_AZ_TX_PREF_WD_TMR_LBN 22
1297 #define	FRF_AZ_TX_PREF_WD_TMR_WIDTH 22
1298 #define	FRF_AZ_TX_ONLY1TAG_LBN 21
1299 #define	FRF_AZ_TX_ONLY1TAG_WIDTH 1
1300 #define	FRF_AZ_TX_PREF_THRESHOLD_LBN 19
1301 #define	FRF_AZ_TX_PREF_THRESHOLD_WIDTH 2
1302 #define	FRF_AZ_TX_ONE_PKT_PER_Q_LBN 18
1303 #define	FRF_AZ_TX_ONE_PKT_PER_Q_WIDTH 1
1304 #define	FRF_AZ_TX_DIS_NON_IP_EV_LBN 17
1305 #define	FRF_AZ_TX_DIS_NON_IP_EV_WIDTH 1
1306 #define	FRF_AA_TX_DMA_FF_THR_LBN 16
1307 #define	FRF_AA_TX_DMA_FF_THR_WIDTH 1
1308 #define	FRF_AZ_TX_DMA_SPACER_LBN 8
1309 #define	FRF_AZ_TX_DMA_SPACER_WIDTH 8
1310 #define	FRF_AA_TX_TCP_DIS_LBN 7
1311 #define	FRF_AA_TX_TCP_DIS_WIDTH 1
1312 #define	FRF_BZ_TX_FLUSH_MIN_LEN_EN_LBN 7
1313 #define	FRF_BZ_TX_FLUSH_MIN_LEN_EN_WIDTH 1
1314 #define	FRF_AA_TX_IP_DIS_LBN 6
1315 #define	FRF_AA_TX_IP_DIS_WIDTH 1
1316 #define	FRF_AZ_TX_MAX_CPL_LBN 2
1317 #define	FRF_AZ_TX_MAX_CPL_WIDTH 2
1318 #define	FFE_AZ_TX_MAX_CPL_16 3
1319 #define	FFE_AZ_TX_MAX_CPL_8 2
1320 #define	FFE_AZ_TX_MAX_CPL_4 1
1321 #define	FFE_AZ_TX_MAX_CPL_NOLIMIT 0
1322 #define	FRF_AZ_TX_MAX_PREF_LBN 0
1323 #define	FRF_AZ_TX_MAX_PREF_WIDTH 2
1324 #define	FFE_AZ_TX_MAX_PREF_32 3
1325 #define	FFE_AZ_TX_MAX_PREF_16 2
1326 #define	FFE_AZ_TX_MAX_PREF_8 1
1327 #define	FFE_AZ_TX_MAX_PREF_OFF 0
1328 
1329 /* TX_PACE_REG: Transmit pace control register */
1330 #define	FR_BZ_TX_PACE 0x00000a90
1331 #define	FRF_BZ_TX_PACE_SB_NOT_AF_LBN 19
1332 #define	FRF_BZ_TX_PACE_SB_NOT_AF_WIDTH 10
1333 #define	FRF_BZ_TX_PACE_SB_AF_LBN 9
1334 #define	FRF_BZ_TX_PACE_SB_AF_WIDTH 10
1335 #define	FRF_BZ_TX_PACE_FB_BASE_LBN 5
1336 #define	FRF_BZ_TX_PACE_FB_BASE_WIDTH 4
1337 #define	FRF_BZ_TX_PACE_BIN_TH_LBN 0
1338 #define	FRF_BZ_TX_PACE_BIN_TH_WIDTH 5
1339 
1340 /* TX_PACE_DROP_QID_REG: PACE Drop QID Counter */
1341 #define	FR_BZ_TX_PACE_DROP_QID 0x00000aa0
1342 #define	FRF_BZ_TX_PACE_QID_DRP_CNT_LBN 0
1343 #define	FRF_BZ_TX_PACE_QID_DRP_CNT_WIDTH 16
1344 
1345 /* TX_VLAN_REG: Transmit VLAN tag register */
1346 #define	FR_BB_TX_VLAN 0x00000ae0
1347 #define	FRF_BB_TX_VLAN_EN_LBN 127
1348 #define	FRF_BB_TX_VLAN_EN_WIDTH 1
1349 #define	FRF_BB_TX_VLAN7_PORT1_EN_LBN 125
1350 #define	FRF_BB_TX_VLAN7_PORT1_EN_WIDTH 1
1351 #define	FRF_BB_TX_VLAN7_PORT0_EN_LBN 124
1352 #define	FRF_BB_TX_VLAN7_PORT0_EN_WIDTH 1
1353 #define	FRF_BB_TX_VLAN7_LBN 112
1354 #define	FRF_BB_TX_VLAN7_WIDTH 12
1355 #define	FRF_BB_TX_VLAN6_PORT1_EN_LBN 109
1356 #define	FRF_BB_TX_VLAN6_PORT1_EN_WIDTH 1
1357 #define	FRF_BB_TX_VLAN6_PORT0_EN_LBN 108
1358 #define	FRF_BB_TX_VLAN6_PORT0_EN_WIDTH 1
1359 #define	FRF_BB_TX_VLAN6_LBN 96
1360 #define	FRF_BB_TX_VLAN6_WIDTH 12
1361 #define	FRF_BB_TX_VLAN5_PORT1_EN_LBN 93
1362 #define	FRF_BB_TX_VLAN5_PORT1_EN_WIDTH 1
1363 #define	FRF_BB_TX_VLAN5_PORT0_EN_LBN 92
1364 #define	FRF_BB_TX_VLAN5_PORT0_EN_WIDTH 1
1365 #define	FRF_BB_TX_VLAN5_LBN 80
1366 #define	FRF_BB_TX_VLAN5_WIDTH 12
1367 #define	FRF_BB_TX_VLAN4_PORT1_EN_LBN 77
1368 #define	FRF_BB_TX_VLAN4_PORT1_EN_WIDTH 1
1369 #define	FRF_BB_TX_VLAN4_PORT0_EN_LBN 76
1370 #define	FRF_BB_TX_VLAN4_PORT0_EN_WIDTH 1
1371 #define	FRF_BB_TX_VLAN4_LBN 64
1372 #define	FRF_BB_TX_VLAN4_WIDTH 12
1373 #define	FRF_BB_TX_VLAN3_PORT1_EN_LBN 61
1374 #define	FRF_BB_TX_VLAN3_PORT1_EN_WIDTH 1
1375 #define	FRF_BB_TX_VLAN3_PORT0_EN_LBN 60
1376 #define	FRF_BB_TX_VLAN3_PORT0_EN_WIDTH 1
1377 #define	FRF_BB_TX_VLAN3_LBN 48
1378 #define	FRF_BB_TX_VLAN3_WIDTH 12
1379 #define	FRF_BB_TX_VLAN2_PORT1_EN_LBN 45
1380 #define	FRF_BB_TX_VLAN2_PORT1_EN_WIDTH 1
1381 #define	FRF_BB_TX_VLAN2_PORT0_EN_LBN 44
1382 #define	FRF_BB_TX_VLAN2_PORT0_EN_WIDTH 1
1383 #define	FRF_BB_TX_VLAN2_LBN 32
1384 #define	FRF_BB_TX_VLAN2_WIDTH 12
1385 #define	FRF_BB_TX_VLAN1_PORT1_EN_LBN 29
1386 #define	FRF_BB_TX_VLAN1_PORT1_EN_WIDTH 1
1387 #define	FRF_BB_TX_VLAN1_PORT0_EN_LBN 28
1388 #define	FRF_BB_TX_VLAN1_PORT0_EN_WIDTH 1
1389 #define	FRF_BB_TX_VLAN1_LBN 16
1390 #define	FRF_BB_TX_VLAN1_WIDTH 12
1391 #define	FRF_BB_TX_VLAN0_PORT1_EN_LBN 13
1392 #define	FRF_BB_TX_VLAN0_PORT1_EN_WIDTH 1
1393 #define	FRF_BB_TX_VLAN0_PORT0_EN_LBN 12
1394 #define	FRF_BB_TX_VLAN0_PORT0_EN_WIDTH 1
1395 #define	FRF_BB_TX_VLAN0_LBN 0
1396 #define	FRF_BB_TX_VLAN0_WIDTH 12
1397 
1398 /* TX_IPFIL_PORTEN_REG: Transmit filter control register */
1399 #define	FR_BZ_TX_IPFIL_PORTEN 0x00000af0
1400 #define	FRF_BZ_TX_MADR0_FIL_EN_LBN 64
1401 #define	FRF_BZ_TX_MADR0_FIL_EN_WIDTH 1
1402 #define	FRF_BB_TX_IPFIL31_PORT_EN_LBN 62
1403 #define	FRF_BB_TX_IPFIL31_PORT_EN_WIDTH 1
1404 #define	FRF_BB_TX_IPFIL30_PORT_EN_LBN 60
1405 #define	FRF_BB_TX_IPFIL30_PORT_EN_WIDTH 1
1406 #define	FRF_BB_TX_IPFIL29_PORT_EN_LBN 58
1407 #define	FRF_BB_TX_IPFIL29_PORT_EN_WIDTH 1
1408 #define	FRF_BB_TX_IPFIL28_PORT_EN_LBN 56
1409 #define	FRF_BB_TX_IPFIL28_PORT_EN_WIDTH 1
1410 #define	FRF_BB_TX_IPFIL27_PORT_EN_LBN 54
1411 #define	FRF_BB_TX_IPFIL27_PORT_EN_WIDTH 1
1412 #define	FRF_BB_TX_IPFIL26_PORT_EN_LBN 52
1413 #define	FRF_BB_TX_IPFIL26_PORT_EN_WIDTH 1
1414 #define	FRF_BB_TX_IPFIL25_PORT_EN_LBN 50
1415 #define	FRF_BB_TX_IPFIL25_PORT_EN_WIDTH 1
1416 #define	FRF_BB_TX_IPFIL24_PORT_EN_LBN 48
1417 #define	FRF_BB_TX_IPFIL24_PORT_EN_WIDTH 1
1418 #define	FRF_BB_TX_IPFIL23_PORT_EN_LBN 46
1419 #define	FRF_BB_TX_IPFIL23_PORT_EN_WIDTH 1
1420 #define	FRF_BB_TX_IPFIL22_PORT_EN_LBN 44
1421 #define	FRF_BB_TX_IPFIL22_PORT_EN_WIDTH 1
1422 #define	FRF_BB_TX_IPFIL21_PORT_EN_LBN 42
1423 #define	FRF_BB_TX_IPFIL21_PORT_EN_WIDTH 1
1424 #define	FRF_BB_TX_IPFIL20_PORT_EN_LBN 40
1425 #define	FRF_BB_TX_IPFIL20_PORT_EN_WIDTH 1
1426 #define	FRF_BB_TX_IPFIL19_PORT_EN_LBN 38
1427 #define	FRF_BB_TX_IPFIL19_PORT_EN_WIDTH 1
1428 #define	FRF_BB_TX_IPFIL18_PORT_EN_LBN 36
1429 #define	FRF_BB_TX_IPFIL18_PORT_EN_WIDTH 1
1430 #define	FRF_BB_TX_IPFIL17_PORT_EN_LBN 34
1431 #define	FRF_BB_TX_IPFIL17_PORT_EN_WIDTH 1
1432 #define	FRF_BB_TX_IPFIL16_PORT_EN_LBN 32
1433 #define	FRF_BB_TX_IPFIL16_PORT_EN_WIDTH 1
1434 #define	FRF_BB_TX_IPFIL15_PORT_EN_LBN 30
1435 #define	FRF_BB_TX_IPFIL15_PORT_EN_WIDTH 1
1436 #define	FRF_BB_TX_IPFIL14_PORT_EN_LBN 28
1437 #define	FRF_BB_TX_IPFIL14_PORT_EN_WIDTH 1
1438 #define	FRF_BB_TX_IPFIL13_PORT_EN_LBN 26
1439 #define	FRF_BB_TX_IPFIL13_PORT_EN_WIDTH 1
1440 #define	FRF_BB_TX_IPFIL12_PORT_EN_LBN 24
1441 #define	FRF_BB_TX_IPFIL12_PORT_EN_WIDTH 1
1442 #define	FRF_BB_TX_IPFIL11_PORT_EN_LBN 22
1443 #define	FRF_BB_TX_IPFIL11_PORT_EN_WIDTH 1
1444 #define	FRF_BB_TX_IPFIL10_PORT_EN_LBN 20
1445 #define	FRF_BB_TX_IPFIL10_PORT_EN_WIDTH 1
1446 #define	FRF_BB_TX_IPFIL9_PORT_EN_LBN 18
1447 #define	FRF_BB_TX_IPFIL9_PORT_EN_WIDTH 1
1448 #define	FRF_BB_TX_IPFIL8_PORT_EN_LBN 16
1449 #define	FRF_BB_TX_IPFIL8_PORT_EN_WIDTH 1
1450 #define	FRF_BB_TX_IPFIL7_PORT_EN_LBN 14
1451 #define	FRF_BB_TX_IPFIL7_PORT_EN_WIDTH 1
1452 #define	FRF_BB_TX_IPFIL6_PORT_EN_LBN 12
1453 #define	FRF_BB_TX_IPFIL6_PORT_EN_WIDTH 1
1454 #define	FRF_BB_TX_IPFIL5_PORT_EN_LBN 10
1455 #define	FRF_BB_TX_IPFIL5_PORT_EN_WIDTH 1
1456 #define	FRF_BB_TX_IPFIL4_PORT_EN_LBN 8
1457 #define	FRF_BB_TX_IPFIL4_PORT_EN_WIDTH 1
1458 #define	FRF_BB_TX_IPFIL3_PORT_EN_LBN 6
1459 #define	FRF_BB_TX_IPFIL3_PORT_EN_WIDTH 1
1460 #define	FRF_BB_TX_IPFIL2_PORT_EN_LBN 4
1461 #define	FRF_BB_TX_IPFIL2_PORT_EN_WIDTH 1
1462 #define	FRF_BB_TX_IPFIL1_PORT_EN_LBN 2
1463 #define	FRF_BB_TX_IPFIL1_PORT_EN_WIDTH 1
1464 #define	FRF_BB_TX_IPFIL0_PORT_EN_LBN 0
1465 #define	FRF_BB_TX_IPFIL0_PORT_EN_WIDTH 1
1466 
1467 /* TX_IPFIL_TBL: Transmit IP source address filter table */
1468 #define	FR_BB_TX_IPFIL_TBL 0x00000b00
1469 #define	FR_BB_TX_IPFIL_TBL_STEP 16
1470 #define	FR_BB_TX_IPFIL_TBL_ROWS 16
1471 #define	FRF_BB_TX_IPFIL_MASK_1_LBN 96
1472 #define	FRF_BB_TX_IPFIL_MASK_1_WIDTH 32
1473 #define	FRF_BB_TX_IP_SRC_ADR_1_LBN 64
1474 #define	FRF_BB_TX_IP_SRC_ADR_1_WIDTH 32
1475 #define	FRF_BB_TX_IPFIL_MASK_0_LBN 32
1476 #define	FRF_BB_TX_IPFIL_MASK_0_WIDTH 32
1477 #define	FRF_BB_TX_IP_SRC_ADR_0_LBN 0
1478 #define	FRF_BB_TX_IP_SRC_ADR_0_WIDTH 32
1479 
1480 /* MD_TXD_REG: PHY management transmit data register */
1481 #define	FR_AB_MD_TXD 0x00000c00
1482 #define	FRF_AB_MD_TXD_LBN 0
1483 #define	FRF_AB_MD_TXD_WIDTH 16
1484 
1485 /* MD_RXD_REG: PHY management receive data register */
1486 #define	FR_AB_MD_RXD 0x00000c10
1487 #define	FRF_AB_MD_RXD_LBN 0
1488 #define	FRF_AB_MD_RXD_WIDTH 16
1489 
1490 /* MD_CS_REG: PHY management configuration & status register */
1491 #define	FR_AB_MD_CS 0x00000c20
1492 #define	FRF_AB_MD_RD_EN_CMD_LBN 15
1493 #define	FRF_AB_MD_RD_EN_CMD_WIDTH 1
1494 #define	FRF_AB_MD_WR_EN_CMD_LBN 14
1495 #define	FRF_AB_MD_WR_EN_CMD_WIDTH 1
1496 #define	FRF_AB_MD_ADDR_CMD_LBN 13
1497 #define	FRF_AB_MD_ADDR_CMD_WIDTH 1
1498 #define	FRF_AB_MD_PT_LBN 7
1499 #define	FRF_AB_MD_PT_WIDTH 3
1500 #define	FRF_AB_MD_PL_LBN 6
1501 #define	FRF_AB_MD_PL_WIDTH 1
1502 #define	FRF_AB_MD_INT_CLR_LBN 5
1503 #define	FRF_AB_MD_INT_CLR_WIDTH 1
1504 #define	FRF_AB_MD_GC_LBN 4
1505 #define	FRF_AB_MD_GC_WIDTH 1
1506 #define	FRF_AB_MD_PRSP_LBN 3
1507 #define	FRF_AB_MD_PRSP_WIDTH 1
1508 #define	FRF_AB_MD_RIC_LBN 2
1509 #define	FRF_AB_MD_RIC_WIDTH 1
1510 #define	FRF_AB_MD_RDC_LBN 1
1511 #define	FRF_AB_MD_RDC_WIDTH 1
1512 #define	FRF_AB_MD_WRC_LBN 0
1513 #define	FRF_AB_MD_WRC_WIDTH 1
1514 
1515 /* MD_PHY_ADR_REG: PHY management PHY address register */
1516 #define	FR_AB_MD_PHY_ADR 0x00000c30
1517 #define	FRF_AB_MD_PHY_ADR_LBN 0
1518 #define	FRF_AB_MD_PHY_ADR_WIDTH 16
1519 
1520 /* MD_ID_REG: PHY management ID register */
1521 #define	FR_AB_MD_ID 0x00000c40
1522 #define	FRF_AB_MD_PRT_ADR_LBN 11
1523 #define	FRF_AB_MD_PRT_ADR_WIDTH 5
1524 #define	FRF_AB_MD_DEV_ADR_LBN 6
1525 #define	FRF_AB_MD_DEV_ADR_WIDTH 5
1526 
1527 /* MD_STAT_REG: PHY management status & mask register */
1528 #define	FR_AB_MD_STAT 0x00000c50
1529 #define	FRF_AB_MD_PINT_LBN 4
1530 #define	FRF_AB_MD_PINT_WIDTH 1
1531 #define	FRF_AB_MD_DONE_LBN 3
1532 #define	FRF_AB_MD_DONE_WIDTH 1
1533 #define	FRF_AB_MD_BSERR_LBN 2
1534 #define	FRF_AB_MD_BSERR_WIDTH 1
1535 #define	FRF_AB_MD_LNFL_LBN 1
1536 #define	FRF_AB_MD_LNFL_WIDTH 1
1537 #define	FRF_AB_MD_BSY_LBN 0
1538 #define	FRF_AB_MD_BSY_WIDTH 1
1539 
1540 /* MAC_STAT_DMA_REG: Port MAC statistical counter DMA register */
1541 #define	FR_AB_MAC_STAT_DMA 0x00000c60
1542 #define	FRF_AB_MAC_STAT_DMA_CMD_LBN 48
1543 #define	FRF_AB_MAC_STAT_DMA_CMD_WIDTH 1
1544 #define	FRF_AB_MAC_STAT_DMA_ADR_LBN 0
1545 #define	FRF_AB_MAC_STAT_DMA_ADR_WIDTH 48
1546 
1547 /* MAC_CTRL_REG: Port MAC control register */
1548 #define	FR_AB_MAC_CTRL 0x00000c80
1549 #define	FRF_AB_MAC_XOFF_VAL_LBN 16
1550 #define	FRF_AB_MAC_XOFF_VAL_WIDTH 16
1551 #define	FRF_BB_TXFIFO_DRAIN_EN_LBN 7
1552 #define	FRF_BB_TXFIFO_DRAIN_EN_WIDTH 1
1553 #define	FRF_AB_MAC_XG_DISTXCRC_LBN 5
1554 #define	FRF_AB_MAC_XG_DISTXCRC_WIDTH 1
1555 #define	FRF_AB_MAC_BCAD_ACPT_LBN 4
1556 #define	FRF_AB_MAC_BCAD_ACPT_WIDTH 1
1557 #define	FRF_AB_MAC_UC_PROM_LBN 3
1558 #define	FRF_AB_MAC_UC_PROM_WIDTH 1
1559 #define	FRF_AB_MAC_LINK_STATUS_LBN 2
1560 #define	FRF_AB_MAC_LINK_STATUS_WIDTH 1
1561 #define	FRF_AB_MAC_SPEED_LBN 0
1562 #define	FRF_AB_MAC_SPEED_WIDTH 2
1563 #define	FFE_AB_MAC_SPEED_10G 3
1564 #define	FFE_AB_MAC_SPEED_1G 2
1565 #define	FFE_AB_MAC_SPEED_100M 1
1566 #define	FFE_AB_MAC_SPEED_10M 0
1567 
1568 /* GEN_MODE_REG: General Purpose mode register (external interrupt mask) */
1569 #define	FR_BB_GEN_MODE 0x00000c90
1570 #define	FRF_BB_XFP_PHY_INT_POL_SEL_LBN 3
1571 #define	FRF_BB_XFP_PHY_INT_POL_SEL_WIDTH 1
1572 #define	FRF_BB_XG_PHY_INT_POL_SEL_LBN 2
1573 #define	FRF_BB_XG_PHY_INT_POL_SEL_WIDTH 1
1574 #define	FRF_BB_XFP_PHY_INT_MASK_LBN 1
1575 #define	FRF_BB_XFP_PHY_INT_MASK_WIDTH 1
1576 #define	FRF_BB_XG_PHY_INT_MASK_LBN 0
1577 #define	FRF_BB_XG_PHY_INT_MASK_WIDTH 1
1578 
1579 /* MAC_MC_HASH_REG0: Multicast address hash table */
1580 #define	FR_AB_MAC_MC_HASH_REG0 0x00000ca0
1581 #define	FRF_AB_MAC_MCAST_HASH0_LBN 0
1582 #define	FRF_AB_MAC_MCAST_HASH0_WIDTH 128
1583 
1584 /* MAC_MC_HASH_REG1: Multicast address hash table */
1585 #define	FR_AB_MAC_MC_HASH_REG1 0x00000cb0
1586 #define	FRF_AB_MAC_MCAST_HASH1_LBN 0
1587 #define	FRF_AB_MAC_MCAST_HASH1_WIDTH 128
1588 
1589 /* GM_CFG1_REG: GMAC configuration register 1 */
1590 #define	FR_AB_GM_CFG1 0x00000e00
1591 #define	FRF_AB_GM_SW_RST_LBN 31
1592 #define	FRF_AB_GM_SW_RST_WIDTH 1
1593 #define	FRF_AB_GM_SIM_RST_LBN 30
1594 #define	FRF_AB_GM_SIM_RST_WIDTH 1
1595 #define	FRF_AB_GM_RST_RX_MAC_CTL_LBN 19
1596 #define	FRF_AB_GM_RST_RX_MAC_CTL_WIDTH 1
1597 #define	FRF_AB_GM_RST_TX_MAC_CTL_LBN 18
1598 #define	FRF_AB_GM_RST_TX_MAC_CTL_WIDTH 1
1599 #define	FRF_AB_GM_RST_RX_FUNC_LBN 17
1600 #define	FRF_AB_GM_RST_RX_FUNC_WIDTH 1
1601 #define	FRF_AB_GM_RST_TX_FUNC_LBN 16
1602 #define	FRF_AB_GM_RST_TX_FUNC_WIDTH 1
1603 #define	FRF_AB_GM_LOOP_LBN 8
1604 #define	FRF_AB_GM_LOOP_WIDTH 1
1605 #define	FRF_AB_GM_RX_FC_EN_LBN 5
1606 #define	FRF_AB_GM_RX_FC_EN_WIDTH 1
1607 #define	FRF_AB_GM_TX_FC_EN_LBN 4
1608 #define	FRF_AB_GM_TX_FC_EN_WIDTH 1
1609 #define	FRF_AB_GM_SYNC_RXEN_LBN 3
1610 #define	FRF_AB_GM_SYNC_RXEN_WIDTH 1
1611 #define	FRF_AB_GM_RX_EN_LBN 2
1612 #define	FRF_AB_GM_RX_EN_WIDTH 1
1613 #define	FRF_AB_GM_SYNC_TXEN_LBN 1
1614 #define	FRF_AB_GM_SYNC_TXEN_WIDTH 1
1615 #define	FRF_AB_GM_TX_EN_LBN 0
1616 #define	FRF_AB_GM_TX_EN_WIDTH 1
1617 
1618 /* GM_CFG2_REG: GMAC configuration register 2 */
1619 #define	FR_AB_GM_CFG2 0x00000e10
1620 #define	FRF_AB_GM_PAMBL_LEN_LBN 12
1621 #define	FRF_AB_GM_PAMBL_LEN_WIDTH 4
1622 #define	FRF_AB_GM_IF_MODE_LBN 8
1623 #define	FRF_AB_GM_IF_MODE_WIDTH 2
1624 #define	FFE_AB_IF_MODE_BYTE_MODE 2
1625 #define	FFE_AB_IF_MODE_NIBBLE_MODE 1
1626 #define	FRF_AB_GM_HUGE_FRM_EN_LBN 5
1627 #define	FRF_AB_GM_HUGE_FRM_EN_WIDTH 1
1628 #define	FRF_AB_GM_LEN_CHK_LBN 4
1629 #define	FRF_AB_GM_LEN_CHK_WIDTH 1
1630 #define	FRF_AB_GM_PAD_CRC_EN_LBN 2
1631 #define	FRF_AB_GM_PAD_CRC_EN_WIDTH 1
1632 #define	FRF_AB_GM_CRC_EN_LBN 1
1633 #define	FRF_AB_GM_CRC_EN_WIDTH 1
1634 #define	FRF_AB_GM_FD_LBN 0
1635 #define	FRF_AB_GM_FD_WIDTH 1
1636 
1637 /* GM_IPG_REG: GMAC IPG register */
1638 #define	FR_AB_GM_IPG 0x00000e20
1639 #define	FRF_AB_GM_NONB2B_IPG1_LBN 24
1640 #define	FRF_AB_GM_NONB2B_IPG1_WIDTH 7
1641 #define	FRF_AB_GM_NONB2B_IPG2_LBN 16
1642 #define	FRF_AB_GM_NONB2B_IPG2_WIDTH 7
1643 #define	FRF_AB_GM_MIN_IPG_ENF_LBN 8
1644 #define	FRF_AB_GM_MIN_IPG_ENF_WIDTH 8
1645 #define	FRF_AB_GM_B2B_IPG_LBN 0
1646 #define	FRF_AB_GM_B2B_IPG_WIDTH 7
1647 
1648 /* GM_HD_REG: GMAC half duplex register */
1649 #define	FR_AB_GM_HD 0x00000e30
1650 #define	FRF_AB_GM_ALT_BOFF_VAL_LBN 20
1651 #define	FRF_AB_GM_ALT_BOFF_VAL_WIDTH 4
1652 #define	FRF_AB_GM_ALT_BOFF_EN_LBN 19
1653 #define	FRF_AB_GM_ALT_BOFF_EN_WIDTH 1
1654 #define	FRF_AB_GM_BP_NO_BOFF_LBN 18
1655 #define	FRF_AB_GM_BP_NO_BOFF_WIDTH 1
1656 #define	FRF_AB_GM_DIS_BOFF_LBN 17
1657 #define	FRF_AB_GM_DIS_BOFF_WIDTH 1
1658 #define	FRF_AB_GM_EXDEF_TX_EN_LBN 16
1659 #define	FRF_AB_GM_EXDEF_TX_EN_WIDTH 1
1660 #define	FRF_AB_GM_RTRY_LIMIT_LBN 12
1661 #define	FRF_AB_GM_RTRY_LIMIT_WIDTH 4
1662 #define	FRF_AB_GM_COL_WIN_LBN 0
1663 #define	FRF_AB_GM_COL_WIN_WIDTH 10
1664 
1665 /* GM_MAX_FLEN_REG: GMAC maximum frame length register */
1666 #define	FR_AB_GM_MAX_FLEN 0x00000e40
1667 #define	FRF_AB_GM_MAX_FLEN_LBN 0
1668 #define	FRF_AB_GM_MAX_FLEN_WIDTH 16
1669 
1670 /* GM_TEST_REG: GMAC test register */
1671 #define	FR_AB_GM_TEST 0x00000e70
1672 #define	FRF_AB_GM_MAX_BOFF_LBN 3
1673 #define	FRF_AB_GM_MAX_BOFF_WIDTH 1
1674 #define	FRF_AB_GM_REG_TX_FLOW_EN_LBN 2
1675 #define	FRF_AB_GM_REG_TX_FLOW_EN_WIDTH 1
1676 #define	FRF_AB_GM_TEST_PAUSE_LBN 1
1677 #define	FRF_AB_GM_TEST_PAUSE_WIDTH 1
1678 #define	FRF_AB_GM_SHORT_SLOT_LBN 0
1679 #define	FRF_AB_GM_SHORT_SLOT_WIDTH 1
1680 
1681 /* GM_ADR1_REG: GMAC station address register 1 */
1682 #define	FR_AB_GM_ADR1 0x00000f00
1683 #define	FRF_AB_GM_ADR_B0_LBN 24
1684 #define	FRF_AB_GM_ADR_B0_WIDTH 8
1685 #define	FRF_AB_GM_ADR_B1_LBN 16
1686 #define	FRF_AB_GM_ADR_B1_WIDTH 8
1687 #define	FRF_AB_GM_ADR_B2_LBN 8
1688 #define	FRF_AB_GM_ADR_B2_WIDTH 8
1689 #define	FRF_AB_GM_ADR_B3_LBN 0
1690 #define	FRF_AB_GM_ADR_B3_WIDTH 8
1691 
1692 /* GM_ADR2_REG: GMAC station address register 2 */
1693 #define	FR_AB_GM_ADR2 0x00000f10
1694 #define	FRF_AB_GM_ADR_B4_LBN 24
1695 #define	FRF_AB_GM_ADR_B4_WIDTH 8
1696 #define	FRF_AB_GM_ADR_B5_LBN 16
1697 #define	FRF_AB_GM_ADR_B5_WIDTH 8
1698 
1699 /* GMF_CFG0_REG: GMAC FIFO configuration register 0 */
1700 #define	FR_AB_GMF_CFG0 0x00000f20
1701 #define	FRF_AB_GMF_FTFENRPLY_LBN 20
1702 #define	FRF_AB_GMF_FTFENRPLY_WIDTH 1
1703 #define	FRF_AB_GMF_STFENRPLY_LBN 19
1704 #define	FRF_AB_GMF_STFENRPLY_WIDTH 1
1705 #define	FRF_AB_GMF_FRFENRPLY_LBN 18
1706 #define	FRF_AB_GMF_FRFENRPLY_WIDTH 1
1707 #define	FRF_AB_GMF_SRFENRPLY_LBN 17
1708 #define	FRF_AB_GMF_SRFENRPLY_WIDTH 1
1709 #define	FRF_AB_GMF_WTMENRPLY_LBN 16
1710 #define	FRF_AB_GMF_WTMENRPLY_WIDTH 1
1711 #define	FRF_AB_GMF_FTFENREQ_LBN 12
1712 #define	FRF_AB_GMF_FTFENREQ_WIDTH 1
1713 #define	FRF_AB_GMF_STFENREQ_LBN 11
1714 #define	FRF_AB_GMF_STFENREQ_WIDTH 1
1715 #define	FRF_AB_GMF_FRFENREQ_LBN 10
1716 #define	FRF_AB_GMF_FRFENREQ_WIDTH 1
1717 #define	FRF_AB_GMF_SRFENREQ_LBN 9
1718 #define	FRF_AB_GMF_SRFENREQ_WIDTH 1
1719 #define	FRF_AB_GMF_WTMENREQ_LBN 8
1720 #define	FRF_AB_GMF_WTMENREQ_WIDTH 1
1721 #define	FRF_AB_GMF_HSTRSTFT_LBN 4
1722 #define	FRF_AB_GMF_HSTRSTFT_WIDTH 1
1723 #define	FRF_AB_GMF_HSTRSTST_LBN 3
1724 #define	FRF_AB_GMF_HSTRSTST_WIDTH 1
1725 #define	FRF_AB_GMF_HSTRSTFR_LBN 2
1726 #define	FRF_AB_GMF_HSTRSTFR_WIDTH 1
1727 #define	FRF_AB_GMF_HSTRSTSR_LBN 1
1728 #define	FRF_AB_GMF_HSTRSTSR_WIDTH 1
1729 #define	FRF_AB_GMF_HSTRSTWT_LBN 0
1730 #define	FRF_AB_GMF_HSTRSTWT_WIDTH 1
1731 
1732 /* GMF_CFG1_REG: GMAC FIFO configuration register 1 */
1733 #define	FR_AB_GMF_CFG1 0x00000f30
1734 #define	FRF_AB_GMF_CFGFRTH_LBN 16
1735 #define	FRF_AB_GMF_CFGFRTH_WIDTH 5
1736 #define	FRF_AB_GMF_CFGXOFFRTX_LBN 0
1737 #define	FRF_AB_GMF_CFGXOFFRTX_WIDTH 16
1738 
1739 /* GMF_CFG2_REG: GMAC FIFO configuration register 2 */
1740 #define	FR_AB_GMF_CFG2 0x00000f40
1741 #define	FRF_AB_GMF_CFGHWM_LBN 16
1742 #define	FRF_AB_GMF_CFGHWM_WIDTH 6
1743 #define	FRF_AB_GMF_CFGLWM_LBN 0
1744 #define	FRF_AB_GMF_CFGLWM_WIDTH 6
1745 
1746 /* GMF_CFG3_REG: GMAC FIFO configuration register 3 */
1747 #define	FR_AB_GMF_CFG3 0x00000f50
1748 #define	FRF_AB_GMF_CFGHWMFT_LBN 16
1749 #define	FRF_AB_GMF_CFGHWMFT_WIDTH 6
1750 #define	FRF_AB_GMF_CFGFTTH_LBN 0
1751 #define	FRF_AB_GMF_CFGFTTH_WIDTH 6
1752 
1753 /* GMF_CFG4_REG: GMAC FIFO configuration register 4 */
1754 #define	FR_AB_GMF_CFG4 0x00000f60
1755 #define	FRF_AB_GMF_HSTFLTRFRM_LBN 0
1756 #define	FRF_AB_GMF_HSTFLTRFRM_WIDTH 18
1757 
1758 /* GMF_CFG5_REG: GMAC FIFO configuration register 5 */
1759 #define	FR_AB_GMF_CFG5 0x00000f70
1760 #define	FRF_AB_GMF_CFGHDPLX_LBN 22
1761 #define	FRF_AB_GMF_CFGHDPLX_WIDTH 1
1762 #define	FRF_AB_GMF_SRFULL_LBN 21
1763 #define	FRF_AB_GMF_SRFULL_WIDTH 1
1764 #define	FRF_AB_GMF_HSTSRFULLCLR_LBN 20
1765 #define	FRF_AB_GMF_HSTSRFULLCLR_WIDTH 1
1766 #define	FRF_AB_GMF_CFGBYTMODE_LBN 19
1767 #define	FRF_AB_GMF_CFGBYTMODE_WIDTH 1
1768 #define	FRF_AB_GMF_HSTDRPLT64_LBN 18
1769 #define	FRF_AB_GMF_HSTDRPLT64_WIDTH 1
1770 #define	FRF_AB_GMF_HSTFLTRFRMDC_LBN 0
1771 #define	FRF_AB_GMF_HSTFLTRFRMDC_WIDTH 18
1772 
1773 /* TX_SRC_MAC_TBL: Transmit IP source address filter table */
1774 #define	FR_BB_TX_SRC_MAC_TBL 0x00001000
1775 #define	FR_BB_TX_SRC_MAC_TBL_STEP 16
1776 #define	FR_BB_TX_SRC_MAC_TBL_ROWS 16
1777 #define	FRF_BB_TX_SRC_MAC_ADR_1_LBN 64
1778 #define	FRF_BB_TX_SRC_MAC_ADR_1_WIDTH 48
1779 #define	FRF_BB_TX_SRC_MAC_ADR_0_LBN 0
1780 #define	FRF_BB_TX_SRC_MAC_ADR_0_WIDTH 48
1781 
1782 /* TX_SRC_MAC_CTL_REG: Transmit MAC source address filter control */
1783 #define	FR_BB_TX_SRC_MAC_CTL 0x00001100
1784 #define	FRF_BB_TX_SRC_DROP_CTR_LBN 16
1785 #define	FRF_BB_TX_SRC_DROP_CTR_WIDTH 16
1786 #define	FRF_BB_TX_SRC_FLTR_EN_LBN 15
1787 #define	FRF_BB_TX_SRC_FLTR_EN_WIDTH 1
1788 #define	FRF_BB_TX_DROP_CTR_CLR_LBN 12
1789 #define	FRF_BB_TX_DROP_CTR_CLR_WIDTH 1
1790 #define	FRF_BB_TX_MAC_QID_SEL_LBN 0
1791 #define	FRF_BB_TX_MAC_QID_SEL_WIDTH 3
1792 
1793 /* XM_ADR_LO_REG: XGMAC address register low */
1794 #define	FR_AB_XM_ADR_LO 0x00001200
1795 #define	FRF_AB_XM_ADR_LO_LBN 0
1796 #define	FRF_AB_XM_ADR_LO_WIDTH 32
1797 
1798 /* XM_ADR_HI_REG: XGMAC address register high */
1799 #define	FR_AB_XM_ADR_HI 0x00001210
1800 #define	FRF_AB_XM_ADR_HI_LBN 0
1801 #define	FRF_AB_XM_ADR_HI_WIDTH 16
1802 
1803 /* XM_GLB_CFG_REG: XGMAC global configuration */
1804 #define	FR_AB_XM_GLB_CFG 0x00001220
1805 #define	FRF_AB_XM_RMTFLT_GEN_LBN 17
1806 #define	FRF_AB_XM_RMTFLT_GEN_WIDTH 1
1807 #define	FRF_AB_XM_DEBUG_MODE_LBN 16
1808 #define	FRF_AB_XM_DEBUG_MODE_WIDTH 1
1809 #define	FRF_AB_XM_RX_STAT_EN_LBN 11
1810 #define	FRF_AB_XM_RX_STAT_EN_WIDTH 1
1811 #define	FRF_AB_XM_TX_STAT_EN_LBN 10
1812 #define	FRF_AB_XM_TX_STAT_EN_WIDTH 1
1813 #define	FRF_AB_XM_RX_JUMBO_MODE_LBN 6
1814 #define	FRF_AB_XM_RX_JUMBO_MODE_WIDTH 1
1815 #define	FRF_AB_XM_WAN_MODE_LBN 5
1816 #define	FRF_AB_XM_WAN_MODE_WIDTH 1
1817 #define	FRF_AB_XM_INTCLR_MODE_LBN 3
1818 #define	FRF_AB_XM_INTCLR_MODE_WIDTH 1
1819 #define	FRF_AB_XM_CORE_RST_LBN 0
1820 #define	FRF_AB_XM_CORE_RST_WIDTH 1
1821 
1822 /* XM_TX_CFG_REG: XGMAC transmit configuration */
1823 #define	FR_AB_XM_TX_CFG 0x00001230
1824 #define	FRF_AB_XM_TX_PROG_LBN 24
1825 #define	FRF_AB_XM_TX_PROG_WIDTH 1
1826 #define	FRF_AB_XM_IPG_LBN 16
1827 #define	FRF_AB_XM_IPG_WIDTH 4
1828 #define	FRF_AB_XM_FCNTL_LBN 10
1829 #define	FRF_AB_XM_FCNTL_WIDTH 1
1830 #define	FRF_AB_XM_TXCRC_LBN 8
1831 #define	FRF_AB_XM_TXCRC_WIDTH 1
1832 #define	FRF_AB_XM_EDRC_LBN 6
1833 #define	FRF_AB_XM_EDRC_WIDTH 1
1834 #define	FRF_AB_XM_AUTO_PAD_LBN 5
1835 #define	FRF_AB_XM_AUTO_PAD_WIDTH 1
1836 #define	FRF_AB_XM_TX_PRMBL_LBN 2
1837 #define	FRF_AB_XM_TX_PRMBL_WIDTH 1
1838 #define	FRF_AB_XM_TXEN_LBN 1
1839 #define	FRF_AB_XM_TXEN_WIDTH 1
1840 #define	FRF_AB_XM_TX_RST_LBN 0
1841 #define	FRF_AB_XM_TX_RST_WIDTH 1
1842 
1843 /* XM_RX_CFG_REG: XGMAC receive configuration */
1844 #define	FR_AB_XM_RX_CFG 0x00001240
1845 #define	FRF_AB_XM_PASS_LENERR_LBN 26
1846 #define	FRF_AB_XM_PASS_LENERR_WIDTH 1
1847 #define	FRF_AB_XM_PASS_CRC_ERR_LBN 25
1848 #define	FRF_AB_XM_PASS_CRC_ERR_WIDTH 1
1849 #define	FRF_AB_XM_PASS_PRMBLE_ERR_LBN 24
1850 #define	FRF_AB_XM_PASS_PRMBLE_ERR_WIDTH 1
1851 #define	FRF_AB_XM_REJ_BCAST_LBN 20
1852 #define	FRF_AB_XM_REJ_BCAST_WIDTH 1
1853 #define	FRF_AB_XM_ACPT_ALL_MCAST_LBN 11
1854 #define	FRF_AB_XM_ACPT_ALL_MCAST_WIDTH 1
1855 #define	FRF_AB_XM_ACPT_ALL_UCAST_LBN 9
1856 #define	FRF_AB_XM_ACPT_ALL_UCAST_WIDTH 1
1857 #define	FRF_AB_XM_AUTO_DEPAD_LBN 8
1858 #define	FRF_AB_XM_AUTO_DEPAD_WIDTH 1
1859 #define	FRF_AB_XM_RXCRC_LBN 3
1860 #define	FRF_AB_XM_RXCRC_WIDTH 1
1861 #define	FRF_AB_XM_RX_PRMBL_LBN 2
1862 #define	FRF_AB_XM_RX_PRMBL_WIDTH 1
1863 #define	FRF_AB_XM_RXEN_LBN 1
1864 #define	FRF_AB_XM_RXEN_WIDTH 1
1865 #define	FRF_AB_XM_RX_RST_LBN 0
1866 #define	FRF_AB_XM_RX_RST_WIDTH 1
1867 
1868 /* XM_MGT_INT_MASK: documentation to be written for sum_XM_MGT_INT_MASK */
1869 #define	FR_AB_XM_MGT_INT_MASK 0x00001250
1870 #define	FRF_AB_XM_MSK_STA_INTR_LBN 16
1871 #define	FRF_AB_XM_MSK_STA_INTR_WIDTH 1
1872 #define	FRF_AB_XM_MSK_STAT_CNTR_HF_LBN 9
1873 #define	FRF_AB_XM_MSK_STAT_CNTR_HF_WIDTH 1
1874 #define	FRF_AB_XM_MSK_STAT_CNTR_OF_LBN 8
1875 #define	FRF_AB_XM_MSK_STAT_CNTR_OF_WIDTH 1
1876 #define	FRF_AB_XM_MSK_PRMBLE_ERR_LBN 2
1877 #define	FRF_AB_XM_MSK_PRMBLE_ERR_WIDTH 1
1878 #define	FRF_AB_XM_MSK_RMTFLT_LBN 1
1879 #define	FRF_AB_XM_MSK_RMTFLT_WIDTH 1
1880 #define	FRF_AB_XM_MSK_LCLFLT_LBN 0
1881 #define	FRF_AB_XM_MSK_LCLFLT_WIDTH 1
1882 
1883 /* XM_FC_REG: XGMAC flow control register */
1884 #define	FR_AB_XM_FC 0x00001270
1885 #define	FRF_AB_XM_PAUSE_TIME_LBN 16
1886 #define	FRF_AB_XM_PAUSE_TIME_WIDTH 16
1887 #define	FRF_AB_XM_RX_MAC_STAT_LBN 11
1888 #define	FRF_AB_XM_RX_MAC_STAT_WIDTH 1
1889 #define	FRF_AB_XM_TX_MAC_STAT_LBN 10
1890 #define	FRF_AB_XM_TX_MAC_STAT_WIDTH 1
1891 #define	FRF_AB_XM_MCNTL_PASS_LBN 8
1892 #define	FRF_AB_XM_MCNTL_PASS_WIDTH 2
1893 #define	FRF_AB_XM_REJ_CNTL_UCAST_LBN 6
1894 #define	FRF_AB_XM_REJ_CNTL_UCAST_WIDTH 1
1895 #define	FRF_AB_XM_REJ_CNTL_MCAST_LBN 5
1896 #define	FRF_AB_XM_REJ_CNTL_MCAST_WIDTH 1
1897 #define	FRF_AB_XM_ZPAUSE_LBN 2
1898 #define	FRF_AB_XM_ZPAUSE_WIDTH 1
1899 #define	FRF_AB_XM_XMIT_PAUSE_LBN 1
1900 #define	FRF_AB_XM_XMIT_PAUSE_WIDTH 1
1901 #define	FRF_AB_XM_DIS_FCNTL_LBN 0
1902 #define	FRF_AB_XM_DIS_FCNTL_WIDTH 1
1903 
1904 /* XM_PAUSE_TIME_REG: XGMAC pause time register */
1905 #define	FR_AB_XM_PAUSE_TIME 0x00001290
1906 #define	FRF_AB_XM_TX_PAUSE_CNT_LBN 16
1907 #define	FRF_AB_XM_TX_PAUSE_CNT_WIDTH 16
1908 #define	FRF_AB_XM_RX_PAUSE_CNT_LBN 0
1909 #define	FRF_AB_XM_RX_PAUSE_CNT_WIDTH 16
1910 
1911 /* XM_TX_PARAM_REG: XGMAC transmit parameter register */
1912 #define	FR_AB_XM_TX_PARAM 0x000012d0
1913 #define	FRF_AB_XM_TX_JUMBO_MODE_LBN 31
1914 #define	FRF_AB_XM_TX_JUMBO_MODE_WIDTH 1
1915 #define	FRF_AB_XM_MAX_TX_FRM_SIZE_HI_LBN 19
1916 #define	FRF_AB_XM_MAX_TX_FRM_SIZE_HI_WIDTH 11
1917 #define	FRF_AB_XM_MAX_TX_FRM_SIZE_LO_LBN 16
1918 #define	FRF_AB_XM_MAX_TX_FRM_SIZE_LO_WIDTH 3
1919 #define	FRF_AB_XM_PAD_CHAR_LBN 0
1920 #define	FRF_AB_XM_PAD_CHAR_WIDTH 8
1921 
1922 /* XM_RX_PARAM_REG: XGMAC receive parameter register */
1923 #define	FR_AB_XM_RX_PARAM 0x000012e0
1924 #define	FRF_AB_XM_MAX_RX_FRM_SIZE_HI_LBN 3
1925 #define	FRF_AB_XM_MAX_RX_FRM_SIZE_HI_WIDTH 11
1926 #define	FRF_AB_XM_MAX_RX_FRM_SIZE_LO_LBN 0
1927 #define	FRF_AB_XM_MAX_RX_FRM_SIZE_LO_WIDTH 3
1928 
1929 /* XM_MGT_INT_MSK_REG: XGMAC management interrupt mask register */
1930 #define	FR_AB_XM_MGT_INT_MSK 0x000012f0
1931 #define	FRF_AB_XM_STAT_CNTR_OF_LBN 9
1932 #define	FRF_AB_XM_STAT_CNTR_OF_WIDTH 1
1933 #define	FRF_AB_XM_STAT_CNTR_HF_LBN 8
1934 #define	FRF_AB_XM_STAT_CNTR_HF_WIDTH 1
1935 #define	FRF_AB_XM_PRMBLE_ERR_LBN 2
1936 #define	FRF_AB_XM_PRMBLE_ERR_WIDTH 1
1937 #define	FRF_AB_XM_RMTFLT_LBN 1
1938 #define	FRF_AB_XM_RMTFLT_WIDTH 1
1939 #define	FRF_AB_XM_LCLFLT_LBN 0
1940 #define	FRF_AB_XM_LCLFLT_WIDTH 1
1941 
1942 /* XX_PWR_RST_REG: XGXS/XAUI powerdown/reset register */
1943 #define	FR_AB_XX_PWR_RST 0x00001300
1944 #define	FRF_AB_XX_PWRDND_SIG_LBN 31
1945 #define	FRF_AB_XX_PWRDND_SIG_WIDTH 1
1946 #define	FRF_AB_XX_PWRDNC_SIG_LBN 30
1947 #define	FRF_AB_XX_PWRDNC_SIG_WIDTH 1
1948 #define	FRF_AB_XX_PWRDNB_SIG_LBN 29
1949 #define	FRF_AB_XX_PWRDNB_SIG_WIDTH 1
1950 #define	FRF_AB_XX_PWRDNA_SIG_LBN 28
1951 #define	FRF_AB_XX_PWRDNA_SIG_WIDTH 1
1952 #define	FRF_AB_XX_SIM_MODE_LBN 27
1953 #define	FRF_AB_XX_SIM_MODE_WIDTH 1
1954 #define	FRF_AB_XX_RSTPLLCD_SIG_LBN 25
1955 #define	FRF_AB_XX_RSTPLLCD_SIG_WIDTH 1
1956 #define	FRF_AB_XX_RSTPLLAB_SIG_LBN 24
1957 #define	FRF_AB_XX_RSTPLLAB_SIG_WIDTH 1
1958 #define	FRF_AB_XX_RESETD_SIG_LBN 23
1959 #define	FRF_AB_XX_RESETD_SIG_WIDTH 1
1960 #define	FRF_AB_XX_RESETC_SIG_LBN 22
1961 #define	FRF_AB_XX_RESETC_SIG_WIDTH 1
1962 #define	FRF_AB_XX_RESETB_SIG_LBN 21
1963 #define	FRF_AB_XX_RESETB_SIG_WIDTH 1
1964 #define	FRF_AB_XX_RESETA_SIG_LBN 20
1965 #define	FRF_AB_XX_RESETA_SIG_WIDTH 1
1966 #define	FRF_AB_XX_RSTXGXSRX_SIG_LBN 18
1967 #define	FRF_AB_XX_RSTXGXSRX_SIG_WIDTH 1
1968 #define	FRF_AB_XX_RSTXGXSTX_SIG_LBN 17
1969 #define	FRF_AB_XX_RSTXGXSTX_SIG_WIDTH 1
1970 #define	FRF_AB_XX_SD_RST_ACT_LBN 16
1971 #define	FRF_AB_XX_SD_RST_ACT_WIDTH 1
1972 #define	FRF_AB_XX_PWRDND_EN_LBN 15
1973 #define	FRF_AB_XX_PWRDND_EN_WIDTH 1
1974 #define	FRF_AB_XX_PWRDNC_EN_LBN 14
1975 #define	FRF_AB_XX_PWRDNC_EN_WIDTH 1
1976 #define	FRF_AB_XX_PWRDNB_EN_LBN 13
1977 #define	FRF_AB_XX_PWRDNB_EN_WIDTH 1
1978 #define	FRF_AB_XX_PWRDNA_EN_LBN 12
1979 #define	FRF_AB_XX_PWRDNA_EN_WIDTH 1
1980 #define	FRF_AB_XX_RSTPLLCD_EN_LBN 9
1981 #define	FRF_AB_XX_RSTPLLCD_EN_WIDTH 1
1982 #define	FRF_AB_XX_RSTPLLAB_EN_LBN 8
1983 #define	FRF_AB_XX_RSTPLLAB_EN_WIDTH 1
1984 #define	FRF_AB_XX_RESETD_EN_LBN 7
1985 #define	FRF_AB_XX_RESETD_EN_WIDTH 1
1986 #define	FRF_AB_XX_RESETC_EN_LBN 6
1987 #define	FRF_AB_XX_RESETC_EN_WIDTH 1
1988 #define	FRF_AB_XX_RESETB_EN_LBN 5
1989 #define	FRF_AB_XX_RESETB_EN_WIDTH 1
1990 #define	FRF_AB_XX_RESETA_EN_LBN 4
1991 #define	FRF_AB_XX_RESETA_EN_WIDTH 1
1992 #define	FRF_AB_XX_RSTXGXSRX_EN_LBN 2
1993 #define	FRF_AB_XX_RSTXGXSRX_EN_WIDTH 1
1994 #define	FRF_AB_XX_RSTXGXSTX_EN_LBN 1
1995 #define	FRF_AB_XX_RSTXGXSTX_EN_WIDTH 1
1996 #define	FRF_AB_XX_RST_XX_EN_LBN 0
1997 #define	FRF_AB_XX_RST_XX_EN_WIDTH 1
1998 
1999 /* XX_SD_CTL_REG: XGXS/XAUI powerdown/reset control register */
2000 #define	FR_AB_XX_SD_CTL 0x00001310
2001 #define	FRF_AB_XX_TERMADJ1_LBN 17
2002 #define	FRF_AB_XX_TERMADJ1_WIDTH 1
2003 #define	FRF_AB_XX_TERMADJ0_LBN 16
2004 #define	FRF_AB_XX_TERMADJ0_WIDTH 1
2005 #define	FRF_AB_XX_HIDRVD_LBN 15
2006 #define	FRF_AB_XX_HIDRVD_WIDTH 1
2007 #define	FRF_AB_XX_LODRVD_LBN 14
2008 #define	FRF_AB_XX_LODRVD_WIDTH 1
2009 #define	FRF_AB_XX_HIDRVC_LBN 13
2010 #define	FRF_AB_XX_HIDRVC_WIDTH 1
2011 #define	FRF_AB_XX_LODRVC_LBN 12
2012 #define	FRF_AB_XX_LODRVC_WIDTH 1
2013 #define	FRF_AB_XX_HIDRVB_LBN 11
2014 #define	FRF_AB_XX_HIDRVB_WIDTH 1
2015 #define	FRF_AB_XX_LODRVB_LBN 10
2016 #define	FRF_AB_XX_LODRVB_WIDTH 1
2017 #define	FRF_AB_XX_HIDRVA_LBN 9
2018 #define	FRF_AB_XX_HIDRVA_WIDTH 1
2019 #define	FRF_AB_XX_LODRVA_LBN 8
2020 #define	FRF_AB_XX_LODRVA_WIDTH 1
2021 #define	FRF_AB_XX_LPBKD_LBN 3
2022 #define	FRF_AB_XX_LPBKD_WIDTH 1
2023 #define	FRF_AB_XX_LPBKC_LBN 2
2024 #define	FRF_AB_XX_LPBKC_WIDTH 1
2025 #define	FRF_AB_XX_LPBKB_LBN 1
2026 #define	FRF_AB_XX_LPBKB_WIDTH 1
2027 #define	FRF_AB_XX_LPBKA_LBN 0
2028 #define	FRF_AB_XX_LPBKA_WIDTH 1
2029 
2030 /* XX_TXDRV_CTL_REG: XAUI SerDes transmit drive control register */
2031 #define	FR_AB_XX_TXDRV_CTL 0x00001320
2032 #define	FRF_AB_XX_DEQD_LBN 28
2033 #define	FRF_AB_XX_DEQD_WIDTH 4
2034 #define	FRF_AB_XX_DEQC_LBN 24
2035 #define	FRF_AB_XX_DEQC_WIDTH 4
2036 #define	FRF_AB_XX_DEQB_LBN 20
2037 #define	FRF_AB_XX_DEQB_WIDTH 4
2038 #define	FRF_AB_XX_DEQA_LBN 16
2039 #define	FRF_AB_XX_DEQA_WIDTH 4
2040 #define	FRF_AB_XX_DTXD_LBN 12
2041 #define	FRF_AB_XX_DTXD_WIDTH 4
2042 #define	FRF_AB_XX_DTXC_LBN 8
2043 #define	FRF_AB_XX_DTXC_WIDTH 4
2044 #define	FRF_AB_XX_DTXB_LBN 4
2045 #define	FRF_AB_XX_DTXB_WIDTH 4
2046 #define	FRF_AB_XX_DTXA_LBN 0
2047 #define	FRF_AB_XX_DTXA_WIDTH 4
2048 
2049 /* XX_PRBS_CTL_REG: documentation to be written for sum_XX_PRBS_CTL_REG */
2050 #define	FR_AB_XX_PRBS_CTL 0x00001330
2051 #define	FRF_AB_XX_CH3_RX_PRBS_SEL_LBN 30
2052 #define	FRF_AB_XX_CH3_RX_PRBS_SEL_WIDTH 2
2053 #define	FRF_AB_XX_CH3_RX_PRBS_INV_LBN 29
2054 #define	FRF_AB_XX_CH3_RX_PRBS_INV_WIDTH 1
2055 #define	FRF_AB_XX_CH3_RX_PRBS_CHKEN_LBN 28
2056 #define	FRF_AB_XX_CH3_RX_PRBS_CHKEN_WIDTH 1
2057 #define	FRF_AB_XX_CH2_RX_PRBS_SEL_LBN 26
2058 #define	FRF_AB_XX_CH2_RX_PRBS_SEL_WIDTH 2
2059 #define	FRF_AB_XX_CH2_RX_PRBS_INV_LBN 25
2060 #define	FRF_AB_XX_CH2_RX_PRBS_INV_WIDTH 1
2061 #define	FRF_AB_XX_CH2_RX_PRBS_CHKEN_LBN 24
2062 #define	FRF_AB_XX_CH2_RX_PRBS_CHKEN_WIDTH 1
2063 #define	FRF_AB_XX_CH1_RX_PRBS_SEL_LBN 22
2064 #define	FRF_AB_XX_CH1_RX_PRBS_SEL_WIDTH 2
2065 #define	FRF_AB_XX_CH1_RX_PRBS_INV_LBN 21
2066 #define	FRF_AB_XX_CH1_RX_PRBS_INV_WIDTH 1
2067 #define	FRF_AB_XX_CH1_RX_PRBS_CHKEN_LBN 20
2068 #define	FRF_AB_XX_CH1_RX_PRBS_CHKEN_WIDTH 1
2069 #define	FRF_AB_XX_CH0_RX_PRBS_SEL_LBN 18
2070 #define	FRF_AB_XX_CH0_RX_PRBS_SEL_WIDTH 2
2071 #define	FRF_AB_XX_CH0_RX_PRBS_INV_LBN 17
2072 #define	FRF_AB_XX_CH0_RX_PRBS_INV_WIDTH 1
2073 #define	FRF_AB_XX_CH0_RX_PRBS_CHKEN_LBN 16
2074 #define	FRF_AB_XX_CH0_RX_PRBS_CHKEN_WIDTH 1
2075 #define	FRF_AB_XX_CH3_TX_PRBS_SEL_LBN 14
2076 #define	FRF_AB_XX_CH3_TX_PRBS_SEL_WIDTH 2
2077 #define	FRF_AB_XX_CH3_TX_PRBS_INV_LBN 13
2078 #define	FRF_AB_XX_CH3_TX_PRBS_INV_WIDTH 1
2079 #define	FRF_AB_XX_CH3_TX_PRBS_CHKEN_LBN 12
2080 #define	FRF_AB_XX_CH3_TX_PRBS_CHKEN_WIDTH 1
2081 #define	FRF_AB_XX_CH2_TX_PRBS_SEL_LBN 10
2082 #define	FRF_AB_XX_CH2_TX_PRBS_SEL_WIDTH 2
2083 #define	FRF_AB_XX_CH2_TX_PRBS_INV_LBN 9
2084 #define	FRF_AB_XX_CH2_TX_PRBS_INV_WIDTH 1
2085 #define	FRF_AB_XX_CH2_TX_PRBS_CHKEN_LBN 8
2086 #define	FRF_AB_XX_CH2_TX_PRBS_CHKEN_WIDTH 1
2087 #define	FRF_AB_XX_CH1_TX_PRBS_SEL_LBN 6
2088 #define	FRF_AB_XX_CH1_TX_PRBS_SEL_WIDTH 2
2089 #define	FRF_AB_XX_CH1_TX_PRBS_INV_LBN 5
2090 #define	FRF_AB_XX_CH1_TX_PRBS_INV_WIDTH 1
2091 #define	FRF_AB_XX_CH1_TX_PRBS_CHKEN_LBN 4
2092 #define	FRF_AB_XX_CH1_TX_PRBS_CHKEN_WIDTH 1
2093 #define	FRF_AB_XX_CH0_TX_PRBS_SEL_LBN 2
2094 #define	FRF_AB_XX_CH0_TX_PRBS_SEL_WIDTH 2
2095 #define	FRF_AB_XX_CH0_TX_PRBS_INV_LBN 1
2096 #define	FRF_AB_XX_CH0_TX_PRBS_INV_WIDTH 1
2097 #define	FRF_AB_XX_CH0_TX_PRBS_CHKEN_LBN 0
2098 #define	FRF_AB_XX_CH0_TX_PRBS_CHKEN_WIDTH 1
2099 
2100 /* XX_PRBS_CHK_REG: documentation to be written for sum_XX_PRBS_CHK_REG */
2101 #define	FR_AB_XX_PRBS_CHK 0x00001340
2102 #define	FRF_AB_XX_REV_LB_EN_LBN 16
2103 #define	FRF_AB_XX_REV_LB_EN_WIDTH 1
2104 #define	FRF_AB_XX_CH3_DEG_DET_LBN 15
2105 #define	FRF_AB_XX_CH3_DEG_DET_WIDTH 1
2106 #define	FRF_AB_XX_CH3_LFSR_LOCK_IND_LBN 14
2107 #define	FRF_AB_XX_CH3_LFSR_LOCK_IND_WIDTH 1
2108 #define	FRF_AB_XX_CH3_PRBS_FRUN_LBN 13
2109 #define	FRF_AB_XX_CH3_PRBS_FRUN_WIDTH 1
2110 #define	FRF_AB_XX_CH3_ERR_CHK_LBN 12
2111 #define	FRF_AB_XX_CH3_ERR_CHK_WIDTH 1
2112 #define	FRF_AB_XX_CH2_DEG_DET_LBN 11
2113 #define	FRF_AB_XX_CH2_DEG_DET_WIDTH 1
2114 #define	FRF_AB_XX_CH2_LFSR_LOCK_IND_LBN 10
2115 #define	FRF_AB_XX_CH2_LFSR_LOCK_IND_WIDTH 1
2116 #define	FRF_AB_XX_CH2_PRBS_FRUN_LBN 9
2117 #define	FRF_AB_XX_CH2_PRBS_FRUN_WIDTH 1
2118 #define	FRF_AB_XX_CH2_ERR_CHK_LBN 8
2119 #define	FRF_AB_XX_CH2_ERR_CHK_WIDTH 1
2120 #define	FRF_AB_XX_CH1_DEG_DET_LBN 7
2121 #define	FRF_AB_XX_CH1_DEG_DET_WIDTH 1
2122 #define	FRF_AB_XX_CH1_LFSR_LOCK_IND_LBN 6
2123 #define	FRF_AB_XX_CH1_LFSR_LOCK_IND_WIDTH 1
2124 #define	FRF_AB_XX_CH1_PRBS_FRUN_LBN 5
2125 #define	FRF_AB_XX_CH1_PRBS_FRUN_WIDTH 1
2126 #define	FRF_AB_XX_CH1_ERR_CHK_LBN 4
2127 #define	FRF_AB_XX_CH1_ERR_CHK_WIDTH 1
2128 #define	FRF_AB_XX_CH0_DEG_DET_LBN 3
2129 #define	FRF_AB_XX_CH0_DEG_DET_WIDTH 1
2130 #define	FRF_AB_XX_CH0_LFSR_LOCK_IND_LBN 2
2131 #define	FRF_AB_XX_CH0_LFSR_LOCK_IND_WIDTH 1
2132 #define	FRF_AB_XX_CH0_PRBS_FRUN_LBN 1
2133 #define	FRF_AB_XX_CH0_PRBS_FRUN_WIDTH 1
2134 #define	FRF_AB_XX_CH0_ERR_CHK_LBN 0
2135 #define	FRF_AB_XX_CH0_ERR_CHK_WIDTH 1
2136 
2137 /* XX_PRBS_ERR_REG: documentation to be written for sum_XX_PRBS_ERR_REG */
2138 #define	FR_AB_XX_PRBS_ERR 0x00001350
2139 #define	FRF_AB_XX_CH3_PRBS_ERR_CNT_LBN 24
2140 #define	FRF_AB_XX_CH3_PRBS_ERR_CNT_WIDTH 8
2141 #define	FRF_AB_XX_CH2_PRBS_ERR_CNT_LBN 16
2142 #define	FRF_AB_XX_CH2_PRBS_ERR_CNT_WIDTH 8
2143 #define	FRF_AB_XX_CH1_PRBS_ERR_CNT_LBN 8
2144 #define	FRF_AB_XX_CH1_PRBS_ERR_CNT_WIDTH 8
2145 #define	FRF_AB_XX_CH0_PRBS_ERR_CNT_LBN 0
2146 #define	FRF_AB_XX_CH0_PRBS_ERR_CNT_WIDTH 8
2147 
2148 /* XX_CORE_STAT_REG: XAUI XGXS core status register */
2149 #define	FR_AB_XX_CORE_STAT 0x00001360
2150 #define	FRF_AB_XX_FORCE_SIG3_LBN 31
2151 #define	FRF_AB_XX_FORCE_SIG3_WIDTH 1
2152 #define	FRF_AB_XX_FORCE_SIG3_VAL_LBN 30
2153 #define	FRF_AB_XX_FORCE_SIG3_VAL_WIDTH 1
2154 #define	FRF_AB_XX_FORCE_SIG2_LBN 29
2155 #define	FRF_AB_XX_FORCE_SIG2_WIDTH 1
2156 #define	FRF_AB_XX_FORCE_SIG2_VAL_LBN 28
2157 #define	FRF_AB_XX_FORCE_SIG2_VAL_WIDTH 1
2158 #define	FRF_AB_XX_FORCE_SIG1_LBN 27
2159 #define	FRF_AB_XX_FORCE_SIG1_WIDTH 1
2160 #define	FRF_AB_XX_FORCE_SIG1_VAL_LBN 26
2161 #define	FRF_AB_XX_FORCE_SIG1_VAL_WIDTH 1
2162 #define	FRF_AB_XX_FORCE_SIG0_LBN 25
2163 #define	FRF_AB_XX_FORCE_SIG0_WIDTH 1
2164 #define	FRF_AB_XX_FORCE_SIG0_VAL_LBN 24
2165 #define	FRF_AB_XX_FORCE_SIG0_VAL_WIDTH 1
2166 #define	FRF_AB_XX_XGXS_LB_EN_LBN 23
2167 #define	FRF_AB_XX_XGXS_LB_EN_WIDTH 1
2168 #define	FRF_AB_XX_XGMII_LB_EN_LBN 22
2169 #define	FRF_AB_XX_XGMII_LB_EN_WIDTH 1
2170 #define	FRF_AB_XX_MATCH_FAULT_LBN 21
2171 #define	FRF_AB_XX_MATCH_FAULT_WIDTH 1
2172 #define	FRF_AB_XX_ALIGN_DONE_LBN 20
2173 #define	FRF_AB_XX_ALIGN_DONE_WIDTH 1
2174 #define	FRF_AB_XX_SYNC_STAT3_LBN 19
2175 #define	FRF_AB_XX_SYNC_STAT3_WIDTH 1
2176 #define	FRF_AB_XX_SYNC_STAT2_LBN 18
2177 #define	FRF_AB_XX_SYNC_STAT2_WIDTH 1
2178 #define	FRF_AB_XX_SYNC_STAT1_LBN 17
2179 #define	FRF_AB_XX_SYNC_STAT1_WIDTH 1
2180 #define	FRF_AB_XX_SYNC_STAT0_LBN 16
2181 #define	FRF_AB_XX_SYNC_STAT0_WIDTH 1
2182 #define	FRF_AB_XX_COMMA_DET_CH3_LBN 15
2183 #define	FRF_AB_XX_COMMA_DET_CH3_WIDTH 1
2184 #define	FRF_AB_XX_COMMA_DET_CH2_LBN 14
2185 #define	FRF_AB_XX_COMMA_DET_CH2_WIDTH 1
2186 #define	FRF_AB_XX_COMMA_DET_CH1_LBN 13
2187 #define	FRF_AB_XX_COMMA_DET_CH1_WIDTH 1
2188 #define	FRF_AB_XX_COMMA_DET_CH0_LBN 12
2189 #define	FRF_AB_XX_COMMA_DET_CH0_WIDTH 1
2190 #define	FRF_AB_XX_CGRP_ALIGN_CH3_LBN 11
2191 #define	FRF_AB_XX_CGRP_ALIGN_CH3_WIDTH 1
2192 #define	FRF_AB_XX_CGRP_ALIGN_CH2_LBN 10
2193 #define	FRF_AB_XX_CGRP_ALIGN_CH2_WIDTH 1
2194 #define	FRF_AB_XX_CGRP_ALIGN_CH1_LBN 9
2195 #define	FRF_AB_XX_CGRP_ALIGN_CH1_WIDTH 1
2196 #define	FRF_AB_XX_CGRP_ALIGN_CH0_LBN 8
2197 #define	FRF_AB_XX_CGRP_ALIGN_CH0_WIDTH 1
2198 #define	FRF_AB_XX_CHAR_ERR_CH3_LBN 7
2199 #define	FRF_AB_XX_CHAR_ERR_CH3_WIDTH 1
2200 #define	FRF_AB_XX_CHAR_ERR_CH2_LBN 6
2201 #define	FRF_AB_XX_CHAR_ERR_CH2_WIDTH 1
2202 #define	FRF_AB_XX_CHAR_ERR_CH1_LBN 5
2203 #define	FRF_AB_XX_CHAR_ERR_CH1_WIDTH 1
2204 #define	FRF_AB_XX_CHAR_ERR_CH0_LBN 4
2205 #define	FRF_AB_XX_CHAR_ERR_CH0_WIDTH 1
2206 #define	FRF_AB_XX_DISPERR_CH3_LBN 3
2207 #define	FRF_AB_XX_DISPERR_CH3_WIDTH 1
2208 #define	FRF_AB_XX_DISPERR_CH2_LBN 2
2209 #define	FRF_AB_XX_DISPERR_CH2_WIDTH 1
2210 #define	FRF_AB_XX_DISPERR_CH1_LBN 1
2211 #define	FRF_AB_XX_DISPERR_CH1_WIDTH 1
2212 #define	FRF_AB_XX_DISPERR_CH0_LBN 0
2213 #define	FRF_AB_XX_DISPERR_CH0_WIDTH 1
2214 
2215 /* RX_DESC_PTR_TBL_KER: Receive descriptor pointer table */
2216 #define	FR_AA_RX_DESC_PTR_TBL_KER 0x00011800
2217 #define	FR_AA_RX_DESC_PTR_TBL_KER_STEP 16
2218 #define	FR_AA_RX_DESC_PTR_TBL_KER_ROWS 4
2219 /* RX_DESC_PTR_TBL: Receive descriptor pointer table */
2220 #define	FR_BZ_RX_DESC_PTR_TBL 0x00f40000
2221 #define	FR_BZ_RX_DESC_PTR_TBL_STEP 16
2222 #define	FR_BB_RX_DESC_PTR_TBL_ROWS 4096
2223 #define	FR_CZ_RX_DESC_PTR_TBL_ROWS 1024
2224 #define	FRF_CZ_RX_HDR_SPLIT_LBN 90
2225 #define	FRF_CZ_RX_HDR_SPLIT_WIDTH 1
2226 #define	FRF_AA_RX_RESET_LBN 89
2227 #define	FRF_AA_RX_RESET_WIDTH 1
2228 #define	FRF_AZ_RX_ISCSI_DDIG_EN_LBN 88
2229 #define	FRF_AZ_RX_ISCSI_DDIG_EN_WIDTH 1
2230 #define	FRF_AZ_RX_ISCSI_HDIG_EN_LBN 87
2231 #define	FRF_AZ_RX_ISCSI_HDIG_EN_WIDTH 1
2232 #define	FRF_AZ_RX_DESC_PREF_ACT_LBN 86
2233 #define	FRF_AZ_RX_DESC_PREF_ACT_WIDTH 1
2234 #define	FRF_AZ_RX_DC_HW_RPTR_LBN 80
2235 #define	FRF_AZ_RX_DC_HW_RPTR_WIDTH 6
2236 #define	FRF_AZ_RX_DESCQ_HW_RPTR_LBN 68
2237 #define	FRF_AZ_RX_DESCQ_HW_RPTR_WIDTH 12
2238 #define	FRF_AZ_RX_DESCQ_SW_WPTR_LBN 56
2239 #define	FRF_AZ_RX_DESCQ_SW_WPTR_WIDTH 12
2240 #define	FRF_AZ_RX_DESCQ_BUF_BASE_ID_LBN 36
2241 #define	FRF_AZ_RX_DESCQ_BUF_BASE_ID_WIDTH 20
2242 #define	FRF_AZ_RX_DESCQ_EVQ_ID_LBN 24
2243 #define	FRF_AZ_RX_DESCQ_EVQ_ID_WIDTH 12
2244 #define	FRF_AZ_RX_DESCQ_OWNER_ID_LBN 10
2245 #define	FRF_AZ_RX_DESCQ_OWNER_ID_WIDTH 14
2246 #define	FRF_AZ_RX_DESCQ_LABEL_LBN 5
2247 #define	FRF_AZ_RX_DESCQ_LABEL_WIDTH 5
2248 #define	FRF_AZ_RX_DESCQ_SIZE_LBN 3
2249 #define	FRF_AZ_RX_DESCQ_SIZE_WIDTH 2
2250 #define	FFE_AZ_RX_DESCQ_SIZE_4K 3
2251 #define	FFE_AZ_RX_DESCQ_SIZE_2K 2
2252 #define	FFE_AZ_RX_DESCQ_SIZE_1K 1
2253 #define	FFE_AZ_RX_DESCQ_SIZE_512 0
2254 #define	FRF_AZ_RX_DESCQ_TYPE_LBN 2
2255 #define	FRF_AZ_RX_DESCQ_TYPE_WIDTH 1
2256 #define	FRF_AZ_RX_DESCQ_JUMBO_LBN 1
2257 #define	FRF_AZ_RX_DESCQ_JUMBO_WIDTH 1
2258 #define	FRF_AZ_RX_DESCQ_EN_LBN 0
2259 #define	FRF_AZ_RX_DESCQ_EN_WIDTH 1
2260 
2261 /* TX_DESC_PTR_TBL_KER: Transmit descriptor pointer */
2262 #define	FR_AA_TX_DESC_PTR_TBL_KER 0x00011900
2263 #define	FR_AA_TX_DESC_PTR_TBL_KER_STEP 16
2264 #define	FR_AA_TX_DESC_PTR_TBL_KER_ROWS 8
2265 /* TX_DESC_PTR_TBL: Transmit descriptor pointer */
2266 #define	FR_BZ_TX_DESC_PTR_TBL 0x00f50000
2267 #define	FR_BZ_TX_DESC_PTR_TBL_STEP 16
2268 #define	FR_BB_TX_DESC_PTR_TBL_ROWS 4096
2269 #define	FR_CZ_TX_DESC_PTR_TBL_ROWS 1024
2270 #define	FRF_CZ_TX_DPT_Q_MASK_WIDTH_LBN 94
2271 #define	FRF_CZ_TX_DPT_Q_MASK_WIDTH_WIDTH 2
2272 #define	FRF_CZ_TX_DPT_ETH_FILT_EN_LBN 93
2273 #define	FRF_CZ_TX_DPT_ETH_FILT_EN_WIDTH 1
2274 #define	FRF_CZ_TX_DPT_IP_FILT_EN_LBN 92
2275 #define	FRF_CZ_TX_DPT_IP_FILT_EN_WIDTH 1
2276 #define	FRF_BZ_TX_NON_IP_DROP_DIS_LBN 91
2277 #define	FRF_BZ_TX_NON_IP_DROP_DIS_WIDTH 1
2278 #define	FRF_BZ_TX_IP_CHKSM_DIS_LBN 90
2279 #define	FRF_BZ_TX_IP_CHKSM_DIS_WIDTH 1
2280 #define	FRF_BZ_TX_TCP_CHKSM_DIS_LBN 89
2281 #define	FRF_BZ_TX_TCP_CHKSM_DIS_WIDTH 1
2282 #define	FRF_AZ_TX_DESCQ_EN_LBN 88
2283 #define	FRF_AZ_TX_DESCQ_EN_WIDTH 1
2284 #define	FRF_AZ_TX_ISCSI_DDIG_EN_LBN 87
2285 #define	FRF_AZ_TX_ISCSI_DDIG_EN_WIDTH 1
2286 #define	FRF_AZ_TX_ISCSI_HDIG_EN_LBN 86
2287 #define	FRF_AZ_TX_ISCSI_HDIG_EN_WIDTH 1
2288 #define	FRF_AZ_TX_DC_HW_RPTR_LBN 80
2289 #define	FRF_AZ_TX_DC_HW_RPTR_WIDTH 6
2290 #define	FRF_AZ_TX_DESCQ_HW_RPTR_LBN 68
2291 #define	FRF_AZ_TX_DESCQ_HW_RPTR_WIDTH 12
2292 #define	FRF_AZ_TX_DESCQ_SW_WPTR_LBN 56
2293 #define	FRF_AZ_TX_DESCQ_SW_WPTR_WIDTH 12
2294 #define	FRF_AZ_TX_DESCQ_BUF_BASE_ID_LBN 36
2295 #define	FRF_AZ_TX_DESCQ_BUF_BASE_ID_WIDTH 20
2296 #define	FRF_AZ_TX_DESCQ_EVQ_ID_LBN 24
2297 #define	FRF_AZ_TX_DESCQ_EVQ_ID_WIDTH 12
2298 #define	FRF_AZ_TX_DESCQ_OWNER_ID_LBN 10
2299 #define	FRF_AZ_TX_DESCQ_OWNER_ID_WIDTH 14
2300 #define	FRF_AZ_TX_DESCQ_LABEL_LBN 5
2301 #define	FRF_AZ_TX_DESCQ_LABEL_WIDTH 5
2302 #define	FRF_AZ_TX_DESCQ_SIZE_LBN 3
2303 #define	FRF_AZ_TX_DESCQ_SIZE_WIDTH 2
2304 #define	FFE_AZ_TX_DESCQ_SIZE_4K 3
2305 #define	FFE_AZ_TX_DESCQ_SIZE_2K 2
2306 #define	FFE_AZ_TX_DESCQ_SIZE_1K 1
2307 #define	FFE_AZ_TX_DESCQ_SIZE_512 0
2308 #define	FRF_AZ_TX_DESCQ_TYPE_LBN 1
2309 #define	FRF_AZ_TX_DESCQ_TYPE_WIDTH 2
2310 #define	FRF_AZ_TX_DESCQ_FLUSH_LBN 0
2311 #define	FRF_AZ_TX_DESCQ_FLUSH_WIDTH 1
2312 
2313 /* EVQ_PTR_TBL_KER: Event queue pointer table */
2314 #define	FR_AA_EVQ_PTR_TBL_KER 0x00011a00
2315 #define	FR_AA_EVQ_PTR_TBL_KER_STEP 16
2316 #define	FR_AA_EVQ_PTR_TBL_KER_ROWS 4
2317 /* EVQ_PTR_TBL: Event queue pointer table */
2318 #define	FR_BZ_EVQ_PTR_TBL 0x00f60000
2319 #define	FR_BZ_EVQ_PTR_TBL_STEP 16
2320 #define	FR_CZ_EVQ_PTR_TBL_ROWS 1024
2321 #define	FR_BB_EVQ_PTR_TBL_ROWS 4096
2322 #define	FRF_BZ_EVQ_RPTR_IGN_LBN 40
2323 #define	FRF_BZ_EVQ_RPTR_IGN_WIDTH 1
2324 #define	FRF_AB_EVQ_WKUP_OR_INT_EN_LBN 39
2325 #define	FRF_AB_EVQ_WKUP_OR_INT_EN_WIDTH 1
2326 #define	FRF_CZ_EVQ_DOS_PROTECT_EN_LBN 39
2327 #define	FRF_CZ_EVQ_DOS_PROTECT_EN_WIDTH 1
2328 #define	FRF_AZ_EVQ_NXT_WPTR_LBN 24
2329 #define	FRF_AZ_EVQ_NXT_WPTR_WIDTH 15
2330 #define	FRF_AZ_EVQ_EN_LBN 23
2331 #define	FRF_AZ_EVQ_EN_WIDTH 1
2332 #define	FRF_AZ_EVQ_SIZE_LBN 20
2333 #define	FRF_AZ_EVQ_SIZE_WIDTH 3
2334 #define	FFE_AZ_EVQ_SIZE_32K 6
2335 #define	FFE_AZ_EVQ_SIZE_16K 5
2336 #define	FFE_AZ_EVQ_SIZE_8K 4
2337 #define	FFE_AZ_EVQ_SIZE_4K 3
2338 #define	FFE_AZ_EVQ_SIZE_2K 2
2339 #define	FFE_AZ_EVQ_SIZE_1K 1
2340 #define	FFE_AZ_EVQ_SIZE_512 0
2341 #define	FRF_AZ_EVQ_BUF_BASE_ID_LBN 0
2342 #define	FRF_AZ_EVQ_BUF_BASE_ID_WIDTH 20
2343 
2344 /* BUF_HALF_TBL_KER: Buffer table in half buffer table mode direct access by driver */
2345 #define	FR_AA_BUF_HALF_TBL_KER 0x00018000
2346 #define	FR_AA_BUF_HALF_TBL_KER_STEP 8
2347 #define	FR_AA_BUF_HALF_TBL_KER_ROWS 4096
2348 /* BUF_HALF_TBL: Buffer table in half buffer table mode direct access by driver */
2349 #define	FR_BZ_BUF_HALF_TBL 0x00800000
2350 #define	FR_BZ_BUF_HALF_TBL_STEP 8
2351 #define	FR_CZ_BUF_HALF_TBL_ROWS 147456
2352 #define	FR_BB_BUF_HALF_TBL_ROWS 524288
2353 #define	FRF_AZ_BUF_ADR_HBUF_ODD_LBN 44
2354 #define	FRF_AZ_BUF_ADR_HBUF_ODD_WIDTH 20
2355 #define	FRF_AZ_BUF_OWNER_ID_HBUF_ODD_LBN 32
2356 #define	FRF_AZ_BUF_OWNER_ID_HBUF_ODD_WIDTH 12
2357 #define	FRF_AZ_BUF_ADR_HBUF_EVEN_LBN 12
2358 #define	FRF_AZ_BUF_ADR_HBUF_EVEN_WIDTH 20
2359 #define	FRF_AZ_BUF_OWNER_ID_HBUF_EVEN_LBN 0
2360 #define	FRF_AZ_BUF_OWNER_ID_HBUF_EVEN_WIDTH 12
2361 
2362 /* BUF_FULL_TBL_KER: Buffer table in full buffer table mode direct access by driver */
2363 #define	FR_AA_BUF_FULL_TBL_KER 0x00018000
2364 #define	FR_AA_BUF_FULL_TBL_KER_STEP 8
2365 #define	FR_AA_BUF_FULL_TBL_KER_ROWS 4096
2366 /* BUF_FULL_TBL: Buffer table in full buffer table mode direct access by driver */
2367 #define	FR_BZ_BUF_FULL_TBL 0x00800000
2368 #define	FR_BZ_BUF_FULL_TBL_STEP 8
2369 #define	FR_CZ_BUF_FULL_TBL_ROWS 147456
2370 #define	FR_BB_BUF_FULL_TBL_ROWS 917504
2371 #define	FRF_AZ_BUF_FULL_UNUSED_LBN 51
2372 #define	FRF_AZ_BUF_FULL_UNUSED_WIDTH 13
2373 #define	FRF_AZ_IP_DAT_BUF_SIZE_LBN 50
2374 #define	FRF_AZ_IP_DAT_BUF_SIZE_WIDTH 1
2375 #define	FRF_AZ_BUF_ADR_REGION_LBN 48
2376 #define	FRF_AZ_BUF_ADR_REGION_WIDTH 2
2377 #define	FFE_AZ_BUF_ADR_REGN3 3
2378 #define	FFE_AZ_BUF_ADR_REGN2 2
2379 #define	FFE_AZ_BUF_ADR_REGN1 1
2380 #define	FFE_AZ_BUF_ADR_REGN0 0
2381 #define	FRF_AZ_BUF_ADR_FBUF_LBN 14
2382 #define	FRF_AZ_BUF_ADR_FBUF_WIDTH 34
2383 #define	FRF_AZ_BUF_OWNER_ID_FBUF_LBN 0
2384 #define	FRF_AZ_BUF_OWNER_ID_FBUF_WIDTH 14
2385 
2386 /* RX_FILTER_TBL0: TCP/IPv4 Receive filter table */
2387 #define	FR_BZ_RX_FILTER_TBL0 0x00f00000
2388 #define	FR_BZ_RX_FILTER_TBL0_STEP 32
2389 #define	FR_BZ_RX_FILTER_TBL0_ROWS 8192
2390 /* RX_FILTER_TBL1: TCP/IPv4 Receive filter table */
2391 #define	FR_BB_RX_FILTER_TBL1 0x00f00010
2392 #define	FR_BB_RX_FILTER_TBL1_STEP 32
2393 #define	FR_BB_RX_FILTER_TBL1_ROWS 8192
2394 #define	FRF_BZ_RSS_EN_LBN 110
2395 #define	FRF_BZ_RSS_EN_WIDTH 1
2396 #define	FRF_BZ_SCATTER_EN_LBN 109
2397 #define	FRF_BZ_SCATTER_EN_WIDTH 1
2398 #define	FRF_BZ_TCP_UDP_LBN 108
2399 #define	FRF_BZ_TCP_UDP_WIDTH 1
2400 #define	FRF_BZ_RXQ_ID_LBN 96
2401 #define	FRF_BZ_RXQ_ID_WIDTH 12
2402 #define	FRF_BZ_DEST_IP_LBN 64
2403 #define	FRF_BZ_DEST_IP_WIDTH 32
2404 #define	FRF_BZ_DEST_PORT_TCP_LBN 48
2405 #define	FRF_BZ_DEST_PORT_TCP_WIDTH 16
2406 #define	FRF_BZ_SRC_IP_LBN 16
2407 #define	FRF_BZ_SRC_IP_WIDTH 32
2408 #define	FRF_BZ_SRC_TCP_DEST_UDP_LBN 0
2409 #define	FRF_BZ_SRC_TCP_DEST_UDP_WIDTH 16
2410 
2411 /* RX_MAC_FILTER_TBL0: Receive Ethernet filter table */
2412 #define	FR_CZ_RX_MAC_FILTER_TBL0 0x00f00010
2413 #define	FR_CZ_RX_MAC_FILTER_TBL0_STEP 32
2414 #define	FR_CZ_RX_MAC_FILTER_TBL0_ROWS 512
2415 #define	FRF_CZ_RMFT_RSS_EN_LBN 75
2416 #define	FRF_CZ_RMFT_RSS_EN_WIDTH 1
2417 #define	FRF_CZ_RMFT_SCATTER_EN_LBN 74
2418 #define	FRF_CZ_RMFT_SCATTER_EN_WIDTH 1
2419 #define	FRF_CZ_RMFT_IP_OVERRIDE_LBN 73
2420 #define	FRF_CZ_RMFT_IP_OVERRIDE_WIDTH 1
2421 #define	FRF_CZ_RMFT_RXQ_ID_LBN 61
2422 #define	FRF_CZ_RMFT_RXQ_ID_WIDTH 12
2423 #define	FRF_CZ_RMFT_WILDCARD_MATCH_LBN 60
2424 #define	FRF_CZ_RMFT_WILDCARD_MATCH_WIDTH 1
2425 #define	FRF_CZ_RMFT_DEST_MAC_LBN 12
2426 #define	FRF_CZ_RMFT_DEST_MAC_WIDTH 48
2427 #define	FRF_CZ_RMFT_VLAN_ID_LBN 0
2428 #define	FRF_CZ_RMFT_VLAN_ID_WIDTH 12
2429 
2430 /* TIMER_TBL: Timer table */
2431 #define	FR_BZ_TIMER_TBL 0x00f70000
2432 #define	FR_BZ_TIMER_TBL_STEP 16
2433 #define	FR_CZ_TIMER_TBL_ROWS 1024
2434 #define	FR_BB_TIMER_TBL_ROWS 4096
2435 #define	FRF_CZ_TIMER_Q_EN_LBN 33
2436 #define	FRF_CZ_TIMER_Q_EN_WIDTH 1
2437 #define	FRF_CZ_INT_ARMD_LBN 32
2438 #define	FRF_CZ_INT_ARMD_WIDTH 1
2439 #define	FRF_CZ_INT_PEND_LBN 31
2440 #define	FRF_CZ_INT_PEND_WIDTH 1
2441 #define	FRF_CZ_HOST_NOTIFY_MODE_LBN 30
2442 #define	FRF_CZ_HOST_NOTIFY_MODE_WIDTH 1
2443 #define	FRF_CZ_RELOAD_TIMER_VAL_LBN 16
2444 #define	FRF_CZ_RELOAD_TIMER_VAL_WIDTH 14
2445 #define	FRF_CZ_TIMER_MODE_LBN 14
2446 #define	FRF_CZ_TIMER_MODE_WIDTH 2
2447 #define	FFE_CZ_TIMER_MODE_INT_HLDOFF 3
2448 #define	FFE_CZ_TIMER_MODE_TRIG_START 2
2449 #define	FFE_CZ_TIMER_MODE_IMMED_START 1
2450 #define	FFE_CZ_TIMER_MODE_DIS 0
2451 #define	FRF_BB_TIMER_MODE_LBN 12
2452 #define	FRF_BB_TIMER_MODE_WIDTH 2
2453 #define	FFE_BB_TIMER_MODE_INT_HLDOFF 2
2454 #define	FFE_BB_TIMER_MODE_TRIG_START 2
2455 #define	FFE_BB_TIMER_MODE_IMMED_START 1
2456 #define	FFE_BB_TIMER_MODE_DIS 0
2457 #define	FRF_CZ_TIMER_VAL_LBN 0
2458 #define	FRF_CZ_TIMER_VAL_WIDTH 14
2459 #define	FRF_BB_TIMER_VAL_LBN 0
2460 #define	FRF_BB_TIMER_VAL_WIDTH 12
2461 
2462 /* TX_PACE_TBL: Transmit pacing table */
2463 #define	FR_BZ_TX_PACE_TBL 0x00f80000
2464 #define	FR_BZ_TX_PACE_TBL_STEP 16
2465 #define	FR_CZ_TX_PACE_TBL_ROWS 1024
2466 #define	FR_BB_TX_PACE_TBL_ROWS 4096
2467 #define	FRF_BZ_TX_PACE_LBN 0
2468 #define	FRF_BZ_TX_PACE_WIDTH 5
2469 
2470 /* RX_INDIRECTION_TBL: RX Indirection Table */
2471 #define	FR_BZ_RX_INDIRECTION_TBL 0x00fb0000
2472 #define	FR_BZ_RX_INDIRECTION_TBL_STEP 16
2473 #define	FR_BZ_RX_INDIRECTION_TBL_ROWS 128
2474 #define	FRF_BZ_IT_QUEUE_LBN 0
2475 #define	FRF_BZ_IT_QUEUE_WIDTH 6
2476 
2477 /* TX_FILTER_TBL0: TCP/IPv4 Transmit filter table */
2478 #define	FR_CZ_TX_FILTER_TBL0 0x00fc0000
2479 #define	FR_CZ_TX_FILTER_TBL0_STEP 16
2480 #define	FR_CZ_TX_FILTER_TBL0_ROWS 8192
2481 #define	FRF_CZ_TIFT_TCP_UDP_LBN 108
2482 #define	FRF_CZ_TIFT_TCP_UDP_WIDTH 1
2483 #define	FRF_CZ_TIFT_TXQ_ID_LBN 96
2484 #define	FRF_CZ_TIFT_TXQ_ID_WIDTH 12
2485 #define	FRF_CZ_TIFT_DEST_IP_LBN 64
2486 #define	FRF_CZ_TIFT_DEST_IP_WIDTH 32
2487 #define	FRF_CZ_TIFT_DEST_PORT_TCP_LBN 48
2488 #define	FRF_CZ_TIFT_DEST_PORT_TCP_WIDTH 16
2489 #define	FRF_CZ_TIFT_SRC_IP_LBN 16
2490 #define	FRF_CZ_TIFT_SRC_IP_WIDTH 32
2491 #define	FRF_CZ_TIFT_SRC_TCP_DEST_UDP_LBN 0
2492 #define	FRF_CZ_TIFT_SRC_TCP_DEST_UDP_WIDTH 16
2493 
2494 /* TX_MAC_FILTER_TBL0: Transmit Ethernet filter table */
2495 #define	FR_CZ_TX_MAC_FILTER_TBL0 0x00fe0000
2496 #define	FR_CZ_TX_MAC_FILTER_TBL0_STEP 16
2497 #define	FR_CZ_TX_MAC_FILTER_TBL0_ROWS 512
2498 #define	FRF_CZ_TMFT_TXQ_ID_LBN 61
2499 #define	FRF_CZ_TMFT_TXQ_ID_WIDTH 12
2500 #define	FRF_CZ_TMFT_WILDCARD_MATCH_LBN 60
2501 #define	FRF_CZ_TMFT_WILDCARD_MATCH_WIDTH 1
2502 #define	FRF_CZ_TMFT_SRC_MAC_LBN 12
2503 #define	FRF_CZ_TMFT_SRC_MAC_WIDTH 48
2504 #define	FRF_CZ_TMFT_VLAN_ID_LBN 0
2505 #define	FRF_CZ_TMFT_VLAN_ID_WIDTH 12
2506 
2507 /* MC_TREG_SMEM: MC Shared Memory */
2508 #define	FR_CZ_MC_TREG_SMEM 0x00ff0000
2509 #define	FR_CZ_MC_TREG_SMEM_STEP 4
2510 #define	FR_CZ_MC_TREG_SMEM_ROWS 512
2511 #define	FRF_CZ_MC_TREG_SMEM_ROW_LBN 0
2512 #define	FRF_CZ_MC_TREG_SMEM_ROW_WIDTH 32
2513 
2514 /* EF10 architecture register definitions
2515  * (from linux/drivers/net/ethernet/sfc/ef10_regs.h)
2516  */
2517 
2518 /* BIU_HW_REV_ID_REG:  */
2519 #define	ER_DZ_BIU_HW_REV_ID 0x00000000
2520 #define	ERF_DZ_HW_REV_ID_LBN 0
2521 #define	ERF_DZ_HW_REV_ID_WIDTH 32
2522 
2523 /* BIU_MC_SFT_STATUS_REG:  */
2524 #define	ER_DZ_BIU_MC_SFT_STATUS 0x00000010
2525 #define	ER_DZ_BIU_MC_SFT_STATUS_STEP 4
2526 #define	ER_DZ_BIU_MC_SFT_STATUS_ROWS 8
2527 #define	ERF_DZ_MC_SFT_STATUS_LBN 0
2528 #define	ERF_DZ_MC_SFT_STATUS_WIDTH 32
2529 
2530 /* BIU_INT_ISR_REG:  */
2531 #define	ER_DZ_BIU_INT_ISR 0x00000090
2532 #define	ERF_DZ_ISR_REG_LBN 0
2533 #define	ERF_DZ_ISR_REG_WIDTH 32
2534 
2535 /* MC_DB_LWRD_REG:  */
2536 #define	ER_DZ_MC_DB_LWRD 0x00000200
2537 #define	ERF_DZ_MC_DOORBELL_L_LBN 0
2538 #define	ERF_DZ_MC_DOORBELL_L_WIDTH 32
2539 
2540 /* MC_DB_HWRD_REG:  */
2541 #define	ER_DZ_MC_DB_HWRD 0x00000204
2542 #define	ERF_DZ_MC_DOORBELL_H_LBN 0
2543 #define	ERF_DZ_MC_DOORBELL_H_WIDTH 32
2544 
2545 /*
2546  * Register dump definition.  This is mostly taken from
2547  * linux/drivers/net/ethernet/sfc/nic.c but has names and bitfield
2548  * definitions added.
2549  *
2550  * The definitions of efx_nic_regs and efx_nic_reg_tables should be
2551  * textually identical to those in the driver, though the structure
2552  * definitions and the macros REGISTER and REGISTER_TABLE_DIMENSIONS
2553  * are defined differently.
2554  */
2555 
2556 #define REGISTER_REVISION_FA	1
2557 #define REGISTER_REVISION_FB	2
2558 #define REGISTER_REVISION_FC	3
2559 #define REGISTER_REVISION_FZ	3	/* last Falcon arch revision */
2560 #define REGISTER_REVISION_ED	4
2561 #define REGISTER_REVISION_EZ	4	/* latest EF10 arch revision */
2562 
2563 struct efx_nic_reg_field {
2564 	const char *name;
2565 	u8 lbn, width;
2566 	u8 min_revision, max_revision;
2567 };
2568 
2569 #define REGISTER_FIELD_RENAME(name, display_name, arch, min_rev, max_rev) { \
2570 	display_name,							\
2571 	arch ## RF_ ## min_rev ## max_rev ## _ ## name ## _LBN,		\
2572 	arch ## RF_ ## min_rev ## max_rev ## _ ## name ## _WIDTH,	\
2573 	REGISTER_REVISION_ ## arch ## min_rev,				\
2574 	REGISTER_REVISION_ ## arch ## max_rev				\
2575 }
2576 #define REGISTER_FIELD(name, arch, min_rev, max_rev)			\
2577 	REGISTER_FIELD_RENAME(name, #name, arch, min_rev, max_rev)
2578 #define REGISTER_FIELD_AA(name) REGISTER_FIELD(name, F, A, A)
2579 #define REGISTER_FIELD_AB(name) REGISTER_FIELD(name, F, A, B)
2580 #define REGISTER_FIELD_AZ(name) REGISTER_FIELD(name, F, A, Z)
2581 #define REGISTER_FIELD_BB(name) REGISTER_FIELD(name, F, B, B)
2582 #define REGISTER_FIELD_BZ(name) REGISTER_FIELD(name, F, B, Z)
2583 #define REGISTER_FIELD_CZ(name) REGISTER_FIELD(name, F, C, Z)
2584 #define REGISTER_FIELD_DZ(name) REGISTER_FIELD(name, E, D, Z)
2585 #define REGISTER_FIELD_AZ_RENAME(name, display_name)	\
2586 	REGISTER_FIELD_RENAME(name, display_name, F, A, Z)
2587 #define REGISTER_FIELD_BZ_RENAME(name, display_name)	\
2588 	REGISTER_FIELD_RENAME(name, display_name, F, B, Z)
2589 #define REGISTER_FIELD_CZ_RENAME(name, display_name)	\
2590 	REGISTER_FIELD_RENAME(name, display_name, F, C, Z)
2591 
2592 static const struct efx_nic_reg_field efx_nic_reg_fields_ADR_REGION[] = {
2593 	REGISTER_FIELD_AZ(ADR_REGION0),
2594 	REGISTER_FIELD_AZ(ADR_REGION1),
2595 	REGISTER_FIELD_AZ(ADR_REGION2),
2596 	REGISTER_FIELD_AZ(ADR_REGION3),
2597 };
2598 static const struct efx_nic_reg_field efx_nic_reg_fields_INT_EN_KER[] = {
2599 	REGISTER_FIELD_AZ(DRV_INT_EN_KER),
2600 	REGISTER_FIELD_AZ(KER_INT_KER),
2601 	REGISTER_FIELD_AZ(KER_INT_CHAR),
2602 	REGISTER_FIELD_AZ(KER_INT_LEVE_SEL),
2603 };
2604 static const struct efx_nic_reg_field efx_nic_reg_fields_INT_EN_CHAR[] = {
2605 	REGISTER_FIELD_BZ(DRV_INT_EN_CHAR),
2606 	REGISTER_FIELD_BZ(CHAR_INT_KER),
2607 	REGISTER_FIELD_BZ(CHAR_INT_CHAR),
2608 	REGISTER_FIELD_BZ(CHAR_INT_LEVE_SEL),
2609 };
2610 static const struct efx_nic_reg_field efx_nic_reg_fields_INT_ADR_KER[] = {
2611 	REGISTER_FIELD_AZ(INT_ADR_KER),
2612 	REGISTER_FIELD_AZ(NORM_INT_VEC_DIS_KER),
2613 };
2614 static const struct efx_nic_reg_field efx_nic_reg_fields_INT_ADR_CHAR[] = {
2615 	REGISTER_FIELD_BZ(INT_ADR_CHAR),
2616 	REGISTER_FIELD_BZ(NORM_INT_VEC_DIS_CHAR),
2617 };
2618 static const struct efx_nic_reg_field efx_nic_reg_fields_HW_INIT[] = {
2619 	REGISTER_FIELD_AZ(TLP_TD),
2620 	REGISTER_FIELD_AZ(TD_SEL),
2621 	REGISTER_FIELD_AZ(ATTR_SEL),
2622 	REGISTER_FIELD_AZ(TLP_EP),
2623 	REGISTER_FIELD_AZ(US_DISABLE),
2624 	REGISTER_FIELD_AZ(WD_TIMER),
2625 	REGISTER_FIELD_AB(INTA_VEC),
2626 	REGISTER_FIELD_AB(INTB_VEC),
2627 	REGISTER_FIELD_AZ(TLP_ATTR),
2628 	REGISTER_FIELD_AZ(TLP_TC),
2629 	REGISTER_FIELD_AZ(POST_WR_MASK),
2630 	REGISTER_FIELD_BB(FC_BLOCKING_EN),
2631 	REGISTER_FIELD_AA(B2B_REQ_EN),
2632 	REGISTER_FIELD_BZ(B2B_REQ_EN),
2633 	REGISTER_FIELD_AA(FC_BLOCKING_EN),
2634 	REGISTER_FIELD_AB(PE_EIDLE_DIS),
2635 	REGISTER_FIELD_AB(TX_RREQ_MASK_EN),
2636 	REGISTER_FIELD_AZ(DOORBELL_DROP),
2637 	REGISTER_FIELD_AB(TRGT_MASK_ALL),
2638 	REGISTER_FIELD_CZ(TX_MRG_TAGS),
2639 	REGISTER_FIELD_BB(PCIE_CPL_TIMEOUT_CTRL),
2640 	REGISTER_FIELD_BB(BDMRD_CPLF_FULL),
2641 };
2642 static const struct efx_nic_reg_field efx_nic_reg_fields_USR_EV_CFG[] = {
2643 	REGISTER_FIELD_CZ(DFLT_EVQ),
2644 	REGISTER_FIELD_CZ(USREV_DIS),
2645 };
2646 static const struct efx_nic_reg_field efx_nic_reg_fields_EE_SPI_HCMD[] = {
2647 	REGISTER_FIELD_AB(EE_SPI_HCMD_ENC),
2648 	REGISTER_FIELD_AB(EE_SPI_HCMD_ADBCNT),
2649 	REGISTER_FIELD_AB(EE_SPI_HCMD_DUBCNT),
2650 	REGISTER_FIELD_AB(EE_SPI_HCMD_READ),
2651 	REGISTER_FIELD_AB(EE_SPI_HCMD_DABCNT),
2652 	REGISTER_FIELD_AB(EE_SPI_HCMD_SF_SEL),
2653 	REGISTER_FIELD_AB(EE_WR_TIMER_ACTIVE),
2654 	REGISTER_FIELD_AB(EE_SPI_HCMD_CMD_EN),
2655 };
2656 static const struct efx_nic_reg_field efx_nic_reg_fields_EE_SPI_HADR[] = {
2657 	REGISTER_FIELD_AB(EE_SPI_HADR_ADR),
2658 	REGISTER_FIELD_AB(EE_SPI_HADR_DUBYTE),
2659 };
2660 static const struct efx_nic_reg_field efx_nic_reg_fields_EE_SPI_HDATA[] = {
2661 	REGISTER_FIELD_AB(EE_SPI_HDATA0),
2662 	REGISTER_FIELD_AB(EE_SPI_HDATA1),
2663 	REGISTER_FIELD_AB(EE_SPI_HDATA2),
2664 	REGISTER_FIELD_AB(EE_SPI_HDATA3),
2665 };
2666 static const struct efx_nic_reg_field efx_nic_reg_fields_EE_BASE_PAGE[] = {
2667 	REGISTER_FIELD_AB(EE_EXP_ROM_WINDOW_BASE),
2668 	REGISTER_FIELD_AB(EE_EXPROM_MASK),
2669 };
2670 static const struct efx_nic_reg_field efx_nic_reg_fields_EE_VPD_CFG0[] = {
2671 	REGISTER_FIELD_AB(EE_VPD_EN),
2672 	REGISTER_FIELD_AB(EE_VPD_EN_AD9_MODE),
2673 	REGISTER_FIELD_AB(EE_VPD_DEV_SF_SEL),
2674 	REGISTER_FIELD_AB(EE_VPD_ACCESS_BLOCK),
2675 	REGISTER_FIELD_AB(EE_VPD_ACCESS_ON),
2676 	REGISTER_FIELD_AB(EE_VPD_AD_SIZE),
2677 	REGISTER_FIELD_AB(EE_VPD_LENGTH),
2678 	REGISTER_FIELD_AB(EE_VPD_BASE),
2679 	REGISTER_FIELD_AB(EE_VPD_WR_CMD_EN),
2680 	REGISTER_FIELD_AB(EE_VPDW_BASE),
2681 	REGISTER_FIELD_AB(EE_VPDW_LENGTH),
2682 	REGISTER_FIELD_AB(EE_EE_WR_TMR_VALUE),
2683 	REGISTER_FIELD_AB(EE_EE_CLOCK_DIV),
2684 	REGISTER_FIELD_AB(EE_VPD_WIP_POLL),
2685 	REGISTER_FIELD_AB(EE_SF_CLOCK_DIV),
2686 	REGISTER_FIELD_AB(EE_SF_FASTRD_EN),
2687 };
2688 static const struct efx_nic_reg_field efx_nic_reg_fields_NIC_STAT[] = {
2689 	REGISTER_FIELD_AB(STRAP_PINS),
2690 	REGISTER_FIELD_AB(ATE_MODE),
2691 	REGISTER_FIELD_AB(EE_PRST),
2692 	REGISTER_FIELD_AB(SF_PRST),
2693 	REGISTER_FIELD_AB(ONCHIP_SRAM),
2694 	REGISTER_FIELD_BB(REVISION_ID),
2695 	REGISTER_FIELD_BB(EE_STRAP),
2696 	REGISTER_FIELD_BB(EE_STRAP_EN),
2697 	REGISTER_FIELD_BB(AER_DIS),
2698 };
2699 static const struct efx_nic_reg_field efx_nic_reg_fields_GPIO_CTL[] = {
2700 	REGISTER_FIELD_AB(GPIO0_PWRUP_VALUE),
2701 	REGISTER_FIELD_AB(GPIO1_PWRUP_VALUE),
2702 	REGISTER_FIELD_AB(GPIO2_PWRUP_VALUE),
2703 	REGISTER_FIELD_AB(GPIO3_PWRUP_VALUE),
2704 	REGISTER_FIELD_AB(GPIO4_PWRUP_VALUE),
2705 	REGISTER_FIELD_AB(GPIO5_PWRUP_VALUE),
2706 	REGISTER_FIELD_AB(GPIO6_PWRUP_VALUE),
2707 	REGISTER_FIELD_AB(GPIO7_PWRUP_VALUE),
2708 	REGISTER_FIELD_AB(GPIO0_IN),
2709 	REGISTER_FIELD_AB(GPIO1_IN),
2710 	REGISTER_FIELD_AB(GPIO2_IN),
2711 	REGISTER_FIELD_AB(GPIO3_IN),
2712 	REGISTER_FIELD_AB(GPIO4_IN),
2713 	REGISTER_FIELD_AB(GPIO5_IN),
2714 	REGISTER_FIELD_AB(GPIO6_IN),
2715 	REGISTER_FIELD_AB(GPIO7_IN),
2716 	REGISTER_FIELD_AB(GPIO0_OUT),
2717 	REGISTER_FIELD_AB(GPIO1_OUT),
2718 	REGISTER_FIELD_AB(GPIO2_OUT),
2719 	REGISTER_FIELD_AB(GPIO3_OUT),
2720 	REGISTER_FIELD_AB(GPIO4_OUT),
2721 	REGISTER_FIELD_AB(GPIO5_OUT),
2722 	REGISTER_FIELD_AB(GPIO6_OUT),
2723 	REGISTER_FIELD_AB(GPIO7_OUT),
2724 	REGISTER_FIELD_AB(GPIO0_OEN),
2725 	REGISTER_FIELD_AB(GPIO1_OEN),
2726 	REGISTER_FIELD_AB(GPIO2_OEN),
2727 	REGISTER_FIELD_AB(GPIO3_OEN),
2728 	REGISTER_FIELD_AB(GPIO4_OEN),
2729 	REGISTER_FIELD_AB(GPIO5_OEN),
2730 	REGISTER_FIELD_AB(USE_NIC_CLK),
2731 	REGISTER_FIELD_AB(CLK156_OUT_EN),
2732 	REGISTER_FIELD_AB(GPIO8_PWRUP_VALUE),
2733 	REGISTER_FIELD_AB(GPIO9_PWRUP_VALUE),
2734 	REGISTER_FIELD_AB(GPIO10_PWRUP_VALUE),
2735 	REGISTER_FIELD_AB(GPIO11_PWRUP_VALUE),
2736 	REGISTER_FIELD_AB(GPIO12_PWRUP_VALUE),
2737 	REGISTER_FIELD_AB(GPIO13_PWRUP_VALUE),
2738 	REGISTER_FIELD_AB(GPIO14_PWRUP_VALUE),
2739 	REGISTER_FIELD_AB(GPIO15_PWRUP_VALUE),
2740 	REGISTER_FIELD_AB(GPIO8_IN),
2741 	REGISTER_FIELD_AB(GPIO9_IN),
2742 	REGISTER_FIELD_AB(GPIO10_IN),
2743 	REGISTER_FIELD_AB(GPIO11_IN),
2744 	REGISTER_FIELD_AB(GPIO12_IN),
2745 	REGISTER_FIELD_AB(GPIO13_IN),
2746 	REGISTER_FIELD_AB(GPIO14_IN),
2747 	REGISTER_FIELD_AB(GPIO15_IN),
2748 	REGISTER_FIELD_AB(GPIO8_OUT),
2749 	REGISTER_FIELD_AB(GPIO9_OUT),
2750 	REGISTER_FIELD_AB(GPIO10_OUT),
2751 	REGISTER_FIELD_AB(GPIO11_OUT),
2752 	REGISTER_FIELD_AB(GPIO12_OUT),
2753 	REGISTER_FIELD_AB(GPIO13_OUT),
2754 	REGISTER_FIELD_AB(GPIO14_OUT),
2755 	REGISTER_FIELD_AB(GPIO15_OUT),
2756 	REGISTER_FIELD_AB(GPIO8_OEN),
2757 	REGISTER_FIELD_AB(GPIO9_OEN),
2758 	REGISTER_FIELD_AB(GPIO10_OEN),
2759 	REGISTER_FIELD_AB(GPIO11_OEN),
2760 	REGISTER_FIELD_AB(GPIO12_OEN),
2761 	REGISTER_FIELD_AB(GPIO13_OEN),
2762 	REGISTER_FIELD_AB(GPIO14_OEN),
2763 	REGISTER_FIELD_AB(GPIO15_OEN),
2764 	REGISTER_FIELD_AB(GPIO_PWRUP_VALUE2),
2765 	REGISTER_FIELD_AB(GPIO_IN2),
2766 	REGISTER_FIELD_AB(GPIO_OUT2),
2767 	REGISTER_FIELD_AB(GPIO_PWRUP_VALUE3),
2768 	REGISTER_FIELD_AB(GPIO_IN3),
2769 	REGISTER_FIELD_AB(GPIO_OUT3),
2770 };
2771 static const struct efx_nic_reg_field efx_nic_reg_fields_GLB_CTL[] = {
2772 	REGISTER_FIELD_AB(SWRST),
2773 	REGISTER_FIELD_AB(EXT_PHY_RST_DUR),
2774 	REGISTER_FIELD_AB(INT_RST_DUR),
2775 	REGISTER_FIELD_AB(RST_CS),
2776 	REGISTER_FIELD_AB(RST_SF),
2777 	REGISTER_FIELD_AB(RST_TX),
2778 	REGISTER_FIELD_AB(RST_RX),
2779 	REGISTER_FIELD_AB(RST_SR),
2780 	REGISTER_FIELD_AB(RST_EV),
2781 	REGISTER_FIELD_AB(RST_EM),
2782 	REGISTER_FIELD_AB(RST_XGTX),
2783 	REGISTER_FIELD_AB(RST_XGRX),
2784 	REGISTER_FIELD_AB(RST_PCIE_CORE),
2785 	REGISTER_FIELD_AB(RST_PCIE_NSTKY),
2786 	REGISTER_FIELD_AB(RST_PCIE_STKY),
2787 	REGISTER_FIELD_BB(RST_BIU),
2788 	REGISTER_FIELD_AA(RST_PCIX),
2789 	REGISTER_FIELD_AB(RST_PCIE_SD),
2790 	REGISTER_FIELD_AB(RST_XAUI_SD),
2791 	REGISTER_FIELD_AB(RST_EXT_PHY),
2792 	REGISTER_FIELD_AB(HOT_RST_CTL),
2793 	REGISTER_FIELD_AB(CS_RST_CTL),
2794 	REGISTER_FIELD_AB(EE_RST_CTL),
2795 	REGISTER_FIELD_AB(TX_RST_CTL),
2796 	REGISTER_FIELD_AB(RX_RST_CTL),
2797 	REGISTER_FIELD_AB(SR_RST_CTL),
2798 	REGISTER_FIELD_AB(EV_RST_CTL),
2799 	REGISTER_FIELD_AB(EM_RST_CTL),
2800 	REGISTER_FIELD_AB(XGTX_RST_CTL),
2801 	REGISTER_FIELD_AB(XGRX_RST_CTL),
2802 	REGISTER_FIELD_AB(PCIE_CORE_RST_CTL),
2803 	REGISTER_FIELD_AB(PCIE_NSTKY_RST_CTL),
2804 	REGISTER_FIELD_AB(PCIE_STKY_RST_CTL),
2805 	REGISTER_FIELD_BB(BIU_RST_CTL),
2806 	REGISTER_FIELD_AA(PCIX_RST_CTL),
2807 	REGISTER_FIELD_AB(PCIE_SD_RST_CTL),
2808 	REGISTER_FIELD_AB(XAUI_SD_RST_CTL),
2809 	REGISTER_FIELD_AB(EXT_PHY_RST_CTL),
2810 };
2811 static const struct efx_nic_reg_field efx_nic_reg_fields_DP_CTRL[] = {
2812 	REGISTER_FIELD_BZ(FLS_EVQ_ID),
2813 };
2814 static const struct efx_nic_reg_field efx_nic_reg_fields_MEM_STAT[] = {
2815 	REGISTER_FIELD_CZ(MEM_PERR_VEC),
2816 	REGISTER_FIELD_AB(MBIST_ERR),
2817 	REGISTER_FIELD_AB(MBIST_CORR),
2818 	REGISTER_FIELD_AB(MEM_PERR_VEC),
2819 };
2820 static const struct efx_nic_reg_field efx_nic_reg_fields_CS_DEBUG[] = {
2821 	/* This is not a complete list of fields */
2822 	REGISTER_FIELD_AZ(CS_DEBUG_EN),
2823 	REGISTER_FIELD_CZ(CS_PORT_NUM),
2824 };
2825 static const struct efx_nic_reg_field efx_nic_reg_fields_ALTERA_BUILD[] = {
2826 	REGISTER_FIELD_AZ(ALTERA_BUILD_VER),
2827 };
2828 static const struct efx_nic_reg_field efx_nic_reg_fields_CSR_SPARE[] = {
2829 	REGISTER_FIELD_AZ(CSR_SPARE_BITS),
2830 	REGISTER_FIELD_AB(MEM_PERR_EN_TX_DATA),
2831 	REGISTER_FIELD_CZ(MEM_PERR_EN),
2832 	REGISTER_FIELD_AB(MEM_PERR_EN),
2833 };
2834 static const struct efx_nic_reg_field efx_nic_reg_fields_PCIE_SD_CTL0123[] = {
2835 	REGISTER_FIELD_AB(PCIE_LODRV),
2836 	REGISTER_FIELD_AB(PCIE_HIDRV),
2837 	REGISTER_FIELD_AB(PCIE_RXEQCTL_L),
2838 	REGISTER_FIELD_AB(PCIE_RXEQCTL_H),
2839 	REGISTER_FIELD_AB(PCIE_TXTERMADJ_L),
2840 	REGISTER_FIELD_AB(PCIE_TXTERMADJ_H),
2841 	REGISTER_FIELD_AB(PCIE_RXTERMADJ_L),
2842 	REGISTER_FIELD_AB(PCIE_RXTERMADJ_H),
2843 	REGISTER_FIELD_AB(PCIE_PARLPBK),
2844 	REGISTER_FIELD_AB(PCIE_LPBK),
2845 	REGISTER_FIELD_AB(PCIE_LPBKWDRV_L),
2846 	REGISTER_FIELD_AB(PCIE_LPBKWDRV_H),
2847 	REGISTER_FIELD_AB(PCIE_PARRESET_L),
2848 	REGISTER_FIELD_AB(PCIE_PARRESET_H),
2849 	REGISTER_FIELD_AB(PCIE_HIVMODE_L),
2850 	REGISTER_FIELD_AB(PCIE_HIVMODE_H),
2851 	REGISTER_FIELD_AB(PCIE_OFFSETEN_L),
2852 	REGISTER_FIELD_AB(PCIE_OFFSETEN_H),
2853 	REGISTER_FIELD_AB(PCIE_OFFSET),
2854 	REGISTER_FIELD_AB(PCIE_TESTSIG_L),
2855 	REGISTER_FIELD_AB(PCIE_TESTSIG_H),
2856 };
2857 static const struct efx_nic_reg_field efx_nic_reg_fields_PCIE_SD_CTL45[] = {
2858 	REGISTER_FIELD_AB(PCIE_DEQ0),
2859 	REGISTER_FIELD_AB(PCIE_DEQ1),
2860 	REGISTER_FIELD_AB(PCIE_DEQ2),
2861 	REGISTER_FIELD_AB(PCIE_DEQ3),
2862 	REGISTER_FIELD_AB(PCIE_DEQ4),
2863 	REGISTER_FIELD_AB(PCIE_DEQ5),
2864 	REGISTER_FIELD_AB(PCIE_DEQ6),
2865 	REGISTER_FIELD_AB(PCIE_DEQ7),
2866 	REGISTER_FIELD_AB(PCIE_DTX0),
2867 	REGISTER_FIELD_AB(PCIE_DTX1),
2868 	REGISTER_FIELD_AB(PCIE_DTX2),
2869 	REGISTER_FIELD_AB(PCIE_DTX3),
2870 	REGISTER_FIELD_AB(PCIE_DTX4),
2871 	REGISTER_FIELD_AB(PCIE_DTX5),
2872 	REGISTER_FIELD_AB(PCIE_DTX6),
2873 	REGISTER_FIELD_AB(PCIE_DTX7),
2874 };
2875 static const struct efx_nic_reg_field efx_nic_reg_fields_PCIE_PCS_CTL_STAT[] = {
2876 	REGISTER_FIELD_AB(PCIE_PRBSSEL),
2877 	REGISTER_FIELD_AB(PCIE_PRBSERRACK_L),
2878 	REGISTER_FIELD_AB(PCIE_PRBSERRACK_H),
2879 	REGISTER_FIELD_AB(PCIE_PRBSSYNC_L),
2880 	REGISTER_FIELD_AB(PCIE_PRBSSYNC_H),
2881 	REGISTER_FIELD_AB(PCIE_CTCDISABLE_L),
2882 	REGISTER_FIELD_AB(PCIE_CTCDISABLE_H),
2883 	REGISTER_FIELD_AB(PCIE_FASTINIT_L),
2884 	REGISTER_FIELD_AB(PCIE_FASTINIT_H),
2885 	REGISTER_FIELD_AB(PCIE_PRBSERRH0),
2886 	REGISTER_FIELD_AB(PCIE_PRBSERR),
2887 	REGISTER_FIELD_AB(PCIE_PRBSERRCOUNT0_L),
2888 	REGISTER_FIELD_AB(PCIE_PRBSERRCOUNT0_H),
2889 };
2890 static const struct efx_nic_reg_field efx_nic_reg_fields_EVQ_CTL[] = {
2891 	REGISTER_FIELD_AZ(EVQ_FIFO_NOTAF_TH),
2892 	REGISTER_FIELD_AZ(EVQ_FIFO_AF_TH),
2893 	REGISTER_FIELD_AZ(EVQ_OWNERR_CTL),
2894 	REGISTER_FIELD_BB(RX_EVQ_WAKEUP_MASK),
2895 	REGISTER_FIELD_CZ(RX_EVQ_WAKEUP_MASK),
2896 };
2897 static const struct efx_nic_reg_field efx_nic_reg_fields_EVQ_CNT1[] = {
2898 	REGISTER_FIELD_AZ(EVQ_ERR_REQ_CNT),
2899 	REGISTER_FIELD_AZ(EVQ_CSR_REQ_CNT),
2900 	REGISTER_FIELD_AZ(EVQ_EM_REQ_CNT),
2901 	REGISTER_FIELD_AZ(EVQ_RX_REQ_CNT),
2902 	REGISTER_FIELD_AZ(EVQ_TX_REQ_CNT),
2903 	REGISTER_FIELD_AZ(EVQ_CNT_TOBIU),
2904 	REGISTER_FIELD_AZ(EVQ_CNT_PRE_FIFO),
2905 };
2906 static const struct efx_nic_reg_field efx_nic_reg_fields_EVQ_CNT2[] = {
2907 	REGISTER_FIELD_AZ(EVQ_TM_REQ_CNT),
2908 	REGISTER_FIELD_AZ(EVQ_INIT_REQ_CNT),
2909 	REGISTER_FIELD_AZ(EVQ_WET_REQ_CNT),
2910 	REGISTER_FIELD_AZ(EVQ_WU_REQ_CNT),
2911 	REGISTER_FIELD_AZ(EVQ_RDY_CNT),
2912 	REGISTER_FIELD_AZ(EVQ_CLR_REQ_CNT),
2913 	REGISTER_FIELD_AZ(EVQ_UPD_REQ_CNT),
2914 };
2915 static const struct efx_nic_reg_field efx_nic_reg_fields_BUF_TBL_CFG[] = {
2916 	REGISTER_FIELD_AZ(BUF_TBL_MODE),
2917 };
2918 static const struct efx_nic_reg_field efx_nic_reg_fields_SRM_RX_DC_CFG[] = {
2919 	REGISTER_FIELD_AZ(SRM_RX_DC_BASE_ADR),
2920 	REGISTER_FIELD_AZ(SRM_CLK_TMP_EN),
2921 };
2922 static const struct efx_nic_reg_field efx_nic_reg_fields_SRM_TX_DC_CFG[] = {
2923 	REGISTER_FIELD_AZ(SRM_TX_DC_BASE_ADR),
2924 };
2925 static const struct efx_nic_reg_field efx_nic_reg_fields_SRM_CFG[] = {
2926 	REGISTER_FIELD_AZ(SRM_BANK_SIZE),
2927 	REGISTER_FIELD_AZ(SRM_NUM_BANK),
2928 	REGISTER_FIELD_AZ(SRM_INIT_EN),
2929 	REGISTER_FIELD_AZ(SRM_OOB_BUF_INTEN),
2930 	REGISTER_FIELD_AZ(SRM_OOB_ADR_INTEN),
2931 };
2932 static const struct efx_nic_reg_field efx_nic_reg_fields_SRM_UPD_EVQ[] = {
2933 	REGISTER_FIELD_AZ(SRM_UPD_EVQ_ID),
2934 };
2935 static const struct efx_nic_reg_field efx_nic_reg_fields_SRAM_PARITY[] = {
2936 	REGISTER_FIELD_CZ(FORCE_SRAM_SINGLE_ERR),
2937 	REGISTER_FIELD_AB(FORCE_SRAM_PERR),
2938 	REGISTER_FIELD_CZ(FORCE_SRAM_DOUBLE_ERR),
2939 	REGISTER_FIELD_CZ(SEC_INT),
2940 	REGISTER_FIELD_CZ(BYPASS_ECC),
2941 };
2942 static const struct efx_nic_reg_field efx_nic_reg_fields_RX_CFG[] = {
2943 	REGISTER_FIELD_AZ(RX_XOFF_MAC_EN),
2944 	REGISTER_FIELD_AA(RX_XOFF_MAC_TH),
2945 	REGISTER_FIELD_BZ(RX_XOFF_MAC_TH),
2946 	REGISTER_FIELD_AA(RX_XON_MAC_TH),
2947 	REGISTER_FIELD_BZ(RX_XON_MAC_TH),
2948 	REGISTER_FIELD_AA(RX_USR_BUF_SIZE),
2949 	REGISTER_FIELD_AA(RX_XOFF_TX_TH),
2950 	REGISTER_FIELD_BZ(RX_USR_BUF_SIZE),
2951 	REGISTER_FIELD_AA(RX_XON_TX_TH),
2952 	REGISTER_FIELD_AA(RX_OWNERR_CTL),
2953 	REGISTER_FIELD_BZ(RX_XOFF_TX_TH),
2954 	REGISTER_FIELD_AA(RX_PCI_BURST_SIZE),
2955 	REGISTER_FIELD_AA(RX_RDW_PATCH_EN),
2956 	REGISTER_FIELD_AA(RX_DESC_PUSH_EN),
2957 	REGISTER_FIELD_BZ(RX_XON_TX_TH),
2958 	REGISTER_FIELD_BZ(RX_OWNERR_CTL),
2959 	REGISTER_FIELD_BB(RX_PCI_BURST_SIZE),
2960 	REGISTER_FIELD_BZ(RX_RDW_PATCH_EN),
2961 	REGISTER_FIELD_BZ(RX_DESC_PUSH_EN),
2962 	REGISTER_FIELD_BZ(RX_HASH_INSRT_HDR),
2963 	REGISTER_FIELD_BZ(RX_HASH_ALG),
2964 	REGISTER_FIELD_BZ(RX_IP_HASH),
2965 	REGISTER_FIELD_BZ(RX_INGR_EN),
2966 	REGISTER_FIELD_BZ(RX_TCP_SUP),
2967 	REGISTER_FIELD_CZ(RX_PRE_RFF_IPG),
2968 	REGISTER_FIELD_CZ(RX_HDR_SPLIT_HDR_BUF_SIZE),
2969 	REGISTER_FIELD_CZ(RX_HDR_SPLIT_PLD_BUF_SIZE),
2970 	REGISTER_FIELD_CZ(RX_HDR_SPLIT_EN),
2971 	REGISTER_FIELD_CZ(RX_MIN_KBUF_SIZE),
2972 };
2973 static const struct efx_nic_reg_field efx_nic_reg_fields_RX_FILTER_CTL[] = {
2974 	REGISTER_FIELD_BZ(TCP_FULL_SRCH_LIMIT),
2975 	REGISTER_FIELD_BZ(TCP_WILD_SRCH_LIMIT),
2976 	REGISTER_FIELD_BZ(UDP_WILD_SRCH_LIMIT),
2977 	REGISTER_FIELD_BZ(NUM_KER),
2978 	REGISTER_FIELD_BZ(UDP_FULL_SRCH_LIMIT),
2979 	REGISTER_FIELD_BZ(SCATTER_ENBL_NO_MATCH_Q),
2980 	REGISTER_FIELD_CZ(UNICAST_NOMATCH_IP_OVERRIDE),
2981 	REGISTER_FIELD_CZ(UNICAST_NOMATCH_RSS_ENABLED),
2982 	REGISTER_FIELD_CZ(UNICAST_NOMATCH_Q_ID),
2983 	REGISTER_FIELD_CZ(MULTICAST_NOMATCH_IP_OVERRIDE),
2984 	REGISTER_FIELD_CZ(MULTICAST_NOMATCH_RSS_ENABLED),
2985 	REGISTER_FIELD_CZ(MULTICAST_NOMATCH_Q_ID),
2986 	REGISTER_FIELD_CZ(RX_VLAN_MATCH_ETHERTYPE),
2987 	REGISTER_FIELD_CZ(RX_FILTER_ALL_VLAN_ETHERTYPES),
2988 	REGISTER_FIELD_CZ(ETHERNET_FULL_SEARCH_LIMIT),
2989 	REGISTER_FIELD_CZ(ETHERNET_WILDCARD_SEARCH_LIMIT),
2990 };
2991 static const struct efx_nic_reg_field efx_nic_reg_fields_RX_DC_CFG[] = {
2992 	REGISTER_FIELD_AZ(RX_DC_SIZE),
2993 	REGISTER_FIELD_AB(RX_MAX_PF),
2994 };
2995 static const struct efx_nic_reg_field efx_nic_reg_fields_RX_DC_PF_WM[] = {
2996 	REGISTER_FIELD_AZ(RX_DC_PF_LWM),
2997 	REGISTER_FIELD_AZ(RX_DC_PF_HWM),
2998 };
2999 static const struct efx_nic_reg_field efx_nic_reg_fields_RX_RSS_TKEY[] = {
3000 	REGISTER_FIELD_BZ(RX_RSS_TKEY_LO),
3001 	REGISTER_FIELD_BZ(RX_RSS_TKEY_HI),
3002 };
3003 static const struct efx_nic_reg_field efx_nic_reg_fields_RX_SELF_RST[] = {
3004 	REGISTER_FIELD_AA(RX_MAX_LU_LAT),
3005 	REGISTER_FIELD_AA(RX_MAX_PF_LAT),
3006 	REGISTER_FIELD_AA(RX_SELF_RST_EN),
3007 	REGISTER_FIELD_AA(RX_NODESC_WAIT_DIS),
3008 	REGISTER_FIELD_AA(RX_SW_RST_REG),
3009 	REGISTER_FIELD_AA(RX_ISCSI_DIS),
3010 };
3011 static const struct efx_nic_reg_field efx_nic_reg_fields_RX_RSS_IPV6_REG1[] = {
3012 	REGISTER_FIELD_CZ(RX_RSS_IPV6_TKEY_LO),
3013 };
3014 static const struct efx_nic_reg_field efx_nic_reg_fields_RX_RSS_IPV6_REG2[] = {
3015 	REGISTER_FIELD_CZ(RX_RSS_IPV6_TKEY_MID),
3016 };
3017 static const struct efx_nic_reg_field efx_nic_reg_fields_RX_RSS_IPV6_REG3[] = {
3018 	REGISTER_FIELD_CZ(RX_RSS_IPV6_TKEY_HI),
3019 	REGISTER_FIELD_CZ(RX_RSS_IPV6_TCP_SUPPRESS),
3020 	REGISTER_FIELD_CZ(RX_RSS_IPV6_IP_THASH_ENABLE),
3021 	REGISTER_FIELD_CZ(RX_RSS_IPV6_THASH_ENABLE),
3022 };
3023 static const struct efx_nic_reg_field efx_nic_reg_fields_TX_DC_CFG[] = {
3024 	REGISTER_FIELD_AZ(TX_DC_SIZE),
3025 };
3026 static const struct efx_nic_reg_field efx_nic_reg_fields_TX_CHKSM_CFG[] = {
3027 	REGISTER_FIELD_AA(TX_Q_CHKSM_DIS_0_31),
3028 	REGISTER_FIELD_AA(TX_Q_CHKSM_DIS_32_63),
3029 	REGISTER_FIELD_AA(TX_Q_CHKSM_DIS_64_95),
3030 	REGISTER_FIELD_AA(TX_Q_CHKSM_DIS_96_127),
3031 };
3032 static const struct efx_nic_reg_field efx_nic_reg_fields_TX_CFG[] = {
3033 	REGISTER_FIELD_AZ(TX_IP_ID_REP_EN),
3034 	REGISTER_FIELD_AA(TX_NON_IP_DROP_DIS),
3035 	REGISTER_FIELD_AZ(TX_OWNERR_CTL),
3036 	REGISTER_FIELD_AZ(TX_P1_PRI_EN),
3037 	REGISTER_FIELD_AZ(TX_NO_EOP_DISC_EN),
3038 	REGISTER_FIELD_AZ(TX_IP_ID_P0_OFS),
3039 	REGISTER_FIELD_CZ(TX_FILTER_EN_BIT),
3040 	REGISTER_FIELD_CZ(TX_VLAN_MATCH_ETHERTYPE_RANGE),
3041 	REGISTER_FIELD_CZ(TX_FILTER_ALL_VLAN_ETHERTYPES_BIT),
3042 	REGISTER_FIELD_CZ(TX_TCPIP_FILTER_FULL_SEARCH_RANGE),
3043 	REGISTER_FIELD_CZ(TX_TCPIP_FILTER_WILD_SEARCH_RANGE),
3044 	REGISTER_FIELD_CZ(TX_UDPIP_FILTER_FULL_SEARCH_RANGE),
3045 	REGISTER_FIELD_CZ(TX_UDPIP_FILTER_WILD_SEARCH_RANGE),
3046 	REGISTER_FIELD_CZ(TX_ETH_FILTER_FULL_SEARCH_RANGE),
3047 	REGISTER_FIELD_CZ(TX_ETH_FILTER_WILD_SEARCH_RANGE),
3048 	REGISTER_FIELD_CZ(TX_FILTER_TEST_MODE_BIT),
3049 	REGISTER_FIELD_CZ(TX_CONT_LOOKUP_THRESH_RANGE),
3050 };
3051 static const struct efx_nic_reg_field efx_nic_reg_fields_TX_RESERVED[] = {
3052 	REGISTER_FIELD_AZ(TX_MAX_PREF),
3053 	REGISTER_FIELD_AZ(TX_MAX_CPL),
3054 	REGISTER_FIELD_AA(TX_IP_DIS),
3055 	REGISTER_FIELD_BZ(TX_FLUSH_MIN_LEN_EN),
3056 	REGISTER_FIELD_AA(TX_TCP_DIS),
3057 	REGISTER_FIELD_AZ(TX_DMA_SPACER),
3058 	REGISTER_FIELD_AA(TX_DMA_FF_THR),
3059 	REGISTER_FIELD_AZ(TX_DIS_NON_IP_EV),
3060 	REGISTER_FIELD_AZ(TX_ONE_PKT_PER_Q),
3061 	REGISTER_FIELD_AZ(TX_PREF_THRESHOLD),
3062 	REGISTER_FIELD_AZ(TX_ONLY1TAG),
3063 	REGISTER_FIELD_AZ(TX_PREF_WD_TMR),
3064 	REGISTER_FIELD_AZ(TX_PREF_SPACER),
3065 	REGISTER_FIELD_AZ(TX_XP_TIMER),
3066 	REGISTER_FIELD_AZ(TX_RX_SPACER_EN),
3067 	REGISTER_FIELD_AZ(TX_PS_EVT_DIS),
3068 	REGISTER_FIELD_AZ(TX_SOFT_EVT_EN),
3069 	REGISTER_FIELD_AZ(TX_DROP_ABORT_EN),
3070 	REGISTER_FIELD_AZ(TX_RX_SPACER),
3071 	REGISTER_FIELD_AZ(TX_DMAQ_ST),
3072 	REGISTER_FIELD_AZ(TX_DMAR_ST_P0),
3073 	REGISTER_FIELD_AZ(TX_D_FF_FULL_P0),
3074 	REGISTER_FIELD_AZ(TX_PUSH_CHK_DIS),
3075 	REGISTER_FIELD_AZ(TX_PUSH_EN),
3076 	REGISTER_FIELD_AZ(TX_RD_COMP_TMR),
3077 	REGISTER_FIELD_AZ(TX_PREF_AGE_CNT),
3078 	REGISTER_FIELD_AZ(TX_EVT_CNT),
3079 };
3080 static const struct efx_nic_reg_field efx_nic_reg_fields_TX_PACE[] = {
3081 	REGISTER_FIELD_BZ(TX_PACE_BIN_TH),
3082 	REGISTER_FIELD_BZ(TX_PACE_FB_BASE),
3083 	REGISTER_FIELD_BZ(TX_PACE_SB_AF),
3084 	REGISTER_FIELD_BZ(TX_PACE_SB_NOT_AF),
3085 };
3086 static const struct efx_nic_reg_field efx_nic_reg_fields_TX_VLAN[] = {
3087 	REGISTER_FIELD_BB(TX_VLAN0),
3088 	REGISTER_FIELD_BB(TX_VLAN0_PORT0_EN),
3089 	REGISTER_FIELD_BB(TX_VLAN0_PORT1_EN),
3090 	REGISTER_FIELD_BB(TX_VLAN1),
3091 	REGISTER_FIELD_BB(TX_VLAN1_PORT0_EN),
3092 	REGISTER_FIELD_BB(TX_VLAN1_PORT1_EN),
3093 	REGISTER_FIELD_BB(TX_VLAN2),
3094 	REGISTER_FIELD_BB(TX_VLAN2_PORT0_EN),
3095 	REGISTER_FIELD_BB(TX_VLAN2_PORT1_EN),
3096 	REGISTER_FIELD_BB(TX_VLAN3),
3097 	REGISTER_FIELD_BB(TX_VLAN3_PORT0_EN),
3098 	REGISTER_FIELD_BB(TX_VLAN3_PORT1_EN),
3099 	REGISTER_FIELD_BB(TX_VLAN4),
3100 	REGISTER_FIELD_BB(TX_VLAN4_PORT0_EN),
3101 	REGISTER_FIELD_BB(TX_VLAN4_PORT1_EN),
3102 	REGISTER_FIELD_BB(TX_VLAN5),
3103 	REGISTER_FIELD_BB(TX_VLAN5_PORT0_EN),
3104 	REGISTER_FIELD_BB(TX_VLAN5_PORT1_EN),
3105 	REGISTER_FIELD_BB(TX_VLAN6),
3106 	REGISTER_FIELD_BB(TX_VLAN6_PORT0_EN),
3107 	REGISTER_FIELD_BB(TX_VLAN6_PORT1_EN),
3108 	REGISTER_FIELD_BB(TX_VLAN7),
3109 	REGISTER_FIELD_BB(TX_VLAN7_PORT0_EN),
3110 	REGISTER_FIELD_BB(TX_VLAN7_PORT1_EN),
3111 	REGISTER_FIELD_BB(TX_VLAN_EN),
3112 };
3113 static const struct efx_nic_reg_field efx_nic_reg_fields_TX_IPFIL_PORTEN[] = {
3114 	REGISTER_FIELD_BB(TX_IPFIL0_PORT_EN),
3115 	REGISTER_FIELD_BB(TX_IPFIL1_PORT_EN),
3116 	REGISTER_FIELD_BB(TX_IPFIL2_PORT_EN),
3117 	REGISTER_FIELD_BB(TX_IPFIL3_PORT_EN),
3118 	REGISTER_FIELD_BB(TX_IPFIL4_PORT_EN),
3119 	REGISTER_FIELD_BB(TX_IPFIL5_PORT_EN),
3120 	REGISTER_FIELD_BB(TX_IPFIL6_PORT_EN),
3121 	REGISTER_FIELD_BB(TX_IPFIL7_PORT_EN),
3122 	REGISTER_FIELD_BB(TX_IPFIL8_PORT_EN),
3123 	REGISTER_FIELD_BB(TX_IPFIL9_PORT_EN),
3124 	REGISTER_FIELD_BB(TX_IPFIL10_PORT_EN),
3125 	REGISTER_FIELD_BB(TX_IPFIL11_PORT_EN),
3126 	REGISTER_FIELD_BB(TX_IPFIL12_PORT_EN),
3127 	REGISTER_FIELD_BB(TX_IPFIL13_PORT_EN),
3128 	REGISTER_FIELD_BB(TX_IPFIL14_PORT_EN),
3129 	REGISTER_FIELD_BB(TX_IPFIL15_PORT_EN),
3130 	REGISTER_FIELD_BB(TX_IPFIL16_PORT_EN),
3131 	REGISTER_FIELD_BB(TX_IPFIL17_PORT_EN),
3132 	REGISTER_FIELD_BB(TX_IPFIL18_PORT_EN),
3133 	REGISTER_FIELD_BB(TX_IPFIL19_PORT_EN),
3134 	REGISTER_FIELD_BB(TX_IPFIL20_PORT_EN),
3135 	REGISTER_FIELD_BB(TX_IPFIL21_PORT_EN),
3136 	REGISTER_FIELD_BB(TX_IPFIL22_PORT_EN),
3137 	REGISTER_FIELD_BB(TX_IPFIL23_PORT_EN),
3138 	REGISTER_FIELD_BB(TX_IPFIL24_PORT_EN),
3139 	REGISTER_FIELD_BB(TX_IPFIL25_PORT_EN),
3140 	REGISTER_FIELD_BB(TX_IPFIL26_PORT_EN),
3141 	REGISTER_FIELD_BB(TX_IPFIL27_PORT_EN),
3142 	REGISTER_FIELD_BB(TX_IPFIL28_PORT_EN),
3143 	REGISTER_FIELD_BB(TX_IPFIL29_PORT_EN),
3144 	REGISTER_FIELD_BB(TX_IPFIL30_PORT_EN),
3145 	REGISTER_FIELD_BB(TX_IPFIL31_PORT_EN),
3146 	REGISTER_FIELD_BZ(TX_MADR0_FIL_EN),
3147 };
3148 static const struct efx_nic_reg_field efx_nic_reg_fields_TX_IPFIL_TBL[] = {
3149 	REGISTER_FIELD_BB(TX_IP_SRC_ADR_0),
3150 	REGISTER_FIELD_BB(TX_IPFIL_MASK_0),
3151 	REGISTER_FIELD_BB(TX_IP_SRC_ADR_1),
3152 	REGISTER_FIELD_BB(TX_IPFIL_MASK_1),
3153 };
3154 static const struct efx_nic_reg_field efx_nic_reg_fields_MD_TXD[] = {
3155 	REGISTER_FIELD_AB(MD_TXD),
3156 };
3157 static const struct efx_nic_reg_field efx_nic_reg_fields_MD_RXD[] = {
3158 	REGISTER_FIELD_AB(MD_RXD),
3159 };
3160 static const struct efx_nic_reg_field efx_nic_reg_fields_MD_CS[] = {
3161 	REGISTER_FIELD_AB(MD_WRC),
3162 	REGISTER_FIELD_AB(MD_RDC),
3163 	REGISTER_FIELD_AB(MD_RIC),
3164 	REGISTER_FIELD_AB(MD_PRSP),
3165 	REGISTER_FIELD_AB(MD_GC),
3166 	REGISTER_FIELD_AB(MD_INT_CLR),
3167 	REGISTER_FIELD_AB(MD_PL),
3168 	REGISTER_FIELD_AB(MD_PT),
3169 	REGISTER_FIELD_AB(MD_ADDR_CMD),
3170 	REGISTER_FIELD_AB(MD_WR_EN_CMD),
3171 	REGISTER_FIELD_AB(MD_RD_EN_CMD),
3172 };
3173 static const struct efx_nic_reg_field efx_nic_reg_fields_MD_PHY_ADR[] = {
3174 	REGISTER_FIELD_AB(MD_PHY_ADR),
3175 };
3176 static const struct efx_nic_reg_field efx_nic_reg_fields_MD_ID[] = {
3177 	REGISTER_FIELD_AB(MD_DEV_ADR),
3178 	REGISTER_FIELD_AB(MD_PRT_ADR),
3179 };
3180 static const struct efx_nic_reg_field efx_nic_reg_fields_MAC_STAT_DMA[] = {
3181 	REGISTER_FIELD_AB(MAC_STAT_DMA_ADR),
3182 	REGISTER_FIELD_AB(MAC_STAT_DMA_CMD),
3183 };
3184 static const struct efx_nic_reg_field efx_nic_reg_fields_MAC_CTRL[] = {
3185 	REGISTER_FIELD_AB(MAC_SPEED),
3186 	REGISTER_FIELD_AB(MAC_LINK_STATUS),
3187 	REGISTER_FIELD_AB(MAC_UC_PROM),
3188 	REGISTER_FIELD_AB(MAC_BCAD_ACPT),
3189 	REGISTER_FIELD_AB(MAC_XG_DISTXCRC),
3190 	REGISTER_FIELD_BB(TXFIFO_DRAIN_EN),
3191 	REGISTER_FIELD_AB(MAC_XOFF_VAL),
3192 };
3193 static const struct efx_nic_reg_field efx_nic_reg_fields_GEN_MODE[] = {
3194 	REGISTER_FIELD_BB(XG_PHY_INT_MASK),
3195 	REGISTER_FIELD_BB(XFP_PHY_INT_MASK),
3196 	REGISTER_FIELD_BB(XG_PHY_INT_POL_SEL),
3197 	REGISTER_FIELD_BB(XFP_PHY_INT_POL_SEL),
3198 };
3199 static const struct efx_nic_reg_field efx_nic_reg_fields_MAC_MC_HASH_REG0[] = {
3200 	REGISTER_FIELD_AB(MAC_MCAST_HASH0),
3201 };
3202 static const struct efx_nic_reg_field efx_nic_reg_fields_MAC_MC_HASH_REG1[] = {
3203 	REGISTER_FIELD_AB(MAC_MCAST_HASH1),
3204 };
3205 static const struct efx_nic_reg_field efx_nic_reg_fields_GM_CFG1[] = {
3206 	REGISTER_FIELD_AB(GM_TX_EN),
3207 	REGISTER_FIELD_AB(GM_SYNC_TXEN),
3208 	REGISTER_FIELD_AB(GM_RX_EN),
3209 	REGISTER_FIELD_AB(GM_SYNC_RXEN),
3210 	REGISTER_FIELD_AB(GM_TX_FC_EN),
3211 	REGISTER_FIELD_AB(GM_RX_FC_EN),
3212 	REGISTER_FIELD_AB(GM_LOOP),
3213 	REGISTER_FIELD_AB(GM_RST_TX_FUNC),
3214 	REGISTER_FIELD_AB(GM_RST_RX_FUNC),
3215 	REGISTER_FIELD_AB(GM_RST_TX_MAC_CTL),
3216 	REGISTER_FIELD_AB(GM_RST_RX_MAC_CTL),
3217 	REGISTER_FIELD_AB(GM_SIM_RST),
3218 	REGISTER_FIELD_AB(GM_SW_RST),
3219 };
3220 static const struct efx_nic_reg_field efx_nic_reg_fields_GM_CFG2[] = {
3221 	REGISTER_FIELD_AB(GM_FD),
3222 	REGISTER_FIELD_AB(GM_CRC_EN),
3223 	REGISTER_FIELD_AB(GM_PAD_CRC_EN),
3224 	REGISTER_FIELD_AB(GM_LEN_CHK),
3225 	REGISTER_FIELD_AB(GM_HUGE_FRM_EN),
3226 	REGISTER_FIELD_AB(GM_IF_MODE),
3227 	REGISTER_FIELD_AB(GM_PAMBL_LEN),
3228 };
3229 static const struct efx_nic_reg_field efx_nic_reg_fields_GM_MAX_FLEN[] = {
3230 	REGISTER_FIELD_AB(GM_MAX_FLEN),
3231 };
3232 static const struct efx_nic_reg_field efx_nic_reg_fields_GM_ADR1[] = {
3233 	REGISTER_FIELD_AB(GM_ADR_B3),
3234 	REGISTER_FIELD_AB(GM_ADR_B2),
3235 	REGISTER_FIELD_AB(GM_ADR_B1),
3236 	REGISTER_FIELD_AB(GM_ADR_B0),
3237 };
3238 static const struct efx_nic_reg_field efx_nic_reg_fields_GM_ADR2[] = {
3239 	REGISTER_FIELD_AB(GM_ADR_B5),
3240 	REGISTER_FIELD_AB(GM_ADR_B4),
3241 };
3242 static const struct efx_nic_reg_field efx_nic_reg_fields_GMF_CFG0[] = {
3243 	REGISTER_FIELD_AB(GMF_HSTRSTWT),
3244 	REGISTER_FIELD_AB(GMF_HSTRSTSR),
3245 	REGISTER_FIELD_AB(GMF_HSTRSTFR),
3246 	REGISTER_FIELD_AB(GMF_HSTRSTST),
3247 	REGISTER_FIELD_AB(GMF_HSTRSTFT),
3248 	REGISTER_FIELD_AB(GMF_WTMENREQ),
3249 	REGISTER_FIELD_AB(GMF_SRFENREQ),
3250 	REGISTER_FIELD_AB(GMF_FRFENREQ),
3251 	REGISTER_FIELD_AB(GMF_STFENREQ),
3252 	REGISTER_FIELD_AB(GMF_FTFENREQ),
3253 	REGISTER_FIELD_AB(GMF_WTMENRPLY),
3254 	REGISTER_FIELD_AB(GMF_SRFENRPLY),
3255 	REGISTER_FIELD_AB(GMF_FRFENRPLY),
3256 	REGISTER_FIELD_AB(GMF_STFENRPLY),
3257 	REGISTER_FIELD_AB(GMF_FTFENRPLY),
3258 };
3259 static const struct efx_nic_reg_field efx_nic_reg_fields_GMF_CFG1[] = {
3260 	REGISTER_FIELD_AB(GMF_CFGXOFFRTX),
3261 	REGISTER_FIELD_AB(GMF_CFGFRTH),
3262 };
3263 static const struct efx_nic_reg_field efx_nic_reg_fields_GMF_CFG2[] = {
3264 	REGISTER_FIELD_AB(GMF_CFGLWM),
3265 	REGISTER_FIELD_AB(GMF_CFGHWM),
3266 };
3267 static const struct efx_nic_reg_field efx_nic_reg_fields_GMF_CFG3[] = {
3268 	REGISTER_FIELD_AB(GMF_CFGFTTH),
3269 	REGISTER_FIELD_AB(GMF_CFGHWMFT),
3270 };
3271 static const struct efx_nic_reg_field efx_nic_reg_fields_GMF_CFG4[] = {
3272 	REGISTER_FIELD_AB(GMF_HSTFLTRFRM),
3273 };
3274 static const struct efx_nic_reg_field efx_nic_reg_fields_GMF_CFG5[] = {
3275 	REGISTER_FIELD_AB(GMF_HSTFLTRFRMDC),
3276 	REGISTER_FIELD_AB(GMF_HSTDRPLT64),
3277 	REGISTER_FIELD_AB(GMF_CFGBYTMODE),
3278 	REGISTER_FIELD_AB(GMF_HSTSRFULLCLR),
3279 	REGISTER_FIELD_AB(GMF_SRFULL),
3280 	REGISTER_FIELD_AB(GMF_CFGHDPLX),
3281 };
3282 static const struct efx_nic_reg_field efx_nic_reg_fields_TX_SRC_MAC_TBL[] = {
3283 	REGISTER_FIELD_BB(TX_SRC_MAC_ADR_0),
3284 	REGISTER_FIELD_BB(TX_SRC_MAC_ADR_1),
3285 };
3286 static const struct efx_nic_reg_field efx_nic_reg_fields_TX_SRC_MAC_CTL[] = {
3287 	REGISTER_FIELD_BB(TX_MAC_QID_SEL),
3288 	REGISTER_FIELD_BB(TX_DROP_CTR_CLR),
3289 	REGISTER_FIELD_BB(TX_SRC_FLTR_EN),
3290 	REGISTER_FIELD_BB(TX_SRC_DROP_CTR),
3291 };
3292 static const struct efx_nic_reg_field efx_nic_reg_fields_XM_ADR_LO[] = {
3293 	REGISTER_FIELD_AB(XM_ADR_LO),
3294 };
3295 static const struct efx_nic_reg_field efx_nic_reg_fields_XM_ADR_HI[] = {
3296 	REGISTER_FIELD_AB(XM_ADR_HI),
3297 };
3298 static const struct efx_nic_reg_field efx_nic_reg_fields_XM_GLB_CFG[] = {
3299 	REGISTER_FIELD_AB(XM_CORE_RST),
3300 	REGISTER_FIELD_AB(XM_INTCLR_MODE),
3301 	REGISTER_FIELD_AB(XM_WAN_MODE),
3302 	REGISTER_FIELD_AB(XM_RX_JUMBO_MODE),
3303 	REGISTER_FIELD_AB(XM_TX_STAT_EN),
3304 	REGISTER_FIELD_AB(XM_RX_STAT_EN),
3305 	REGISTER_FIELD_AB(XM_DEBUG_MODE),
3306 	REGISTER_FIELD_AB(XM_RMTFLT_GEN),
3307 };
3308 static const struct efx_nic_reg_field efx_nic_reg_fields_XM_TX_CFG[] = {
3309 	REGISTER_FIELD_AB(XM_TX_RST),
3310 	REGISTER_FIELD_AB(XM_TXEN),
3311 	REGISTER_FIELD_AB(XM_TX_PRMBL),
3312 	REGISTER_FIELD_AB(XM_AUTO_PAD),
3313 	REGISTER_FIELD_AB(XM_EDRC),
3314 	REGISTER_FIELD_AB(XM_TXCRC),
3315 	REGISTER_FIELD_AB(XM_FCNTL),
3316 	REGISTER_FIELD_AB(XM_IPG),
3317 	REGISTER_FIELD_AB(XM_TX_PROG),
3318 };
3319 static const struct efx_nic_reg_field efx_nic_reg_fields_XM_RX_CFG[] = {
3320 	REGISTER_FIELD_AB(XM_RX_RST),
3321 	REGISTER_FIELD_AB(XM_RXEN),
3322 	REGISTER_FIELD_AB(XM_RX_PRMBL),
3323 	REGISTER_FIELD_AB(XM_RXCRC),
3324 	REGISTER_FIELD_AB(XM_AUTO_DEPAD),
3325 	REGISTER_FIELD_AB(XM_ACPT_ALL_UCAST),
3326 	REGISTER_FIELD_AB(XM_ACPT_ALL_MCAST),
3327 	REGISTER_FIELD_AB(XM_REJ_BCAST),
3328 	REGISTER_FIELD_AB(XM_PASS_PRMBLE_ERR),
3329 	REGISTER_FIELD_AB(XM_PASS_CRC_ERR),
3330 	REGISTER_FIELD_AB(XM_PASS_LENERR),
3331 };
3332 static const struct efx_nic_reg_field efx_nic_reg_fields_XM_MGT_INT_MASK[] = {
3333 	REGISTER_FIELD_AB(XM_MSK_LCLFLT),
3334 	REGISTER_FIELD_AB(XM_MSK_RMTFLT),
3335 	REGISTER_FIELD_AB(XM_MSK_PRMBLE_ERR),
3336 	REGISTER_FIELD_AB(XM_MSK_STAT_CNTR_OF),
3337 	REGISTER_FIELD_AB(XM_MSK_STAT_CNTR_HF),
3338 	REGISTER_FIELD_AB(XM_MSK_STA_INTR),
3339 };
3340 static const struct efx_nic_reg_field efx_nic_reg_fields_XM_FC[] = {
3341 	REGISTER_FIELD_AB(XM_DIS_FCNTL),
3342 	REGISTER_FIELD_AB(XM_XMIT_PAUSE),
3343 	REGISTER_FIELD_AB(XM_ZPAUSE),
3344 	REGISTER_FIELD_AB(XM_REJ_CNTL_MCAST),
3345 	REGISTER_FIELD_AB(XM_REJ_CNTL_UCAST),
3346 	REGISTER_FIELD_AB(XM_MCNTL_PASS),
3347 	REGISTER_FIELD_AB(XM_TX_MAC_STAT),
3348 	REGISTER_FIELD_AB(XM_RX_MAC_STAT),
3349 	REGISTER_FIELD_AB(XM_PAUSE_TIME),
3350 };
3351 static const struct efx_nic_reg_field efx_nic_reg_fields_XM_PAUSE_TIME[] = {
3352 	REGISTER_FIELD_AB(XM_RX_PAUSE_CNT),
3353 	REGISTER_FIELD_AB(XM_TX_PAUSE_CNT),
3354 };
3355 static const struct efx_nic_reg_field efx_nic_reg_fields_XM_TX_PARAM[] = {
3356 	REGISTER_FIELD_AB(XM_PAD_CHAR),
3357 	REGISTER_FIELD_AB(XM_MAX_TX_FRM_SIZE_LO),
3358 	REGISTER_FIELD_AB(XM_MAX_TX_FRM_SIZE_HI),
3359 	REGISTER_FIELD_AB(XM_TX_JUMBO_MODE),
3360 };
3361 static const struct efx_nic_reg_field efx_nic_reg_fields_XM_RX_PARAM[] = {
3362 	REGISTER_FIELD_AB(XM_MAX_RX_FRM_SIZE_LO),
3363 	REGISTER_FIELD_AB(XM_MAX_RX_FRM_SIZE_HI),
3364 };
3365 static const struct efx_nic_reg_field efx_nic_reg_fields_XX_PWR_RST[] = {
3366 	REGISTER_FIELD_AB(XX_RST_XX_EN),
3367 	REGISTER_FIELD_AB(XX_RSTXGXSTX_EN),
3368 	REGISTER_FIELD_AB(XX_RSTXGXSRX_EN),
3369 	REGISTER_FIELD_AB(XX_RESETA_EN),
3370 	REGISTER_FIELD_AB(XX_RESETB_EN),
3371 	REGISTER_FIELD_AB(XX_RESETC_EN),
3372 	REGISTER_FIELD_AB(XX_RESETD_EN),
3373 	REGISTER_FIELD_AB(XX_RSTPLLAB_EN),
3374 	REGISTER_FIELD_AB(XX_RSTPLLCD_EN),
3375 	REGISTER_FIELD_AB(XX_PWRDNA_EN),
3376 	REGISTER_FIELD_AB(XX_PWRDNB_EN),
3377 	REGISTER_FIELD_AB(XX_PWRDNC_EN),
3378 	REGISTER_FIELD_AB(XX_PWRDND_EN),
3379 	REGISTER_FIELD_AB(XX_SD_RST_ACT),
3380 	REGISTER_FIELD_AB(XX_RSTXGXSTX_SIG),
3381 	REGISTER_FIELD_AB(XX_RSTXGXSRX_SIG),
3382 	REGISTER_FIELD_AB(XX_RESETA_SIG),
3383 	REGISTER_FIELD_AB(XX_RESETB_SIG),
3384 	REGISTER_FIELD_AB(XX_RESETC_SIG),
3385 	REGISTER_FIELD_AB(XX_RESETD_SIG),
3386 	REGISTER_FIELD_AB(XX_RSTPLLAB_SIG),
3387 	REGISTER_FIELD_AB(XX_RSTPLLCD_SIG),
3388 	REGISTER_FIELD_AB(XX_SIM_MODE),
3389 	REGISTER_FIELD_AB(XX_PWRDNA_SIG),
3390 	REGISTER_FIELD_AB(XX_PWRDNB_SIG),
3391 	REGISTER_FIELD_AB(XX_PWRDNC_SIG),
3392 	REGISTER_FIELD_AB(XX_PWRDND_SIG),
3393 };
3394 static const struct efx_nic_reg_field efx_nic_reg_fields_XX_SD_CTL[] = {
3395 	REGISTER_FIELD_AB(XX_LPBKA),
3396 	REGISTER_FIELD_AB(XX_LPBKB),
3397 	REGISTER_FIELD_AB(XX_LPBKC),
3398 	REGISTER_FIELD_AB(XX_LPBKD),
3399 	REGISTER_FIELD_AB(XX_LODRVA),
3400 	REGISTER_FIELD_AB(XX_HIDRVA),
3401 	REGISTER_FIELD_AB(XX_LODRVB),
3402 	REGISTER_FIELD_AB(XX_HIDRVB),
3403 	REGISTER_FIELD_AB(XX_LODRVC),
3404 	REGISTER_FIELD_AB(XX_HIDRVC),
3405 	REGISTER_FIELD_AB(XX_LODRVD),
3406 	REGISTER_FIELD_AB(XX_HIDRVD),
3407 	REGISTER_FIELD_AB(XX_TERMADJ0),
3408 	REGISTER_FIELD_AB(XX_TERMADJ1),
3409 };
3410 static const struct efx_nic_reg_field efx_nic_reg_fields_XX_TXDRV_CTL[] = {
3411 	REGISTER_FIELD_AB(XX_DTXA),
3412 	REGISTER_FIELD_AB(XX_DTXB),
3413 	REGISTER_FIELD_AB(XX_DTXC),
3414 	REGISTER_FIELD_AB(XX_DTXD),
3415 	REGISTER_FIELD_AB(XX_DEQA),
3416 	REGISTER_FIELD_AB(XX_DEQB),
3417 	REGISTER_FIELD_AB(XX_DEQC),
3418 	REGISTER_FIELD_AB(XX_DEQD),
3419 };
3420 static const struct efx_nic_reg_field efx_nic_reg_fields_BIU_HW_REV_ID[] = {
3421 	REGISTER_FIELD_DZ(HW_REV_ID),
3422 };
3423 static const struct efx_nic_reg_field efx_nic_reg_fields_MC_DB_LWRD[] = {
3424 	REGISTER_FIELD_DZ(MC_DOORBELL_L),
3425 };
3426 static const struct efx_nic_reg_field efx_nic_reg_fields_MC_DB_HWRD[] = {
3427 	REGISTER_FIELD_DZ(MC_DOORBELL_H),
3428 };
3429 static const struct efx_nic_reg_field efx_nic_reg_fields_RX_DESC_PTR_TBL[] = {
3430 	/* Abbreviate field names to reduce the table width */
3431 	REGISTER_FIELD_AZ_RENAME(RX_DESCQ_EN, "EN"),
3432 	REGISTER_FIELD_AZ_RENAME(RX_DESCQ_JUMBO, "JUMBO"),
3433 	REGISTER_FIELD_AZ_RENAME(RX_DESCQ_TYPE, "TYPE"),
3434 	REGISTER_FIELD_AZ_RENAME(RX_DESCQ_SIZE, "SIZE"),
3435 	REGISTER_FIELD_AZ_RENAME(RX_DESCQ_LABEL, "LABEL"),
3436 	REGISTER_FIELD_AZ_RENAME(RX_DESCQ_OWNER_ID, "OWNER"),
3437 	REGISTER_FIELD_AZ_RENAME(RX_DESCQ_EVQ_ID, "EVQ"),
3438 	REGISTER_FIELD_AZ_RENAME(RX_DESCQ_BUF_BASE_ID, "BUF_BASE"),
3439 	REGISTER_FIELD_AZ_RENAME(RX_DESCQ_SW_WPTR, "SW_WPTR"),
3440 	REGISTER_FIELD_AZ_RENAME(RX_DESCQ_HW_RPTR, "HW_RPTR"),
3441 	REGISTER_FIELD_AZ_RENAME(RX_DC_HW_RPTR, "DC_HW_RPTR"),
3442 	REGISTER_FIELD_AZ_RENAME(RX_DESC_PREF_ACT, "PREF_ACT"),
3443 	REGISTER_FIELD_AZ_RENAME(RX_ISCSI_HDIG_EN, "HDIG"),
3444 	REGISTER_FIELD_AZ_RENAME(RX_ISCSI_DDIG_EN, "DDIG"),
3445 	REGISTER_FIELD_AA(RX_RESET),
3446 	REGISTER_FIELD_CZ_RENAME(RX_HDR_SPLIT, "HDR_SPLIT"),
3447 };
3448 #define efx_nic_reg_fields_RX_DESC_PTR_TBL_KER efx_nic_reg_fields_RX_DESC_PTR_TBL
3449 static const struct efx_nic_reg_field efx_nic_reg_fields_TX_DESC_PTR_TBL[] = {
3450 	/* Abbreviate field names to reduce the table width */
3451 	REGISTER_FIELD_AZ_RENAME(TX_DESCQ_FLUSH, "FLUSH"),
3452 	REGISTER_FIELD_AZ_RENAME(TX_DESCQ_TYPE, "TYPE"),
3453 	REGISTER_FIELD_AZ_RENAME(TX_DESCQ_SIZE, "SIZE"),
3454 	REGISTER_FIELD_AZ_RENAME(TX_DESCQ_LABEL, "LABEL"),
3455 	REGISTER_FIELD_AZ_RENAME(TX_DESCQ_OWNER_ID, "OWNER"),
3456 	REGISTER_FIELD_AZ_RENAME(TX_DESCQ_EVQ_ID, "EVQ"),
3457 	REGISTER_FIELD_AZ_RENAME(TX_DESCQ_BUF_BASE_ID, "BUF_BASE"),
3458 	REGISTER_FIELD_AZ_RENAME(TX_DESCQ_SW_WPTR, "SW_WPTR"),
3459 	REGISTER_FIELD_AZ_RENAME(TX_DESCQ_HW_RPTR, "HW_RPTR"),
3460 	REGISTER_FIELD_AZ_RENAME(TX_DC_HW_RPTR, "DC_HW_RPTR"),
3461 	REGISTER_FIELD_AZ_RENAME(TX_ISCSI_HDIG_EN, "HDIG"),
3462 	REGISTER_FIELD_AZ_RENAME(TX_ISCSI_DDIG_EN, "DDIG"),
3463 	REGISTER_FIELD_AZ_RENAME(TX_DESCQ_EN, "EN"),
3464 	REGISTER_FIELD_BZ_RENAME(TX_TCP_CHKSM_DIS, "!TCP_CHKSM"),
3465 	REGISTER_FIELD_BZ_RENAME(TX_IP_CHKSM_DIS, "!IP_CHKSM"),
3466 	REGISTER_FIELD_BZ_RENAME(TX_NON_IP_DROP_DIS, "!NON_IP_DROP"),
3467 	REGISTER_FIELD_CZ_RENAME(TX_DPT_IP_FILT_EN, "IP_FILT"),
3468 	REGISTER_FIELD_CZ_RENAME(TX_DPT_ETH_FILT_EN, "ETH_FILT"),
3469 	REGISTER_FIELD_CZ_RENAME(TX_DPT_Q_MASK_WIDTH, "Q_MASK_WIDTH"),
3470 };
3471 #define efx_nic_reg_fields_TX_DESC_PTR_TBL_KER efx_nic_reg_fields_TX_DESC_PTR_TBL
3472 static const struct efx_nic_reg_field efx_nic_reg_fields_EVQ_PTR_TBL[] = {
3473 	REGISTER_FIELD_AZ(EVQ_BUF_BASE_ID),
3474 	REGISTER_FIELD_AZ(EVQ_SIZE),
3475 	REGISTER_FIELD_AZ(EVQ_EN),
3476 	REGISTER_FIELD_AZ(EVQ_NXT_WPTR),
3477 	REGISTER_FIELD_CZ(EVQ_DOS_PROTECT_EN),
3478 	REGISTER_FIELD_AB(EVQ_WKUP_OR_INT_EN),
3479 	REGISTER_FIELD_BZ(EVQ_RPTR_IGN),
3480 };
3481 #define efx_nic_reg_fields_EVQ_PTR_TBL_KER efx_nic_reg_fields_EVQ_PTR_TBL
3482 static const struct efx_nic_reg_field efx_nic_reg_fields_BUF_FULL_TBL[] = {
3483 	REGISTER_FIELD_AZ(BUF_OWNER_ID_FBUF),
3484 	REGISTER_FIELD_AZ(BUF_ADR_FBUF),
3485 	REGISTER_FIELD_AZ(BUF_ADR_REGION),
3486 	REGISTER_FIELD_AZ(IP_DAT_BUF_SIZE),
3487 	REGISTER_FIELD_AZ(BUF_FULL_UNUSED),
3488 };
3489 #define efx_nic_reg_fields_BUF_FULL_TBL_KER efx_nic_reg_fields_BUF_FULL_TBL
3490 static const struct efx_nic_reg_field efx_nic_reg_fields_RX_FILTER_TBL0[] = {
3491 	/* Source port for full match; destination port for UDP wild match */
3492 	REGISTER_FIELD_BZ_RENAME(SRC_TCP_DEST_UDP, "SRC_PORT"),
3493 	REGISTER_FIELD_BZ(SRC_IP),
3494 	/* Destination port for full match or TCP wild match */
3495 	REGISTER_FIELD_BZ_RENAME(DEST_PORT_TCP, "DEST_PORT"),
3496 	REGISTER_FIELD_BZ(DEST_IP),
3497 	REGISTER_FIELD_BZ(RXQ_ID),
3498 	REGISTER_FIELD_BZ(TCP_UDP),
3499 	REGISTER_FIELD_BZ(SCATTER_EN),
3500 	REGISTER_FIELD_BZ(RSS_EN),
3501 };
3502 #define efx_nic_reg_fields_RX_FILTER_TBL1 efx_nic_reg_fields_RX_FILTER_TBL0
3503 static const struct efx_nic_reg_field efx_nic_reg_fields_RX_MAC_FILTER_TBL0[] = {
3504 	REGISTER_FIELD_CZ(RMFT_VLAN_ID),
3505 	REGISTER_FIELD_CZ(RMFT_DEST_MAC),
3506 	REGISTER_FIELD_CZ(RMFT_WILDCARD_MATCH),
3507 	REGISTER_FIELD_CZ(RMFT_RXQ_ID),
3508 	REGISTER_FIELD_CZ(RMFT_IP_OVERRIDE),
3509 	REGISTER_FIELD_CZ(RMFT_SCATTER_EN),
3510 	REGISTER_FIELD_CZ(RMFT_RSS_EN),
3511 };
3512 static const struct efx_nic_reg_field efx_nic_reg_fields_TIMER_TBL[] = {
3513 	REGISTER_FIELD_BB(TIMER_VAL),
3514 	REGISTER_FIELD_CZ(TIMER_VAL),
3515 	REGISTER_FIELD_BB(TIMER_MODE),
3516 	REGISTER_FIELD_CZ(TIMER_MODE),
3517 	REGISTER_FIELD_CZ(RELOAD_TIMER_VAL),
3518 	REGISTER_FIELD_CZ(HOST_NOTIFY_MODE),
3519 	REGISTER_FIELD_CZ(INT_PEND),
3520 	REGISTER_FIELD_CZ(INT_ARMD),
3521 	REGISTER_FIELD_CZ(TIMER_Q_EN),
3522 };
3523 static const struct efx_nic_reg_field efx_nic_reg_fields_TX_PACE_TBL[] = {
3524 	REGISTER_FIELD_BZ(TX_PACE),
3525 };
3526 static const struct efx_nic_reg_field efx_nic_reg_fields_RX_INDIRECTION_TBL[] = {
3527 	REGISTER_FIELD_BZ(IT_QUEUE),
3528 };
3529 static const struct efx_nic_reg_field efx_nic_reg_fields_TX_MAC_FILTER_TBL0[] = {
3530 	REGISTER_FIELD_CZ(TMFT_VLAN_ID),
3531 	REGISTER_FIELD_CZ(TMFT_SRC_MAC),
3532 	REGISTER_FIELD_CZ(TMFT_WILDCARD_MATCH),
3533 	REGISTER_FIELD_CZ(TMFT_TXQ_ID),
3534 };
3535 static const struct efx_nic_reg_field efx_nic_reg_fields_MC_TREG_SMEM[] = {
3536 	REGISTER_FIELD_CZ(MC_TREG_SMEM_ROW),
3537 };
3538 static const struct efx_nic_reg_field efx_nic_reg_fields_BIU_MC_SFT_STATUS[] = {
3539 	REGISTER_FIELD_DZ(MC_SFT_STATUS),
3540 };
3541 
3542 struct efx_nic_reg {
3543 	const char *name;
3544 	const struct efx_nic_reg_field *fields;
3545 	u8 field_count;
3546 	u8 min_revision, max_revision;
3547 };
3548 
3549 #define REGISTER(name, arch, min_rev, max_rev) {			\
3550 	#name,								\
3551 	efx_nic_reg_fields_ ## name,					\
3552 	ARRAY_SIZE(efx_nic_reg_fields_ ## name),			\
3553 	REGISTER_REVISION_ ## arch ## min_rev,				\
3554 	REGISTER_REVISION_ ## arch ## max_rev				\
3555 }
3556 #define REGISTER_AA(name) REGISTER(name, F, A, A)
3557 #define REGISTER_AB(name) REGISTER(name, F, A, B)
3558 #define REGISTER_AZ(name) REGISTER(name, F, A, Z)
3559 #define REGISTER_BB(name) REGISTER(name, F, B, B)
3560 #define REGISTER_BZ(name) REGISTER(name, F, B, Z)
3561 #define REGISTER_CZ(name) REGISTER(name, F, C, Z)
3562 #define REGISTER_DZ(name) REGISTER(name, E, D, Z)
3563 
3564 static const struct efx_nic_reg efx_nic_regs[] = {
3565 	REGISTER_AZ(ADR_REGION),
3566 	REGISTER_AZ(INT_EN_KER),
3567 	REGISTER_BZ(INT_EN_CHAR),
3568 	REGISTER_AZ(INT_ADR_KER),
3569 	REGISTER_BZ(INT_ADR_CHAR),
3570 	/* INT_ACK_KER is WO */
3571 	/* INT_ISR0 is RC */
3572 	REGISTER_AZ(HW_INIT),
3573 	REGISTER_CZ(USR_EV_CFG),
3574 	REGISTER_AB(EE_SPI_HCMD),
3575 	REGISTER_AB(EE_SPI_HADR),
3576 	REGISTER_AB(EE_SPI_HDATA),
3577 	REGISTER_AB(EE_BASE_PAGE),
3578 	REGISTER_AB(EE_VPD_CFG0),
3579 	/* EE_VPD_SW_CNTL and EE_VPD_SW_DATA are not used */
3580 	/* PMBX_DBG_IADDR and PBMX_DBG_IDATA are indirect */
3581 	/* PCIE_CORE_INDIRECT is indirect */
3582 	REGISTER_AB(NIC_STAT),
3583 	REGISTER_AB(GPIO_CTL),
3584 	REGISTER_AB(GLB_CTL),
3585 	/* FATAL_INTR_KER and FATAL_INTR_CHAR are partly RC */
3586 	REGISTER_BZ(DP_CTRL),
3587 	REGISTER_AZ(MEM_STAT),
3588 	REGISTER_AZ(CS_DEBUG),
3589 	REGISTER_AZ(ALTERA_BUILD),
3590 	REGISTER_AZ(CSR_SPARE),
3591 	REGISTER_AB(PCIE_SD_CTL0123),
3592 	REGISTER_AB(PCIE_SD_CTL45),
3593 	REGISTER_AB(PCIE_PCS_CTL_STAT),
3594 	/* DEBUG_DATA_OUT is not used */
3595 	/* DRV_EV is WO */
3596 	REGISTER_AZ(EVQ_CTL),
3597 	REGISTER_AZ(EVQ_CNT1),
3598 	REGISTER_AZ(EVQ_CNT2),
3599 	REGISTER_AZ(BUF_TBL_CFG),
3600 	REGISTER_AZ(SRM_RX_DC_CFG),
3601 	REGISTER_AZ(SRM_TX_DC_CFG),
3602 	REGISTER_AZ(SRM_CFG),
3603 	/* BUF_TBL_UPD is WO */
3604 	REGISTER_AZ(SRM_UPD_EVQ),
3605 	REGISTER_AZ(SRAM_PARITY),
3606 	REGISTER_AZ(RX_CFG),
3607 	REGISTER_BZ(RX_FILTER_CTL),
3608 	/* RX_FLUSH_DESCQ is WO */
3609 	REGISTER_AZ(RX_DC_CFG),
3610 	REGISTER_AZ(RX_DC_PF_WM),
3611 	REGISTER_BZ(RX_RSS_TKEY),
3612 	/* RX_NODESC_DROP is RC */
3613 	REGISTER_AA(RX_SELF_RST),
3614 	/* RX_DEBUG, RX_PUSH_DROP are not used */
3615 	REGISTER_CZ(RX_RSS_IPV6_REG1),
3616 	REGISTER_CZ(RX_RSS_IPV6_REG2),
3617 	REGISTER_CZ(RX_RSS_IPV6_REG3),
3618 	/* TX_FLUSH_DESCQ is WO */
3619 	REGISTER_AZ(TX_DC_CFG),
3620 	REGISTER_AA(TX_CHKSM_CFG),
3621 	REGISTER_AZ(TX_CFG),
3622 	/* TX_PUSH_DROP is not used */
3623 	REGISTER_AZ(TX_RESERVED),
3624 	REGISTER_BZ(TX_PACE),
3625 	/* TX_PACE_DROP_QID is RC */
3626 	REGISTER_BB(TX_VLAN),
3627 	REGISTER_BZ(TX_IPFIL_PORTEN),
3628 	REGISTER_AB(MD_TXD),
3629 	REGISTER_AB(MD_RXD),
3630 	REGISTER_AB(MD_CS),
3631 	REGISTER_AB(MD_PHY_ADR),
3632 	REGISTER_AB(MD_ID),
3633 	/* MD_STAT is RC */
3634 	REGISTER_AB(MAC_STAT_DMA),
3635 	REGISTER_AB(MAC_CTRL),
3636 	REGISTER_BB(GEN_MODE),
3637 	REGISTER_AB(MAC_MC_HASH_REG0),
3638 	REGISTER_AB(MAC_MC_HASH_REG1),
3639 	REGISTER_AB(GM_CFG1),
3640 	REGISTER_AB(GM_CFG2),
3641 	/* GM_IPG and GM_HD are not used */
3642 	REGISTER_AB(GM_MAX_FLEN),
3643 	/* GM_TEST is not used */
3644 	REGISTER_AB(GM_ADR1),
3645 	REGISTER_AB(GM_ADR2),
3646 	REGISTER_AB(GMF_CFG0),
3647 	REGISTER_AB(GMF_CFG1),
3648 	REGISTER_AB(GMF_CFG2),
3649 	REGISTER_AB(GMF_CFG3),
3650 	REGISTER_AB(GMF_CFG4),
3651 	REGISTER_AB(GMF_CFG5),
3652 	REGISTER_BB(TX_SRC_MAC_CTL),
3653 	REGISTER_AB(XM_ADR_LO),
3654 	REGISTER_AB(XM_ADR_HI),
3655 	REGISTER_AB(XM_GLB_CFG),
3656 	REGISTER_AB(XM_TX_CFG),
3657 	REGISTER_AB(XM_RX_CFG),
3658 	REGISTER_AB(XM_MGT_INT_MASK),
3659 	REGISTER_AB(XM_FC),
3660 	REGISTER_AB(XM_PAUSE_TIME),
3661 	REGISTER_AB(XM_TX_PARAM),
3662 	REGISTER_AB(XM_RX_PARAM),
3663 	/* XM_MGT_INT_MSK (note no 'A') is RC */
3664 	REGISTER_AB(XX_PWR_RST),
3665 	REGISTER_AB(XX_SD_CTL),
3666 	REGISTER_AB(XX_TXDRV_CTL),
3667 	/* XX_PRBS_CTL, XX_PRBS_CHK and XX_PRBS_ERR are not used */
3668 	/* XX_CORE_STAT is partly RC */
3669 	REGISTER_DZ(BIU_HW_REV_ID),
3670 	REGISTER_DZ(MC_DB_LWRD),
3671 	REGISTER_DZ(MC_DB_HWRD),
3672 };
3673 
3674 struct efx_nic_reg_table {
3675 	const char *name;
3676 	const struct efx_nic_reg_field *fields;
3677 	u8 field_count;
3678 	u8 min_revision, max_revision;
3679 	u8 step;
3680 	u32 rows;
3681 };
3682 
3683 #define REGISTER_TABLE_DIMENSIONS(name, _, arch, min_rev, max_rev, step, rows) { \
3684 	#name,								\
3685 	efx_nic_reg_fields_ ## name,					\
3686 	ARRAY_SIZE(efx_nic_reg_fields_ ## name),			\
3687 	REGISTER_REVISION_ ## arch ## min_rev,				\
3688 	REGISTER_REVISION_ ## arch ## max_rev,				\
3689 	step, rows							\
3690 }
3691 #define REGISTER_TABLE(name, arch, min_rev, max_rev)			\
3692 	REGISTER_TABLE_DIMENSIONS(					\
3693 		name, arch ## R_ ## min_rev ## max_rev ## _ ## name,	\
3694 		arch, min_rev, max_rev,					\
3695 		arch ## R_ ## min_rev ## max_rev ## _ ## name ## _STEP,	\
3696 		arch ## R_ ## min_rev ## max_rev ## _ ## name ## _ROWS)
3697 #define REGISTER_TABLE_AA(name) REGISTER_TABLE(name, F, A, A)
3698 #define REGISTER_TABLE_AZ(name) REGISTER_TABLE(name, F, A, Z)
3699 #define REGISTER_TABLE_BB(name) REGISTER_TABLE(name, F, B, B)
3700 #define REGISTER_TABLE_BZ(name) REGISTER_TABLE(name, F, B, Z)
3701 #define REGISTER_TABLE_BB_CZ(name)					\
3702 	REGISTER_TABLE_DIMENSIONS(name, FR_BZ_ ## name, F, B, B,	\
3703 				  FR_BZ_ ## name ## _STEP,		\
3704 				  FR_BB_ ## name ## _ROWS),		\
3705 	REGISTER_TABLE_DIMENSIONS(name, FR_BZ_ ## name, F, C, Z,	\
3706 				  FR_BZ_ ## name ## _STEP,		\
3707 				  FR_CZ_ ## name ## _ROWS)
3708 #define REGISTER_TABLE_CZ(name) REGISTER_TABLE(name, F, C, Z)
3709 #define REGISTER_TABLE_DZ(name) REGISTER_TABLE(name, E, D, Z)
3710 
3711 static const struct efx_nic_reg_table efx_nic_reg_tables[] = {
3712 	/* DRIVER is not used */
3713 	/* EVQ_RPTR, TIMER_COMMAND, USR_EV and {RX,TX}_DESC_UPD are WO */
3714 	REGISTER_TABLE_BB(TX_IPFIL_TBL),
3715 	REGISTER_TABLE_BB(TX_SRC_MAC_TBL),
3716 	REGISTER_TABLE_AA(RX_DESC_PTR_TBL_KER),
3717 	REGISTER_TABLE_BB_CZ(RX_DESC_PTR_TBL),
3718 	REGISTER_TABLE_AA(TX_DESC_PTR_TBL_KER),
3719 	REGISTER_TABLE_BB_CZ(TX_DESC_PTR_TBL),
3720 	REGISTER_TABLE_AA(EVQ_PTR_TBL_KER),
3721 	REGISTER_TABLE_BB_CZ(EVQ_PTR_TBL),
3722 	/* We can't reasonably read all of the buffer table (up to 8MB!).
3723 	 * However this driver will only use a few entries.  Reading
3724 	 * 1K entries allows for some expansion of queue count and
3725 	 * size before we need to change the version. */
3726 	REGISTER_TABLE_DIMENSIONS(BUF_FULL_TBL_KER, FR_AA_BUF_FULL_TBL_KER,
3727 				  F, A, A, 8, 1024),
3728 	REGISTER_TABLE_DIMENSIONS(BUF_FULL_TBL, FR_BZ_BUF_FULL_TBL,
3729 				  F, B, Z, 8, 1024),
3730 	REGISTER_TABLE_CZ(RX_MAC_FILTER_TBL0),
3731 	REGISTER_TABLE_BB_CZ(TIMER_TBL),
3732 	REGISTER_TABLE_BB_CZ(TX_PACE_TBL),
3733 	REGISTER_TABLE_BZ(RX_INDIRECTION_TBL),
3734 	/* TX_FILTER_TBL0 is huge and not used by this driver */
3735 	REGISTER_TABLE_CZ(TX_MAC_FILTER_TBL0),
3736 	REGISTER_TABLE_CZ(MC_TREG_SMEM),
3737 	/* MSIX_PBA_TABLE is not mapped */
3738 	/* SRM_DBG is not mapped (and is redundant with BUF_FLL_TBL) */
3739 	REGISTER_TABLE_BZ(RX_FILTER_TBL0),
3740 	REGISTER_TABLE_DZ(BIU_MC_SFT_STATUS),
3741 };
3742 
column_width(const struct efx_nic_reg_field * field)3743 static size_t column_width(const struct efx_nic_reg_field *field)
3744 {
3745 	size_t name_width, value_width;
3746 
3747 	name_width = strlen(field->name);
3748 	value_width = (field->width + 3) >> 2;
3749 
3750 	return name_width > value_width ? name_width : value_width;
3751 }
3752 
column_padding(const struct efx_nic_reg_field * field)3753 static size_t column_padding(const struct efx_nic_reg_field *field)
3754 {
3755 	size_t name_width, value_width;
3756 
3757 	name_width = strlen(field->name);
3758 	value_width = (field->width + 3) >> 2;
3759 
3760 	return name_width > value_width ? name_width - value_width : 0;
3761 }
3762 
3763 static void
print_field_value(const struct efx_nic_reg_field * field,const u8 * buf)3764 print_field_value(const struct efx_nic_reg_field *field, const u8 *buf)
3765 {
3766 	unsigned left, right, sig_bits, digit;
3767 
3768 	right = field->lbn;
3769 	left = right + ((field->width + 3) & ~3);
3770 
3771 	/* How many bits are valid for the most significant hex digit? */
3772 	sig_bits = (field->width & 3) ? (field->width & 3) : 4;
3773 
3774 	while (left > right) {
3775 		left -= 4;
3776 		digit = buf[left >> 3];
3777 		if ((left & 7) + sig_bits > 8)
3778 			digit |= buf[(left >> 3) + 1] << 8;
3779 		digit = (digit >> (left & 7)) & ((1 << sig_bits) - 1);
3780 		printf("%x", digit);
3781 		sig_bits = 4; /* for all subsequent digits */
3782 	}
3783 }
3784 
3785 static const void *
print_single_register(unsigned revision,const struct efx_nic_reg * reg,const void * buf)3786 print_single_register(unsigned revision, const struct efx_nic_reg *reg,
3787 		      const void *buf)
3788 {
3789 	const struct efx_nic_reg_field *field;
3790 	int indent = 0;
3791 	size_t i;
3792 
3793 	for (i = 0; i < reg->field_count; i++) {
3794 		field = &reg->fields[i];
3795 		if (revision >= field->min_revision &&
3796 		    revision <= field->max_revision) {
3797 			if (indent == 0)
3798 				indent = printf("%s: ", reg->name);
3799 			else
3800 				printf("%*s", indent, "");
3801 			printf("%s = ", field->name);
3802 			print_field_value(field, buf);
3803 			fputc('\n', stdout);
3804 		}
3805 	}
3806 
3807 	return (const u8 *)buf + 16;
3808 }
3809 
3810 static const void *
print_simple_table(const struct efx_nic_reg_table * table,const void * buf)3811 print_simple_table(const struct efx_nic_reg_table *table, const void *buf)
3812 {
3813 	const struct efx_nic_reg_field *field = &table->fields[0];
3814 	size_t value_width = (field->width + 3) >> 2;
3815 	size_t column_count = 72 / (value_width + 1);
3816 	size_t size = table->step > 16 ? 16 : table->step;
3817 	size_t i;
3818 
3819 	for (i = 0; i < table->rows; i++) {
3820 		if (i % column_count == 0) {
3821 			if (i != 0)
3822 				fputc('\n', stdout);
3823 			printf("%4zu ", i);
3824 		}
3825 		fputc(' ', stdout);
3826 		print_field_value(field, buf);
3827 		buf = (const u8 *)buf + size;
3828 	}
3829 	fputc('\n', stdout);
3830 
3831 	return buf;
3832 }
3833 
buf_is_zero(const u8 * buf,size_t size)3834 static int buf_is_zero(const u8 *buf, size_t size)
3835 {
3836 	size_t i;
3837 	for (i = 0; i < size; i++)
3838 		if (buf[i])
3839 			return 0;
3840 	return 1;
3841 }
3842 
3843 static const void *
print_complex_table(unsigned revision,const struct efx_nic_reg_table * table,const void * buf)3844 print_complex_table(unsigned revision, const struct efx_nic_reg_table *table,
3845 		    const void *buf)
3846 {
3847 	const struct efx_nic_reg_field *field;
3848 	size_t size = table->step > 16 ? 16 : table->step;
3849 	size_t i, j;
3850 
3851 	/* Column headings */
3852 	fputs("Row ", stdout);
3853 	for (i = 0; i < table->field_count; i++) {
3854 		field = &table->fields[i];
3855 		if (revision >= field->min_revision &&
3856 		    revision <= field->max_revision)
3857 			printf(" %-*s", (int)column_width(field),
3858 			       field->name);
3859 	}
3860 	fputc('\n', stdout);
3861 	fputs("----", stdout);
3862 	for (i = 0; i < table->field_count; i++) {
3863 		field = &table->fields[i];
3864 		if (revision >= field->min_revision &&
3865 		    revision <= field->max_revision) {
3866 			fputc(' ', stdout);
3867 			for (j = column_width(field); j > 0; j--)
3868 				fputc('-', stdout);
3869 		}
3870 	}
3871 	fputc('\n', stdout);
3872 
3873 	for (j = 0; j < table->rows; j++) {
3874 		if (!buf_is_zero(buf, size)) {
3875 			printf("%4zu", j);
3876 			for (i = 0; i < table->field_count; i++) {
3877 				field = &table->fields[i];
3878 				if (!(revision >= field->min_revision &&
3879 				      revision <= field->max_revision))
3880 					continue;
3881 				printf(" %*s", (int)column_padding(field), "");
3882 				print_field_value(field, buf);
3883 			}
3884 			fputc('\n', stdout);
3885 		}
3886 		buf = (const u8 *)buf + size;
3887 	}
3888 
3889 	return buf;
3890 }
3891 
3892 int
sfc_dump_regs(struct ethtool_drvinfo * info maybe_unused,struct ethtool_regs * regs)3893 sfc_dump_regs(struct ethtool_drvinfo *info maybe_unused, struct ethtool_regs *regs)
3894 {
3895 	const struct efx_nic_reg *reg;
3896 	const struct efx_nic_reg_table *table;
3897 	unsigned revision = regs->version;
3898 	const void *buf = regs->data;
3899 	const void *end = regs->data + regs->len;
3900 
3901 	if (revision > REGISTER_REVISION_ED)
3902 		return -1;
3903 
3904 	for (reg = efx_nic_regs;
3905 	     reg < efx_nic_regs + ARRAY_SIZE(efx_nic_regs) && buf < end;
3906 	     reg++) {
3907 		if (revision >= reg->min_revision &&
3908 		    revision <= reg->max_revision)
3909 			buf = print_single_register(revision, reg, buf);
3910 	}
3911 
3912 	for (table = efx_nic_reg_tables;
3913 	     table < efx_nic_reg_tables + ARRAY_SIZE(efx_nic_reg_tables) &&
3914 		     buf < end;
3915 	     table++) {
3916 		if (revision >= table->min_revision &&
3917 		    revision <= table->max_revision) {
3918 			printf("\n%s:\n", table->name);
3919 			if (table->field_count == 1)
3920 				buf = print_simple_table(table, buf);
3921 			else
3922 				buf = print_complex_table(revision, table, buf);
3923 		}
3924 	}
3925 
3926 	return 0;
3927 }
3928