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-2018 Cavium, Inc.
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_ASXX_DEFS_H__
29 #define __CVMX_ASXX_DEFS_H__
31 #define CVMX_ASXX_GMII_RX_CLK_SET(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000180ull))
32 #define CVMX_ASXX_GMII_RX_DAT_SET(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000188ull))
33 #define CVMX_ASXX_INT_EN(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000018ull) + ((block_id) & 1) * 0x8000000ull)
34 #define CVMX_ASXX_INT_REG(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000010ull) + ((block_id) & 1) * 0x8000000ull)
35 #define CVMX_ASXX_MII_RX_DAT_SET(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000190ull))
36 #define CVMX_ASXX_PRT_LOOP(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000040ull) + ((block_id) & 1) * 0x8000000ull)
37 #define CVMX_ASXX_RLD_BYPASS(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000248ull) + ((block_id) & 1) * 0x8000000ull)
38 #define CVMX_ASXX_RLD_BYPASS_SETTING(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000250ull) + ((block_id) & 1) * 0x8000000ull)
39 #define CVMX_ASXX_RLD_COMP(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000220ull) + ((block_id) & 1) * 0x8000000ull)
40 #define CVMX_ASXX_RLD_DATA_DRV(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000218ull) + ((block_id) & 1) * 0x8000000ull)
41 #define CVMX_ASXX_RLD_FCRAM_MODE(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000210ull) + ((block_id) & 1) * 0x8000000ull)
42 #define CVMX_ASXX_RLD_NCTL_STRONG(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000230ull) + ((block_id) & 1) * 0x8000000ull)
43 #define CVMX_ASXX_RLD_NCTL_WEAK(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000240ull) + ((block_id) & 1) * 0x8000000ull)
44 #define CVMX_ASXX_RLD_PCTL_STRONG(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000228ull) + ((block_id) & 1) * 0x8000000ull)
45 #define CVMX_ASXX_RLD_PCTL_WEAK(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000238ull) + ((block_id) & 1) * 0x8000000ull)
46 #define CVMX_ASXX_RLD_SETTING(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000258ull) + ((block_id) & 1) * 0x8000000ull)
47 #define CVMX_ASXX_RX_CLK_SETX(offset, block_id) (CVMX_ADD_IO_SEG(0x00011800B0000020ull) + (((offset) & 3) + ((block_id) & 1) * 0x1000000ull) * 8)
48 #define CVMX_ASXX_RX_PRT_EN(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000000ull) + ((block_id) & 1) * 0x8000000ull)
49 #define CVMX_ASXX_RX_WOL(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000100ull) + ((block_id) & 1) * 0x8000000ull)
50 #define CVMX_ASXX_RX_WOL_MSK(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000108ull) + ((block_id) & 1) * 0x8000000ull)
51 #define CVMX_ASXX_RX_WOL_POWOK(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000118ull) + ((block_id) & 1) * 0x8000000ull)
52 #define CVMX_ASXX_RX_WOL_SIG(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000110ull) + ((block_id) & 1) * 0x8000000ull)
53 #define CVMX_ASXX_TX_CLK_SETX(offset, block_id) (CVMX_ADD_IO_SEG(0x00011800B0000048ull) + (((offset) & 3) + ((block_id) & 1) * 0x1000000ull) * 8)
54 #define CVMX_ASXX_TX_COMP_BYP(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000068ull) + ((block_id) & 1) * 0x8000000ull)
55 #define CVMX_ASXX_TX_HI_WATERX(offset, block_id) (CVMX_ADD_IO_SEG(0x00011800B0000080ull) + (((offset) & 3) + ((block_id) & 1) * 0x1000000ull) * 8)
56 #define CVMX_ASXX_TX_PRT_EN(block_id) (CVMX_ADD_IO_SEG(0x00011800B0000008ull) + ((block_id) & 1) * 0x8000000ull)
58 void __cvmx_interrupt_asxx_enable(int block
);
60 union cvmx_asxx_gmii_rx_clk_set
{
62 struct cvmx_asxx_gmii_rx_clk_set_s
{
63 #ifdef __BIG_ENDIAN_BITFIELD
64 uint64_t reserved_5_63
:59;
68 uint64_t reserved_5_63
:59;
73 union cvmx_asxx_gmii_rx_dat_set
{
75 struct cvmx_asxx_gmii_rx_dat_set_s
{
76 #ifdef __BIG_ENDIAN_BITFIELD
77 uint64_t reserved_5_63
:59;
81 uint64_t reserved_5_63
:59;
86 union cvmx_asxx_int_en
{
88 struct cvmx_asxx_int_en_s
{
89 #ifdef __BIG_ENDIAN_BITFIELD
90 uint64_t reserved_12_63
:52;
98 uint64_t reserved_12_63
:52;
101 struct cvmx_asxx_int_en_cn30xx
{
102 #ifdef __BIG_ENDIAN_BITFIELD
103 uint64_t reserved_11_63
:53;
105 uint64_t reserved_7_7
:1;
107 uint64_t reserved_3_3
:1;
111 uint64_t reserved_3_3
:1;
113 uint64_t reserved_7_7
:1;
115 uint64_t reserved_11_63
:53;
120 union cvmx_asxx_int_reg
{
122 struct cvmx_asxx_int_reg_s
{
123 #ifdef __BIG_ENDIAN_BITFIELD
124 uint64_t reserved_12_63
:52;
132 uint64_t reserved_12_63
:52;
135 struct cvmx_asxx_int_reg_cn30xx
{
136 #ifdef __BIG_ENDIAN_BITFIELD
137 uint64_t reserved_11_63
:53;
139 uint64_t reserved_7_7
:1;
141 uint64_t reserved_3_3
:1;
145 uint64_t reserved_3_3
:1;
147 uint64_t reserved_7_7
:1;
149 uint64_t reserved_11_63
:53;
154 union cvmx_asxx_mii_rx_dat_set
{
156 struct cvmx_asxx_mii_rx_dat_set_s
{
157 #ifdef __BIG_ENDIAN_BITFIELD
158 uint64_t reserved_5_63
:59;
162 uint64_t reserved_5_63
:59;
167 union cvmx_asxx_prt_loop
{
169 struct cvmx_asxx_prt_loop_s
{
170 #ifdef __BIG_ENDIAN_BITFIELD
171 uint64_t reserved_8_63
:56;
177 uint64_t reserved_8_63
:56;
180 struct cvmx_asxx_prt_loop_cn30xx
{
181 #ifdef __BIG_ENDIAN_BITFIELD
182 uint64_t reserved_7_63
:57;
184 uint64_t reserved_3_3
:1;
188 uint64_t reserved_3_3
:1;
190 uint64_t reserved_7_63
:57;
195 union cvmx_asxx_rld_bypass
{
197 struct cvmx_asxx_rld_bypass_s
{
198 #ifdef __BIG_ENDIAN_BITFIELD
199 uint64_t reserved_1_63
:63;
203 uint64_t reserved_1_63
:63;
208 union cvmx_asxx_rld_bypass_setting
{
210 struct cvmx_asxx_rld_bypass_setting_s
{
211 #ifdef __BIG_ENDIAN_BITFIELD
212 uint64_t reserved_5_63
:59;
216 uint64_t reserved_5_63
:59;
221 union cvmx_asxx_rld_comp
{
223 struct cvmx_asxx_rld_comp_s
{
224 #ifdef __BIG_ENDIAN_BITFIELD
225 uint64_t reserved_9_63
:55;
231 uint64_t reserved_9_63
:55;
234 struct cvmx_asxx_rld_comp_cn38xx
{
235 #ifdef __BIG_ENDIAN_BITFIELD
236 uint64_t reserved_8_63
:56;
242 uint64_t reserved_8_63
:56;
247 union cvmx_asxx_rld_data_drv
{
249 struct cvmx_asxx_rld_data_drv_s
{
250 #ifdef __BIG_ENDIAN_BITFIELD
251 uint64_t reserved_8_63
:56;
257 uint64_t reserved_8_63
:56;
262 union cvmx_asxx_rld_fcram_mode
{
264 struct cvmx_asxx_rld_fcram_mode_s
{
265 #ifdef __BIG_ENDIAN_BITFIELD
266 uint64_t reserved_1_63
:63;
270 uint64_t reserved_1_63
:63;
275 union cvmx_asxx_rld_nctl_strong
{
277 struct cvmx_asxx_rld_nctl_strong_s
{
278 #ifdef __BIG_ENDIAN_BITFIELD
279 uint64_t reserved_5_63
:59;
283 uint64_t reserved_5_63
:59;
288 union cvmx_asxx_rld_nctl_weak
{
290 struct cvmx_asxx_rld_nctl_weak_s
{
291 #ifdef __BIG_ENDIAN_BITFIELD
292 uint64_t reserved_5_63
:59;
296 uint64_t reserved_5_63
:59;
301 union cvmx_asxx_rld_pctl_strong
{
303 struct cvmx_asxx_rld_pctl_strong_s
{
304 #ifdef __BIG_ENDIAN_BITFIELD
305 uint64_t reserved_5_63
:59;
309 uint64_t reserved_5_63
:59;
314 union cvmx_asxx_rld_pctl_weak
{
316 struct cvmx_asxx_rld_pctl_weak_s
{
317 #ifdef __BIG_ENDIAN_BITFIELD
318 uint64_t reserved_5_63
:59;
322 uint64_t reserved_5_63
:59;
327 union cvmx_asxx_rld_setting
{
329 struct cvmx_asxx_rld_setting_s
{
330 #ifdef __BIG_ENDIAN_BITFIELD
331 uint64_t reserved_13_63
:51;
343 uint64_t reserved_13_63
:51;
346 struct cvmx_asxx_rld_setting_cn38xx
{
347 #ifdef __BIG_ENDIAN_BITFIELD
348 uint64_t reserved_5_63
:59;
352 uint64_t reserved_5_63
:59;
357 union cvmx_asxx_rx_clk_setx
{
359 struct cvmx_asxx_rx_clk_setx_s
{
360 #ifdef __BIG_ENDIAN_BITFIELD
361 uint64_t reserved_5_63
:59;
365 uint64_t reserved_5_63
:59;
370 union cvmx_asxx_rx_prt_en
{
372 struct cvmx_asxx_rx_prt_en_s
{
373 #ifdef __BIG_ENDIAN_BITFIELD
374 uint64_t reserved_4_63
:60;
378 uint64_t reserved_4_63
:60;
381 struct cvmx_asxx_rx_prt_en_cn30xx
{
382 #ifdef __BIG_ENDIAN_BITFIELD
383 uint64_t reserved_3_63
:61;
387 uint64_t reserved_3_63
:61;
392 union cvmx_asxx_rx_wol
{
394 struct cvmx_asxx_rx_wol_s
{
395 #ifdef __BIG_ENDIAN_BITFIELD
396 uint64_t reserved_2_63
:62;
402 uint64_t reserved_2_63
:62;
407 union cvmx_asxx_rx_wol_msk
{
409 struct cvmx_asxx_rx_wol_msk_s
{
410 #ifdef __BIG_ENDIAN_BITFIELD
418 union cvmx_asxx_rx_wol_powok
{
420 struct cvmx_asxx_rx_wol_powok_s
{
421 #ifdef __BIG_ENDIAN_BITFIELD
422 uint64_t reserved_1_63
:63;
426 uint64_t reserved_1_63
:63;
431 union cvmx_asxx_rx_wol_sig
{
433 struct cvmx_asxx_rx_wol_sig_s
{
434 #ifdef __BIG_ENDIAN_BITFIELD
435 uint64_t reserved_32_63
:32;
439 uint64_t reserved_32_63
:32;
444 union cvmx_asxx_tx_clk_setx
{
446 struct cvmx_asxx_tx_clk_setx_s
{
447 #ifdef __BIG_ENDIAN_BITFIELD
448 uint64_t reserved_5_63
:59;
452 uint64_t reserved_5_63
:59;
457 union cvmx_asxx_tx_comp_byp
{
459 struct cvmx_asxx_tx_comp_byp_s
{
460 #ifdef __BIG_ENDIAN_BITFIELD
461 uint64_t reserved_0_63
:64;
463 uint64_t reserved_0_63
:64;
466 struct cvmx_asxx_tx_comp_byp_cn30xx
{
467 #ifdef __BIG_ENDIAN_BITFIELD
468 uint64_t reserved_9_63
:55;
476 uint64_t reserved_9_63
:55;
479 struct cvmx_asxx_tx_comp_byp_cn38xx
{
480 #ifdef __BIG_ENDIAN_BITFIELD
481 uint64_t reserved_8_63
:56;
487 uint64_t reserved_8_63
:56;
490 struct cvmx_asxx_tx_comp_byp_cn50xx
{
491 #ifdef __BIG_ENDIAN_BITFIELD
492 uint64_t reserved_17_63
:47;
494 uint64_t reserved_13_15
:3;
496 uint64_t reserved_5_7
:3;
500 uint64_t reserved_5_7
:3;
502 uint64_t reserved_13_15
:3;
504 uint64_t reserved_17_63
:47;
507 struct cvmx_asxx_tx_comp_byp_cn58xx
{
508 #ifdef __BIG_ENDIAN_BITFIELD
509 uint64_t reserved_13_63
:51;
511 uint64_t reserved_5_7
:3;
515 uint64_t reserved_5_7
:3;
517 uint64_t reserved_13_63
:51;
522 union cvmx_asxx_tx_hi_waterx
{
524 struct cvmx_asxx_tx_hi_waterx_s
{
525 #ifdef __BIG_ENDIAN_BITFIELD
526 uint64_t reserved_4_63
:60;
530 uint64_t reserved_4_63
:60;
533 struct cvmx_asxx_tx_hi_waterx_cn30xx
{
534 #ifdef __BIG_ENDIAN_BITFIELD
535 uint64_t reserved_3_63
:61;
539 uint64_t reserved_3_63
:61;
544 union cvmx_asxx_tx_prt_en
{
546 struct cvmx_asxx_tx_prt_en_s
{
547 #ifdef __BIG_ENDIAN_BITFIELD
548 uint64_t reserved_4_63
:60;
552 uint64_t reserved_4_63
:60;
555 struct cvmx_asxx_tx_prt_en_cn30xx
{
556 #ifdef __BIG_ENDIAN_BITFIELD
557 uint64_t reserved_3_63
:61;
561 uint64_t reserved_3_63
:61;