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_STXX_DEFS_H__
29 #define __CVMX_STXX_DEFS_H__
31 #define CVMX_STXX_ARB_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000608ull) + ((block_id) & 1) * 0x8000000ull)
32 #define CVMX_STXX_BCKPRS_CNT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000688ull) + ((block_id) & 1) * 0x8000000ull)
33 #define CVMX_STXX_COM_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000600ull) + ((block_id) & 1) * 0x8000000ull)
34 #define CVMX_STXX_DIP_CNT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000690ull) + ((block_id) & 1) * 0x8000000ull)
35 #define CVMX_STXX_IGN_CAL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000610ull) + ((block_id) & 1) * 0x8000000ull)
36 #define CVMX_STXX_INT_MSK(block_id) (CVMX_ADD_IO_SEG(0x00011800900006A0ull) + ((block_id) & 1) * 0x8000000ull)
37 #define CVMX_STXX_INT_REG(block_id) (CVMX_ADD_IO_SEG(0x0001180090000698ull) + ((block_id) & 1) * 0x8000000ull)
38 #define CVMX_STXX_INT_SYNC(block_id) (CVMX_ADD_IO_SEG(0x00011800900006A8ull) + ((block_id) & 1) * 0x8000000ull)
39 #define CVMX_STXX_MIN_BST(block_id) (CVMX_ADD_IO_SEG(0x0001180090000618ull) + ((block_id) & 1) * 0x8000000ull)
40 #define CVMX_STXX_SPI4_CALX(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180090000400ull) + (((offset) & 31) + ((block_id) & 1) * 0x1000000ull) * 8)
41 #define CVMX_STXX_SPI4_DAT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000628ull) + ((block_id) & 1) * 0x8000000ull)
42 #define CVMX_STXX_SPI4_STAT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000630ull) + ((block_id) & 1) * 0x8000000ull)
43 #define CVMX_STXX_STAT_BYTES_HI(block_id) (CVMX_ADD_IO_SEG(0x0001180090000648ull) + ((block_id) & 1) * 0x8000000ull)
44 #define CVMX_STXX_STAT_BYTES_LO(block_id) (CVMX_ADD_IO_SEG(0x0001180090000680ull) + ((block_id) & 1) * 0x8000000ull)
45 #define CVMX_STXX_STAT_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000638ull) + ((block_id) & 1) * 0x8000000ull)
46 #define CVMX_STXX_STAT_PKT_XMT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000640ull) + ((block_id) & 1) * 0x8000000ull)
48 union cvmx_stxx_arb_ctl {
50 struct cvmx_stxx_arb_ctl_s {
51 #ifdef __BIG_ENDIAN_BITFIELD
52 uint64_t reserved_6_63:58;
54 uint64_t reserved_4_4:1;
56 uint64_t reserved_0_2:3;
58 uint64_t reserved_0_2:3;
60 uint64_t reserved_4_4:1;
62 uint64_t reserved_6_63:58;
65 struct cvmx_stxx_arb_ctl_s cn38xx;
66 struct cvmx_stxx_arb_ctl_s cn38xxp2;
67 struct cvmx_stxx_arb_ctl_s cn58xx;
68 struct cvmx_stxx_arb_ctl_s cn58xxp1;
71 union cvmx_stxx_bckprs_cnt {
73 struct cvmx_stxx_bckprs_cnt_s {
74 #ifdef __BIG_ENDIAN_BITFIELD
75 uint64_t reserved_32_63:32;
79 uint64_t reserved_32_63:32;
82 struct cvmx_stxx_bckprs_cnt_s cn38xx;
83 struct cvmx_stxx_bckprs_cnt_s cn38xxp2;
84 struct cvmx_stxx_bckprs_cnt_s cn58xx;
85 struct cvmx_stxx_bckprs_cnt_s cn58xxp1;
88 union cvmx_stxx_com_ctl {
90 struct cvmx_stxx_com_ctl_s {
91 #ifdef __BIG_ENDIAN_BITFIELD
92 uint64_t reserved_4_63:60;
94 uint64_t reserved_1_2:2;
98 uint64_t reserved_1_2:2;
100 uint64_t reserved_4_63:60;
103 struct cvmx_stxx_com_ctl_s cn38xx;
104 struct cvmx_stxx_com_ctl_s cn38xxp2;
105 struct cvmx_stxx_com_ctl_s cn58xx;
106 struct cvmx_stxx_com_ctl_s cn58xxp1;
109 union cvmx_stxx_dip_cnt {
111 struct cvmx_stxx_dip_cnt_s {
112 #ifdef __BIG_ENDIAN_BITFIELD
113 uint64_t reserved_8_63:56;
119 uint64_t reserved_8_63:56;
122 struct cvmx_stxx_dip_cnt_s cn38xx;
123 struct cvmx_stxx_dip_cnt_s cn38xxp2;
124 struct cvmx_stxx_dip_cnt_s cn58xx;
125 struct cvmx_stxx_dip_cnt_s cn58xxp1;
128 union cvmx_stxx_ign_cal {
130 struct cvmx_stxx_ign_cal_s {
131 #ifdef __BIG_ENDIAN_BITFIELD
132 uint64_t reserved_16_63:48;
136 uint64_t reserved_16_63:48;
139 struct cvmx_stxx_ign_cal_s cn38xx;
140 struct cvmx_stxx_ign_cal_s cn38xxp2;
141 struct cvmx_stxx_ign_cal_s cn58xx;
142 struct cvmx_stxx_ign_cal_s cn58xxp1;
145 union cvmx_stxx_int_msk {
147 struct cvmx_stxx_int_msk_s {
148 #ifdef __BIG_ENDIAN_BITFIELD
149 uint64_t reserved_8_63:56;
167 uint64_t reserved_8_63:56;
170 struct cvmx_stxx_int_msk_s cn38xx;
171 struct cvmx_stxx_int_msk_s cn38xxp2;
172 struct cvmx_stxx_int_msk_s cn58xx;
173 struct cvmx_stxx_int_msk_s cn58xxp1;
176 union cvmx_stxx_int_reg {
178 struct cvmx_stxx_int_reg_s {
179 #ifdef __BIG_ENDIAN_BITFIELD
180 uint64_t reserved_9_63:55;
200 uint64_t reserved_9_63:55;
203 struct cvmx_stxx_int_reg_s cn38xx;
204 struct cvmx_stxx_int_reg_s cn38xxp2;
205 struct cvmx_stxx_int_reg_s cn58xx;
206 struct cvmx_stxx_int_reg_s cn58xxp1;
209 union cvmx_stxx_int_sync {
211 struct cvmx_stxx_int_sync_s {
212 #ifdef __BIG_ENDIAN_BITFIELD
213 uint64_t reserved_8_63:56;
231 uint64_t reserved_8_63:56;
234 struct cvmx_stxx_int_sync_s cn38xx;
235 struct cvmx_stxx_int_sync_s cn38xxp2;
236 struct cvmx_stxx_int_sync_s cn58xx;
237 struct cvmx_stxx_int_sync_s cn58xxp1;
240 union cvmx_stxx_min_bst {
242 struct cvmx_stxx_min_bst_s {
243 #ifdef __BIG_ENDIAN_BITFIELD
244 uint64_t reserved_9_63:55;
248 uint64_t reserved_9_63:55;
251 struct cvmx_stxx_min_bst_s cn38xx;
252 struct cvmx_stxx_min_bst_s cn38xxp2;
253 struct cvmx_stxx_min_bst_s cn58xx;
254 struct cvmx_stxx_min_bst_s cn58xxp1;
257 union cvmx_stxx_spi4_calx {
259 struct cvmx_stxx_spi4_calx_s {
260 #ifdef __BIG_ENDIAN_BITFIELD
261 uint64_t reserved_17_63:47;
273 uint64_t reserved_17_63:47;
276 struct cvmx_stxx_spi4_calx_s cn38xx;
277 struct cvmx_stxx_spi4_calx_s cn38xxp2;
278 struct cvmx_stxx_spi4_calx_s cn58xx;
279 struct cvmx_stxx_spi4_calx_s cn58xxp1;
282 union cvmx_stxx_spi4_dat {
284 struct cvmx_stxx_spi4_dat_s {
285 #ifdef __BIG_ENDIAN_BITFIELD
286 uint64_t reserved_32_63:32;
292 uint64_t reserved_32_63:32;
295 struct cvmx_stxx_spi4_dat_s cn38xx;
296 struct cvmx_stxx_spi4_dat_s cn38xxp2;
297 struct cvmx_stxx_spi4_dat_s cn58xx;
298 struct cvmx_stxx_spi4_dat_s cn58xxp1;
301 union cvmx_stxx_spi4_stat {
303 struct cvmx_stxx_spi4_stat_s {
304 #ifdef __BIG_ENDIAN_BITFIELD
305 uint64_t reserved_16_63:48;
307 uint64_t reserved_7_7:1;
311 uint64_t reserved_7_7:1;
313 uint64_t reserved_16_63:48;
316 struct cvmx_stxx_spi4_stat_s cn38xx;
317 struct cvmx_stxx_spi4_stat_s cn38xxp2;
318 struct cvmx_stxx_spi4_stat_s cn58xx;
319 struct cvmx_stxx_spi4_stat_s cn58xxp1;
322 union cvmx_stxx_stat_bytes_hi {
324 struct cvmx_stxx_stat_bytes_hi_s {
325 #ifdef __BIG_ENDIAN_BITFIELD
326 uint64_t reserved_32_63:32;
330 uint64_t reserved_32_63:32;
333 struct cvmx_stxx_stat_bytes_hi_s cn38xx;
334 struct cvmx_stxx_stat_bytes_hi_s cn38xxp2;
335 struct cvmx_stxx_stat_bytes_hi_s cn58xx;
336 struct cvmx_stxx_stat_bytes_hi_s cn58xxp1;
339 union cvmx_stxx_stat_bytes_lo {
341 struct cvmx_stxx_stat_bytes_lo_s {
342 #ifdef __BIG_ENDIAN_BITFIELD
343 uint64_t reserved_32_63:32;
347 uint64_t reserved_32_63:32;
350 struct cvmx_stxx_stat_bytes_lo_s cn38xx;
351 struct cvmx_stxx_stat_bytes_lo_s cn38xxp2;
352 struct cvmx_stxx_stat_bytes_lo_s cn58xx;
353 struct cvmx_stxx_stat_bytes_lo_s cn58xxp1;
356 union cvmx_stxx_stat_ctl {
358 struct cvmx_stxx_stat_ctl_s {
359 #ifdef __BIG_ENDIAN_BITFIELD
360 uint64_t reserved_5_63:59;
366 uint64_t reserved_5_63:59;
369 struct cvmx_stxx_stat_ctl_s cn38xx;
370 struct cvmx_stxx_stat_ctl_s cn38xxp2;
371 struct cvmx_stxx_stat_ctl_s cn58xx;
372 struct cvmx_stxx_stat_ctl_s cn58xxp1;
375 union cvmx_stxx_stat_pkt_xmt {
377 struct cvmx_stxx_stat_pkt_xmt_s {
378 #ifdef __BIG_ENDIAN_BITFIELD
379 uint64_t reserved_32_63:32;
383 uint64_t reserved_32_63:32;
386 struct cvmx_stxx_stat_pkt_xmt_s cn38xx;
387 struct cvmx_stxx_stat_pkt_xmt_s cn38xxp2;
388 struct cvmx_stxx_stat_pkt_xmt_s cn58xx;
389 struct cvmx_stxx_stat_pkt_xmt_s cn58xxp1;