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-2011 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_PEMX_DEFS_H__
29 #define __CVMX_PEMX_DEFS_H__
31 #define CVMX_PEMX_BAR1_INDEXX(offset, block_id) (CVMX_ADD_IO_SEG(0x00011800C00000A8ull) + (((offset) & 15) + ((block_id) & 1) * 0x200000ull) * 8)
32 #define CVMX_PEMX_BAR2_MASK(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000130ull) + ((block_id) & 1) * 0x1000000ull)
33 #define CVMX_PEMX_BAR_CTL(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000128ull) + ((block_id) & 1) * 0x1000000ull)
34 #define CVMX_PEMX_BIST_STATUS(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000018ull) + ((block_id) & 1) * 0x1000000ull)
35 #define CVMX_PEMX_BIST_STATUS2(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000420ull) + ((block_id) & 1) * 0x1000000ull)
36 #define CVMX_PEMX_CFG_RD(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000030ull) + ((block_id) & 1) * 0x1000000ull)
37 #define CVMX_PEMX_CFG_WR(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000028ull) + ((block_id) & 1) * 0x1000000ull)
38 #define CVMX_PEMX_CPL_LUT_VALID(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000098ull) + ((block_id) & 1) * 0x1000000ull)
39 #define CVMX_PEMX_CTL_STATUS(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000000ull) + ((block_id) & 1) * 0x1000000ull)
40 #define CVMX_PEMX_DBG_INFO(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000008ull) + ((block_id) & 1) * 0x1000000ull)
41 #define CVMX_PEMX_DBG_INFO_EN(block_id) (CVMX_ADD_IO_SEG(0x00011800C00000A0ull) + ((block_id) & 1) * 0x1000000ull)
42 #define CVMX_PEMX_DIAG_STATUS(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000020ull) + ((block_id) & 1) * 0x1000000ull)
43 #define CVMX_PEMX_INB_READ_CREDITS(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000138ull) + ((block_id) & 1) * 0x1000000ull)
44 #define CVMX_PEMX_INT_ENB(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000410ull) + ((block_id) & 1) * 0x1000000ull)
45 #define CVMX_PEMX_INT_ENB_INT(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000418ull) + ((block_id) & 1) * 0x1000000ull)
46 #define CVMX_PEMX_INT_SUM(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000408ull) + ((block_id) & 1) * 0x1000000ull)
47 #define CVMX_PEMX_P2N_BAR0_START(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000080ull) + ((block_id) & 1) * 0x1000000ull)
48 #define CVMX_PEMX_P2N_BAR1_START(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000088ull) + ((block_id) & 1) * 0x1000000ull)
49 #define CVMX_PEMX_P2N_BAR2_START(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000090ull) + ((block_id) & 1) * 0x1000000ull)
50 #define CVMX_PEMX_P2P_BARX_END(offset, block_id) (CVMX_ADD_IO_SEG(0x00011800C0000048ull) + (((offset) & 3) + ((block_id) & 1) * 0x100000ull) * 16)
51 #define CVMX_PEMX_P2P_BARX_START(offset, block_id) (CVMX_ADD_IO_SEG(0x00011800C0000040ull) + (((offset) & 3) + ((block_id) & 1) * 0x100000ull) * 16)
52 #define CVMX_PEMX_TLP_CREDITS(block_id) (CVMX_ADD_IO_SEG(0x00011800C0000038ull) + ((block_id) & 1) * 0x1000000ull)
54 union cvmx_pemx_bar1_indexx
{
56 struct cvmx_pemx_bar1_indexx_s
{
57 uint64_t reserved_20_63
:44;
63 struct cvmx_pemx_bar1_indexx_s cn61xx
;
64 struct cvmx_pemx_bar1_indexx_s cn63xx
;
65 struct cvmx_pemx_bar1_indexx_s cn63xxp1
;
66 struct cvmx_pemx_bar1_indexx_s cn66xx
;
67 struct cvmx_pemx_bar1_indexx_s cn68xx
;
68 struct cvmx_pemx_bar1_indexx_s cn68xxp1
;
71 union cvmx_pemx_bar2_mask
{
73 struct cvmx_pemx_bar2_mask_s
{
74 uint64_t reserved_38_63
:26;
76 uint64_t reserved_0_2
:3;
78 struct cvmx_pemx_bar2_mask_s cn61xx
;
79 struct cvmx_pemx_bar2_mask_s cn66xx
;
80 struct cvmx_pemx_bar2_mask_s cn68xx
;
81 struct cvmx_pemx_bar2_mask_s cn68xxp1
;
84 union cvmx_pemx_bar_ctl
{
86 struct cvmx_pemx_bar_ctl_s
{
87 uint64_t reserved_7_63
:57;
93 struct cvmx_pemx_bar_ctl_s cn61xx
;
94 struct cvmx_pemx_bar_ctl_s cn63xx
;
95 struct cvmx_pemx_bar_ctl_s cn63xxp1
;
96 struct cvmx_pemx_bar_ctl_s cn66xx
;
97 struct cvmx_pemx_bar_ctl_s cn68xx
;
98 struct cvmx_pemx_bar_ctl_s cn68xxp1
;
101 union cvmx_pemx_bist_status
{
103 struct cvmx_pemx_bist_status_s
{
104 uint64_t reserved_8_63
:56;
114 struct cvmx_pemx_bist_status_s cn61xx
;
115 struct cvmx_pemx_bist_status_s cn63xx
;
116 struct cvmx_pemx_bist_status_s cn63xxp1
;
117 struct cvmx_pemx_bist_status_s cn66xx
;
118 struct cvmx_pemx_bist_status_s cn68xx
;
119 struct cvmx_pemx_bist_status_s cn68xxp1
;
122 union cvmx_pemx_bist_status2
{
124 struct cvmx_pemx_bist_status2_s
{
125 uint64_t reserved_10_63
:54;
137 struct cvmx_pemx_bist_status2_s cn61xx
;
138 struct cvmx_pemx_bist_status2_s cn63xx
;
139 struct cvmx_pemx_bist_status2_s cn63xxp1
;
140 struct cvmx_pemx_bist_status2_s cn66xx
;
141 struct cvmx_pemx_bist_status2_s cn68xx
;
142 struct cvmx_pemx_bist_status2_s cn68xxp1
;
145 union cvmx_pemx_cfg_rd
{
147 struct cvmx_pemx_cfg_rd_s
{
151 struct cvmx_pemx_cfg_rd_s cn61xx
;
152 struct cvmx_pemx_cfg_rd_s cn63xx
;
153 struct cvmx_pemx_cfg_rd_s cn63xxp1
;
154 struct cvmx_pemx_cfg_rd_s cn66xx
;
155 struct cvmx_pemx_cfg_rd_s cn68xx
;
156 struct cvmx_pemx_cfg_rd_s cn68xxp1
;
159 union cvmx_pemx_cfg_wr
{
161 struct cvmx_pemx_cfg_wr_s
{
165 struct cvmx_pemx_cfg_wr_s cn61xx
;
166 struct cvmx_pemx_cfg_wr_s cn63xx
;
167 struct cvmx_pemx_cfg_wr_s cn63xxp1
;
168 struct cvmx_pemx_cfg_wr_s cn66xx
;
169 struct cvmx_pemx_cfg_wr_s cn68xx
;
170 struct cvmx_pemx_cfg_wr_s cn68xxp1
;
173 union cvmx_pemx_cpl_lut_valid
{
175 struct cvmx_pemx_cpl_lut_valid_s
{
176 uint64_t reserved_32_63
:32;
179 struct cvmx_pemx_cpl_lut_valid_s cn61xx
;
180 struct cvmx_pemx_cpl_lut_valid_s cn63xx
;
181 struct cvmx_pemx_cpl_lut_valid_s cn63xxp1
;
182 struct cvmx_pemx_cpl_lut_valid_s cn66xx
;
183 struct cvmx_pemx_cpl_lut_valid_s cn68xx
;
184 struct cvmx_pemx_cpl_lut_valid_s cn68xxp1
;
187 union cvmx_pemx_ctl_status
{
189 struct cvmx_pemx_ctl_status_s
{
190 uint64_t reserved_48_63
:16;
194 uint64_t reserved_32_33
:2;
195 uint64_t cfg_rtry
:16;
196 uint64_t reserved_12_15
:4;
200 uint64_t reserved_7_8
:2;
209 struct cvmx_pemx_ctl_status_s cn61xx
;
210 struct cvmx_pemx_ctl_status_s cn63xx
;
211 struct cvmx_pemx_ctl_status_s cn63xxp1
;
212 struct cvmx_pemx_ctl_status_s cn66xx
;
213 struct cvmx_pemx_ctl_status_s cn68xx
;
214 struct cvmx_pemx_ctl_status_s cn68xxp1
;
217 union cvmx_pemx_dbg_info
{
219 struct cvmx_pemx_dbg_info_s
{
220 uint64_t reserved_31_63
:33;
253 struct cvmx_pemx_dbg_info_s cn61xx
;
254 struct cvmx_pemx_dbg_info_s cn63xx
;
255 struct cvmx_pemx_dbg_info_s cn63xxp1
;
256 struct cvmx_pemx_dbg_info_s cn66xx
;
257 struct cvmx_pemx_dbg_info_s cn68xx
;
258 struct cvmx_pemx_dbg_info_s cn68xxp1
;
261 union cvmx_pemx_dbg_info_en
{
263 struct cvmx_pemx_dbg_info_en_s
{
264 uint64_t reserved_31_63
:33;
297 struct cvmx_pemx_dbg_info_en_s cn61xx
;
298 struct cvmx_pemx_dbg_info_en_s cn63xx
;
299 struct cvmx_pemx_dbg_info_en_s cn63xxp1
;
300 struct cvmx_pemx_dbg_info_en_s cn66xx
;
301 struct cvmx_pemx_dbg_info_en_s cn68xx
;
302 struct cvmx_pemx_dbg_info_en_s cn68xxp1
;
305 union cvmx_pemx_diag_status
{
307 struct cvmx_pemx_diag_status_s
{
308 uint64_t reserved_4_63
:60;
314 struct cvmx_pemx_diag_status_s cn61xx
;
315 struct cvmx_pemx_diag_status_s cn63xx
;
316 struct cvmx_pemx_diag_status_s cn63xxp1
;
317 struct cvmx_pemx_diag_status_s cn66xx
;
318 struct cvmx_pemx_diag_status_s cn68xx
;
319 struct cvmx_pemx_diag_status_s cn68xxp1
;
322 union cvmx_pemx_inb_read_credits
{
324 struct cvmx_pemx_inb_read_credits_s
{
325 uint64_t reserved_6_63
:58;
328 struct cvmx_pemx_inb_read_credits_s cn61xx
;
329 struct cvmx_pemx_inb_read_credits_s cn66xx
;
330 struct cvmx_pemx_inb_read_credits_s cn68xx
;
333 union cvmx_pemx_int_enb
{
335 struct cvmx_pemx_int_enb_s
{
336 uint64_t reserved_14_63
:50;
352 struct cvmx_pemx_int_enb_s cn61xx
;
353 struct cvmx_pemx_int_enb_s cn63xx
;
354 struct cvmx_pemx_int_enb_s cn63xxp1
;
355 struct cvmx_pemx_int_enb_s cn66xx
;
356 struct cvmx_pemx_int_enb_s cn68xx
;
357 struct cvmx_pemx_int_enb_s cn68xxp1
;
360 union cvmx_pemx_int_enb_int
{
362 struct cvmx_pemx_int_enb_int_s
{
363 uint64_t reserved_14_63
:50;
379 struct cvmx_pemx_int_enb_int_s cn61xx
;
380 struct cvmx_pemx_int_enb_int_s cn63xx
;
381 struct cvmx_pemx_int_enb_int_s cn63xxp1
;
382 struct cvmx_pemx_int_enb_int_s cn66xx
;
383 struct cvmx_pemx_int_enb_int_s cn68xx
;
384 struct cvmx_pemx_int_enb_int_s cn68xxp1
;
387 union cvmx_pemx_int_sum
{
389 struct cvmx_pemx_int_sum_s
{
390 uint64_t reserved_14_63
:50;
406 struct cvmx_pemx_int_sum_s cn61xx
;
407 struct cvmx_pemx_int_sum_s cn63xx
;
408 struct cvmx_pemx_int_sum_s cn63xxp1
;
409 struct cvmx_pemx_int_sum_s cn66xx
;
410 struct cvmx_pemx_int_sum_s cn68xx
;
411 struct cvmx_pemx_int_sum_s cn68xxp1
;
414 union cvmx_pemx_p2n_bar0_start
{
416 struct cvmx_pemx_p2n_bar0_start_s
{
418 uint64_t reserved_0_13
:14;
420 struct cvmx_pemx_p2n_bar0_start_s cn61xx
;
421 struct cvmx_pemx_p2n_bar0_start_s cn63xx
;
422 struct cvmx_pemx_p2n_bar0_start_s cn63xxp1
;
423 struct cvmx_pemx_p2n_bar0_start_s cn66xx
;
424 struct cvmx_pemx_p2n_bar0_start_s cn68xx
;
425 struct cvmx_pemx_p2n_bar0_start_s cn68xxp1
;
428 union cvmx_pemx_p2n_bar1_start
{
430 struct cvmx_pemx_p2n_bar1_start_s
{
432 uint64_t reserved_0_25
:26;
434 struct cvmx_pemx_p2n_bar1_start_s cn61xx
;
435 struct cvmx_pemx_p2n_bar1_start_s cn63xx
;
436 struct cvmx_pemx_p2n_bar1_start_s cn63xxp1
;
437 struct cvmx_pemx_p2n_bar1_start_s cn66xx
;
438 struct cvmx_pemx_p2n_bar1_start_s cn68xx
;
439 struct cvmx_pemx_p2n_bar1_start_s cn68xxp1
;
442 union cvmx_pemx_p2n_bar2_start
{
444 struct cvmx_pemx_p2n_bar2_start_s
{
446 uint64_t reserved_0_40
:41;
448 struct cvmx_pemx_p2n_bar2_start_s cn61xx
;
449 struct cvmx_pemx_p2n_bar2_start_s cn63xx
;
450 struct cvmx_pemx_p2n_bar2_start_s cn63xxp1
;
451 struct cvmx_pemx_p2n_bar2_start_s cn66xx
;
452 struct cvmx_pemx_p2n_bar2_start_s cn68xx
;
453 struct cvmx_pemx_p2n_bar2_start_s cn68xxp1
;
456 union cvmx_pemx_p2p_barx_end
{
458 struct cvmx_pemx_p2p_barx_end_s
{
460 uint64_t reserved_0_11
:12;
462 struct cvmx_pemx_p2p_barx_end_s cn63xx
;
463 struct cvmx_pemx_p2p_barx_end_s cn63xxp1
;
464 struct cvmx_pemx_p2p_barx_end_s cn66xx
;
465 struct cvmx_pemx_p2p_barx_end_s cn68xx
;
466 struct cvmx_pemx_p2p_barx_end_s cn68xxp1
;
469 union cvmx_pemx_p2p_barx_start
{
471 struct cvmx_pemx_p2p_barx_start_s
{
473 uint64_t reserved_0_11
:12;
475 struct cvmx_pemx_p2p_barx_start_s cn63xx
;
476 struct cvmx_pemx_p2p_barx_start_s cn63xxp1
;
477 struct cvmx_pemx_p2p_barx_start_s cn66xx
;
478 struct cvmx_pemx_p2p_barx_start_s cn68xx
;
479 struct cvmx_pemx_p2p_barx_start_s cn68xxp1
;
482 union cvmx_pemx_tlp_credits
{
484 struct cvmx_pemx_tlp_credits_s
{
485 uint64_t reserved_56_63
:8;
494 struct cvmx_pemx_tlp_credits_cn61xx
{
495 uint64_t reserved_56_63
:8;
497 uint64_t reserved_24_47
:24;
502 struct cvmx_pemx_tlp_credits_s cn63xx
;
503 struct cvmx_pemx_tlp_credits_s cn63xxp1
;
504 struct cvmx_pemx_tlp_credits_s cn66xx
;
505 struct cvmx_pemx_tlp_credits_s cn68xx
;
506 struct cvmx_pemx_tlp_credits_s cn68xxp1
;