Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cvmx-gmxx-defs.h
Go to the documentation of this file.
1 /***********************license start***************
2  * Author: Cavium Networks
3  *
4  * Contact: [email protected]
5  * This file is part of the OCTEON SDK
6  *
7  * Copyright (c) 2003-2012 Cavium Networks
8  *
9  * This file is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License, Version 2, as
11  * published by the Free Software Foundation.
12  *
13  * This file is distributed in the hope that it will be useful, but
14  * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
15  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
16  * NONINFRINGEMENT. See the GNU General Public License for more
17  * details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this file; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22  * or visit http://www.gnu.org/licenses/.
23  *
24  * This file may also be available under a different license from Cavium.
25  * Contact Cavium Networks for more information
26  ***********************license end**************************************/
27 
28 #ifndef __CVMX_GMXX_DEFS_H__
29 #define __CVMX_GMXX_DEFS_H__
30 
31 static inline uint64_t CVMX_GMXX_BAD_REG(unsigned long block_id)
32 {
33  switch (cvmx_get_octeon_family()) {
40  return CVMX_ADD_IO_SEG(0x0001180008000518ull) + (block_id) * 0x8000000ull;
46  return CVMX_ADD_IO_SEG(0x0001180008000518ull) + (block_id) * 0x8000000ull;
48  return CVMX_ADD_IO_SEG(0x0001180008000518ull) + (block_id) * 0x1000000ull;
49  }
50  return CVMX_ADD_IO_SEG(0x0001180008000518ull) + (block_id) * 0x8000000ull;
51 }
52 
53 static inline uint64_t CVMX_GMXX_BIST(unsigned long block_id)
54 {
55  switch (cvmx_get_octeon_family()) {
62  return CVMX_ADD_IO_SEG(0x0001180008000400ull) + (block_id) * 0x8000000ull;
68  return CVMX_ADD_IO_SEG(0x0001180008000400ull) + (block_id) * 0x8000000ull;
70  return CVMX_ADD_IO_SEG(0x0001180008000400ull) + (block_id) * 0x1000000ull;
71  }
72  return CVMX_ADD_IO_SEG(0x0001180008000400ull) + (block_id) * 0x8000000ull;
73 }
74 
75 #define CVMX_GMXX_BPID_MAPX(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000680ull) + (((offset) & 15) + ((block_id) & 7) * 0x200000ull) * 8)
76 #define CVMX_GMXX_BPID_MSK(block_id) (CVMX_ADD_IO_SEG(0x0001180008000700ull) + ((block_id) & 7) * 0x1000000ull)
77 static inline uint64_t CVMX_GMXX_CLK_EN(unsigned long block_id)
78 {
79  switch (cvmx_get_octeon_family()) {
83  return CVMX_ADD_IO_SEG(0x00011800080007F0ull) + (block_id) * 0x8000000ull;
87  return CVMX_ADD_IO_SEG(0x00011800080007F0ull) + (block_id) * 0x8000000ull;
89  return CVMX_ADD_IO_SEG(0x00011800080007F0ull) + (block_id) * 0x1000000ull;
90  }
91  return CVMX_ADD_IO_SEG(0x00011800080007F0ull) + (block_id) * 0x8000000ull;
92 }
93 
94 #define CVMX_GMXX_EBP_DIS(block_id) (CVMX_ADD_IO_SEG(0x0001180008000608ull) + ((block_id) & 7) * 0x1000000ull)
95 #define CVMX_GMXX_EBP_MSK(block_id) (CVMX_ADD_IO_SEG(0x0001180008000600ull) + ((block_id) & 7) * 0x1000000ull)
96 static inline uint64_t CVMX_GMXX_HG2_CONTROL(unsigned long block_id)
97 {
98  switch (cvmx_get_octeon_family()) {
102  return CVMX_ADD_IO_SEG(0x0001180008000550ull) + (block_id) * 0x8000000ull;
106  return CVMX_ADD_IO_SEG(0x0001180008000550ull) + (block_id) * 0x8000000ull;
108  return CVMX_ADD_IO_SEG(0x0001180008000550ull) + (block_id) * 0x1000000ull;
109  }
110  return CVMX_ADD_IO_SEG(0x0001180008000550ull) + (block_id) * 0x8000000ull;
111 }
112 
113 static inline uint64_t CVMX_GMXX_INF_MODE(unsigned long block_id)
114 {
115  switch (cvmx_get_octeon_family()) {
122  return CVMX_ADD_IO_SEG(0x00011800080007F8ull) + (block_id) * 0x8000000ull;
128  return CVMX_ADD_IO_SEG(0x00011800080007F8ull) + (block_id) * 0x8000000ull;
130  return CVMX_ADD_IO_SEG(0x00011800080007F8ull) + (block_id) * 0x1000000ull;
131  }
132  return CVMX_ADD_IO_SEG(0x00011800080007F8ull) + (block_id) * 0x8000000ull;
133 }
134 
135 static inline uint64_t CVMX_GMXX_NXA_ADR(unsigned long block_id)
136 {
137  switch (cvmx_get_octeon_family()) {
144  return CVMX_ADD_IO_SEG(0x0001180008000510ull) + (block_id) * 0x8000000ull;
150  return CVMX_ADD_IO_SEG(0x0001180008000510ull) + (block_id) * 0x8000000ull;
152  return CVMX_ADD_IO_SEG(0x0001180008000510ull) + (block_id) * 0x1000000ull;
153  }
154  return CVMX_ADD_IO_SEG(0x0001180008000510ull) + (block_id) * 0x8000000ull;
155 }
156 
157 #define CVMX_GMXX_PIPE_STATUS(block_id) (CVMX_ADD_IO_SEG(0x0001180008000760ull) + ((block_id) & 7) * 0x1000000ull)
158 static inline uint64_t CVMX_GMXX_PRTX_CBFC_CTL(unsigned long offset, unsigned long block_id)
159 {
160  switch (cvmx_get_octeon_family()) {
164  return CVMX_ADD_IO_SEG(0x0001180008000580ull) + (block_id) * 0x8000000ull;
168  return CVMX_ADD_IO_SEG(0x0001180008000580ull) + (block_id) * 0x8000000ull;
170  return CVMX_ADD_IO_SEG(0x0001180008000580ull) + (block_id) * 0x1000000ull;
171  }
172  return CVMX_ADD_IO_SEG(0x0001180008000580ull) + (block_id) * 0x8000000ull;
173 }
174 
175 static inline uint64_t CVMX_GMXX_PRTX_CFG(unsigned long offset, unsigned long block_id)
176 {
177  switch (cvmx_get_octeon_family()) {
179  return CVMX_ADD_IO_SEG(0x0001180008000010ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
182  return CVMX_ADD_IO_SEG(0x0001180008000010ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
185  return CVMX_ADD_IO_SEG(0x0001180008000010ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
191  return CVMX_ADD_IO_SEG(0x0001180008000010ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
193  return CVMX_ADD_IO_SEG(0x0001180008000010ull) + ((offset) + (block_id) * 0x0ull) * 2048;
195  return CVMX_ADD_IO_SEG(0x0001180008000010ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
196  }
197  return CVMX_ADD_IO_SEG(0x0001180008000010ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
198 }
199 
200 #define CVMX_GMXX_RXAUI_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180008000740ull) + ((block_id) & 7) * 0x1000000ull)
201 static inline uint64_t CVMX_GMXX_RXX_ADR_CAM0(unsigned long offset, unsigned long block_id)
202 {
203  switch (cvmx_get_octeon_family()) {
207  return CVMX_ADD_IO_SEG(0x0001180008000180ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
210  return CVMX_ADD_IO_SEG(0x0001180008000180ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
216  return CVMX_ADD_IO_SEG(0x0001180008000180ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
218  return CVMX_ADD_IO_SEG(0x0001180008000180ull) + ((offset) + (block_id) * 0x0ull) * 2048;
220  return CVMX_ADD_IO_SEG(0x0001180008000180ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
221  }
222  return CVMX_ADD_IO_SEG(0x0001180008000180ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
223 }
224 
225 static inline uint64_t CVMX_GMXX_RXX_ADR_CAM1(unsigned long offset, unsigned long block_id)
226 {
227  switch (cvmx_get_octeon_family()) {
231  return CVMX_ADD_IO_SEG(0x0001180008000188ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
234  return CVMX_ADD_IO_SEG(0x0001180008000188ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
240  return CVMX_ADD_IO_SEG(0x0001180008000188ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
242  return CVMX_ADD_IO_SEG(0x0001180008000188ull) + ((offset) + (block_id) * 0x0ull) * 2048;
244  return CVMX_ADD_IO_SEG(0x0001180008000188ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
245  }
246  return CVMX_ADD_IO_SEG(0x0001180008000188ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
247 }
248 
249 static inline uint64_t CVMX_GMXX_RXX_ADR_CAM2(unsigned long offset, unsigned long block_id)
250 {
251  switch (cvmx_get_octeon_family()) {
255  return CVMX_ADD_IO_SEG(0x0001180008000190ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
258  return CVMX_ADD_IO_SEG(0x0001180008000190ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
264  return CVMX_ADD_IO_SEG(0x0001180008000190ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
266  return CVMX_ADD_IO_SEG(0x0001180008000190ull) + ((offset) + (block_id) * 0x0ull) * 2048;
268  return CVMX_ADD_IO_SEG(0x0001180008000190ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
269  }
270  return CVMX_ADD_IO_SEG(0x0001180008000190ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
271 }
272 
273 static inline uint64_t CVMX_GMXX_RXX_ADR_CAM3(unsigned long offset, unsigned long block_id)
274 {
275  switch (cvmx_get_octeon_family()) {
279  return CVMX_ADD_IO_SEG(0x0001180008000198ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
282  return CVMX_ADD_IO_SEG(0x0001180008000198ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
288  return CVMX_ADD_IO_SEG(0x0001180008000198ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
290  return CVMX_ADD_IO_SEG(0x0001180008000198ull) + ((offset) + (block_id) * 0x0ull) * 2048;
292  return CVMX_ADD_IO_SEG(0x0001180008000198ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
293  }
294  return CVMX_ADD_IO_SEG(0x0001180008000198ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
295 }
296 
297 static inline uint64_t CVMX_GMXX_RXX_ADR_CAM4(unsigned long offset, unsigned long block_id)
298 {
299  switch (cvmx_get_octeon_family()) {
303  return CVMX_ADD_IO_SEG(0x00011800080001A0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
306  return CVMX_ADD_IO_SEG(0x00011800080001A0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
312  return CVMX_ADD_IO_SEG(0x00011800080001A0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
314  return CVMX_ADD_IO_SEG(0x00011800080001A0ull) + ((offset) + (block_id) * 0x0ull) * 2048;
316  return CVMX_ADD_IO_SEG(0x00011800080001A0ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
317  }
318  return CVMX_ADD_IO_SEG(0x00011800080001A0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
319 }
320 
321 static inline uint64_t CVMX_GMXX_RXX_ADR_CAM5(unsigned long offset, unsigned long block_id)
322 {
323  switch (cvmx_get_octeon_family()) {
327  return CVMX_ADD_IO_SEG(0x00011800080001A8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
330  return CVMX_ADD_IO_SEG(0x00011800080001A8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
336  return CVMX_ADD_IO_SEG(0x00011800080001A8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
338  return CVMX_ADD_IO_SEG(0x00011800080001A8ull) + ((offset) + (block_id) * 0x0ull) * 2048;
340  return CVMX_ADD_IO_SEG(0x00011800080001A8ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
341  }
342  return CVMX_ADD_IO_SEG(0x00011800080001A8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
343 }
344 
345 static inline uint64_t CVMX_GMXX_RXX_ADR_CAM_ALL_EN(unsigned long offset, unsigned long block_id)
346 {
347  switch (cvmx_get_octeon_family()) {
350  return CVMX_ADD_IO_SEG(0x0001180008000110ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
352  return CVMX_ADD_IO_SEG(0x0001180008000110ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
354  return CVMX_ADD_IO_SEG(0x0001180008000110ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
355  }
356  return CVMX_ADD_IO_SEG(0x0001180008000110ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
357 }
358 
359 static inline uint64_t CVMX_GMXX_RXX_ADR_CAM_EN(unsigned long offset, unsigned long block_id)
360 {
361  switch (cvmx_get_octeon_family()) {
363  return CVMX_ADD_IO_SEG(0x0001180008000108ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
366  return CVMX_ADD_IO_SEG(0x0001180008000108ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
369  return CVMX_ADD_IO_SEG(0x0001180008000108ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
375  return CVMX_ADD_IO_SEG(0x0001180008000108ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
377  return CVMX_ADD_IO_SEG(0x0001180008000108ull) + ((offset) + (block_id) * 0x0ull) * 2048;
379  return CVMX_ADD_IO_SEG(0x0001180008000108ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
380  }
381  return CVMX_ADD_IO_SEG(0x0001180008000108ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
382 }
383 
384 static inline uint64_t CVMX_GMXX_RXX_ADR_CTL(unsigned long offset, unsigned long block_id)
385 {
386  switch (cvmx_get_octeon_family()) {
388  return CVMX_ADD_IO_SEG(0x0001180008000100ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
391  return CVMX_ADD_IO_SEG(0x0001180008000100ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
394  return CVMX_ADD_IO_SEG(0x0001180008000100ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
400  return CVMX_ADD_IO_SEG(0x0001180008000100ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
402  return CVMX_ADD_IO_SEG(0x0001180008000100ull) + ((offset) + (block_id) * 0x0ull) * 2048;
404  return CVMX_ADD_IO_SEG(0x0001180008000100ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
405  }
406  return CVMX_ADD_IO_SEG(0x0001180008000100ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
407 }
408 
409 static inline uint64_t CVMX_GMXX_RXX_DECISION(unsigned long offset, unsigned long block_id)
410 {
411  switch (cvmx_get_octeon_family()) {
413  return CVMX_ADD_IO_SEG(0x0001180008000040ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
416  return CVMX_ADD_IO_SEG(0x0001180008000040ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
419  return CVMX_ADD_IO_SEG(0x0001180008000040ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
425  return CVMX_ADD_IO_SEG(0x0001180008000040ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
427  return CVMX_ADD_IO_SEG(0x0001180008000040ull) + ((offset) + (block_id) * 0x0ull) * 2048;
429  return CVMX_ADD_IO_SEG(0x0001180008000040ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
430  }
431  return CVMX_ADD_IO_SEG(0x0001180008000040ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
432 }
433 
434 static inline uint64_t CVMX_GMXX_RXX_FRM_CHK(unsigned long offset, unsigned long block_id)
435 {
436  switch (cvmx_get_octeon_family()) {
438  return CVMX_ADD_IO_SEG(0x0001180008000020ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
441  return CVMX_ADD_IO_SEG(0x0001180008000020ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
444  return CVMX_ADD_IO_SEG(0x0001180008000020ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
450  return CVMX_ADD_IO_SEG(0x0001180008000020ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
452  return CVMX_ADD_IO_SEG(0x0001180008000020ull) + ((offset) + (block_id) * 0x0ull) * 2048;
454  return CVMX_ADD_IO_SEG(0x0001180008000020ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
455  }
456  return CVMX_ADD_IO_SEG(0x0001180008000020ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
457 }
458 
459 static inline uint64_t CVMX_GMXX_RXX_FRM_CTL(unsigned long offset, unsigned long block_id)
460 {
461  switch (cvmx_get_octeon_family()) {
463  return CVMX_ADD_IO_SEG(0x0001180008000018ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
466  return CVMX_ADD_IO_SEG(0x0001180008000018ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
469  return CVMX_ADD_IO_SEG(0x0001180008000018ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
475  return CVMX_ADD_IO_SEG(0x0001180008000018ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
477  return CVMX_ADD_IO_SEG(0x0001180008000018ull) + ((offset) + (block_id) * 0x0ull) * 2048;
479  return CVMX_ADD_IO_SEG(0x0001180008000018ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
480  }
481  return CVMX_ADD_IO_SEG(0x0001180008000018ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
482 }
483 
484 #define CVMX_GMXX_RXX_FRM_MAX(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000030ull) + (((offset) & 3) + ((block_id) & 1) * 0x10000ull) * 2048)
485 #define CVMX_GMXX_RXX_FRM_MIN(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000028ull) + (((offset) & 3) + ((block_id) & 1) * 0x10000ull) * 2048)
486 static inline uint64_t CVMX_GMXX_RXX_IFG(unsigned long offset, unsigned long block_id)
487 {
488  switch (cvmx_get_octeon_family()) {
490  return CVMX_ADD_IO_SEG(0x0001180008000058ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
493  return CVMX_ADD_IO_SEG(0x0001180008000058ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
496  return CVMX_ADD_IO_SEG(0x0001180008000058ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
502  return CVMX_ADD_IO_SEG(0x0001180008000058ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
504  return CVMX_ADD_IO_SEG(0x0001180008000058ull) + ((offset) + (block_id) * 0x0ull) * 2048;
506  return CVMX_ADD_IO_SEG(0x0001180008000058ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
507  }
508  return CVMX_ADD_IO_SEG(0x0001180008000058ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
509 }
510 
511 static inline uint64_t CVMX_GMXX_RXX_INT_EN(unsigned long offset, unsigned long block_id)
512 {
513  switch (cvmx_get_octeon_family()) {
515  return CVMX_ADD_IO_SEG(0x0001180008000008ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
518  return CVMX_ADD_IO_SEG(0x0001180008000008ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
521  return CVMX_ADD_IO_SEG(0x0001180008000008ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
527  return CVMX_ADD_IO_SEG(0x0001180008000008ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
529  return CVMX_ADD_IO_SEG(0x0001180008000008ull) + ((offset) + (block_id) * 0x0ull) * 2048;
531  return CVMX_ADD_IO_SEG(0x0001180008000008ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
532  }
533  return CVMX_ADD_IO_SEG(0x0001180008000008ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
534 }
535 
536 static inline uint64_t CVMX_GMXX_RXX_INT_REG(unsigned long offset, unsigned long block_id)
537 {
538  switch (cvmx_get_octeon_family()) {
540  return CVMX_ADD_IO_SEG(0x0001180008000000ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
543  return CVMX_ADD_IO_SEG(0x0001180008000000ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
546  return CVMX_ADD_IO_SEG(0x0001180008000000ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
552  return CVMX_ADD_IO_SEG(0x0001180008000000ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
554  return CVMX_ADD_IO_SEG(0x0001180008000000ull) + ((offset) + (block_id) * 0x0ull) * 2048;
556  return CVMX_ADD_IO_SEG(0x0001180008000000ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
557  }
558  return CVMX_ADD_IO_SEG(0x0001180008000000ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
559 }
560 
561 static inline uint64_t CVMX_GMXX_RXX_JABBER(unsigned long offset, unsigned long block_id)
562 {
563  switch (cvmx_get_octeon_family()) {
565  return CVMX_ADD_IO_SEG(0x0001180008000038ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
568  return CVMX_ADD_IO_SEG(0x0001180008000038ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
571  return CVMX_ADD_IO_SEG(0x0001180008000038ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
577  return CVMX_ADD_IO_SEG(0x0001180008000038ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
579  return CVMX_ADD_IO_SEG(0x0001180008000038ull) + ((offset) + (block_id) * 0x0ull) * 2048;
581  return CVMX_ADD_IO_SEG(0x0001180008000038ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
582  }
583  return CVMX_ADD_IO_SEG(0x0001180008000038ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
584 }
585 
586 static inline uint64_t CVMX_GMXX_RXX_PAUSE_DROP_TIME(unsigned long offset, unsigned long block_id)
587 {
588  switch (cvmx_get_octeon_family()) {
590  return CVMX_ADD_IO_SEG(0x0001180008000068ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
592  return CVMX_ADD_IO_SEG(0x0001180008000068ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
594  return CVMX_ADD_IO_SEG(0x0001180008000068ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
599  return CVMX_ADD_IO_SEG(0x0001180008000068ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
601  return CVMX_ADD_IO_SEG(0x0001180008000068ull) + ((offset) + (block_id) * 0x0ull) * 2048;
603  return CVMX_ADD_IO_SEG(0x0001180008000068ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
604  }
605  return CVMX_ADD_IO_SEG(0x0001180008000068ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
606 }
607 
608 #define CVMX_GMXX_RXX_RX_INBND(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000060ull) + (((offset) & 3) + ((block_id) & 1) * 0x10000ull) * 2048)
609 static inline uint64_t CVMX_GMXX_RXX_STATS_CTL(unsigned long offset, unsigned long block_id)
610 {
611  switch (cvmx_get_octeon_family()) {
613  return CVMX_ADD_IO_SEG(0x0001180008000050ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
616  return CVMX_ADD_IO_SEG(0x0001180008000050ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
619  return CVMX_ADD_IO_SEG(0x0001180008000050ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
625  return CVMX_ADD_IO_SEG(0x0001180008000050ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
627  return CVMX_ADD_IO_SEG(0x0001180008000050ull) + ((offset) + (block_id) * 0x0ull) * 2048;
629  return CVMX_ADD_IO_SEG(0x0001180008000050ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
630  }
631  return CVMX_ADD_IO_SEG(0x0001180008000050ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
632 }
633 
634 static inline uint64_t CVMX_GMXX_RXX_STATS_OCTS(unsigned long offset, unsigned long block_id)
635 {
636  switch (cvmx_get_octeon_family()) {
638  return CVMX_ADD_IO_SEG(0x0001180008000088ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
641  return CVMX_ADD_IO_SEG(0x0001180008000088ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
644  return CVMX_ADD_IO_SEG(0x0001180008000088ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
650  return CVMX_ADD_IO_SEG(0x0001180008000088ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
652  return CVMX_ADD_IO_SEG(0x0001180008000088ull) + ((offset) + (block_id) * 0x0ull) * 2048;
654  return CVMX_ADD_IO_SEG(0x0001180008000088ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
655  }
656  return CVMX_ADD_IO_SEG(0x0001180008000088ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
657 }
658 
659 static inline uint64_t CVMX_GMXX_RXX_STATS_OCTS_CTL(unsigned long offset, unsigned long block_id)
660 {
661  switch (cvmx_get_octeon_family()) {
663  return CVMX_ADD_IO_SEG(0x0001180008000098ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
666  return CVMX_ADD_IO_SEG(0x0001180008000098ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
669  return CVMX_ADD_IO_SEG(0x0001180008000098ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
675  return CVMX_ADD_IO_SEG(0x0001180008000098ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
677  return CVMX_ADD_IO_SEG(0x0001180008000098ull) + ((offset) + (block_id) * 0x0ull) * 2048;
679  return CVMX_ADD_IO_SEG(0x0001180008000098ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
680  }
681  return CVMX_ADD_IO_SEG(0x0001180008000098ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
682 }
683 
684 static inline uint64_t CVMX_GMXX_RXX_STATS_OCTS_DMAC(unsigned long offset, unsigned long block_id)
685 {
686  switch (cvmx_get_octeon_family()) {
688  return CVMX_ADD_IO_SEG(0x00011800080000A8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
691  return CVMX_ADD_IO_SEG(0x00011800080000A8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
694  return CVMX_ADD_IO_SEG(0x00011800080000A8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
700  return CVMX_ADD_IO_SEG(0x00011800080000A8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
702  return CVMX_ADD_IO_SEG(0x00011800080000A8ull) + ((offset) + (block_id) * 0x0ull) * 2048;
704  return CVMX_ADD_IO_SEG(0x00011800080000A8ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
705  }
706  return CVMX_ADD_IO_SEG(0x00011800080000A8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
707 }
708 
709 static inline uint64_t CVMX_GMXX_RXX_STATS_OCTS_DRP(unsigned long offset, unsigned long block_id)
710 {
711  switch (cvmx_get_octeon_family()) {
713  return CVMX_ADD_IO_SEG(0x00011800080000B8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
716  return CVMX_ADD_IO_SEG(0x00011800080000B8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
719  return CVMX_ADD_IO_SEG(0x00011800080000B8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
725  return CVMX_ADD_IO_SEG(0x00011800080000B8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
727  return CVMX_ADD_IO_SEG(0x00011800080000B8ull) + ((offset) + (block_id) * 0x0ull) * 2048;
729  return CVMX_ADD_IO_SEG(0x00011800080000B8ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
730  }
731  return CVMX_ADD_IO_SEG(0x00011800080000B8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
732 }
733 
734 static inline uint64_t CVMX_GMXX_RXX_STATS_PKTS(unsigned long offset, unsigned long block_id)
735 {
736  switch (cvmx_get_octeon_family()) {
738  return CVMX_ADD_IO_SEG(0x0001180008000080ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
741  return CVMX_ADD_IO_SEG(0x0001180008000080ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
744  return CVMX_ADD_IO_SEG(0x0001180008000080ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
750  return CVMX_ADD_IO_SEG(0x0001180008000080ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
752  return CVMX_ADD_IO_SEG(0x0001180008000080ull) + ((offset) + (block_id) * 0x0ull) * 2048;
754  return CVMX_ADD_IO_SEG(0x0001180008000080ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
755  }
756  return CVMX_ADD_IO_SEG(0x0001180008000080ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
757 }
758 
759 static inline uint64_t CVMX_GMXX_RXX_STATS_PKTS_BAD(unsigned long offset, unsigned long block_id)
760 {
761  switch (cvmx_get_octeon_family()) {
763  return CVMX_ADD_IO_SEG(0x00011800080000C0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
766  return CVMX_ADD_IO_SEG(0x00011800080000C0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
769  return CVMX_ADD_IO_SEG(0x00011800080000C0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
775  return CVMX_ADD_IO_SEG(0x00011800080000C0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
777  return CVMX_ADD_IO_SEG(0x00011800080000C0ull) + ((offset) + (block_id) * 0x0ull) * 2048;
779  return CVMX_ADD_IO_SEG(0x00011800080000C0ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
780  }
781  return CVMX_ADD_IO_SEG(0x00011800080000C0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
782 }
783 
784 static inline uint64_t CVMX_GMXX_RXX_STATS_PKTS_CTL(unsigned long offset, unsigned long block_id)
785 {
786  switch (cvmx_get_octeon_family()) {
788  return CVMX_ADD_IO_SEG(0x0001180008000090ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
791  return CVMX_ADD_IO_SEG(0x0001180008000090ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
794  return CVMX_ADD_IO_SEG(0x0001180008000090ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
800  return CVMX_ADD_IO_SEG(0x0001180008000090ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
802  return CVMX_ADD_IO_SEG(0x0001180008000090ull) + ((offset) + (block_id) * 0x0ull) * 2048;
804  return CVMX_ADD_IO_SEG(0x0001180008000090ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
805  }
806  return CVMX_ADD_IO_SEG(0x0001180008000090ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
807 }
808 
809 static inline uint64_t CVMX_GMXX_RXX_STATS_PKTS_DMAC(unsigned long offset, unsigned long block_id)
810 {
811  switch (cvmx_get_octeon_family()) {
813  return CVMX_ADD_IO_SEG(0x00011800080000A0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
816  return CVMX_ADD_IO_SEG(0x00011800080000A0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
819  return CVMX_ADD_IO_SEG(0x00011800080000A0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
825  return CVMX_ADD_IO_SEG(0x00011800080000A0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
827  return CVMX_ADD_IO_SEG(0x00011800080000A0ull) + ((offset) + (block_id) * 0x0ull) * 2048;
829  return CVMX_ADD_IO_SEG(0x00011800080000A0ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
830  }
831  return CVMX_ADD_IO_SEG(0x00011800080000A0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
832 }
833 
834 static inline uint64_t CVMX_GMXX_RXX_STATS_PKTS_DRP(unsigned long offset, unsigned long block_id)
835 {
836  switch (cvmx_get_octeon_family()) {
838  return CVMX_ADD_IO_SEG(0x00011800080000B0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
841  return CVMX_ADD_IO_SEG(0x00011800080000B0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
844  return CVMX_ADD_IO_SEG(0x00011800080000B0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
850  return CVMX_ADD_IO_SEG(0x00011800080000B0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
852  return CVMX_ADD_IO_SEG(0x00011800080000B0ull) + ((offset) + (block_id) * 0x0ull) * 2048;
854  return CVMX_ADD_IO_SEG(0x00011800080000B0ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
855  }
856  return CVMX_ADD_IO_SEG(0x00011800080000B0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
857 }
858 
859 static inline uint64_t CVMX_GMXX_RXX_UDD_SKP(unsigned long offset, unsigned long block_id)
860 {
861  switch (cvmx_get_octeon_family()) {
863  return CVMX_ADD_IO_SEG(0x0001180008000048ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
866  return CVMX_ADD_IO_SEG(0x0001180008000048ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
869  return CVMX_ADD_IO_SEG(0x0001180008000048ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
875  return CVMX_ADD_IO_SEG(0x0001180008000048ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
877  return CVMX_ADD_IO_SEG(0x0001180008000048ull) + ((offset) + (block_id) * 0x0ull) * 2048;
879  return CVMX_ADD_IO_SEG(0x0001180008000048ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
880  }
881  return CVMX_ADD_IO_SEG(0x0001180008000048ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
882 }
883 
884 static inline uint64_t CVMX_GMXX_RX_BP_DROPX(unsigned long offset, unsigned long block_id)
885 {
886  switch (cvmx_get_octeon_family()) {
888  return CVMX_ADD_IO_SEG(0x0001180008000420ull) + ((offset) + (block_id) * 0x1000000ull) * 8;
891  return CVMX_ADD_IO_SEG(0x0001180008000420ull) + ((offset) + (block_id) * 0x1000000ull) * 8;
894  return CVMX_ADD_IO_SEG(0x0001180008000420ull) + ((offset) + (block_id) * 0x1000000ull) * 8;
900  return CVMX_ADD_IO_SEG(0x0001180008000420ull) + ((offset) + (block_id) * 0x1000000ull) * 8;
902  return CVMX_ADD_IO_SEG(0x0001180008000420ull) + ((offset) + (block_id) * 0x0ull) * 8;
904  return CVMX_ADD_IO_SEG(0x0001180008000420ull) + ((offset) + (block_id) * 0x200000ull) * 8;
905  }
906  return CVMX_ADD_IO_SEG(0x0001180008000420ull) + ((offset) + (block_id) * 0x1000000ull) * 8;
907 }
908 
909 static inline uint64_t CVMX_GMXX_RX_BP_OFFX(unsigned long offset, unsigned long block_id)
910 {
911  switch (cvmx_get_octeon_family()) {
913  return CVMX_ADD_IO_SEG(0x0001180008000460ull) + ((offset) + (block_id) * 0x1000000ull) * 8;
916  return CVMX_ADD_IO_SEG(0x0001180008000460ull) + ((offset) + (block_id) * 0x1000000ull) * 8;
919  return CVMX_ADD_IO_SEG(0x0001180008000460ull) + ((offset) + (block_id) * 0x1000000ull) * 8;
925  return CVMX_ADD_IO_SEG(0x0001180008000460ull) + ((offset) + (block_id) * 0x1000000ull) * 8;
927  return CVMX_ADD_IO_SEG(0x0001180008000460ull) + ((offset) + (block_id) * 0x0ull) * 8;
929  return CVMX_ADD_IO_SEG(0x0001180008000460ull) + ((offset) + (block_id) * 0x200000ull) * 8;
930  }
931  return CVMX_ADD_IO_SEG(0x0001180008000460ull) + ((offset) + (block_id) * 0x1000000ull) * 8;
932 }
933 
934 static inline uint64_t CVMX_GMXX_RX_BP_ONX(unsigned long offset, unsigned long block_id)
935 {
936  switch (cvmx_get_octeon_family()) {
938  return CVMX_ADD_IO_SEG(0x0001180008000440ull) + ((offset) + (block_id) * 0x1000000ull) * 8;
941  return CVMX_ADD_IO_SEG(0x0001180008000440ull) + ((offset) + (block_id) * 0x1000000ull) * 8;
944  return CVMX_ADD_IO_SEG(0x0001180008000440ull) + ((offset) + (block_id) * 0x1000000ull) * 8;
950  return CVMX_ADD_IO_SEG(0x0001180008000440ull) + ((offset) + (block_id) * 0x1000000ull) * 8;
952  return CVMX_ADD_IO_SEG(0x0001180008000440ull) + ((offset) + (block_id) * 0x0ull) * 8;
954  return CVMX_ADD_IO_SEG(0x0001180008000440ull) + ((offset) + (block_id) * 0x200000ull) * 8;
955  }
956  return CVMX_ADD_IO_SEG(0x0001180008000440ull) + ((offset) + (block_id) * 0x1000000ull) * 8;
957 }
958 
959 static inline uint64_t CVMX_GMXX_RX_HG2_STATUS(unsigned long block_id)
960 {
961  switch (cvmx_get_octeon_family()) {
965  return CVMX_ADD_IO_SEG(0x0001180008000548ull) + (block_id) * 0x8000000ull;
969  return CVMX_ADD_IO_SEG(0x0001180008000548ull) + (block_id) * 0x8000000ull;
971  return CVMX_ADD_IO_SEG(0x0001180008000548ull) + (block_id) * 0x1000000ull;
972  }
973  return CVMX_ADD_IO_SEG(0x0001180008000548ull) + (block_id) * 0x8000000ull;
974 }
975 
976 #define CVMX_GMXX_RX_PASS_EN(block_id) (CVMX_ADD_IO_SEG(0x00011800080005F8ull) + ((block_id) & 1) * 0x8000000ull)
977 #define CVMX_GMXX_RX_PASS_MAPX(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000600ull) + (((offset) & 15) + ((block_id) & 1) * 0x1000000ull) * 8)
978 static inline uint64_t CVMX_GMXX_RX_PRTS(unsigned long block_id)
979 {
980  switch (cvmx_get_octeon_family()) {
987  return CVMX_ADD_IO_SEG(0x0001180008000410ull) + (block_id) * 0x8000000ull;
993  return CVMX_ADD_IO_SEG(0x0001180008000410ull) + (block_id) * 0x8000000ull;
995  return CVMX_ADD_IO_SEG(0x0001180008000410ull) + (block_id) * 0x1000000ull;
996  }
997  return CVMX_ADD_IO_SEG(0x0001180008000410ull) + (block_id) * 0x8000000ull;
998 }
999 
1000 static inline uint64_t CVMX_GMXX_RX_PRT_INFO(unsigned long block_id)
1001 {
1002  switch (cvmx_get_octeon_family()) {
1009  return CVMX_ADD_IO_SEG(0x00011800080004E8ull) + (block_id) * 0x8000000ull;
1015  return CVMX_ADD_IO_SEG(0x00011800080004E8ull) + (block_id) * 0x8000000ull;
1017  return CVMX_ADD_IO_SEG(0x00011800080004E8ull) + (block_id) * 0x1000000ull;
1018  }
1019  return CVMX_ADD_IO_SEG(0x00011800080004E8ull) + (block_id) * 0x8000000ull;
1020 }
1021 
1022 #define CVMX_GMXX_RX_TX_STATUS(block_id) (CVMX_ADD_IO_SEG(0x00011800080007E8ull))
1023 static inline uint64_t CVMX_GMXX_RX_XAUI_BAD_COL(unsigned long block_id)
1024 {
1025  switch (cvmx_get_octeon_family()) {
1029  return CVMX_ADD_IO_SEG(0x0001180008000538ull) + (block_id) * 0x8000000ull;
1033  return CVMX_ADD_IO_SEG(0x0001180008000538ull) + (block_id) * 0x8000000ull;
1035  return CVMX_ADD_IO_SEG(0x0001180008000538ull) + (block_id) * 0x1000000ull;
1036  }
1037  return CVMX_ADD_IO_SEG(0x0001180008000538ull) + (block_id) * 0x8000000ull;
1038 }
1039 
1040 static inline uint64_t CVMX_GMXX_RX_XAUI_CTL(unsigned long block_id)
1041 {
1042  switch (cvmx_get_octeon_family()) {
1046  return CVMX_ADD_IO_SEG(0x0001180008000530ull) + (block_id) * 0x8000000ull;
1050  return CVMX_ADD_IO_SEG(0x0001180008000530ull) + (block_id) * 0x8000000ull;
1052  return CVMX_ADD_IO_SEG(0x0001180008000530ull) + (block_id) * 0x1000000ull;
1053  }
1054  return CVMX_ADD_IO_SEG(0x0001180008000530ull) + (block_id) * 0x8000000ull;
1055 }
1056 
1057 static inline uint64_t CVMX_GMXX_SMACX(unsigned long offset, unsigned long block_id)
1058 {
1059  switch (cvmx_get_octeon_family()) {
1061  return CVMX_ADD_IO_SEG(0x0001180008000230ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1064  return CVMX_ADD_IO_SEG(0x0001180008000230ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1067  return CVMX_ADD_IO_SEG(0x0001180008000230ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1073  return CVMX_ADD_IO_SEG(0x0001180008000230ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1075  return CVMX_ADD_IO_SEG(0x0001180008000230ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1077  return CVMX_ADD_IO_SEG(0x0001180008000230ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1078  }
1079  return CVMX_ADD_IO_SEG(0x0001180008000230ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1080 }
1081 
1082 static inline uint64_t CVMX_GMXX_SOFT_BIST(unsigned long block_id)
1083 {
1084  switch (cvmx_get_octeon_family()) {
1086  return CVMX_ADD_IO_SEG(0x00011800080007E8ull) + (block_id) * 0x8000000ull;
1088  return CVMX_ADD_IO_SEG(0x00011800080007E8ull) + (block_id) * 0x8000000ull;
1090  return CVMX_ADD_IO_SEG(0x00011800080007E8ull) + (block_id) * 0x1000000ull;
1091  }
1092  return CVMX_ADD_IO_SEG(0x00011800080007E8ull) + (block_id) * 0x1000000ull;
1093 }
1094 
1095 static inline uint64_t CVMX_GMXX_STAT_BP(unsigned long block_id)
1096 {
1097  switch (cvmx_get_octeon_family()) {
1104  return CVMX_ADD_IO_SEG(0x0001180008000520ull) + (block_id) * 0x8000000ull;
1110  return CVMX_ADD_IO_SEG(0x0001180008000520ull) + (block_id) * 0x8000000ull;
1112  return CVMX_ADD_IO_SEG(0x0001180008000520ull) + (block_id) * 0x1000000ull;
1113  }
1114  return CVMX_ADD_IO_SEG(0x0001180008000520ull) + (block_id) * 0x8000000ull;
1115 }
1116 
1117 static inline uint64_t CVMX_GMXX_TB_REG(unsigned long block_id)
1118 {
1119  switch (cvmx_get_octeon_family()) {
1122  return CVMX_ADD_IO_SEG(0x00011800080007E0ull) + (block_id) * 0x8000000ull;
1124  return CVMX_ADD_IO_SEG(0x00011800080007E0ull) + (block_id) * 0x8000000ull;
1126  return CVMX_ADD_IO_SEG(0x00011800080007E0ull) + (block_id) * 0x1000000ull;
1127  }
1128  return CVMX_ADD_IO_SEG(0x00011800080007E0ull) + (block_id) * 0x8000000ull;
1129 }
1130 
1131 static inline uint64_t CVMX_GMXX_TXX_APPEND(unsigned long offset, unsigned long block_id)
1132 {
1133  switch (cvmx_get_octeon_family()) {
1135  return CVMX_ADD_IO_SEG(0x0001180008000218ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1138  return CVMX_ADD_IO_SEG(0x0001180008000218ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1141  return CVMX_ADD_IO_SEG(0x0001180008000218ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1147  return CVMX_ADD_IO_SEG(0x0001180008000218ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1149  return CVMX_ADD_IO_SEG(0x0001180008000218ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1151  return CVMX_ADD_IO_SEG(0x0001180008000218ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1152  }
1153  return CVMX_ADD_IO_SEG(0x0001180008000218ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1154 }
1155 
1156 static inline uint64_t CVMX_GMXX_TXX_BURST(unsigned long offset, unsigned long block_id)
1157 {
1158  switch (cvmx_get_octeon_family()) {
1160  return CVMX_ADD_IO_SEG(0x0001180008000228ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1163  return CVMX_ADD_IO_SEG(0x0001180008000228ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1166  return CVMX_ADD_IO_SEG(0x0001180008000228ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1172  return CVMX_ADD_IO_SEG(0x0001180008000228ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1174  return CVMX_ADD_IO_SEG(0x0001180008000228ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1176  return CVMX_ADD_IO_SEG(0x0001180008000228ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1177  }
1178  return CVMX_ADD_IO_SEG(0x0001180008000228ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1179 }
1180 
1181 static inline uint64_t CVMX_GMXX_TXX_CBFC_XOFF(unsigned long offset, unsigned long block_id)
1182 {
1183  switch (cvmx_get_octeon_family()) {
1187  return CVMX_ADD_IO_SEG(0x00011800080005A0ull) + (block_id) * 0x8000000ull;
1191  return CVMX_ADD_IO_SEG(0x00011800080005A0ull) + (block_id) * 0x8000000ull;
1193  return CVMX_ADD_IO_SEG(0x00011800080005A0ull) + (block_id) * 0x1000000ull;
1194  }
1195  return CVMX_ADD_IO_SEG(0x00011800080005A0ull) + (block_id) * 0x8000000ull;
1196 }
1197 
1198 static inline uint64_t CVMX_GMXX_TXX_CBFC_XON(unsigned long offset, unsigned long block_id)
1199 {
1200  switch (cvmx_get_octeon_family()) {
1204  return CVMX_ADD_IO_SEG(0x00011800080005C0ull) + (block_id) * 0x8000000ull;
1208  return CVMX_ADD_IO_SEG(0x00011800080005C0ull) + (block_id) * 0x8000000ull;
1210  return CVMX_ADD_IO_SEG(0x00011800080005C0ull) + (block_id) * 0x1000000ull;
1211  }
1212  return CVMX_ADD_IO_SEG(0x00011800080005C0ull) + (block_id) * 0x8000000ull;
1213 }
1214 
1215 #define CVMX_GMXX_TXX_CLK(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000208ull) + (((offset) & 3) + ((block_id) & 1) * 0x10000ull) * 2048)
1216 static inline uint64_t CVMX_GMXX_TXX_CTL(unsigned long offset, unsigned long block_id)
1217 {
1218  switch (cvmx_get_octeon_family()) {
1220  return CVMX_ADD_IO_SEG(0x0001180008000270ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1223  return CVMX_ADD_IO_SEG(0x0001180008000270ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1226  return CVMX_ADD_IO_SEG(0x0001180008000270ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1232  return CVMX_ADD_IO_SEG(0x0001180008000270ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1234  return CVMX_ADD_IO_SEG(0x0001180008000270ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1236  return CVMX_ADD_IO_SEG(0x0001180008000270ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1237  }
1238  return CVMX_ADD_IO_SEG(0x0001180008000270ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1239 }
1240 
1241 static inline uint64_t CVMX_GMXX_TXX_MIN_PKT(unsigned long offset, unsigned long block_id)
1242 {
1243  switch (cvmx_get_octeon_family()) {
1245  return CVMX_ADD_IO_SEG(0x0001180008000240ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1248  return CVMX_ADD_IO_SEG(0x0001180008000240ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1251  return CVMX_ADD_IO_SEG(0x0001180008000240ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1257  return CVMX_ADD_IO_SEG(0x0001180008000240ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1259  return CVMX_ADD_IO_SEG(0x0001180008000240ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1261  return CVMX_ADD_IO_SEG(0x0001180008000240ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1262  }
1263  return CVMX_ADD_IO_SEG(0x0001180008000240ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1264 }
1265 
1266 static inline uint64_t CVMX_GMXX_TXX_PAUSE_PKT_INTERVAL(unsigned long offset, unsigned long block_id)
1267 {
1268  switch (cvmx_get_octeon_family()) {
1270  return CVMX_ADD_IO_SEG(0x0001180008000248ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1273  return CVMX_ADD_IO_SEG(0x0001180008000248ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1276  return CVMX_ADD_IO_SEG(0x0001180008000248ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1282  return CVMX_ADD_IO_SEG(0x0001180008000248ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1284  return CVMX_ADD_IO_SEG(0x0001180008000248ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1286  return CVMX_ADD_IO_SEG(0x0001180008000248ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1287  }
1288  return CVMX_ADD_IO_SEG(0x0001180008000248ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1289 }
1290 
1291 static inline uint64_t CVMX_GMXX_TXX_PAUSE_PKT_TIME(unsigned long offset, unsigned long block_id)
1292 {
1293  switch (cvmx_get_octeon_family()) {
1295  return CVMX_ADD_IO_SEG(0x0001180008000238ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1298  return CVMX_ADD_IO_SEG(0x0001180008000238ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1301  return CVMX_ADD_IO_SEG(0x0001180008000238ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1307  return CVMX_ADD_IO_SEG(0x0001180008000238ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1309  return CVMX_ADD_IO_SEG(0x0001180008000238ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1311  return CVMX_ADD_IO_SEG(0x0001180008000238ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1312  }
1313  return CVMX_ADD_IO_SEG(0x0001180008000238ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1314 }
1315 
1316 static inline uint64_t CVMX_GMXX_TXX_PAUSE_TOGO(unsigned long offset, unsigned long block_id)
1317 {
1318  switch (cvmx_get_octeon_family()) {
1320  return CVMX_ADD_IO_SEG(0x0001180008000258ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1323  return CVMX_ADD_IO_SEG(0x0001180008000258ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1326  return CVMX_ADD_IO_SEG(0x0001180008000258ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1332  return CVMX_ADD_IO_SEG(0x0001180008000258ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1334  return CVMX_ADD_IO_SEG(0x0001180008000258ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1336  return CVMX_ADD_IO_SEG(0x0001180008000258ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1337  }
1338  return CVMX_ADD_IO_SEG(0x0001180008000258ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1339 }
1340 
1341 static inline uint64_t CVMX_GMXX_TXX_PAUSE_ZERO(unsigned long offset, unsigned long block_id)
1342 {
1343  switch (cvmx_get_octeon_family()) {
1345  return CVMX_ADD_IO_SEG(0x0001180008000260ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1348  return CVMX_ADD_IO_SEG(0x0001180008000260ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1351  return CVMX_ADD_IO_SEG(0x0001180008000260ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1357  return CVMX_ADD_IO_SEG(0x0001180008000260ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1359  return CVMX_ADD_IO_SEG(0x0001180008000260ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1361  return CVMX_ADD_IO_SEG(0x0001180008000260ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1362  }
1363  return CVMX_ADD_IO_SEG(0x0001180008000260ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1364 }
1365 
1366 #define CVMX_GMXX_TXX_PIPE(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000310ull) + (((offset) & 3) + ((block_id) & 7) * 0x2000ull) * 2048)
1367 static inline uint64_t CVMX_GMXX_TXX_SGMII_CTL(unsigned long offset, unsigned long block_id)
1368 {
1369  switch (cvmx_get_octeon_family()) {
1371  return CVMX_ADD_IO_SEG(0x0001180008000300ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1374  return CVMX_ADD_IO_SEG(0x0001180008000300ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1378  return CVMX_ADD_IO_SEG(0x0001180008000300ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1380  return CVMX_ADD_IO_SEG(0x0001180008000300ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1381  }
1382  return CVMX_ADD_IO_SEG(0x0001180008000300ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1383 }
1384 
1385 static inline uint64_t CVMX_GMXX_TXX_SLOT(unsigned long offset, unsigned long block_id)
1386 {
1387  switch (cvmx_get_octeon_family()) {
1389  return CVMX_ADD_IO_SEG(0x0001180008000220ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1392  return CVMX_ADD_IO_SEG(0x0001180008000220ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1395  return CVMX_ADD_IO_SEG(0x0001180008000220ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1401  return CVMX_ADD_IO_SEG(0x0001180008000220ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1403  return CVMX_ADD_IO_SEG(0x0001180008000220ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1405  return CVMX_ADD_IO_SEG(0x0001180008000220ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1406  }
1407  return CVMX_ADD_IO_SEG(0x0001180008000220ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1408 }
1409 
1410 static inline uint64_t CVMX_GMXX_TXX_SOFT_PAUSE(unsigned long offset, unsigned long block_id)
1411 {
1412  switch (cvmx_get_octeon_family()) {
1414  return CVMX_ADD_IO_SEG(0x0001180008000250ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1417  return CVMX_ADD_IO_SEG(0x0001180008000250ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1420  return CVMX_ADD_IO_SEG(0x0001180008000250ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1426  return CVMX_ADD_IO_SEG(0x0001180008000250ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1428  return CVMX_ADD_IO_SEG(0x0001180008000250ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1430  return CVMX_ADD_IO_SEG(0x0001180008000250ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1431  }
1432  return CVMX_ADD_IO_SEG(0x0001180008000250ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1433 }
1434 
1435 static inline uint64_t CVMX_GMXX_TXX_STAT0(unsigned long offset, unsigned long block_id)
1436 {
1437  switch (cvmx_get_octeon_family()) {
1439  return CVMX_ADD_IO_SEG(0x0001180008000280ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1442  return CVMX_ADD_IO_SEG(0x0001180008000280ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1445  return CVMX_ADD_IO_SEG(0x0001180008000280ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1451  return CVMX_ADD_IO_SEG(0x0001180008000280ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1453  return CVMX_ADD_IO_SEG(0x0001180008000280ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1455  return CVMX_ADD_IO_SEG(0x0001180008000280ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1456  }
1457  return CVMX_ADD_IO_SEG(0x0001180008000280ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1458 }
1459 
1460 static inline uint64_t CVMX_GMXX_TXX_STAT1(unsigned long offset, unsigned long block_id)
1461 {
1462  switch (cvmx_get_octeon_family()) {
1464  return CVMX_ADD_IO_SEG(0x0001180008000288ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1467  return CVMX_ADD_IO_SEG(0x0001180008000288ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1470  return CVMX_ADD_IO_SEG(0x0001180008000288ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1476  return CVMX_ADD_IO_SEG(0x0001180008000288ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1478  return CVMX_ADD_IO_SEG(0x0001180008000288ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1480  return CVMX_ADD_IO_SEG(0x0001180008000288ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1481  }
1482  return CVMX_ADD_IO_SEG(0x0001180008000288ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1483 }
1484 
1485 static inline uint64_t CVMX_GMXX_TXX_STAT2(unsigned long offset, unsigned long block_id)
1486 {
1487  switch (cvmx_get_octeon_family()) {
1489  return CVMX_ADD_IO_SEG(0x0001180008000290ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1492  return CVMX_ADD_IO_SEG(0x0001180008000290ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1495  return CVMX_ADD_IO_SEG(0x0001180008000290ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1501  return CVMX_ADD_IO_SEG(0x0001180008000290ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1503  return CVMX_ADD_IO_SEG(0x0001180008000290ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1505  return CVMX_ADD_IO_SEG(0x0001180008000290ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1506  }
1507  return CVMX_ADD_IO_SEG(0x0001180008000290ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1508 }
1509 
1510 static inline uint64_t CVMX_GMXX_TXX_STAT3(unsigned long offset, unsigned long block_id)
1511 {
1512  switch (cvmx_get_octeon_family()) {
1514  return CVMX_ADD_IO_SEG(0x0001180008000298ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1517  return CVMX_ADD_IO_SEG(0x0001180008000298ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1520  return CVMX_ADD_IO_SEG(0x0001180008000298ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1526  return CVMX_ADD_IO_SEG(0x0001180008000298ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1528  return CVMX_ADD_IO_SEG(0x0001180008000298ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1530  return CVMX_ADD_IO_SEG(0x0001180008000298ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1531  }
1532  return CVMX_ADD_IO_SEG(0x0001180008000298ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1533 }
1534 
1535 static inline uint64_t CVMX_GMXX_TXX_STAT4(unsigned long offset, unsigned long block_id)
1536 {
1537  switch (cvmx_get_octeon_family()) {
1539  return CVMX_ADD_IO_SEG(0x00011800080002A0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1542  return CVMX_ADD_IO_SEG(0x00011800080002A0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1545  return CVMX_ADD_IO_SEG(0x00011800080002A0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1551  return CVMX_ADD_IO_SEG(0x00011800080002A0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1553  return CVMX_ADD_IO_SEG(0x00011800080002A0ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1555  return CVMX_ADD_IO_SEG(0x00011800080002A0ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1556  }
1557  return CVMX_ADD_IO_SEG(0x00011800080002A0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1558 }
1559 
1560 static inline uint64_t CVMX_GMXX_TXX_STAT5(unsigned long offset, unsigned long block_id)
1561 {
1562  switch (cvmx_get_octeon_family()) {
1564  return CVMX_ADD_IO_SEG(0x00011800080002A8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1567  return CVMX_ADD_IO_SEG(0x00011800080002A8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1570  return CVMX_ADD_IO_SEG(0x00011800080002A8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1576  return CVMX_ADD_IO_SEG(0x00011800080002A8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1578  return CVMX_ADD_IO_SEG(0x00011800080002A8ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1580  return CVMX_ADD_IO_SEG(0x00011800080002A8ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1581  }
1582  return CVMX_ADD_IO_SEG(0x00011800080002A8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1583 }
1584 
1585 static inline uint64_t CVMX_GMXX_TXX_STAT6(unsigned long offset, unsigned long block_id)
1586 {
1587  switch (cvmx_get_octeon_family()) {
1589  return CVMX_ADD_IO_SEG(0x00011800080002B0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1592  return CVMX_ADD_IO_SEG(0x00011800080002B0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1595  return CVMX_ADD_IO_SEG(0x00011800080002B0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1601  return CVMX_ADD_IO_SEG(0x00011800080002B0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1603  return CVMX_ADD_IO_SEG(0x00011800080002B0ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1605  return CVMX_ADD_IO_SEG(0x00011800080002B0ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1606  }
1607  return CVMX_ADD_IO_SEG(0x00011800080002B0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1608 }
1609 
1610 static inline uint64_t CVMX_GMXX_TXX_STAT7(unsigned long offset, unsigned long block_id)
1611 {
1612  switch (cvmx_get_octeon_family()) {
1614  return CVMX_ADD_IO_SEG(0x00011800080002B8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1617  return CVMX_ADD_IO_SEG(0x00011800080002B8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1620  return CVMX_ADD_IO_SEG(0x00011800080002B8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1626  return CVMX_ADD_IO_SEG(0x00011800080002B8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1628  return CVMX_ADD_IO_SEG(0x00011800080002B8ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1630  return CVMX_ADD_IO_SEG(0x00011800080002B8ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1631  }
1632  return CVMX_ADD_IO_SEG(0x00011800080002B8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1633 }
1634 
1635 static inline uint64_t CVMX_GMXX_TXX_STAT8(unsigned long offset, unsigned long block_id)
1636 {
1637  switch (cvmx_get_octeon_family()) {
1639  return CVMX_ADD_IO_SEG(0x00011800080002C0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1642  return CVMX_ADD_IO_SEG(0x00011800080002C0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1645  return CVMX_ADD_IO_SEG(0x00011800080002C0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1651  return CVMX_ADD_IO_SEG(0x00011800080002C0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1653  return CVMX_ADD_IO_SEG(0x00011800080002C0ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1655  return CVMX_ADD_IO_SEG(0x00011800080002C0ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1656  }
1657  return CVMX_ADD_IO_SEG(0x00011800080002C0ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1658 }
1659 
1660 static inline uint64_t CVMX_GMXX_TXX_STAT9(unsigned long offset, unsigned long block_id)
1661 {
1662  switch (cvmx_get_octeon_family()) {
1664  return CVMX_ADD_IO_SEG(0x00011800080002C8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1667  return CVMX_ADD_IO_SEG(0x00011800080002C8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1670  return CVMX_ADD_IO_SEG(0x00011800080002C8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1676  return CVMX_ADD_IO_SEG(0x00011800080002C8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1678  return CVMX_ADD_IO_SEG(0x00011800080002C8ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1680  return CVMX_ADD_IO_SEG(0x00011800080002C8ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1681  }
1682  return CVMX_ADD_IO_SEG(0x00011800080002C8ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1683 }
1684 
1685 static inline uint64_t CVMX_GMXX_TXX_STATS_CTL(unsigned long offset, unsigned long block_id)
1686 {
1687  switch (cvmx_get_octeon_family()) {
1689  return CVMX_ADD_IO_SEG(0x0001180008000268ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1692  return CVMX_ADD_IO_SEG(0x0001180008000268ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1695  return CVMX_ADD_IO_SEG(0x0001180008000268ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1701  return CVMX_ADD_IO_SEG(0x0001180008000268ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1703  return CVMX_ADD_IO_SEG(0x0001180008000268ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1705  return CVMX_ADD_IO_SEG(0x0001180008000268ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1706  }
1707  return CVMX_ADD_IO_SEG(0x0001180008000268ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1708 }
1709 
1710 static inline uint64_t CVMX_GMXX_TXX_THRESH(unsigned long offset, unsigned long block_id)
1711 {
1712  switch (cvmx_get_octeon_family()) {
1714  return CVMX_ADD_IO_SEG(0x0001180008000210ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1717  return CVMX_ADD_IO_SEG(0x0001180008000210ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1720  return CVMX_ADD_IO_SEG(0x0001180008000210ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1726  return CVMX_ADD_IO_SEG(0x0001180008000210ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1728  return CVMX_ADD_IO_SEG(0x0001180008000210ull) + ((offset) + (block_id) * 0x0ull) * 2048;
1730  return CVMX_ADD_IO_SEG(0x0001180008000210ull) + ((offset) + (block_id) * 0x2000ull) * 2048;
1731  }
1732  return CVMX_ADD_IO_SEG(0x0001180008000210ull) + ((offset) + (block_id) * 0x10000ull) * 2048;
1733 }
1734 
1735 static inline uint64_t CVMX_GMXX_TX_BP(unsigned long block_id)
1736 {
1737  switch (cvmx_get_octeon_family()) {
1744  return CVMX_ADD_IO_SEG(0x00011800080004D0ull) + (block_id) * 0x8000000ull;
1750  return CVMX_ADD_IO_SEG(0x00011800080004D0ull) + (block_id) * 0x8000000ull;
1752  return CVMX_ADD_IO_SEG(0x00011800080004D0ull) + (block_id) * 0x1000000ull;
1753  }
1754  return CVMX_ADD_IO_SEG(0x00011800080004D0ull) + (block_id) * 0x8000000ull;
1755 }
1756 
1757 #define CVMX_GMXX_TX_CLK_MSKX(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000780ull) + (((offset) & 1) + ((block_id) & 0) * 0x0ull) * 8)
1758 static inline uint64_t CVMX_GMXX_TX_COL_ATTEMPT(unsigned long block_id)
1759 {
1760  switch (cvmx_get_octeon_family()) {
1767  return CVMX_ADD_IO_SEG(0x0001180008000498ull) + (block_id) * 0x8000000ull;
1773  return CVMX_ADD_IO_SEG(0x0001180008000498ull) + (block_id) * 0x8000000ull;
1775  return CVMX_ADD_IO_SEG(0x0001180008000498ull) + (block_id) * 0x1000000ull;
1776  }
1777  return CVMX_ADD_IO_SEG(0x0001180008000498ull) + (block_id) * 0x8000000ull;
1778 }
1779 
1780 static inline uint64_t CVMX_GMXX_TX_CORRUPT(unsigned long block_id)
1781 {
1782  switch (cvmx_get_octeon_family()) {
1789  return CVMX_ADD_IO_SEG(0x00011800080004D8ull) + (block_id) * 0x8000000ull;
1795  return CVMX_ADD_IO_SEG(0x00011800080004D8ull) + (block_id) * 0x8000000ull;
1797  return CVMX_ADD_IO_SEG(0x00011800080004D8ull) + (block_id) * 0x1000000ull;
1798  }
1799  return CVMX_ADD_IO_SEG(0x00011800080004D8ull) + (block_id) * 0x8000000ull;
1800 }
1801 
1802 static inline uint64_t CVMX_GMXX_TX_HG2_REG1(unsigned long block_id)
1803 {
1804  switch (cvmx_get_octeon_family()) {
1808  return CVMX_ADD_IO_SEG(0x0001180008000558ull) + (block_id) * 0x8000000ull;
1812  return CVMX_ADD_IO_SEG(0x0001180008000558ull) + (block_id) * 0x8000000ull;
1814  return CVMX_ADD_IO_SEG(0x0001180008000558ull) + (block_id) * 0x1000000ull;
1815  }
1816  return CVMX_ADD_IO_SEG(0x0001180008000558ull) + (block_id) * 0x8000000ull;
1817 }
1818 
1819 static inline uint64_t CVMX_GMXX_TX_HG2_REG2(unsigned long block_id)
1820 {
1821  switch (cvmx_get_octeon_family()) {
1825  return CVMX_ADD_IO_SEG(0x0001180008000560ull) + (block_id) * 0x8000000ull;
1829  return CVMX_ADD_IO_SEG(0x0001180008000560ull) + (block_id) * 0x8000000ull;
1831  return CVMX_ADD_IO_SEG(0x0001180008000560ull) + (block_id) * 0x1000000ull;
1832  }
1833  return CVMX_ADD_IO_SEG(0x0001180008000560ull) + (block_id) * 0x8000000ull;
1834 }
1835 
1836 static inline uint64_t CVMX_GMXX_TX_IFG(unsigned long block_id)
1837 {
1838  switch (cvmx_get_octeon_family()) {
1845  return CVMX_ADD_IO_SEG(0x0001180008000488ull) + (block_id) * 0x8000000ull;
1851  return CVMX_ADD_IO_SEG(0x0001180008000488ull) + (block_id) * 0x8000000ull;
1853  return CVMX_ADD_IO_SEG(0x0001180008000488ull) + (block_id) * 0x1000000ull;
1854  }
1855  return CVMX_ADD_IO_SEG(0x0001180008000488ull) + (block_id) * 0x8000000ull;
1856 }
1857 
1858 static inline uint64_t CVMX_GMXX_TX_INT_EN(unsigned long block_id)
1859 {
1860  switch (cvmx_get_octeon_family()) {
1867  return CVMX_ADD_IO_SEG(0x0001180008000508ull) + (block_id) * 0x8000000ull;
1873  return CVMX_ADD_IO_SEG(0x0001180008000508ull) + (block_id) * 0x8000000ull;
1875  return CVMX_ADD_IO_SEG(0x0001180008000508ull) + (block_id) * 0x1000000ull;
1876  }
1877  return CVMX_ADD_IO_SEG(0x0001180008000508ull) + (block_id) * 0x8000000ull;
1878 }
1879 
1880 static inline uint64_t CVMX_GMXX_TX_INT_REG(unsigned long block_id)
1881 {
1882  switch (cvmx_get_octeon_family()) {
1889  return CVMX_ADD_IO_SEG(0x0001180008000500ull) + (block_id) * 0x8000000ull;
1895  return CVMX_ADD_IO_SEG(0x0001180008000500ull) + (block_id) * 0x8000000ull;
1897  return CVMX_ADD_IO_SEG(0x0001180008000500ull) + (block_id) * 0x1000000ull;
1898  }
1899  return CVMX_ADD_IO_SEG(0x0001180008000500ull) + (block_id) * 0x8000000ull;
1900 }
1901 
1902 static inline uint64_t CVMX_GMXX_TX_JAM(unsigned long block_id)
1903 {
1904  switch (cvmx_get_octeon_family()) {
1911  return CVMX_ADD_IO_SEG(0x0001180008000490ull) + (block_id) * 0x8000000ull;
1917  return CVMX_ADD_IO_SEG(0x0001180008000490ull) + (block_id) * 0x8000000ull;
1919  return CVMX_ADD_IO_SEG(0x0001180008000490ull) + (block_id) * 0x1000000ull;
1920  }
1921  return CVMX_ADD_IO_SEG(0x0001180008000490ull) + (block_id) * 0x8000000ull;
1922 }
1923 
1924 static inline uint64_t CVMX_GMXX_TX_LFSR(unsigned long block_id)
1925 {
1926  switch (cvmx_get_octeon_family()) {
1933  return CVMX_ADD_IO_SEG(0x00011800080004F8ull) + (block_id) * 0x8000000ull;
1939  return CVMX_ADD_IO_SEG(0x00011800080004F8ull) + (block_id) * 0x8000000ull;
1941  return CVMX_ADD_IO_SEG(0x00011800080004F8ull) + (block_id) * 0x1000000ull;
1942  }
1943  return CVMX_ADD_IO_SEG(0x00011800080004F8ull) + (block_id) * 0x8000000ull;
1944 }
1945 
1946 static inline uint64_t CVMX_GMXX_TX_OVR_BP(unsigned long block_id)
1947 {
1948  switch (cvmx_get_octeon_family()) {
1955  return CVMX_ADD_IO_SEG(0x00011800080004C8ull) + (block_id) * 0x8000000ull;
1961  return CVMX_ADD_IO_SEG(0x00011800080004C8ull) + (block_id) * 0x8000000ull;
1963  return CVMX_ADD_IO_SEG(0x00011800080004C8ull) + (block_id) * 0x1000000ull;
1964  }
1965  return CVMX_ADD_IO_SEG(0x00011800080004C8ull) + (block_id) * 0x8000000ull;
1966 }
1967 
1968 static inline uint64_t CVMX_GMXX_TX_PAUSE_PKT_DMAC(unsigned long block_id)
1969 {
1970  switch (cvmx_get_octeon_family()) {
1977  return CVMX_ADD_IO_SEG(0x00011800080004A0ull) + (block_id) * 0x8000000ull;
1983  return CVMX_ADD_IO_SEG(0x00011800080004A0ull) + (block_id) * 0x8000000ull;
1985  return CVMX_ADD_IO_SEG(0x00011800080004A0ull) + (block_id) * 0x1000000ull;
1986  }
1987  return CVMX_ADD_IO_SEG(0x00011800080004A0ull) + (block_id) * 0x8000000ull;
1988 }
1989 
1990 static inline uint64_t CVMX_GMXX_TX_PAUSE_PKT_TYPE(unsigned long block_id)
1991 {
1992  switch (cvmx_get_octeon_family()) {
1999  return CVMX_ADD_IO_SEG(0x00011800080004A8ull) + (block_id) * 0x8000000ull;
2005  return CVMX_ADD_IO_SEG(0x00011800080004A8ull) + (block_id) * 0x8000000ull;
2007  return CVMX_ADD_IO_SEG(0x00011800080004A8ull) + (block_id) * 0x1000000ull;
2008  }
2009  return CVMX_ADD_IO_SEG(0x00011800080004A8ull) + (block_id) * 0x8000000ull;
2010 }
2011 
2012 static inline uint64_t CVMX_GMXX_TX_PRTS(unsigned long block_id)
2013 {
2014  switch (cvmx_get_octeon_family()) {
2021  return CVMX_ADD_IO_SEG(0x0001180008000480ull) + (block_id) * 0x8000000ull;
2027  return CVMX_ADD_IO_SEG(0x0001180008000480ull) + (block_id) * 0x8000000ull;
2029  return CVMX_ADD_IO_SEG(0x0001180008000480ull) + (block_id) * 0x1000000ull;
2030  }
2031  return CVMX_ADD_IO_SEG(0x0001180008000480ull) + (block_id) * 0x8000000ull;
2032 }
2033 
2034 #define CVMX_GMXX_TX_SPI_CTL(block_id) (CVMX_ADD_IO_SEG(0x00011800080004C0ull) + ((block_id) & 1) * 0x8000000ull)
2035 #define CVMX_GMXX_TX_SPI_DRAIN(block_id) (CVMX_ADD_IO_SEG(0x00011800080004E0ull) + ((block_id) & 1) * 0x8000000ull)
2036 #define CVMX_GMXX_TX_SPI_MAX(block_id) (CVMX_ADD_IO_SEG(0x00011800080004B0ull) + ((block_id) & 1) * 0x8000000ull)
2037 #define CVMX_GMXX_TX_SPI_ROUNDX(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000680ull) + (((offset) & 31) + ((block_id) & 1) * 0x1000000ull) * 8)
2038 #define CVMX_GMXX_TX_SPI_THRESH(block_id) (CVMX_ADD_IO_SEG(0x00011800080004B8ull) + ((block_id) & 1) * 0x8000000ull)
2039 static inline uint64_t CVMX_GMXX_TX_XAUI_CTL(unsigned long block_id)
2040 {
2041  switch (cvmx_get_octeon_family()) {
2045  return CVMX_ADD_IO_SEG(0x0001180008000528ull) + (block_id) * 0x8000000ull;
2049  return CVMX_ADD_IO_SEG(0x0001180008000528ull) + (block_id) * 0x8000000ull;
2051  return CVMX_ADD_IO_SEG(0x0001180008000528ull) + (block_id) * 0x1000000ull;
2052  }
2053  return CVMX_ADD_IO_SEG(0x0001180008000528ull) + (block_id) * 0x8000000ull;
2054 }
2055 
2056 static inline uint64_t CVMX_GMXX_XAUI_EXT_LOOPBACK(unsigned long block_id)
2057 {
2058  switch (cvmx_get_octeon_family()) {
2062  return CVMX_ADD_IO_SEG(0x0001180008000540ull) + (block_id) * 0x8000000ull;
2066  return CVMX_ADD_IO_SEG(0x0001180008000540ull) + (block_id) * 0x8000000ull;
2068  return CVMX_ADD_IO_SEG(0x0001180008000540ull) + (block_id) * 0x1000000ull;
2069  }
2070  return CVMX_ADD_IO_SEG(0x0001180008000540ull) + (block_id) * 0x8000000ull;
2071 }
2072 
2076 #ifdef __BIG_ENDIAN_BITFIELD
2078  uint64_t inb_nxa:4;
2079  uint64_t statovr:1;
2080  uint64_t loststat:4;
2082  uint64_t out_ovr:16;
2083  uint64_t ncb_ovr:1;
2084  uint64_t out_col:1;
2085 #else
2094 #endif
2095  } s;
2097 #ifdef __BIG_ENDIAN_BITFIELD
2099  uint64_t inb_nxa:4;
2100  uint64_t statovr:1;
2102  uint64_t loststat:3;
2104  uint64_t out_ovr:3;
2106 #else
2115 #endif
2116  } cn30xx;
2122 #ifdef __BIG_ENDIAN_BITFIELD
2124  uint64_t inb_nxa:4;
2125  uint64_t statovr:1;
2126  uint64_t loststat:4;
2128  uint64_t out_ovr:4;
2130 #else
2138 #endif
2139  } cn52xx;
2152 };
2153 
2157 #ifdef __BIG_ENDIAN_BITFIELD
2159  uint64_t status:25;
2160 #else
2163 #endif
2164  } s;
2166 #ifdef __BIG_ENDIAN_BITFIELD
2168  uint64_t status:10;
2169 #else
2172 #endif
2173  } cn30xx;
2178 #ifdef __BIG_ENDIAN_BITFIELD
2180  uint64_t status:12;
2181 #else
2184 #endif
2185  } cn50xx;
2187 #ifdef __BIG_ENDIAN_BITFIELD
2189  uint64_t status:16;
2190 #else
2193 #endif
2194  } cn52xx;
2199 #ifdef __BIG_ENDIAN_BITFIELD
2201  uint64_t status:17;
2202 #else
2205 #endif
2206  } cn58xx;
2215 };
2216 
2220 #ifdef __BIG_ENDIAN_BITFIELD
2222  uint64_t status:1;
2224  uint64_t val:1;
2226  uint64_t bpid:6;
2227 #else
2234 #endif
2235  } s;
2238 };
2239 
2243 #ifdef __BIG_ENDIAN_BITFIELD
2245  uint64_t msk_or:16;
2247  uint64_t msk_and:16;
2248 #else
2253 #endif
2254  } s;
2257 };
2258 
2262 #ifdef __BIG_ENDIAN_BITFIELD
2264  uint64_t clk_en:1;
2265 #else
2268 #endif
2269  } s;
2281 };
2282 
2286 #ifdef __BIG_ENDIAN_BITFIELD
2288  uint64_t dis:16;
2289 #else
2292 #endif
2293  } s;
2296 };
2297 
2301 #ifdef __BIG_ENDIAN_BITFIELD
2303  uint64_t msk:16;
2304 #else
2307 #endif
2308  } s;
2311 };
2312 
2316 #ifdef __BIG_ENDIAN_BITFIELD
2318  uint64_t hg2tx_en:1;
2319  uint64_t hg2rx_en:1;
2320  uint64_t phys_en:1;
2321  uint64_t logl_en:16;
2322 #else
2328 #endif
2329  } s;
2340 };
2341 
2345 #ifdef __BIG_ENDIAN_BITFIELD
2347  uint64_t rate:4;
2349  uint64_t speed:4;
2351  uint64_t mode:3;
2353  uint64_t p0mii:1;
2354  uint64_t en:1;
2355  uint64_t type:1;
2356 #else
2367 #endif
2368  } s;
2370 #ifdef __BIG_ENDIAN_BITFIELD
2372  uint64_t p0mii:1;
2373  uint64_t en:1;
2374  uint64_t type:1;
2375 #else
2380 #endif
2381  } cn30xx;
2383 #ifdef __BIG_ENDIAN_BITFIELD
2385  uint64_t en:1;
2386  uint64_t type:1;
2387 #else
2391 #endif
2392  } cn31xx;
2397 #ifdef __BIG_ENDIAN_BITFIELD
2399  uint64_t speed:2;
2401  uint64_t mode:2;
2403  uint64_t en:1;
2404  uint64_t type:1;
2405 #else
2413 #endif
2414  } cn52xx;
2421 #ifdef __BIG_ENDIAN_BITFIELD
2423  uint64_t speed:4;
2425  uint64_t mode:1;
2427  uint64_t en:1;
2428  uint64_t type:1;
2429 #else
2437 #endif
2438  } cn61xx;
2442 #ifdef __BIG_ENDIAN_BITFIELD
2444  uint64_t rate:4;
2446  uint64_t speed:4;
2448  uint64_t mode:1;
2450  uint64_t en:1;
2451  uint64_t type:1;
2452 #else
2462 #endif
2463  } cn66xx;
2465 #ifdef __BIG_ENDIAN_BITFIELD
2467  uint64_t speed:4;
2469  uint64_t mode:3;
2471  uint64_t en:1;
2472  uint64_t type:1;
2473 #else
2481 #endif
2482  } cn68xx;
2485 };
2486 
2490 #ifdef __BIG_ENDIAN_BITFIELD
2492  uint64_t pipe:7;
2494  uint64_t prt:6;
2495 #else
2500 #endif
2501  } s;
2503 #ifdef __BIG_ENDIAN_BITFIELD
2505  uint64_t prt:6;
2506 #else
2509 #endif
2510  } cn30xx;
2528 };
2529 
2533 #ifdef __BIG_ENDIAN_BITFIELD
2535  uint64_t ovr:4;
2537  uint64_t bp:4;
2539  uint64_t stop:4;
2540 #else
2547 #endif
2548  } s;
2551 };
2552 
2556 #ifdef __BIG_ENDIAN_BITFIELD
2557  uint64_t phys_en:16;
2558  uint64_t logl_en:16;
2559  uint64_t phys_bp:16;
2561  uint64_t bck_en:1;
2562  uint64_t drp_en:1;
2563  uint64_t tx_en:1;
2564  uint64_t rx_en:1;
2565 #else
2574 #endif
2575  } s;
2585 };
2586 
2590 #ifdef __BIG_ENDIAN_BITFIELD
2592  uint64_t pknd:6;
2594  uint64_t tx_idle:1;
2595  uint64_t rx_idle:1;
2597  uint64_t speed_msb:1;
2599  uint64_t slottime:1;
2600  uint64_t duplex:1;
2601  uint64_t speed:1;
2602  uint64_t en:1;
2603 #else
2616 #endif
2617  } s;
2619 #ifdef __BIG_ENDIAN_BITFIELD
2621  uint64_t slottime:1;
2622  uint64_t duplex:1;
2623  uint64_t speed:1;
2624  uint64_t en:1;
2625 #else
2631 #endif
2632  } cn30xx;
2638 #ifdef __BIG_ENDIAN_BITFIELD
2640  uint64_t tx_idle:1;
2641  uint64_t rx_idle:1;
2643  uint64_t speed_msb:1;
2645  uint64_t slottime:1;
2646  uint64_t duplex:1;
2647  uint64_t speed:1;
2648  uint64_t en:1;
2649 #else
2660 #endif
2661  } cn52xx;
2674 };
2675 
2679 #ifdef __BIG_ENDIAN_BITFIELD
2680  uint64_t adr:64;
2681 #else
2683 #endif
2684  } s;
2703 };
2704 
2708 #ifdef __BIG_ENDIAN_BITFIELD
2709  uint64_t adr:64;
2710 #else
2712 #endif
2713  } s;
2732 };
2733 
2737 #ifdef __BIG_ENDIAN_BITFIELD
2738  uint64_t adr:64;
2739 #else
2741 #endif
2742  } s;
2761 };
2762 
2766 #ifdef __BIG_ENDIAN_BITFIELD
2767  uint64_t adr:64;
2768 #else
2770 #endif
2771  } s;
2790 };
2791 
2795 #ifdef __BIG_ENDIAN_BITFIELD
2796  uint64_t adr:64;
2797 #else
2799 #endif
2800  } s;
2819 };
2820 
2824 #ifdef __BIG_ENDIAN_BITFIELD
2825  uint64_t adr:64;
2826 #else
2828 #endif
2829  } s;
2848 };
2849 
2853 #ifdef __BIG_ENDIAN_BITFIELD
2855  uint64_t en:32;
2856 #else
2859 #endif
2860  } s;
2865 };
2866 
2870 #ifdef __BIG_ENDIAN_BITFIELD
2872  uint64_t en:8;
2873 #else
2876 #endif
2877  } s;
2896 };
2897 
2901 #ifdef __BIG_ENDIAN_BITFIELD
2903  uint64_t cam_mode:1;
2904  uint64_t mcst:2;
2905  uint64_t bcst:1;
2906 #else
2911 #endif
2912  } s;
2931 };
2932 
2936 #ifdef __BIG_ENDIAN_BITFIELD
2938  uint64_t cnt:5;
2939 #else
2942 #endif
2943  } s;
2962 };
2963 
2967 #ifdef __BIG_ENDIAN_BITFIELD
2969  uint64_t niberr:1;
2970  uint64_t skperr:1;
2971  uint64_t rcverr:1;
2972  uint64_t lenerr:1;
2973  uint64_t alnerr:1;
2974  uint64_t fcserr:1;
2975  uint64_t jabber:1;
2976  uint64_t maxerr:1;
2977  uint64_t carext:1;
2978  uint64_t minerr:1;
2979 #else
2991 #endif
2992  } s;
2998 #ifdef __BIG_ENDIAN_BITFIELD
3000  uint64_t niberr:1;
3001  uint64_t skperr:1;
3002  uint64_t rcverr:1;
3004  uint64_t alnerr:1;
3005  uint64_t fcserr:1;
3006  uint64_t jabber:1;
3008  uint64_t carext:1;
3010 #else
3022 #endif
3023  } cn50xx;
3025 #ifdef __BIG_ENDIAN_BITFIELD
3027  uint64_t skperr:1;
3028  uint64_t rcverr:1;
3030  uint64_t fcserr:1;
3031  uint64_t jabber:1;
3033  uint64_t carext:1;
3035 #else
3045 #endif
3046  } cn52xx;
3053 #ifdef __BIG_ENDIAN_BITFIELD
3055  uint64_t skperr:1;
3056  uint64_t rcverr:1;
3058  uint64_t fcserr:1;
3059  uint64_t jabber:1;
3061  uint64_t carext:1;
3062  uint64_t minerr:1;
3063 #else
3073 #endif
3074  } cn61xx;
3081 };
3082 
3086 #ifdef __BIG_ENDIAN_BITFIELD
3088  uint64_t ptp_mode:1;
3090  uint64_t null_dis:1;
3091  uint64_t pre_align:1;
3092  uint64_t pad_len:1;
3093  uint64_t vlan_len:1;
3094  uint64_t pre_free:1;
3095  uint64_t ctl_smac:1;
3096  uint64_t ctl_mcst:1;
3097  uint64_t ctl_bck:1;
3098  uint64_t ctl_drp:1;
3099  uint64_t pre_strp:1;
3100  uint64_t pre_chk:1;
3101 #else
3116 #endif
3117  } s;
3119 #ifdef __BIG_ENDIAN_BITFIELD
3121  uint64_t pad_len:1;
3122  uint64_t vlan_len:1;
3123  uint64_t pre_free:1;
3124  uint64_t ctl_smac:1;
3125  uint64_t ctl_mcst:1;
3126  uint64_t ctl_bck:1;
3127  uint64_t ctl_drp:1;
3128  uint64_t pre_strp:1;
3129  uint64_t pre_chk:1;
3130 #else
3141 #endif
3142  } cn30xx;
3144 #ifdef __BIG_ENDIAN_BITFIELD
3146  uint64_t vlan_len:1;
3147  uint64_t pre_free:1;
3148  uint64_t ctl_smac:1;
3149  uint64_t ctl_mcst:1;
3150  uint64_t ctl_bck:1;
3151  uint64_t ctl_drp:1;
3152  uint64_t pre_strp:1;
3153  uint64_t pre_chk:1;
3154 #else
3164 #endif
3165  } cn31xx;
3169 #ifdef __BIG_ENDIAN_BITFIELD
3171  uint64_t null_dis:1;
3172  uint64_t pre_align:1;
3174  uint64_t pre_free:1;
3175  uint64_t ctl_smac:1;
3176  uint64_t ctl_mcst:1;
3177  uint64_t ctl_bck:1;
3178  uint64_t ctl_drp:1;
3179  uint64_t pre_strp:1;
3180  uint64_t pre_chk:1;
3181 #else
3193 #endif
3194  } cn50xx;
3199 #ifdef __BIG_ENDIAN_BITFIELD
3201  uint64_t pre_align:1;
3203  uint64_t pre_free:1;
3204  uint64_t ctl_smac:1;
3205  uint64_t ctl_mcst:1;
3206  uint64_t ctl_bck:1;
3207  uint64_t ctl_drp:1;
3208  uint64_t pre_strp:1;
3209  uint64_t pre_chk:1;
3210 #else
3221 #endif
3222  } cn56xxp1;
3224 #ifdef __BIG_ENDIAN_BITFIELD
3226  uint64_t null_dis:1;
3227  uint64_t pre_align:1;
3228  uint64_t pad_len:1;
3229  uint64_t vlan_len:1;
3230  uint64_t pre_free:1;
3231  uint64_t ctl_smac:1;
3232  uint64_t ctl_mcst:1;
3233  uint64_t ctl_bck:1;
3234  uint64_t ctl_drp:1;
3235  uint64_t pre_strp:1;
3236  uint64_t pre_chk:1;
3237 #else
3250 #endif
3251  } cn58xx;
3254 #ifdef __BIG_ENDIAN_BITFIELD
3256  uint64_t ptp_mode:1;
3258  uint64_t null_dis:1;
3259  uint64_t pre_align:1;
3261  uint64_t pre_free:1;
3262  uint64_t ctl_smac:1;
3263  uint64_t ctl_mcst:1;
3264  uint64_t ctl_bck:1;
3265  uint64_t ctl_drp:1;
3266  uint64_t pre_strp:1;
3267  uint64_t pre_chk:1;
3268 #else
3282 #endif
3283  } cn61xx;
3290 };
3291 
3295 #ifdef __BIG_ENDIAN_BITFIELD
3297  uint64_t len:16;
3298 #else
3301 #endif
3302  } s;
3309 };
3310 
3314 #ifdef __BIG_ENDIAN_BITFIELD
3316  uint64_t len:16;
3317 #else
3320 #endif
3321  } s;
3328 };
3329 
3333 #ifdef __BIG_ENDIAN_BITFIELD
3335  uint64_t ifg:4;
3336 #else
3339 #endif
3340  } s;
3359 };
3360 
3364 #ifdef __BIG_ENDIAN_BITFIELD
3366  uint64_t hg2cc:1;
3367  uint64_t hg2fld:1;
3368  uint64_t undat:1;
3369  uint64_t uneop:1;
3370  uint64_t unsop:1;
3371  uint64_t bad_term:1;
3372  uint64_t bad_seq:1;
3373  uint64_t rem_fault:1;
3374  uint64_t loc_fault:1;
3375  uint64_t pause_drp:1;
3376  uint64_t phy_dupx:1;
3377  uint64_t phy_spd:1;
3378  uint64_t phy_link:1;
3379  uint64_t ifgerr:1;
3380  uint64_t coldet:1;
3381  uint64_t falerr:1;
3382  uint64_t rsverr:1;
3383  uint64_t pcterr:1;
3384  uint64_t ovrerr:1;
3385  uint64_t niberr:1;
3386  uint64_t skperr:1;
3387  uint64_t rcverr:1;
3388  uint64_t lenerr:1;
3389  uint64_t alnerr:1;
3390  uint64_t fcserr:1;
3391  uint64_t jabber:1;
3392  uint64_t maxerr:1;
3393  uint64_t carext:1;
3394  uint64_t minerr:1;
3395 #else
3426 #endif
3427  } s;
3429 #ifdef __BIG_ENDIAN_BITFIELD
3431  uint64_t phy_dupx:1;
3432  uint64_t phy_spd:1;
3433  uint64_t phy_link:1;
3434  uint64_t ifgerr:1;
3435  uint64_t coldet:1;
3436  uint64_t falerr:1;
3437  uint64_t rsverr:1;
3438  uint64_t pcterr:1;
3439  uint64_t ovrerr:1;
3440  uint64_t niberr:1;
3441  uint64_t skperr:1;
3442  uint64_t rcverr:1;
3443  uint64_t lenerr:1;
3444  uint64_t alnerr:1;
3445  uint64_t fcserr:1;
3446  uint64_t jabber:1;
3447  uint64_t maxerr:1;
3448  uint64_t carext:1;
3449  uint64_t minerr:1;
3450 #else
3471 #endif
3472  } cn30xx;
3477 #ifdef __BIG_ENDIAN_BITFIELD
3479  uint64_t pause_drp:1;
3480  uint64_t phy_dupx:1;
3481  uint64_t phy_spd:1;
3482  uint64_t phy_link:1;
3483  uint64_t ifgerr:1;
3484  uint64_t coldet:1;
3485  uint64_t falerr:1;
3486  uint64_t rsverr:1;
3487  uint64_t pcterr:1;
3488  uint64_t ovrerr:1;
3489  uint64_t niberr:1;
3490  uint64_t skperr:1;
3491  uint64_t rcverr:1;
3493  uint64_t alnerr:1;
3494  uint64_t fcserr:1;
3495  uint64_t jabber:1;
3497  uint64_t carext:1;
3499 #else
3521 #endif
3522  } cn50xx;
3524 #ifdef __BIG_ENDIAN_BITFIELD
3526  uint64_t hg2cc:1;
3527  uint64_t hg2fld:1;
3528  uint64_t undat:1;
3529  uint64_t uneop:1;
3530  uint64_t unsop:1;
3531  uint64_t bad_term:1;
3532  uint64_t bad_seq:1;
3533  uint64_t rem_fault:1;
3534  uint64_t loc_fault:1;
3535  uint64_t pause_drp:1;
3537  uint64_t ifgerr:1;
3538  uint64_t coldet:1;
3539  uint64_t falerr:1;
3540  uint64_t rsverr:1;
3541  uint64_t pcterr:1;
3542  uint64_t ovrerr:1;
3544  uint64_t skperr:1;
3545  uint64_t rcverr:1;
3547  uint64_t fcserr:1;
3548  uint64_t jabber:1;
3550  uint64_t carext:1;
3552 #else
3580 #endif
3581  } cn52xx;
3585 #ifdef __BIG_ENDIAN_BITFIELD
3587  uint64_t undat:1;
3588  uint64_t uneop:1;
3589  uint64_t unsop:1;
3590  uint64_t bad_term:1;
3591  uint64_t bad_seq:1;
3592  uint64_t rem_fault:1;
3593  uint64_t loc_fault:1;
3594  uint64_t pause_drp:1;
3596  uint64_t ifgerr:1;
3597  uint64_t coldet:1;
3598  uint64_t falerr:1;
3599  uint64_t rsverr:1;
3600  uint64_t pcterr:1;
3601  uint64_t ovrerr:1;
3603  uint64_t skperr:1;
3604  uint64_t rcverr:1;
3606  uint64_t fcserr:1;
3607  uint64_t jabber:1;
3609  uint64_t carext:1;
3611 #else
3637 #endif
3638  } cn56xxp1;
3640 #ifdef __BIG_ENDIAN_BITFIELD
3642  uint64_t pause_drp:1;
3643  uint64_t phy_dupx:1;
3644  uint64_t phy_spd:1;
3645  uint64_t phy_link:1;
3646  uint64_t ifgerr:1;
3647  uint64_t coldet:1;
3648  uint64_t falerr:1;
3649  uint64_t rsverr:1;
3650  uint64_t pcterr:1;
3651  uint64_t ovrerr:1;
3652  uint64_t niberr:1;
3653  uint64_t skperr:1;
3654  uint64_t rcverr:1;
3655  uint64_t lenerr:1;
3656  uint64_t alnerr:1;
3657  uint64_t fcserr:1;
3658  uint64_t jabber:1;
3659  uint64_t maxerr:1;
3660  uint64_t carext:1;
3661  uint64_t minerr:1;
3662 #else
3684 #endif
3685  } cn58xx;
3688 #ifdef __BIG_ENDIAN_BITFIELD
3690  uint64_t hg2cc:1;
3691  uint64_t hg2fld:1;
3692  uint64_t undat:1;
3693  uint64_t uneop:1;
3694  uint64_t unsop:1;
3695  uint64_t bad_term:1;
3696  uint64_t bad_seq:1;
3697  uint64_t rem_fault:1;
3698  uint64_t loc_fault:1;
3699  uint64_t pause_drp:1;
3701  uint64_t ifgerr:1;
3702  uint64_t coldet:1;
3703  uint64_t falerr:1;
3704  uint64_t rsverr:1;
3705  uint64_t pcterr:1;
3706  uint64_t ovrerr:1;
3708  uint64_t skperr:1;
3709  uint64_t rcverr:1;
3711  uint64_t fcserr:1;
3712  uint64_t jabber:1;
3714  uint64_t carext:1;
3715  uint64_t minerr:1;
3716 #else
3744 #endif
3745  } cn61xx;
3752 };
3753 
3757 #ifdef __BIG_ENDIAN_BITFIELD
3759  uint64_t hg2cc:1;
3760  uint64_t hg2fld:1;
3761  uint64_t undat:1;
3762  uint64_t uneop:1;
3763  uint64_t unsop:1;
3764  uint64_t bad_term:1;
3765  uint64_t bad_seq:1;
3766  uint64_t rem_fault:1;
3767  uint64_t loc_fault:1;
3768  uint64_t pause_drp:1;
3769  uint64_t phy_dupx:1;
3770  uint64_t phy_spd:1;
3771  uint64_t phy_link:1;
3772  uint64_t ifgerr:1;
3773  uint64_t coldet:1;
3774  uint64_t falerr:1;
3775  uint64_t rsverr:1;
3776  uint64_t pcterr:1;
3777  uint64_t ovrerr:1;
3778  uint64_t niberr:1;
3779  uint64_t skperr:1;
3780  uint64_t rcverr:1;
3781  uint64_t lenerr:1;
3782  uint64_t alnerr:1;
3783  uint64_t fcserr:1;
3784  uint64_t jabber:1;
3785  uint64_t maxerr:1;
3786  uint64_t carext:1;
3787  uint64_t minerr:1;
3788 #else
3819 #endif
3820  } s;
3822 #ifdef __BIG_ENDIAN_BITFIELD
3824  uint64_t phy_dupx:1;
3825  uint64_t phy_spd:1;
3826  uint64_t phy_link:1;
3827  uint64_t ifgerr:1;
3828  uint64_t coldet:1;
3829  uint64_t falerr:1;
3830  uint64_t rsverr:1;
3831  uint64_t pcterr:1;
3832  uint64_t ovrerr:1;
3833  uint64_t niberr:1;
3834  uint64_t skperr:1;
3835  uint64_t rcverr:1;
3836  uint64_t lenerr:1;
3837  uint64_t alnerr:1;
3838  uint64_t fcserr:1;
3839  uint64_t jabber:1;
3840  uint64_t maxerr:1;
3841  uint64_t carext:1;
3842  uint64_t minerr:1;
3843 #else
3864 #endif
3865  } cn30xx;
3870 #ifdef __BIG_ENDIAN_BITFIELD
3872  uint64_t pause_drp:1;
3873  uint64_t phy_dupx:1;
3874  uint64_t phy_spd:1;
3875  uint64_t phy_link:1;
3876  uint64_t ifgerr:1;
3877  uint64_t coldet:1;
3878  uint64_t falerr:1;
3879  uint64_t rsverr:1;
3880  uint64_t pcterr:1;
3881  uint64_t ovrerr:1;
3882  uint64_t niberr:1;
3883  uint64_t skperr:1;
3884  uint64_t rcverr:1;
3886  uint64_t alnerr:1;
3887  uint64_t fcserr:1;
3888  uint64_t jabber:1;
3890  uint64_t carext:1;
3892 #else
3914 #endif
3915  } cn50xx;
3917 #ifdef __BIG_ENDIAN_BITFIELD
3919  uint64_t hg2cc:1;
3920  uint64_t hg2fld:1;
3921  uint64_t undat:1;
3922  uint64_t uneop:1;
3923  uint64_t unsop:1;
3924  uint64_t bad_term:1;
3925  uint64_t bad_seq:1;
3926  uint64_t rem_fault:1;
3927  uint64_t loc_fault:1;
3928  uint64_t pause_drp:1;
3930  uint64_t ifgerr:1;
3931  uint64_t coldet:1;
3932  uint64_t falerr:1;
3933  uint64_t rsverr:1;
3934  uint64_t pcterr:1;
3935  uint64_t ovrerr:1;
3937  uint64_t skperr:1;
3938  uint64_t rcverr:1;
3940  uint64_t fcserr:1;
3941  uint64_t jabber:1;
3943  uint64_t carext:1;
3945 #else
3973 #endif
3974  } cn52xx;
3978 #ifdef __BIG_ENDIAN_BITFIELD
3980  uint64_t undat:1;
3981  uint64_t uneop:1;
3982  uint64_t unsop:1;
3983  uint64_t bad_term:1;
3984  uint64_t bad_seq:1;
3985  uint64_t rem_fault:1;
3986  uint64_t loc_fault:1;
3987  uint64_t pause_drp:1;
3989  uint64_t ifgerr:1;
3990  uint64_t coldet:1;
3991  uint64_t falerr:1;
3992  uint64_t rsverr:1;
3993  uint64_t pcterr:1;
3994  uint64_t ovrerr:1;
3996  uint64_t skperr:1;
3997  uint64_t rcverr:1;
3999  uint64_t fcserr:1;
4000  uint64_t jabber:1;
4002  uint64_t carext:1;
4004 #else
4030 #endif
4031  } cn56xxp1;
4033 #ifdef __BIG_ENDIAN_BITFIELD
4035  uint64_t pause_drp:1;
4036  uint64_t phy_dupx:1;
4037  uint64_t phy_spd:1;
4038  uint64_t phy_link:1;
4039  uint64_t ifgerr:1;
4040  uint64_t coldet:1;
4041  uint64_t falerr:1;
4042  uint64_t rsverr:1;
4043  uint64_t pcterr:1;
4044  uint64_t ovrerr:1;
4045  uint64_t niberr:1;
4046  uint64_t skperr:1;
4047  uint64_t rcverr:1;
4048  uint64_t lenerr:1;
4049  uint64_t alnerr:1;
4050  uint64_t fcserr:1;
4051  uint64_t jabber:1;
4052  uint64_t maxerr:1;
4053  uint64_t carext:1;
4054  uint64_t minerr:1;
4055 #else
4077 #endif
4078  } cn58xx;
4081 #ifdef __BIG_ENDIAN_BITFIELD
4083  uint64_t hg2cc:1;
4084  uint64_t hg2fld:1;
4085  uint64_t undat:1;
4086  uint64_t uneop:1;
4087  uint64_t unsop:1;
4088  uint64_t bad_term:1;
4089  uint64_t bad_seq:1;
4090  uint64_t rem_fault:1;
4091  uint64_t loc_fault:1;
4092  uint64_t pause_drp:1;
4094  uint64_t ifgerr:1;
4095  uint64_t coldet:1;
4096  uint64_t falerr:1;
4097  uint64_t rsverr:1;
4098  uint64_t pcterr:1;
4099  uint64_t ovrerr:1;
4101  uint64_t skperr:1;
4102  uint64_t rcverr:1;
4104  uint64_t fcserr:1;
4105  uint64_t jabber:1;
4107  uint64_t carext:1;
4108  uint64_t minerr:1;
4109 #else
4137 #endif
4138  } cn61xx;
4145 };
4146 
4150 #ifdef __BIG_ENDIAN_BITFIELD
4152  uint64_t cnt:16;
4153 #else
4156 #endif
4157  } s;
4176 };
4177 
4181 #ifdef __BIG_ENDIAN_BITFIELD
4183  uint64_t status:16;
4184 #else
4187 #endif
4188  } s;
4203 };
4204 
4208 #ifdef __BIG_ENDIAN_BITFIELD
4210  uint64_t duplex:1;
4211  uint64_t speed:2;
4212  uint64_t status:1;
4213 #else
4218 #endif
4219  } s;
4227 };
4228 
4232 #ifdef __BIG_ENDIAN_BITFIELD
4234  uint64_t rd_clr:1;
4235 #else
4238 #endif
4239  } s;
4258 };
4259 
4263 #ifdef __BIG_ENDIAN_BITFIELD
4265  uint64_t cnt:48;
4266 #else
4269 #endif
4270  } s;
4289 };
4290 
4294 #ifdef __BIG_ENDIAN_BITFIELD
4296  uint64_t cnt:48;
4297 #else
4300 #endif
4301  } s;
4320 };
4321 
4325 #ifdef __BIG_ENDIAN_BITFIELD
4327  uint64_t cnt:48;
4328 #else
4331 #endif
4332  } s;
4351 };
4352 
4356 #ifdef __BIG_ENDIAN_BITFIELD
4358  uint64_t cnt:48;
4359 #else
4362 #endif
4363  } s;
4382 };
4383 
4387 #ifdef __BIG_ENDIAN_BITFIELD
4389  uint64_t cnt:32;
4390 #else
4393 #endif
4394  } s;
4413 };
4414 
4418 #ifdef __BIG_ENDIAN_BITFIELD
4420  uint64_t cnt:32;
4421 #else
4424 #endif
4425  } s;
4444 };
4445 
4449 #ifdef __BIG_ENDIAN_BITFIELD
4451  uint64_t cnt:32;
4452 #else
4455 #endif
4456  } s;
4475 };
4476 
4480 #ifdef __BIG_ENDIAN_BITFIELD
4482  uint64_t cnt:32;
4483 #else
4486 #endif
4487  } s;
4506 };
4507 
4511 #ifdef __BIG_ENDIAN_BITFIELD
4513  uint64_t cnt:32;
4514 #else
4517 #endif
4518  } s;
4537 };
4538 
4542 #ifdef __BIG_ENDIAN_BITFIELD
4544  uint64_t fcssel:1;
4546  uint64_t len:7;
4547 #else
4552 #endif
4553  } s;
4572 };
4573 
4577 #ifdef __BIG_ENDIAN_BITFIELD
4579  uint64_t mark:6;
4580 #else
4583 #endif
4584  } s;
4603 };
4604 
4608 #ifdef __BIG_ENDIAN_BITFIELD
4610  uint64_t mark:6;
4611 #else
4614 #endif
4615  } s;
4634 };
4635 
4639 #ifdef __BIG_ENDIAN_BITFIELD
4641  uint64_t mark:11;
4642 #else
4645 #endif
4646  } s;
4648 #ifdef __BIG_ENDIAN_BITFIELD
4650  uint64_t mark:9;
4651 #else
4654 #endif
4655  } cn30xx;
4673 };
4674 
4678 #ifdef __BIG_ENDIAN_BITFIELD
4680  uint64_t phtim2go:16;
4681  uint64_t xof:16;
4682  uint64_t lgtim2go:16;
4683 #else
4688 #endif
4689  } s;
4700 };
4701 
4705 #ifdef __BIG_ENDIAN_BITFIELD
4707  uint64_t en:16;
4708 #else
4711 #endif
4712  } s;
4717 };
4718 
4722 #ifdef __BIG_ENDIAN_BITFIELD
4724  uint64_t dprt:4;
4725 #else
4728 #endif
4729  } s;
4734 };
4735 
4739 #ifdef __BIG_ENDIAN_BITFIELD
4741  uint64_t drop:16;
4742  uint64_t commit:16;
4743 #else
4747 #endif
4748  } s;
4750 #ifdef __BIG_ENDIAN_BITFIELD
4752  uint64_t drop:3;
4754  uint64_t commit:3;
4755 #else
4760 #endif
4761  } cn30xx;
4766 #ifdef __BIG_ENDIAN_BITFIELD
4768  uint64_t drop:4;
4770  uint64_t commit:4;
4771 #else
4776 #endif
4777  } cn52xx;
4790 #ifdef __BIG_ENDIAN_BITFIELD
4792  uint64_t drop:2;
4794  uint64_t commit:2;
4795 #else
4800 #endif
4801  } cnf71xx;
4802 };
4803 
4807 #ifdef __BIG_ENDIAN_BITFIELD
4809  uint64_t prts:3;
4810 #else
4813 #endif
4814  } s;
4833 };
4834 
4838 #ifdef __BIG_ENDIAN_BITFIELD
4840  uint64_t tx:3;
4842  uint64_t rx:3;
4843 #else
4848 #endif
4849  } s;
4853 };
4854 
4858 #ifdef __BIG_ENDIAN_BITFIELD
4860  uint64_t val:1;
4861  uint64_t state:3;
4862  uint64_t lane_rxc:4;
4863  uint64_t lane_rxd:32;
4864 #else
4870 #endif
4871  } s;
4883 };
4884 
4888 #ifdef __BIG_ENDIAN_BITFIELD
4890  uint64_t status:2;
4891 #else
4894 #endif
4895  } s;
4907 };
4908 
4912 #ifdef __BIG_ENDIAN_BITFIELD
4914  uint64_t disparity:1;
4915 #else
4918 #endif
4919  } s;
4922 };
4923 
4927 #ifdef __BIG_ENDIAN_BITFIELD
4929  uint64_t smac:48;
4930 #else
4933 #endif
4934  } s;
4953 };
4954 
4958 #ifdef __BIG_ENDIAN_BITFIELD
4960  uint64_t start_bist:1;
4961  uint64_t clear_bist:1;
4962 #else
4966 #endif
4967  } s;
4973 };
4974 
4978 #ifdef __BIG_ENDIAN_BITFIELD
4980  uint64_t bp:1;
4981  uint64_t cnt:16;
4982 #else
4986 #endif
4987  } s;
5006 };
5007 
5011 #ifdef __BIG_ENDIAN_BITFIELD
5013  uint64_t wr_magic:1;
5014 #else
5017 #endif
5018  } s;
5023 };
5024 
5028 #ifdef __BIG_ENDIAN_BITFIELD
5030  uint64_t force_fcs:1;
5031  uint64_t fcs:1;
5032  uint64_t pad:1;
5033  uint64_t preamble:1;
5034 #else
5040 #endif
5041  } s;
5060 };
5061 
5065 #ifdef __BIG_ENDIAN_BITFIELD
5067  uint64_t burst:16;
5068 #else
5071 #endif
5072  } s;
5091 };
5092 
5096 #ifdef __BIG_ENDIAN_BITFIELD
5098  uint64_t xoff:16;
5099 #else
5102 #endif
5103  } s;
5113 };
5114 
5118 #ifdef __BIG_ENDIAN_BITFIELD
5120  uint64_t xon:16;
5121 #else
5124 #endif
5125  } s;
5135 };
5136 
5140 #ifdef __BIG_ENDIAN_BITFIELD
5142  uint64_t clk_cnt:6;
5143 #else
5146 #endif
5147  } s;
5155 };
5156 
5160 #ifdef __BIG_ENDIAN_BITFIELD
5162  uint64_t xsdef_en:1;
5163  uint64_t xscol_en:1;
5164 #else
5168 #endif
5169  } s;
5188 };
5189 
5193 #ifdef __BIG_ENDIAN_BITFIELD
5195  uint64_t min_size:8;
5196 #else
5199 #endif
5200  } s;
5219 };
5220 
5224 #ifdef __BIG_ENDIAN_BITFIELD
5226  uint64_t interval:16;
5227 #else
5230 #endif
5231  } s;
5250 };
5251 
5255 #ifdef __BIG_ENDIAN_BITFIELD
5257  uint64_t time:16;
5258 #else
5261 #endif
5262  } s;
5281 };
5282 
5286 #ifdef __BIG_ENDIAN_BITFIELD
5288  uint64_t msg_time:16;
5289  uint64_t time:16;
5290 #else
5294 #endif
5295  } s;
5297 #ifdef __BIG_ENDIAN_BITFIELD
5299  uint64_t time:16;
5300 #else
5303 #endif
5304  } cn30xx;
5322 };
5323 
5327 #ifdef __BIG_ENDIAN_BITFIELD
5329  uint64_t send:1;
5330 #else
5333 #endif
5334  } s;
5353 };
5354 
5358 #ifdef __BIG_ENDIAN_BITFIELD
5360  uint64_t ign_bp:1;
5362  uint64_t nump:5;
5364  uint64_t base:7;
5365 #else
5372 #endif
5373  } s;
5376 };
5377 
5381 #ifdef __BIG_ENDIAN_BITFIELD
5383  uint64_t align:1;
5384 #else
5387 #endif
5388  } s;
5400 };
5401 
5405 #ifdef __BIG_ENDIAN_BITFIELD
5407  uint64_t slot:10;
5408 #else
5411 #endif
5412  } s;
5431 };
5432 
5436 #ifdef __BIG_ENDIAN_BITFIELD
5438  uint64_t time:16;
5439 #else
5442 #endif
5443  } s;
5462 };
5463 
5467 #ifdef __BIG_ENDIAN_BITFIELD
5468  uint64_t xsdef:32;
5469  uint64_t xscol:32;
5470 #else
5473 #endif
5474  } s;
5493 };
5494 
5498 #ifdef __BIG_ENDIAN_BITFIELD
5499  uint64_t scol:32;
5500  uint64_t mcol:32;
5501 #else
5504 #endif
5505  } s;
5524 };
5525 
5529 #ifdef __BIG_ENDIAN_BITFIELD
5531  uint64_t octs:48;
5532 #else
5535 #endif
5536  } s;
5555 };
5556 
5560 #ifdef __BIG_ENDIAN_BITFIELD
5562  uint64_t pkts:32;
5563 #else
5566 #endif
5567  } s;
5586 };
5587 
5591 #ifdef __BIG_ENDIAN_BITFIELD
5592  uint64_t hist1:32;
5593  uint64_t hist0:32;
5594 #else
5597 #endif
5598  } s;
5617 };
5618 
5622 #ifdef __BIG_ENDIAN_BITFIELD
5623  uint64_t hist3:32;
5624  uint64_t hist2:32;
5625 #else
5628 #endif
5629  } s;
5648 };
5649 
5653 #ifdef __BIG_ENDIAN_BITFIELD
5654  uint64_t hist5:32;
5655  uint64_t hist4:32;
5656 #else
5659 #endif
5660  } s;
5679 };
5680 
5684 #ifdef __BIG_ENDIAN_BITFIELD
5685  uint64_t hist7:32;
5686  uint64_t hist6:32;
5687 #else
5690 #endif
5691  } s;
5710 };
5711 
5715 #ifdef __BIG_ENDIAN_BITFIELD
5716  uint64_t mcst:32;
5717  uint64_t bcst:32;
5718 #else
5721 #endif
5722  } s;
5741 };
5742 
5746 #ifdef __BIG_ENDIAN_BITFIELD
5747  uint64_t undflw:32;
5748  uint64_t ctl:32;
5749 #else
5752 #endif
5753  } s;
5772 };
5773 
5777 #ifdef __BIG_ENDIAN_BITFIELD
5779  uint64_t rd_clr:1;
5780 #else
5783 #endif
5784  } s;
5803 };
5804 
5808 #ifdef __BIG_ENDIAN_BITFIELD
5810  uint64_t cnt:10;
5811 #else
5814 #endif
5815  } s;
5817 #ifdef __BIG_ENDIAN_BITFIELD
5819  uint64_t cnt:7;
5820 #else
5823 #endif
5824  } cn30xx;
5827 #ifdef __BIG_ENDIAN_BITFIELD
5829  uint64_t cnt:9;
5830 #else
5833 #endif
5834  } cn38xx;
5850 };
5851 
5855 #ifdef __BIG_ENDIAN_BITFIELD
5857  uint64_t bp:4;
5858 #else
5861 #endif
5862  } s;
5864 #ifdef __BIG_ENDIAN_BITFIELD
5866  uint64_t bp:3;
5867 #else
5870 #endif
5871  } cn30xx;
5889 #ifdef __BIG_ENDIAN_BITFIELD
5891  uint64_t bp:2;
5892 #else
5895 #endif
5896  } cnf71xx;
5897 };
5898 
5902 #ifdef __BIG_ENDIAN_BITFIELD
5904  uint64_t msk:1;
5905 #else
5908 #endif
5909  } s;
5912 };
5913 
5917 #ifdef __BIG_ENDIAN_BITFIELD
5919  uint64_t limit:5;
5920 #else
5923 #endif
5924  } s;
5943 };
5944 
5948 #ifdef __BIG_ENDIAN_BITFIELD
5950  uint64_t corrupt:4;
5951 #else
5954 #endif
5955  } s;
5957 #ifdef __BIG_ENDIAN_BITFIELD
5959  uint64_t corrupt:3;
5960 #else
5963 #endif
5964  } cn30xx;
5982 #ifdef __BIG_ENDIAN_BITFIELD
5984  uint64_t corrupt:2;
5985 #else
5988 #endif
5989  } cnf71xx;
5990 };
5991 
5995 #ifdef __BIG_ENDIAN_BITFIELD
5997  uint64_t tx_xof:16;
5998 #else
6001 #endif
6002  } s;
6013 };
6014 
6018 #ifdef __BIG_ENDIAN_BITFIELD
6020  uint64_t tx_xon:16;
6021 #else
6024 #endif
6025  } s;
6036 };
6037 
6041 #ifdef __BIG_ENDIAN_BITFIELD
6043  uint64_t ifg2:4;
6044  uint64_t ifg1:4;
6045 #else
6049 #endif
6050  } s;
6069 };
6070 
6074 #ifdef __BIG_ENDIAN_BITFIELD
6076  uint64_t xchange:1;
6077  uint64_t ptp_lost:4;
6078  uint64_t late_col:4;
6079  uint64_t xsdef:4;
6080  uint64_t xscol:4;
6082  uint64_t undflw:4;
6084  uint64_t pko_nxa:1;
6085 #else
6096 #endif
6097  } s;
6099 #ifdef __BIG_ENDIAN_BITFIELD
6101  uint64_t late_col:3;
6103  uint64_t xsdef:3;
6105  uint64_t xscol:3;
6107  uint64_t undflw:3;
6109  uint64_t pko_nxa:1;
6110 #else
6121 #endif
6122  } cn30xx;
6124 #ifdef __BIG_ENDIAN_BITFIELD
6126  uint64_t xsdef:3;
6128  uint64_t xscol:3;
6130  uint64_t undflw:3;
6132  uint64_t pko_nxa:1;
6133 #else
6142 #endif
6143  } cn31xx;
6145 #ifdef __BIG_ENDIAN_BITFIELD
6147  uint64_t late_col:4;
6148  uint64_t xsdef:4;
6149  uint64_t xscol:4;
6151  uint64_t undflw:4;
6152  uint64_t ncb_nxa:1;
6153  uint64_t pko_nxa:1;
6154 #else
6163 #endif
6164  } cn38xx;
6166 #ifdef __BIG_ENDIAN_BITFIELD
6168  uint64_t xsdef:4;
6169  uint64_t xscol:4;
6171  uint64_t undflw:4;
6172  uint64_t ncb_nxa:1;
6173  uint64_t pko_nxa:1;
6174 #else
6182 #endif
6183  } cn38xxp2;
6186 #ifdef __BIG_ENDIAN_BITFIELD
6188  uint64_t late_col:4;
6189  uint64_t xsdef:4;
6190  uint64_t xscol:4;
6192  uint64_t undflw:4;
6194  uint64_t pko_nxa:1;
6195 #else
6204 #endif
6205  } cn52xx;
6213 #ifdef __BIG_ENDIAN_BITFIELD
6215  uint64_t ptp_lost:4;
6216  uint64_t late_col:4;
6217  uint64_t xsdef:4;
6218  uint64_t xscol:4;
6220  uint64_t undflw:4;
6222  uint64_t pko_nxa:1;
6223 #else
6233 #endif
6234  } cn63xx;
6238 #ifdef __BIG_ENDIAN_BITFIELD
6240  uint64_t xchange:1;
6241  uint64_t ptp_lost:4;
6242  uint64_t late_col:4;
6243  uint64_t xsdef:4;
6244  uint64_t xscol:4;
6246  uint64_t undflw:4;
6247  uint64_t pko_nxp:1;
6248  uint64_t pko_nxa:1;
6249 #else
6260 #endif
6261  } cn68xx;
6264 #ifdef __BIG_ENDIAN_BITFIELD
6266  uint64_t xchange:1;
6268  uint64_t ptp_lost:2;
6270  uint64_t late_col:2;
6272  uint64_t xsdef:2;
6274  uint64_t xscol:2;
6276  uint64_t undflw:2;
6278  uint64_t pko_nxa:1;
6279 #else
6294 #endif
6295  } cnf71xx;
6296 };
6297 
6301 #ifdef __BIG_ENDIAN_BITFIELD
6303  uint64_t xchange:1;
6304  uint64_t ptp_lost:4;
6305  uint64_t late_col:4;
6306  uint64_t xsdef:4;
6307  uint64_t xscol:4;
6309  uint64_t undflw:4;
6311  uint64_t pko_nxa:1;
6312 #else
6323 #endif
6324  } s;
6326 #ifdef __BIG_ENDIAN_BITFIELD
6328  uint64_t late_col:3;
6330  uint64_t xsdef:3;
6332  uint64_t xscol:3;
6334  uint64_t undflw:3;
6336  uint64_t pko_nxa:1;
6337 #else
6348 #endif
6349  } cn30xx;
6351 #ifdef __BIG_ENDIAN_BITFIELD
6353  uint64_t xsdef:3;
6355  uint64_t xscol:3;
6357  uint64_t undflw:3;
6359  uint64_t pko_nxa:1;
6360 #else
6369 #endif
6370  } cn31xx;
6372 #ifdef __BIG_ENDIAN_BITFIELD
6374  uint64_t late_col:4;
6375  uint64_t xsdef:4;
6376  uint64_t xscol:4;
6378  uint64_t undflw:4;
6379  uint64_t ncb_nxa:1;
6380  uint64_t pko_nxa:1;
6381 #else
6390 #endif
6391  } cn38xx;
6393 #ifdef __BIG_ENDIAN_BITFIELD
6395  uint64_t xsdef:4;
6396  uint64_t xscol:4;
6398  uint64_t undflw:4;
6399  uint64_t ncb_nxa:1;
6400  uint64_t pko_nxa:1;
6401 #else
6409 #endif
6410  } cn38xxp2;
6413 #ifdef __BIG_ENDIAN_BITFIELD
6415  uint64_t late_col:4;
6416  uint64_t xsdef:4;
6417  uint64_t xscol:4;
6419  uint64_t undflw:4;
6421  uint64_t pko_nxa:1;
6422 #else
6431 #endif
6432  } cn52xx;
6440 #ifdef __BIG_ENDIAN_BITFIELD
6442  uint64_t ptp_lost:4;
6443  uint64_t late_col:4;
6444  uint64_t xsdef:4;
6445  uint64_t xscol:4;
6447  uint64_t undflw:4;
6449  uint64_t pko_nxa:1;
6450 #else
6460 #endif
6461  } cn63xx;
6465 #ifdef __BIG_ENDIAN_BITFIELD
6467  uint64_t xchange:1;
6468  uint64_t ptp_lost:4;
6469  uint64_t late_col:4;
6470  uint64_t xsdef:4;
6471  uint64_t xscol:4;
6473  uint64_t undflw:4;
6474  uint64_t pko_nxp:1;
6475  uint64_t pko_nxa:1;
6476 #else
6487 #endif
6488  } cn68xx;
6491 #ifdef __BIG_ENDIAN_BITFIELD
6493  uint64_t xchange:1;
6495  uint64_t ptp_lost:2;
6497  uint64_t late_col:2;
6499  uint64_t xsdef:2;
6501  uint64_t xscol:2;
6503  uint64_t undflw:2;
6505  uint64_t pko_nxa:1;
6506 #else
6521 #endif
6522  } cnf71xx;
6523 };
6524 
6528 #ifdef __BIG_ENDIAN_BITFIELD
6530  uint64_t jam:8;
6531 #else
6534 #endif
6535  } s;
6554 };
6555 
6559 #ifdef __BIG_ENDIAN_BITFIELD
6561  uint64_t lfsr:16;
6562 #else
6565 #endif
6566  } s;
6585 };
6586 
6590 #ifdef __BIG_ENDIAN_BITFIELD
6592  uint64_t tx_prt_bp:16;
6594  uint64_t en:4;
6595  uint64_t bp:4;
6596  uint64_t ign_full:4;
6597 #else
6604 #endif
6605  } s;
6607 #ifdef __BIG_ENDIAN_BITFIELD
6609  uint64_t en:3;
6611  uint64_t bp:3;
6613  uint64_t ign_full:3;
6614 #else
6621 #endif
6622  } cn30xx;
6625 #ifdef __BIG_ENDIAN_BITFIELD
6627  uint64_t en:4;
6628  uint64_t bp:4;
6629  uint64_t ign_full:4;
6630 #else
6635 #endif
6636  } cn38xx;
6652 #ifdef __BIG_ENDIAN_BITFIELD
6654  uint64_t tx_prt_bp:16;
6656  uint64_t en:2;
6658  uint64_t bp:2;
6660  uint64_t ign_full:2;
6661 #else
6670 #endif
6671  } cnf71xx;
6672 };
6673 
6677 #ifdef __BIG_ENDIAN_BITFIELD
6679  uint64_t dmac:48;
6680 #else
6683 #endif
6684  } s;
6703 };
6704 
6708 #ifdef __BIG_ENDIAN_BITFIELD
6710  uint64_t type:16;
6711 #else
6714 #endif
6715  } s;
6734 };
6735 
6739 #ifdef __BIG_ENDIAN_BITFIELD
6741  uint64_t prts:5;
6742 #else
6745 #endif
6746  } s;
6765 };
6766 
6770 #ifdef __BIG_ENDIAN_BITFIELD
6772  uint64_t tpa_clr:1;
6773  uint64_t cont_pkt:1;
6774 #else
6778 #endif
6779  } s;
6784 };
6785 
6789 #ifdef __BIG_ENDIAN_BITFIELD
6791  uint64_t drain:16;
6792 #else
6795 #endif
6796  } s;
6800 };
6801 
6805 #ifdef __BIG_ENDIAN_BITFIELD
6807  uint64_t slice:7;
6808  uint64_t max2:8;
6809  uint64_t max1:8;
6810 #else
6815 #endif
6816  } s;
6818 #ifdef __BIG_ENDIAN_BITFIELD
6820  uint64_t max2:8;
6821  uint64_t max1:8;
6822 #else
6826 #endif
6827  } cn38xx;
6831 };
6832 
6836 #ifdef __BIG_ENDIAN_BITFIELD
6838  uint64_t round:16;
6839 #else
6842 #endif
6843  } s;
6846 };
6847 
6851 #ifdef __BIG_ENDIAN_BITFIELD
6853  uint64_t thresh:6;
6854 #else
6857 #endif
6858  } s;
6863 };
6864 
6868 #ifdef __BIG_ENDIAN_BITFIELD
6871  uint64_t hg_en:1;
6873  uint64_t ls_byp:1;
6874  uint64_t ls:2;
6876  uint64_t uni_en:1;
6877  uint64_t dic_en:1;
6878 #else
6888 #endif
6889  } s;
6901 };
6902 
6906 #ifdef __BIG_ENDIAN_BITFIELD
6908  uint64_t en:1;
6909  uint64_t thresh:4;
6910 #else
6914 #endif
6915  } s;
6927 };
6928 
6929 #endif