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_PESCX_DEFS_H__
29 #define __CVMX_PESCX_DEFS_H__
31 #define CVMX_PESCX_BIST_STATUS(block_id) (CVMX_ADD_IO_SEG(0x00011800C8000018ull) + ((block_id) & 1) * 0x8000000ull)
32 #define CVMX_PESCX_BIST_STATUS2(block_id) (CVMX_ADD_IO_SEG(0x00011800C8000418ull) + ((block_id) & 1) * 0x8000000ull)
33 #define CVMX_PESCX_CFG_RD(block_id) (CVMX_ADD_IO_SEG(0x00011800C8000030ull) + ((block_id) & 1) * 0x8000000ull)
34 #define CVMX_PESCX_CFG_WR(block_id) (CVMX_ADD_IO_SEG(0x00011800C8000028ull) + ((block_id) & 1) * 0x8000000ull)
35 #define CVMX_PESCX_CPL_LUT_VALID(block_id) (CVMX_ADD_IO_SEG(0x00011800C8000098ull) + ((block_id) & 1) * 0x8000000ull)
36 #define CVMX_PESCX_CTL_STATUS(block_id) (CVMX_ADD_IO_SEG(0x00011800C8000000ull) + ((block_id) & 1) * 0x8000000ull)
37 #define CVMX_PESCX_CTL_STATUS2(block_id) (CVMX_ADD_IO_SEG(0x00011800C8000400ull) + ((block_id) & 1) * 0x8000000ull)
38 #define CVMX_PESCX_DBG_INFO(block_id) (CVMX_ADD_IO_SEG(0x00011800C8000008ull) + ((block_id) & 1) * 0x8000000ull)
39 #define CVMX_PESCX_DBG_INFO_EN(block_id) (CVMX_ADD_IO_SEG(0x00011800C80000A0ull) + ((block_id) & 1) * 0x8000000ull)
40 #define CVMX_PESCX_DIAG_STATUS(block_id) (CVMX_ADD_IO_SEG(0x00011800C8000020ull) + ((block_id) & 1) * 0x8000000ull)
41 #define CVMX_PESCX_P2N_BAR0_START(block_id) (CVMX_ADD_IO_SEG(0x00011800C8000080ull) + ((block_id) & 1) * 0x8000000ull)
42 #define CVMX_PESCX_P2N_BAR1_START(block_id) (CVMX_ADD_IO_SEG(0x00011800C8000088ull) + ((block_id) & 1) * 0x8000000ull)
43 #define CVMX_PESCX_P2N_BAR2_START(block_id) (CVMX_ADD_IO_SEG(0x00011800C8000090ull) + ((block_id) & 1) * 0x8000000ull)
44 #define CVMX_PESCX_P2P_BARX_END(offset, block_id) (CVMX_ADD_IO_SEG(0x00011800C8000048ull) + (((offset) & 3) + ((block_id) & 1) * 0x800000ull) * 16)
45 #define CVMX_PESCX_P2P_BARX_START(offset, block_id) (CVMX_ADD_IO_SEG(0x00011800C8000040ull) + (((offset) & 3) + ((block_id) & 1) * 0x800000ull) * 16)
46 #define CVMX_PESCX_TLP_CREDITS(block_id) (CVMX_ADD_IO_SEG(0x00011800C8000038ull) + ((block_id) & 1) * 0x8000000ull)
48 union cvmx_pescx_bist_status
{
50 struct cvmx_pescx_bist_status_s
{
51 #ifdef __BIG_ENDIAN_BITFIELD
52 uint64_t reserved_13_63
:51;
80 uint64_t reserved_13_63
:51;
83 struct cvmx_pescx_bist_status_cn52xxp1
{
84 #ifdef __BIG_ENDIAN_BITFIELD
85 uint64_t reserved_12_63
:52;
111 uint64_t reserved_12_63
:52;
116 union cvmx_pescx_bist_status2
{
118 struct cvmx_pescx_bist_status2_s
{
119 #ifdef __BIG_ENDIAN_BITFIELD
120 uint64_t reserved_14_63
:50;
150 uint64_t reserved_14_63
:50;
155 union cvmx_pescx_cfg_rd
{
157 struct cvmx_pescx_cfg_rd_s
{
158 #ifdef __BIG_ENDIAN_BITFIELD
168 union cvmx_pescx_cfg_wr
{
170 struct cvmx_pescx_cfg_wr_s
{
171 #ifdef __BIG_ENDIAN_BITFIELD
181 union cvmx_pescx_cpl_lut_valid
{
183 struct cvmx_pescx_cpl_lut_valid_s
{
184 #ifdef __BIG_ENDIAN_BITFIELD
185 uint64_t reserved_32_63
:32;
189 uint64_t reserved_32_63
:32;
194 union cvmx_pescx_ctl_status
{
196 struct cvmx_pescx_ctl_status_s
{
197 #ifdef __BIG_ENDIAN_BITFIELD
198 uint64_t reserved_28_63
:36;
206 uint64_t reserved_7_8
:2;
211 uint64_t reserved_2_2
:1;
217 uint64_t reserved_2_2
:1;
222 uint64_t reserved_7_8
:2;
230 uint64_t reserved_28_63
:36;
233 struct cvmx_pescx_ctl_status_cn56xx
{
234 #ifdef __BIG_ENDIAN_BITFIELD
235 uint64_t reserved_28_63
:36;
239 uint64_t reserved_12_12
:1;
243 uint64_t reserved_7_8
:2;
248 uint64_t reserved_2_2
:1;
254 uint64_t reserved_2_2
:1;
259 uint64_t reserved_7_8
:2;
263 uint64_t reserved_12_12
:1;
267 uint64_t reserved_28_63
:36;
272 union cvmx_pescx_ctl_status2
{
274 struct cvmx_pescx_ctl_status2_s
{
275 #ifdef __BIG_ENDIAN_BITFIELD
276 uint64_t reserved_2_63
:62;
282 uint64_t reserved_2_63
:62;
285 struct cvmx_pescx_ctl_status2_cn52xxp1
{
286 #ifdef __BIG_ENDIAN_BITFIELD
287 uint64_t reserved_1_63
:63;
291 uint64_t reserved_1_63
:63;
296 union cvmx_pescx_dbg_info
{
298 struct cvmx_pescx_dbg_info_s
{
299 #ifdef __BIG_ENDIAN_BITFIELD
300 uint64_t reserved_31_63
:33;
364 uint64_t reserved_31_63
:33;
369 union cvmx_pescx_dbg_info_en
{
371 struct cvmx_pescx_dbg_info_en_s
{
372 #ifdef __BIG_ENDIAN_BITFIELD
373 uint64_t reserved_31_63
:33;
437 uint64_t reserved_31_63
:33;
442 union cvmx_pescx_diag_status
{
444 struct cvmx_pescx_diag_status_s
{
445 #ifdef __BIG_ENDIAN_BITFIELD
446 uint64_t reserved_4_63
:60;
456 uint64_t reserved_4_63
:60;
461 union cvmx_pescx_p2n_bar0_start
{
463 struct cvmx_pescx_p2n_bar0_start_s
{
464 #ifdef __BIG_ENDIAN_BITFIELD
466 uint64_t reserved_0_13
:14;
468 uint64_t reserved_0_13
:14;
474 union cvmx_pescx_p2n_bar1_start
{
476 struct cvmx_pescx_p2n_bar1_start_s
{
477 #ifdef __BIG_ENDIAN_BITFIELD
479 uint64_t reserved_0_25
:26;
481 uint64_t reserved_0_25
:26;
487 union cvmx_pescx_p2n_bar2_start
{
489 struct cvmx_pescx_p2n_bar2_start_s
{
490 #ifdef __BIG_ENDIAN_BITFIELD
492 uint64_t reserved_0_38
:39;
494 uint64_t reserved_0_38
:39;
500 union cvmx_pescx_p2p_barx_end
{
502 struct cvmx_pescx_p2p_barx_end_s
{
503 #ifdef __BIG_ENDIAN_BITFIELD
505 uint64_t reserved_0_11
:12;
507 uint64_t reserved_0_11
:12;
513 union cvmx_pescx_p2p_barx_start
{
515 struct cvmx_pescx_p2p_barx_start_s
{
516 #ifdef __BIG_ENDIAN_BITFIELD
518 uint64_t reserved_0_11
:12;
520 uint64_t reserved_0_11
:12;
526 union cvmx_pescx_tlp_credits
{
528 struct cvmx_pescx_tlp_credits_s
{
529 #ifdef __BIG_ENDIAN_BITFIELD
530 uint64_t reserved_0_63
:64;
532 uint64_t reserved_0_63
:64;
535 struct cvmx_pescx_tlp_credits_cn52xx
{
536 #ifdef __BIG_ENDIAN_BITFIELD
537 uint64_t reserved_56_63
:8;
553 uint64_t reserved_56_63
:8;
556 struct cvmx_pescx_tlp_credits_cn52xxp1
{
557 #ifdef __BIG_ENDIAN_BITFIELD
558 uint64_t reserved_38_63
:26;
574 uint64_t reserved_38_63
:26;