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_MPI_DEFS_H__
29 #define __CVMX_MPI_DEFS_H__
31 #define CVMX_MPI_CFG (CVMX_ADD_IO_SEG(0x0001070000001000ull))
32 #define CVMX_MPI_DATX(offset) (CVMX_ADD_IO_SEG(0x0001070000001080ull) + ((offset) & 15) * 8)
33 #define CVMX_MPI_STS (CVMX_ADD_IO_SEG(0x0001070000001008ull))
34 #define CVMX_MPI_TX (CVMX_ADD_IO_SEG(0x0001070000001010ull))
38 struct cvmx_mpi_cfg_s
{
39 #ifdef __BIG_ENDIAN_BITFIELD
40 uint64_t reserved_29_63
:35;
74 uint64_t reserved_29_63
:35;
77 struct cvmx_mpi_cfg_cn30xx
{
78 #ifdef __BIG_ENDIAN_BITFIELD
79 uint64_t reserved_29_63
:35;
81 uint64_t reserved_12_15
:4;
105 uint64_t reserved_12_15
:4;
107 uint64_t reserved_29_63
:35;
110 struct cvmx_mpi_cfg_cn31xx
{
111 #ifdef __BIG_ENDIAN_BITFIELD
112 uint64_t reserved_29_63
:35;
114 uint64_t reserved_11_15
:5;
136 uint64_t reserved_11_15
:5;
138 uint64_t reserved_29_63
:35;
141 struct cvmx_mpi_cfg_cn30xx cn50xx
;
142 struct cvmx_mpi_cfg_cn61xx
{
143 #ifdef __BIG_ENDIAN_BITFIELD
144 uint64_t reserved_29_63
:35;
146 uint64_t reserved_14_15
:2;
153 uint64_t reserved_6_6
:1;
167 uint64_t reserved_6_6
:1;
174 uint64_t reserved_14_15
:2;
176 uint64_t reserved_29_63
:35;
179 struct cvmx_mpi_cfg_cn66xx
{
180 #ifdef __BIG_ENDIAN_BITFIELD
181 uint64_t reserved_29_63
:35;
185 uint64_t reserved_12_13
:2;
190 uint64_t reserved_6_6
:1;
204 uint64_t reserved_6_6
:1;
209 uint64_t reserved_12_13
:2;
213 uint64_t reserved_29_63
:35;
216 struct cvmx_mpi_cfg_cn61xx cnf71xx
;
219 union cvmx_mpi_datx
{
221 struct cvmx_mpi_datx_s
{
222 #ifdef __BIG_ENDIAN_BITFIELD
223 uint64_t reserved_8_63
:56;
227 uint64_t reserved_8_63
:56;
230 struct cvmx_mpi_datx_s cn30xx
;
231 struct cvmx_mpi_datx_s cn31xx
;
232 struct cvmx_mpi_datx_s cn50xx
;
233 struct cvmx_mpi_datx_s cn61xx
;
234 struct cvmx_mpi_datx_s cn66xx
;
235 struct cvmx_mpi_datx_s cnf71xx
;
240 struct cvmx_mpi_sts_s
{
241 #ifdef __BIG_ENDIAN_BITFIELD
242 uint64_t reserved_13_63
:51;
244 uint64_t reserved_1_7
:7;
248 uint64_t reserved_1_7
:7;
250 uint64_t reserved_13_63
:51;
253 struct cvmx_mpi_sts_s cn30xx
;
254 struct cvmx_mpi_sts_s cn31xx
;
255 struct cvmx_mpi_sts_s cn50xx
;
256 struct cvmx_mpi_sts_s cn61xx
;
257 struct cvmx_mpi_sts_s cn66xx
;
258 struct cvmx_mpi_sts_s cnf71xx
;
263 struct cvmx_mpi_tx_s
{
264 #ifdef __BIG_ENDIAN_BITFIELD
265 uint64_t reserved_22_63
:42;
267 uint64_t reserved_17_19
:3;
269 uint64_t reserved_13_15
:3;
271 uint64_t reserved_5_7
:3;
275 uint64_t reserved_5_7
:3;
277 uint64_t reserved_13_15
:3;
279 uint64_t reserved_17_19
:3;
281 uint64_t reserved_22_63
:42;
284 struct cvmx_mpi_tx_cn30xx
{
285 #ifdef __BIG_ENDIAN_BITFIELD
286 uint64_t reserved_17_63
:47;
288 uint64_t reserved_13_15
:3;
290 uint64_t reserved_5_7
:3;
294 uint64_t reserved_5_7
:3;
296 uint64_t reserved_13_15
:3;
298 uint64_t reserved_17_63
:47;
301 struct cvmx_mpi_tx_cn30xx cn31xx
;
302 struct cvmx_mpi_tx_cn30xx cn50xx
;
303 struct cvmx_mpi_tx_cn61xx
{
304 #ifdef __BIG_ENDIAN_BITFIELD
305 uint64_t reserved_21_63
:43;
307 uint64_t reserved_17_19
:3;
309 uint64_t reserved_13_15
:3;
311 uint64_t reserved_5_7
:3;
315 uint64_t reserved_5_7
:3;
317 uint64_t reserved_13_15
:3;
319 uint64_t reserved_17_19
:3;
321 uint64_t reserved_21_63
:43;
324 struct cvmx_mpi_tx_s cn66xx
;
325 struct cvmx_mpi_tx_cn61xx cnf71xx
;