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_FPA_DEFS_H__
29 #define __CVMX_FPA_DEFS_H__
31 #define CVMX_FPA_ADDR_RANGE_ERROR (CVMX_ADD_IO_SEG(0x0001180028000458ull))
32 #define CVMX_FPA_BIST_STATUS (CVMX_ADD_IO_SEG(0x00011800280000E8ull))
33 #define CVMX_FPA_CTL_STATUS (CVMX_ADD_IO_SEG(0x0001180028000050ull))
34 #define CVMX_FPA_FPF0_MARKS (CVMX_ADD_IO_SEG(0x0001180028000000ull))
35 #define CVMX_FPA_FPF0_SIZE (CVMX_ADD_IO_SEG(0x0001180028000058ull))
36 #define CVMX_FPA_FPF1_MARKS CVMX_FPA_FPFX_MARKS(1)
37 #define CVMX_FPA_FPF2_MARKS CVMX_FPA_FPFX_MARKS(2)
38 #define CVMX_FPA_FPF3_MARKS CVMX_FPA_FPFX_MARKS(3)
39 #define CVMX_FPA_FPF4_MARKS CVMX_FPA_FPFX_MARKS(4)
40 #define CVMX_FPA_FPF5_MARKS CVMX_FPA_FPFX_MARKS(5)
41 #define CVMX_FPA_FPF6_MARKS CVMX_FPA_FPFX_MARKS(6)
42 #define CVMX_FPA_FPF7_MARKS CVMX_FPA_FPFX_MARKS(7)
43 #define CVMX_FPA_FPF8_MARKS (CVMX_ADD_IO_SEG(0x0001180028000240ull))
44 #define CVMX_FPA_FPF8_SIZE (CVMX_ADD_IO_SEG(0x0001180028000248ull))
45 #define CVMX_FPA_FPFX_MARKS(offset) (CVMX_ADD_IO_SEG(0x0001180028000008ull) + ((offset) & 7) * 8 - 8*1)
46 #define CVMX_FPA_FPFX_SIZE(offset) (CVMX_ADD_IO_SEG(0x0001180028000060ull) + ((offset) & 7) * 8 - 8*1)
47 #define CVMX_FPA_INT_ENB (CVMX_ADD_IO_SEG(0x0001180028000048ull))
48 #define CVMX_FPA_INT_SUM (CVMX_ADD_IO_SEG(0x0001180028000040ull))
49 #define CVMX_FPA_PACKET_THRESHOLD (CVMX_ADD_IO_SEG(0x0001180028000460ull))
50 #define CVMX_FPA_POOLX_END_ADDR(offset) (CVMX_ADD_IO_SEG(0x0001180028000358ull) + ((offset) & 15) * 8)
51 #define CVMX_FPA_POOLX_START_ADDR(offset) (CVMX_ADD_IO_SEG(0x0001180028000258ull) + ((offset) & 15) * 8)
52 #define CVMX_FPA_POOLX_THRESHOLD(offset) (CVMX_ADD_IO_SEG(0x0001180028000140ull) + ((offset) & 15) * 8)
53 #define CVMX_FPA_QUE0_PAGE_INDEX CVMX_FPA_QUEX_PAGE_INDEX(0)
54 #define CVMX_FPA_QUE1_PAGE_INDEX CVMX_FPA_QUEX_PAGE_INDEX(1)
55 #define CVMX_FPA_QUE2_PAGE_INDEX CVMX_FPA_QUEX_PAGE_INDEX(2)
56 #define CVMX_FPA_QUE3_PAGE_INDEX CVMX_FPA_QUEX_PAGE_INDEX(3)
57 #define CVMX_FPA_QUE4_PAGE_INDEX CVMX_FPA_QUEX_PAGE_INDEX(4)
58 #define CVMX_FPA_QUE5_PAGE_INDEX CVMX_FPA_QUEX_PAGE_INDEX(5)
59 #define CVMX_FPA_QUE6_PAGE_INDEX CVMX_FPA_QUEX_PAGE_INDEX(6)
60 #define CVMX_FPA_QUE7_PAGE_INDEX CVMX_FPA_QUEX_PAGE_INDEX(7)
61 #define CVMX_FPA_QUE8_PAGE_INDEX (CVMX_ADD_IO_SEG(0x0001180028000250ull))
62 #define CVMX_FPA_QUEX_AVAILABLE(offset) (CVMX_ADD_IO_SEG(0x0001180028000098ull) + ((offset) & 15) * 8)
63 #define CVMX_FPA_QUEX_PAGE_INDEX(offset) (CVMX_ADD_IO_SEG(0x00011800280000F0ull) + ((offset) & 7) * 8)
64 #define CVMX_FPA_QUE_ACT (CVMX_ADD_IO_SEG(0x0001180028000138ull))
65 #define CVMX_FPA_QUE_EXP (CVMX_ADD_IO_SEG(0x0001180028000130ull))
66 #define CVMX_FPA_WART_CTL (CVMX_ADD_IO_SEG(0x00011800280000D8ull))
67 #define CVMX_FPA_WART_STATUS (CVMX_ADD_IO_SEG(0x00011800280000E0ull))
68 #define CVMX_FPA_WQE_THRESHOLD (CVMX_ADD_IO_SEG(0x0001180028000468ull))
69 #define CVMX_FPA_CLK_COUNT (CVMX_ADD_IO_SEG(0x00012800000000F0ull))
71 union cvmx_fpa_addr_range_error
{
73 struct cvmx_fpa_addr_range_error_s
{
74 #ifdef __BIG_ENDIAN_BITFIELD
75 uint64_t reserved_38_63
:26;
81 uint64_t reserved_38_63
:26;
86 union cvmx_fpa_bist_status
{
88 struct cvmx_fpa_bist_status_s
{
89 #ifdef __BIG_ENDIAN_BITFIELD
90 uint64_t reserved_5_63
:59;
102 uint64_t reserved_5_63
:59;
107 union cvmx_fpa_ctl_status
{
109 struct cvmx_fpa_ctl_status_s
{
110 #ifdef __BIG_ENDIAN_BITFIELD
111 uint64_t reserved_21_63
:43;
131 uint64_t reserved_21_63
:43;
134 struct cvmx_fpa_ctl_status_cn30xx
{
135 #ifdef __BIG_ENDIAN_BITFIELD
136 uint64_t reserved_18_63
:46;
150 uint64_t reserved_18_63
:46;
155 union cvmx_fpa_fpfx_marks
{
157 struct cvmx_fpa_fpfx_marks_s
{
158 #ifdef __BIG_ENDIAN_BITFIELD
159 uint64_t reserved_22_63
:42;
165 uint64_t reserved_22_63
:42;
170 union cvmx_fpa_fpfx_size
{
172 struct cvmx_fpa_fpfx_size_s
{
173 #ifdef __BIG_ENDIAN_BITFIELD
174 uint64_t reserved_11_63
:53;
178 uint64_t reserved_11_63
:53;
183 union cvmx_fpa_fpf0_marks
{
185 struct cvmx_fpa_fpf0_marks_s
{
186 #ifdef __BIG_ENDIAN_BITFIELD
187 uint64_t reserved_24_63
:40;
193 uint64_t reserved_24_63
:40;
198 union cvmx_fpa_fpf0_size
{
200 struct cvmx_fpa_fpf0_size_s
{
201 #ifdef __BIG_ENDIAN_BITFIELD
202 uint64_t reserved_12_63
:52;
206 uint64_t reserved_12_63
:52;
211 union cvmx_fpa_fpf8_marks
{
213 struct cvmx_fpa_fpf8_marks_s
{
214 #ifdef __BIG_ENDIAN_BITFIELD
215 uint64_t reserved_22_63
:42;
221 uint64_t reserved_22_63
:42;
226 union cvmx_fpa_fpf8_size
{
228 struct cvmx_fpa_fpf8_size_s
{
229 #ifdef __BIG_ENDIAN_BITFIELD
230 uint64_t reserved_12_63
:52;
234 uint64_t reserved_12_63
:52;
239 union cvmx_fpa_int_enb
{
241 struct cvmx_fpa_int_enb_s
{
242 #ifdef __BIG_ENDIAN_BITFIELD
243 uint64_t reserved_50_63
:14;
245 uint64_t reserved_44_48
:5;
335 uint64_t reserved_44_48
:5;
337 uint64_t reserved_50_63
:14;
340 struct cvmx_fpa_int_enb_cn30xx
{
341 #ifdef __BIG_ENDIAN_BITFIELD
342 uint64_t reserved_28_63
:36;
400 uint64_t reserved_28_63
:36;
403 struct cvmx_fpa_int_enb_cn61xx
{
404 #ifdef __BIG_ENDIAN_BITFIELD
405 uint64_t reserved_50_63
:14;
499 uint64_t reserved_50_63
:14;
502 struct cvmx_fpa_int_enb_cn63xx
{
503 #ifdef __BIG_ENDIAN_BITFIELD
504 uint64_t reserved_44_63
:20;
594 uint64_t reserved_44_63
:20;
597 struct cvmx_fpa_int_enb_cn68xx
{
598 #ifdef __BIG_ENDIAN_BITFIELD
599 uint64_t reserved_50_63
:14;
701 uint64_t reserved_50_63
:14;
706 union cvmx_fpa_int_sum
{
708 struct cvmx_fpa_int_sum_s
{
709 #ifdef __BIG_ENDIAN_BITFIELD
710 uint64_t reserved_50_63
:14;
812 uint64_t reserved_50_63
:14;
815 struct cvmx_fpa_int_sum_cn30xx
{
816 #ifdef __BIG_ENDIAN_BITFIELD
817 uint64_t reserved_28_63
:36;
875 uint64_t reserved_28_63
:36;
878 struct cvmx_fpa_int_sum_cn61xx
{
879 #ifdef __BIG_ENDIAN_BITFIELD
880 uint64_t reserved_50_63
:14;
882 uint64_t reserved_44_48
:5;
972 uint64_t reserved_44_48
:5;
974 uint64_t reserved_50_63
:14;
977 struct cvmx_fpa_int_sum_cn63xx
{
978 #ifdef __BIG_ENDIAN_BITFIELD
979 uint64_t reserved_44_63
:20;
1020 uint64_t fed1_dbe
:1;
1021 uint64_t fed1_sbe
:1;
1022 uint64_t fed0_dbe
:1;
1023 uint64_t fed0_sbe
:1;
1025 uint64_t fed0_sbe
:1;
1026 uint64_t fed0_dbe
:1;
1027 uint64_t fed1_sbe
:1;
1028 uint64_t fed1_dbe
:1;
1069 uint64_t reserved_44_63
:20;
1074 union cvmx_fpa_packet_threshold
{
1076 struct cvmx_fpa_packet_threshold_s
{
1077 #ifdef __BIG_ENDIAN_BITFIELD
1078 uint64_t reserved_32_63
:32;
1082 uint64_t reserved_32_63
:32;
1087 union cvmx_fpa_poolx_end_addr
{
1089 struct cvmx_fpa_poolx_end_addr_s
{
1090 #ifdef __BIG_ENDIAN_BITFIELD
1091 uint64_t reserved_33_63
:31;
1095 uint64_t reserved_33_63
:31;
1100 union cvmx_fpa_poolx_start_addr
{
1102 struct cvmx_fpa_poolx_start_addr_s
{
1103 #ifdef __BIG_ENDIAN_BITFIELD
1104 uint64_t reserved_33_63
:31;
1108 uint64_t reserved_33_63
:31;
1113 union cvmx_fpa_poolx_threshold
{
1115 struct cvmx_fpa_poolx_threshold_s
{
1116 #ifdef __BIG_ENDIAN_BITFIELD
1117 uint64_t reserved_32_63
:32;
1121 uint64_t reserved_32_63
:32;
1124 struct cvmx_fpa_poolx_threshold_cn61xx
{
1125 #ifdef __BIG_ENDIAN_BITFIELD
1126 uint64_t reserved_29_63
:35;
1130 uint64_t reserved_29_63
:35;
1135 union cvmx_fpa_quex_available
{
1137 struct cvmx_fpa_quex_available_s
{
1138 #ifdef __BIG_ENDIAN_BITFIELD
1139 uint64_t reserved_32_63
:32;
1140 uint64_t que_siz
:32;
1142 uint64_t que_siz
:32;
1143 uint64_t reserved_32_63
:32;
1146 struct cvmx_fpa_quex_available_cn30xx
{
1147 #ifdef __BIG_ENDIAN_BITFIELD
1148 uint64_t reserved_29_63
:35;
1149 uint64_t que_siz
:29;
1151 uint64_t que_siz
:29;
1152 uint64_t reserved_29_63
:35;
1157 union cvmx_fpa_quex_page_index
{
1159 struct cvmx_fpa_quex_page_index_s
{
1160 #ifdef __BIG_ENDIAN_BITFIELD
1161 uint64_t reserved_25_63
:39;
1165 uint64_t reserved_25_63
:39;
1170 union cvmx_fpa_que8_page_index
{
1172 struct cvmx_fpa_que8_page_index_s
{
1173 #ifdef __BIG_ENDIAN_BITFIELD
1174 uint64_t reserved_25_63
:39;
1178 uint64_t reserved_25_63
:39;
1183 union cvmx_fpa_que_act
{
1185 struct cvmx_fpa_que_act_s
{
1186 #ifdef __BIG_ENDIAN_BITFIELD
1187 uint64_t reserved_29_63
:35;
1189 uint64_t act_indx
:26;
1191 uint64_t act_indx
:26;
1193 uint64_t reserved_29_63
:35;
1198 union cvmx_fpa_que_exp
{
1200 struct cvmx_fpa_que_exp_s
{
1201 #ifdef __BIG_ENDIAN_BITFIELD
1202 uint64_t reserved_29_63
:35;
1204 uint64_t exp_indx
:26;
1206 uint64_t exp_indx
:26;
1208 uint64_t reserved_29_63
:35;
1213 union cvmx_fpa_wart_ctl
{
1215 struct cvmx_fpa_wart_ctl_s
{
1216 #ifdef __BIG_ENDIAN_BITFIELD
1217 uint64_t reserved_16_63
:48;
1221 uint64_t reserved_16_63
:48;
1226 union cvmx_fpa_wart_status
{
1228 struct cvmx_fpa_wart_status_s
{
1229 #ifdef __BIG_ENDIAN_BITFIELD
1230 uint64_t reserved_32_63
:32;
1234 uint64_t reserved_32_63
:32;
1239 union cvmx_fpa_wqe_threshold
{
1241 struct cvmx_fpa_wqe_threshold_s
{
1242 #ifdef __BIG_ENDIAN_BITFIELD
1243 uint64_t reserved_32_63
:32;
1247 uint64_t reserved_32_63
:32;