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-2008 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) \
32 CVMX_ADD_IO_SEG(0x0001180090000608ull + (((block_id) & 1) * 0x8000000ull))
33 #define CVMX_STXX_BCKPRS_CNT(block_id) \
34 CVMX_ADD_IO_SEG(0x0001180090000688ull + (((block_id) & 1) * 0x8000000ull))
35 #define CVMX_STXX_COM_CTL(block_id) \
36 CVMX_ADD_IO_SEG(0x0001180090000600ull + (((block_id) & 1) * 0x8000000ull))
37 #define CVMX_STXX_DIP_CNT(block_id) \
38 CVMX_ADD_IO_SEG(0x0001180090000690ull + (((block_id) & 1) * 0x8000000ull))
39 #define CVMX_STXX_IGN_CAL(block_id) \
40 CVMX_ADD_IO_SEG(0x0001180090000610ull + (((block_id) & 1) * 0x8000000ull))
41 #define CVMX_STXX_INT_MSK(block_id) \
42 CVMX_ADD_IO_SEG(0x00011800900006A0ull + (((block_id) & 1) * 0x8000000ull))
43 #define CVMX_STXX_INT_REG(block_id) \
44 CVMX_ADD_IO_SEG(0x0001180090000698ull + (((block_id) & 1) * 0x8000000ull))
45 #define CVMX_STXX_INT_SYNC(block_id) \
46 CVMX_ADD_IO_SEG(0x00011800900006A8ull + (((block_id) & 1) * 0x8000000ull))
47 #define CVMX_STXX_MIN_BST(block_id) \
48 CVMX_ADD_IO_SEG(0x0001180090000618ull + (((block_id) & 1) * 0x8000000ull))
49 #define CVMX_STXX_SPI4_CALX(offset, block_id) \
50 CVMX_ADD_IO_SEG(0x0001180090000400ull + (((offset) & 31) * 8) + (((block_id) & 1) * 0x8000000ull))
51 #define CVMX_STXX_SPI4_DAT(block_id) \
52 CVMX_ADD_IO_SEG(0x0001180090000628ull + (((block_id) & 1) * 0x8000000ull))
53 #define CVMX_STXX_SPI4_STAT(block_id) \
54 CVMX_ADD_IO_SEG(0x0001180090000630ull + (((block_id) & 1) * 0x8000000ull))
55 #define CVMX_STXX_STAT_BYTES_HI(block_id) \
56 CVMX_ADD_IO_SEG(0x0001180090000648ull + (((block_id) & 1) * 0x8000000ull))
57 #define CVMX_STXX_STAT_BYTES_LO(block_id) \
58 CVMX_ADD_IO_SEG(0x0001180090000680ull + (((block_id) & 1) * 0x8000000ull))
59 #define CVMX_STXX_STAT_CTL(block_id) \
60 CVMX_ADD_IO_SEG(0x0001180090000638ull + (((block_id) & 1) * 0x8000000ull))
61 #define CVMX_STXX_STAT_PKT_XMT(block_id) \
62 CVMX_ADD_IO_SEG(0x0001180090000640ull + (((block_id) & 1) * 0x8000000ull))
64 union cvmx_stxx_arb_ctl
{
66 struct cvmx_stxx_arb_ctl_s
{
67 uint64_t reserved_6_63
:58;
69 uint64_t reserved_4_4
:1;
71 uint64_t reserved_0_2
:3;
73 struct cvmx_stxx_arb_ctl_s cn38xx
;
74 struct cvmx_stxx_arb_ctl_s cn38xxp2
;
75 struct cvmx_stxx_arb_ctl_s cn58xx
;
76 struct cvmx_stxx_arb_ctl_s cn58xxp1
;
79 union cvmx_stxx_bckprs_cnt
{
81 struct cvmx_stxx_bckprs_cnt_s
{
82 uint64_t reserved_32_63
:32;
85 struct cvmx_stxx_bckprs_cnt_s cn38xx
;
86 struct cvmx_stxx_bckprs_cnt_s cn38xxp2
;
87 struct cvmx_stxx_bckprs_cnt_s cn58xx
;
88 struct cvmx_stxx_bckprs_cnt_s cn58xxp1
;
91 union cvmx_stxx_com_ctl
{
93 struct cvmx_stxx_com_ctl_s
{
94 uint64_t reserved_4_63
:60;
96 uint64_t reserved_1_2
:2;
99 struct cvmx_stxx_com_ctl_s cn38xx
;
100 struct cvmx_stxx_com_ctl_s cn38xxp2
;
101 struct cvmx_stxx_com_ctl_s cn58xx
;
102 struct cvmx_stxx_com_ctl_s cn58xxp1
;
105 union cvmx_stxx_dip_cnt
{
107 struct cvmx_stxx_dip_cnt_s
{
108 uint64_t reserved_8_63
:56;
112 struct cvmx_stxx_dip_cnt_s cn38xx
;
113 struct cvmx_stxx_dip_cnt_s cn38xxp2
;
114 struct cvmx_stxx_dip_cnt_s cn58xx
;
115 struct cvmx_stxx_dip_cnt_s cn58xxp1
;
118 union cvmx_stxx_ign_cal
{
120 struct cvmx_stxx_ign_cal_s
{
121 uint64_t reserved_16_63
:48;
124 struct cvmx_stxx_ign_cal_s cn38xx
;
125 struct cvmx_stxx_ign_cal_s cn38xxp2
;
126 struct cvmx_stxx_ign_cal_s cn58xx
;
127 struct cvmx_stxx_ign_cal_s cn58xxp1
;
130 union cvmx_stxx_int_msk
{
132 struct cvmx_stxx_int_msk_s
{
133 uint64_t reserved_8_63
:56;
143 struct cvmx_stxx_int_msk_s cn38xx
;
144 struct cvmx_stxx_int_msk_s cn38xxp2
;
145 struct cvmx_stxx_int_msk_s cn58xx
;
146 struct cvmx_stxx_int_msk_s cn58xxp1
;
149 union cvmx_stxx_int_reg
{
151 struct cvmx_stxx_int_reg_s
{
152 uint64_t reserved_9_63
:55;
163 struct cvmx_stxx_int_reg_s cn38xx
;
164 struct cvmx_stxx_int_reg_s cn38xxp2
;
165 struct cvmx_stxx_int_reg_s cn58xx
;
166 struct cvmx_stxx_int_reg_s cn58xxp1
;
169 union cvmx_stxx_int_sync
{
171 struct cvmx_stxx_int_sync_s
{
172 uint64_t reserved_8_63
:56;
182 struct cvmx_stxx_int_sync_s cn38xx
;
183 struct cvmx_stxx_int_sync_s cn38xxp2
;
184 struct cvmx_stxx_int_sync_s cn58xx
;
185 struct cvmx_stxx_int_sync_s cn58xxp1
;
188 union cvmx_stxx_min_bst
{
190 struct cvmx_stxx_min_bst_s
{
191 uint64_t reserved_9_63
:55;
194 struct cvmx_stxx_min_bst_s cn38xx
;
195 struct cvmx_stxx_min_bst_s cn38xxp2
;
196 struct cvmx_stxx_min_bst_s cn58xx
;
197 struct cvmx_stxx_min_bst_s cn58xxp1
;
200 union cvmx_stxx_spi4_calx
{
202 struct cvmx_stxx_spi4_calx_s
{
203 uint64_t reserved_17_63
:47;
210 struct cvmx_stxx_spi4_calx_s cn38xx
;
211 struct cvmx_stxx_spi4_calx_s cn38xxp2
;
212 struct cvmx_stxx_spi4_calx_s cn58xx
;
213 struct cvmx_stxx_spi4_calx_s cn58xxp1
;
216 union cvmx_stxx_spi4_dat
{
218 struct cvmx_stxx_spi4_dat_s
{
219 uint64_t reserved_32_63
:32;
223 struct cvmx_stxx_spi4_dat_s cn38xx
;
224 struct cvmx_stxx_spi4_dat_s cn38xxp2
;
225 struct cvmx_stxx_spi4_dat_s cn58xx
;
226 struct cvmx_stxx_spi4_dat_s cn58xxp1
;
229 union cvmx_stxx_spi4_stat
{
231 struct cvmx_stxx_spi4_stat_s
{
232 uint64_t reserved_16_63
:48;
234 uint64_t reserved_7_7
:1;
237 struct cvmx_stxx_spi4_stat_s cn38xx
;
238 struct cvmx_stxx_spi4_stat_s cn38xxp2
;
239 struct cvmx_stxx_spi4_stat_s cn58xx
;
240 struct cvmx_stxx_spi4_stat_s cn58xxp1
;
243 union cvmx_stxx_stat_bytes_hi
{
245 struct cvmx_stxx_stat_bytes_hi_s
{
246 uint64_t reserved_32_63
:32;
249 struct cvmx_stxx_stat_bytes_hi_s cn38xx
;
250 struct cvmx_stxx_stat_bytes_hi_s cn38xxp2
;
251 struct cvmx_stxx_stat_bytes_hi_s cn58xx
;
252 struct cvmx_stxx_stat_bytes_hi_s cn58xxp1
;
255 union cvmx_stxx_stat_bytes_lo
{
257 struct cvmx_stxx_stat_bytes_lo_s
{
258 uint64_t reserved_32_63
:32;
261 struct cvmx_stxx_stat_bytes_lo_s cn38xx
;
262 struct cvmx_stxx_stat_bytes_lo_s cn38xxp2
;
263 struct cvmx_stxx_stat_bytes_lo_s cn58xx
;
264 struct cvmx_stxx_stat_bytes_lo_s cn58xxp1
;
267 union cvmx_stxx_stat_ctl
{
269 struct cvmx_stxx_stat_ctl_s
{
270 uint64_t reserved_5_63
:59;
274 struct cvmx_stxx_stat_ctl_s cn38xx
;
275 struct cvmx_stxx_stat_ctl_s cn38xxp2
;
276 struct cvmx_stxx_stat_ctl_s cn58xx
;
277 struct cvmx_stxx_stat_ctl_s cn58xxp1
;
280 union cvmx_stxx_stat_pkt_xmt
{
282 struct cvmx_stxx_stat_pkt_xmt_s
{
283 uint64_t reserved_32_63
:32;
286 struct cvmx_stxx_stat_pkt_xmt_s cn38xx
;
287 struct cvmx_stxx_stat_pkt_xmt_s cn38xxp2
;
288 struct cvmx_stxx_stat_pkt_xmt_s cn58xx
;
289 struct cvmx_stxx_stat_pkt_xmt_s cn58xxp1
;