1 /***********************license start***************
2 * Author: Cavium Networks
4 * Contact: support@caviumnetworks.com
5 * This file is part of the OCTEON SDK
7 * Copyright (c) 2003-2012 Cavium Networks
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.
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
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/.
24 * This file may also be available under a different license from Cavium.
25 * Contact Cavium Networks for more information
26 ***********************license end**************************************/
28 #ifndef __CVMX_MIXX_DEFS_H__
29 #define __CVMX_MIXX_DEFS_H__
31 #define CVMX_MIXX_BIST(offset) (CVMX_ADD_IO_SEG(0x0001070000100078ull) + ((offset) & 1) * 2048)
32 #define CVMX_MIXX_CTL(offset) (CVMX_ADD_IO_SEG(0x0001070000100020ull) + ((offset) & 1) * 2048)
33 #define CVMX_MIXX_INTENA(offset) (CVMX_ADD_IO_SEG(0x0001070000100050ull) + ((offset) & 1) * 2048)
34 #define CVMX_MIXX_IRCNT(offset) (CVMX_ADD_IO_SEG(0x0001070000100030ull) + ((offset) & 1) * 2048)
35 #define CVMX_MIXX_IRHWM(offset) (CVMX_ADD_IO_SEG(0x0001070000100028ull) + ((offset) & 1) * 2048)
36 #define CVMX_MIXX_IRING1(offset) (CVMX_ADD_IO_SEG(0x0001070000100010ull) + ((offset) & 1) * 2048)
37 #define CVMX_MIXX_IRING2(offset) (CVMX_ADD_IO_SEG(0x0001070000100018ull) + ((offset) & 1) * 2048)
38 #define CVMX_MIXX_ISR(offset) (CVMX_ADD_IO_SEG(0x0001070000100048ull) + ((offset) & 1) * 2048)
39 #define CVMX_MIXX_ORCNT(offset) (CVMX_ADD_IO_SEG(0x0001070000100040ull) + ((offset) & 1) * 2048)
40 #define CVMX_MIXX_ORHWM(offset) (CVMX_ADD_IO_SEG(0x0001070000100038ull) + ((offset) & 1) * 2048)
41 #define CVMX_MIXX_ORING1(offset) (CVMX_ADD_IO_SEG(0x0001070000100000ull) + ((offset) & 1) * 2048)
42 #define CVMX_MIXX_ORING2(offset) (CVMX_ADD_IO_SEG(0x0001070000100008ull) + ((offset) & 1) * 2048)
43 #define CVMX_MIXX_REMCNT(offset) (CVMX_ADD_IO_SEG(0x0001070000100058ull) + ((offset) & 1) * 2048)
44 #define CVMX_MIXX_TSCTL(offset) (CVMX_ADD_IO_SEG(0x0001070000100068ull) + ((offset) & 1) * 2048)
45 #define CVMX_MIXX_TSTAMP(offset) (CVMX_ADD_IO_SEG(0x0001070000100060ull) + ((offset) & 1) * 2048)
47 union cvmx_mixx_bist
{
49 struct cvmx_mixx_bist_s
{
50 #ifdef __BIG_ENDIAN_BITFIELD
51 uint64_t reserved_6_63
:58;
65 uint64_t reserved_6_63
:58;
68 struct cvmx_mixx_bist_cn52xx
{
69 #ifdef __BIG_ENDIAN_BITFIELD
70 uint64_t reserved_4_63
:60;
80 uint64_t reserved_4_63
:60;
87 struct cvmx_mixx_ctl_s
{
88 #ifdef __BIG_ENDIAN_BITFIELD
89 uint64_t reserved_12_63
:52;
105 uint64_t crc_strip
:1;
106 uint64_t ts_thresh
:4;
107 uint64_t reserved_12_63
:52;
110 struct cvmx_mixx_ctl_cn52xx
{
111 #ifdef __BIG_ENDIAN_BITFIELD
112 uint64_t reserved_8_63
:56;
113 uint64_t crc_strip
:1;
127 uint64_t crc_strip
:1;
128 uint64_t reserved_8_63
:56;
133 union cvmx_mixx_intena
{
135 struct cvmx_mixx_intena_s
{
136 #ifdef __BIG_ENDIAN_BITFIELD
137 uint64_t reserved_8_63
:56;
141 uint64_t data_drpena
:1;
151 uint64_t data_drpena
:1;
155 uint64_t reserved_8_63
:56;
158 struct cvmx_mixx_intena_cn52xx
{
159 #ifdef __BIG_ENDIAN_BITFIELD
160 uint64_t reserved_7_63
:57;
163 uint64_t data_drpena
:1;
173 uint64_t data_drpena
:1;
176 uint64_t reserved_7_63
:57;
181 union cvmx_mixx_ircnt
{
183 struct cvmx_mixx_ircnt_s
{
184 #ifdef __BIG_ENDIAN_BITFIELD
185 uint64_t reserved_20_63
:44;
189 uint64_t reserved_20_63
:44;
194 union cvmx_mixx_irhwm
{
196 struct cvmx_mixx_irhwm_s
{
197 #ifdef __BIG_ENDIAN_BITFIELD
198 uint64_t reserved_40_63
:24;
204 uint64_t reserved_40_63
:24;
209 union cvmx_mixx_iring1
{
211 struct cvmx_mixx_iring1_s
{
212 #ifdef __BIG_ENDIAN_BITFIELD
213 uint64_t reserved_60_63
:4;
216 uint64_t reserved_0_2
:3;
218 uint64_t reserved_0_2
:3;
221 uint64_t reserved_60_63
:4;
224 struct cvmx_mixx_iring1_cn52xx
{
225 #ifdef __BIG_ENDIAN_BITFIELD
226 uint64_t reserved_60_63
:4;
228 uint64_t reserved_36_39
:4;
230 uint64_t reserved_0_2
:3;
232 uint64_t reserved_0_2
:3;
234 uint64_t reserved_36_39
:4;
236 uint64_t reserved_60_63
:4;
241 union cvmx_mixx_iring2
{
243 struct cvmx_mixx_iring2_s
{
244 #ifdef __BIG_ENDIAN_BITFIELD
245 uint64_t reserved_52_63
:12;
247 uint64_t reserved_20_31
:12;
251 uint64_t reserved_20_31
:12;
253 uint64_t reserved_52_63
:12;
258 union cvmx_mixx_isr
{
260 struct cvmx_mixx_isr_s
{
261 #ifdef __BIG_ENDIAN_BITFIELD
262 uint64_t reserved_8_63
:56;
280 uint64_t reserved_8_63
:56;
283 struct cvmx_mixx_isr_cn52xx
{
284 #ifdef __BIG_ENDIAN_BITFIELD
285 uint64_t reserved_7_63
:57;
301 uint64_t reserved_7_63
:57;
306 union cvmx_mixx_orcnt
{
308 struct cvmx_mixx_orcnt_s
{
309 #ifdef __BIG_ENDIAN_BITFIELD
310 uint64_t reserved_20_63
:44;
314 uint64_t reserved_20_63
:44;
319 union cvmx_mixx_orhwm
{
321 struct cvmx_mixx_orhwm_s
{
322 #ifdef __BIG_ENDIAN_BITFIELD
323 uint64_t reserved_20_63
:44;
327 uint64_t reserved_20_63
:44;
332 union cvmx_mixx_oring1
{
334 struct cvmx_mixx_oring1_s
{
335 #ifdef __BIG_ENDIAN_BITFIELD
336 uint64_t reserved_60_63
:4;
339 uint64_t reserved_0_2
:3;
341 uint64_t reserved_0_2
:3;
344 uint64_t reserved_60_63
:4;
347 struct cvmx_mixx_oring1_cn52xx
{
348 #ifdef __BIG_ENDIAN_BITFIELD
349 uint64_t reserved_60_63
:4;
351 uint64_t reserved_36_39
:4;
353 uint64_t reserved_0_2
:3;
355 uint64_t reserved_0_2
:3;
357 uint64_t reserved_36_39
:4;
359 uint64_t reserved_60_63
:4;
364 union cvmx_mixx_oring2
{
366 struct cvmx_mixx_oring2_s
{
367 #ifdef __BIG_ENDIAN_BITFIELD
368 uint64_t reserved_52_63
:12;
370 uint64_t reserved_20_31
:12;
374 uint64_t reserved_20_31
:12;
376 uint64_t reserved_52_63
:12;
381 union cvmx_mixx_remcnt
{
383 struct cvmx_mixx_remcnt_s
{
384 #ifdef __BIG_ENDIAN_BITFIELD
385 uint64_t reserved_52_63
:12;
387 uint64_t reserved_20_31
:12;
391 uint64_t reserved_20_31
:12;
393 uint64_t reserved_52_63
:12;
398 union cvmx_mixx_tsctl
{
400 struct cvmx_mixx_tsctl_s
{
401 #ifdef __BIG_ENDIAN_BITFIELD
402 uint64_t reserved_21_63
:43;
404 uint64_t reserved_13_15
:3;
406 uint64_t reserved_5_7
:3;
410 uint64_t reserved_5_7
:3;
412 uint64_t reserved_13_15
:3;
414 uint64_t reserved_21_63
:43;
419 union cvmx_mixx_tstamp
{
421 struct cvmx_mixx_tstamp_s
{
422 #ifdef __BIG_ENDIAN_BITFIELD