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-2010 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 uint64_t reserved_13_63
:51;
66 struct cvmx_pescx_bist_status_s cn52xx
;
67 struct cvmx_pescx_bist_status_cn52xxp1
{
68 uint64_t reserved_12_63
:52;
82 struct cvmx_pescx_bist_status_s cn56xx
;
83 struct cvmx_pescx_bist_status_cn52xxp1 cn56xxp1
;
86 union cvmx_pescx_bist_status2
{
88 struct cvmx_pescx_bist_status2_s
{
89 uint64_t reserved_14_63
:50;
105 struct cvmx_pescx_bist_status2_s cn52xx
;
106 struct cvmx_pescx_bist_status2_s cn52xxp1
;
107 struct cvmx_pescx_bist_status2_s cn56xx
;
108 struct cvmx_pescx_bist_status2_s cn56xxp1
;
111 union cvmx_pescx_cfg_rd
{
113 struct cvmx_pescx_cfg_rd_s
{
117 struct cvmx_pescx_cfg_rd_s cn52xx
;
118 struct cvmx_pescx_cfg_rd_s cn52xxp1
;
119 struct cvmx_pescx_cfg_rd_s cn56xx
;
120 struct cvmx_pescx_cfg_rd_s cn56xxp1
;
123 union cvmx_pescx_cfg_wr
{
125 struct cvmx_pescx_cfg_wr_s
{
129 struct cvmx_pescx_cfg_wr_s cn52xx
;
130 struct cvmx_pescx_cfg_wr_s cn52xxp1
;
131 struct cvmx_pescx_cfg_wr_s cn56xx
;
132 struct cvmx_pescx_cfg_wr_s cn56xxp1
;
135 union cvmx_pescx_cpl_lut_valid
{
137 struct cvmx_pescx_cpl_lut_valid_s
{
138 uint64_t reserved_32_63
:32;
141 struct cvmx_pescx_cpl_lut_valid_s cn52xx
;
142 struct cvmx_pescx_cpl_lut_valid_s cn52xxp1
;
143 struct cvmx_pescx_cpl_lut_valid_s cn56xx
;
144 struct cvmx_pescx_cpl_lut_valid_s cn56xxp1
;
147 union cvmx_pescx_ctl_status
{
149 struct cvmx_pescx_ctl_status_s
{
150 uint64_t reserved_28_63
:36;
158 uint64_t reserved_7_8
:2;
163 uint64_t reserved_2_2
:1;
167 struct cvmx_pescx_ctl_status_s cn52xx
;
168 struct cvmx_pescx_ctl_status_s cn52xxp1
;
169 struct cvmx_pescx_ctl_status_cn56xx
{
170 uint64_t reserved_28_63
:36;
174 uint64_t reserved_12_12
:1;
178 uint64_t reserved_7_8
:2;
183 uint64_t reserved_2_2
:1;
187 struct cvmx_pescx_ctl_status_cn56xx cn56xxp1
;
190 union cvmx_pescx_ctl_status2
{
192 struct cvmx_pescx_ctl_status2_s
{
193 uint64_t reserved_2_63
:62;
197 struct cvmx_pescx_ctl_status2_s cn52xx
;
198 struct cvmx_pescx_ctl_status2_cn52xxp1
{
199 uint64_t reserved_1_63
:63;
202 struct cvmx_pescx_ctl_status2_s cn56xx
;
203 struct cvmx_pescx_ctl_status2_cn52xxp1 cn56xxp1
;
206 union cvmx_pescx_dbg_info
{
208 struct cvmx_pescx_dbg_info_s
{
209 uint64_t reserved_31_63
:33;
242 struct cvmx_pescx_dbg_info_s cn52xx
;
243 struct cvmx_pescx_dbg_info_s cn52xxp1
;
244 struct cvmx_pescx_dbg_info_s cn56xx
;
245 struct cvmx_pescx_dbg_info_s cn56xxp1
;
248 union cvmx_pescx_dbg_info_en
{
250 struct cvmx_pescx_dbg_info_en_s
{
251 uint64_t reserved_31_63
:33;
284 struct cvmx_pescx_dbg_info_en_s cn52xx
;
285 struct cvmx_pescx_dbg_info_en_s cn52xxp1
;
286 struct cvmx_pescx_dbg_info_en_s cn56xx
;
287 struct cvmx_pescx_dbg_info_en_s cn56xxp1
;
290 union cvmx_pescx_diag_status
{
292 struct cvmx_pescx_diag_status_s
{
293 uint64_t reserved_4_63
:60;
299 struct cvmx_pescx_diag_status_s cn52xx
;
300 struct cvmx_pescx_diag_status_s cn52xxp1
;
301 struct cvmx_pescx_diag_status_s cn56xx
;
302 struct cvmx_pescx_diag_status_s cn56xxp1
;
305 union cvmx_pescx_p2n_bar0_start
{
307 struct cvmx_pescx_p2n_bar0_start_s
{
309 uint64_t reserved_0_13
:14;
311 struct cvmx_pescx_p2n_bar0_start_s cn52xx
;
312 struct cvmx_pescx_p2n_bar0_start_s cn52xxp1
;
313 struct cvmx_pescx_p2n_bar0_start_s cn56xx
;
314 struct cvmx_pescx_p2n_bar0_start_s cn56xxp1
;
317 union cvmx_pescx_p2n_bar1_start
{
319 struct cvmx_pescx_p2n_bar1_start_s
{
321 uint64_t reserved_0_25
:26;
323 struct cvmx_pescx_p2n_bar1_start_s cn52xx
;
324 struct cvmx_pescx_p2n_bar1_start_s cn52xxp1
;
325 struct cvmx_pescx_p2n_bar1_start_s cn56xx
;
326 struct cvmx_pescx_p2n_bar1_start_s cn56xxp1
;
329 union cvmx_pescx_p2n_bar2_start
{
331 struct cvmx_pescx_p2n_bar2_start_s
{
333 uint64_t reserved_0_38
:39;
335 struct cvmx_pescx_p2n_bar2_start_s cn52xx
;
336 struct cvmx_pescx_p2n_bar2_start_s cn52xxp1
;
337 struct cvmx_pescx_p2n_bar2_start_s cn56xx
;
338 struct cvmx_pescx_p2n_bar2_start_s cn56xxp1
;
341 union cvmx_pescx_p2p_barx_end
{
343 struct cvmx_pescx_p2p_barx_end_s
{
345 uint64_t reserved_0_11
:12;
347 struct cvmx_pescx_p2p_barx_end_s cn52xx
;
348 struct cvmx_pescx_p2p_barx_end_s cn52xxp1
;
349 struct cvmx_pescx_p2p_barx_end_s cn56xx
;
350 struct cvmx_pescx_p2p_barx_end_s cn56xxp1
;
353 union cvmx_pescx_p2p_barx_start
{
355 struct cvmx_pescx_p2p_barx_start_s
{
357 uint64_t reserved_0_11
:12;
359 struct cvmx_pescx_p2p_barx_start_s cn52xx
;
360 struct cvmx_pescx_p2p_barx_start_s cn52xxp1
;
361 struct cvmx_pescx_p2p_barx_start_s cn56xx
;
362 struct cvmx_pescx_p2p_barx_start_s cn56xxp1
;
365 union cvmx_pescx_tlp_credits
{
367 struct cvmx_pescx_tlp_credits_s
{
368 uint64_t reserved_0_63
:64;
370 struct cvmx_pescx_tlp_credits_cn52xx
{
371 uint64_t reserved_56_63
:8;
380 struct cvmx_pescx_tlp_credits_cn52xxp1
{
381 uint64_t reserved_38_63
:26;
390 struct cvmx_pescx_tlp_credits_cn52xx cn56xx
;
391 struct cvmx_pescx_tlp_credits_cn52xxp1 cn56xxp1
;