162306a36Sopenharmony_ci/***********************license start***************
262306a36Sopenharmony_ci * Author: Cavium Networks
362306a36Sopenharmony_ci *
462306a36Sopenharmony_ci * Contact: support@caviumnetworks.com
562306a36Sopenharmony_ci * This file is part of the OCTEON SDK
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci * Copyright (c) 2003-2012 Cavium Networks
862306a36Sopenharmony_ci *
962306a36Sopenharmony_ci * This file is free software; you can redistribute it and/or modify
1062306a36Sopenharmony_ci * it under the terms of the GNU General Public License, Version 2, as
1162306a36Sopenharmony_ci * published by the Free Software Foundation.
1262306a36Sopenharmony_ci *
1362306a36Sopenharmony_ci * This file is distributed in the hope that it will be useful, but
1462306a36Sopenharmony_ci * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
1562306a36Sopenharmony_ci * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
1662306a36Sopenharmony_ci * NONINFRINGEMENT.  See the GNU General Public License for more
1762306a36Sopenharmony_ci * details.
1862306a36Sopenharmony_ci *
1962306a36Sopenharmony_ci * You should have received a copy of the GNU General Public License
2062306a36Sopenharmony_ci * along with this file; if not, write to the Free Software
2162306a36Sopenharmony_ci * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2262306a36Sopenharmony_ci * or visit http://www.gnu.org/licenses/.
2362306a36Sopenharmony_ci *
2462306a36Sopenharmony_ci * This file may also be available under a different license from Cavium.
2562306a36Sopenharmony_ci * Contact Cavium Networks for more information
2662306a36Sopenharmony_ci ***********************license end**************************************/
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci#ifndef __CVMX_SRXX_DEFS_H__
2962306a36Sopenharmony_ci#define __CVMX_SRXX_DEFS_H__
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci#define CVMX_SRXX_COM_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000200ull) + ((block_id) & 1) * 0x8000000ull)
3262306a36Sopenharmony_ci#define CVMX_SRXX_IGN_RX_FULL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000218ull) + ((block_id) & 1) * 0x8000000ull)
3362306a36Sopenharmony_ci#define CVMX_SRXX_SPI4_CALX(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180090000000ull) + (((offset) & 31) + ((block_id) & 1) * 0x1000000ull) * 8)
3462306a36Sopenharmony_ci#define CVMX_SRXX_SPI4_STAT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000208ull) + ((block_id) & 1) * 0x8000000ull)
3562306a36Sopenharmony_ci#define CVMX_SRXX_SW_TICK_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000220ull) + ((block_id) & 1) * 0x8000000ull)
3662306a36Sopenharmony_ci#define CVMX_SRXX_SW_TICK_DAT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000228ull) + ((block_id) & 1) * 0x8000000ull)
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ciunion cvmx_srxx_com_ctl {
3962306a36Sopenharmony_ci	uint64_t u64;
4062306a36Sopenharmony_ci	struct cvmx_srxx_com_ctl_s {
4162306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
4262306a36Sopenharmony_ci		uint64_t reserved_8_63:56;
4362306a36Sopenharmony_ci		uint64_t prts:4;
4462306a36Sopenharmony_ci		uint64_t st_en:1;
4562306a36Sopenharmony_ci		uint64_t reserved_1_2:2;
4662306a36Sopenharmony_ci		uint64_t inf_en:1;
4762306a36Sopenharmony_ci#else
4862306a36Sopenharmony_ci		uint64_t inf_en:1;
4962306a36Sopenharmony_ci		uint64_t reserved_1_2:2;
5062306a36Sopenharmony_ci		uint64_t st_en:1;
5162306a36Sopenharmony_ci		uint64_t prts:4;
5262306a36Sopenharmony_ci		uint64_t reserved_8_63:56;
5362306a36Sopenharmony_ci#endif
5462306a36Sopenharmony_ci	} s;
5562306a36Sopenharmony_ci};
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ciunion cvmx_srxx_ign_rx_full {
5862306a36Sopenharmony_ci	uint64_t u64;
5962306a36Sopenharmony_ci	struct cvmx_srxx_ign_rx_full_s {
6062306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
6162306a36Sopenharmony_ci		uint64_t reserved_16_63:48;
6262306a36Sopenharmony_ci		uint64_t ignore:16;
6362306a36Sopenharmony_ci#else
6462306a36Sopenharmony_ci		uint64_t ignore:16;
6562306a36Sopenharmony_ci		uint64_t reserved_16_63:48;
6662306a36Sopenharmony_ci#endif
6762306a36Sopenharmony_ci	} s;
6862306a36Sopenharmony_ci};
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ciunion cvmx_srxx_spi4_calx {
7162306a36Sopenharmony_ci	uint64_t u64;
7262306a36Sopenharmony_ci	struct cvmx_srxx_spi4_calx_s {
7362306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
7462306a36Sopenharmony_ci		uint64_t reserved_17_63:47;
7562306a36Sopenharmony_ci		uint64_t oddpar:1;
7662306a36Sopenharmony_ci		uint64_t prt3:4;
7762306a36Sopenharmony_ci		uint64_t prt2:4;
7862306a36Sopenharmony_ci		uint64_t prt1:4;
7962306a36Sopenharmony_ci		uint64_t prt0:4;
8062306a36Sopenharmony_ci#else
8162306a36Sopenharmony_ci		uint64_t prt0:4;
8262306a36Sopenharmony_ci		uint64_t prt1:4;
8362306a36Sopenharmony_ci		uint64_t prt2:4;
8462306a36Sopenharmony_ci		uint64_t prt3:4;
8562306a36Sopenharmony_ci		uint64_t oddpar:1;
8662306a36Sopenharmony_ci		uint64_t reserved_17_63:47;
8762306a36Sopenharmony_ci#endif
8862306a36Sopenharmony_ci	} s;
8962306a36Sopenharmony_ci};
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ciunion cvmx_srxx_spi4_stat {
9262306a36Sopenharmony_ci	uint64_t u64;
9362306a36Sopenharmony_ci	struct cvmx_srxx_spi4_stat_s {
9462306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
9562306a36Sopenharmony_ci		uint64_t reserved_16_63:48;
9662306a36Sopenharmony_ci		uint64_t m:8;
9762306a36Sopenharmony_ci		uint64_t reserved_7_7:1;
9862306a36Sopenharmony_ci		uint64_t len:7;
9962306a36Sopenharmony_ci#else
10062306a36Sopenharmony_ci		uint64_t len:7;
10162306a36Sopenharmony_ci		uint64_t reserved_7_7:1;
10262306a36Sopenharmony_ci		uint64_t m:8;
10362306a36Sopenharmony_ci		uint64_t reserved_16_63:48;
10462306a36Sopenharmony_ci#endif
10562306a36Sopenharmony_ci	} s;
10662306a36Sopenharmony_ci};
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ciunion cvmx_srxx_sw_tick_ctl {
10962306a36Sopenharmony_ci	uint64_t u64;
11062306a36Sopenharmony_ci	struct cvmx_srxx_sw_tick_ctl_s {
11162306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
11262306a36Sopenharmony_ci		uint64_t reserved_14_63:50;
11362306a36Sopenharmony_ci		uint64_t eop:1;
11462306a36Sopenharmony_ci		uint64_t sop:1;
11562306a36Sopenharmony_ci		uint64_t mod:4;
11662306a36Sopenharmony_ci		uint64_t opc:4;
11762306a36Sopenharmony_ci		uint64_t adr:4;
11862306a36Sopenharmony_ci#else
11962306a36Sopenharmony_ci		uint64_t adr:4;
12062306a36Sopenharmony_ci		uint64_t opc:4;
12162306a36Sopenharmony_ci		uint64_t mod:4;
12262306a36Sopenharmony_ci		uint64_t sop:1;
12362306a36Sopenharmony_ci		uint64_t eop:1;
12462306a36Sopenharmony_ci		uint64_t reserved_14_63:50;
12562306a36Sopenharmony_ci#endif
12662306a36Sopenharmony_ci	} s;
12762306a36Sopenharmony_ci};
12862306a36Sopenharmony_ci
12962306a36Sopenharmony_ciunion cvmx_srxx_sw_tick_dat {
13062306a36Sopenharmony_ci	uint64_t u64;
13162306a36Sopenharmony_ci	struct cvmx_srxx_sw_tick_dat_s {
13262306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
13362306a36Sopenharmony_ci		uint64_t dat:64;
13462306a36Sopenharmony_ci#else
13562306a36Sopenharmony_ci		uint64_t dat:64;
13662306a36Sopenharmony_ci#endif
13762306a36Sopenharmony_ci	} s;
13862306a36Sopenharmony_ci};
13962306a36Sopenharmony_ci
14062306a36Sopenharmony_ci#endif
141