18c2ecf20Sopenharmony_ci/***********************license start***************
28c2ecf20Sopenharmony_ci * Author: Cavium Networks
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Contact: support@caviumnetworks.com
58c2ecf20Sopenharmony_ci * This file is part of the OCTEON SDK
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * Copyright (c) 2003-2012 Cavium Networks
88c2ecf20Sopenharmony_ci *
98c2ecf20Sopenharmony_ci * This file is free software; you can redistribute it and/or modify
108c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License, Version 2, as
118c2ecf20Sopenharmony_ci * published by the Free Software Foundation.
128c2ecf20Sopenharmony_ci *
138c2ecf20Sopenharmony_ci * This file is distributed in the hope that it will be useful, but
148c2ecf20Sopenharmony_ci * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
158c2ecf20Sopenharmony_ci * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
168c2ecf20Sopenharmony_ci * NONINFRINGEMENT.  See the GNU General Public License for more
178c2ecf20Sopenharmony_ci * details.
188c2ecf20Sopenharmony_ci *
198c2ecf20Sopenharmony_ci * You should have received a copy of the GNU General Public License
208c2ecf20Sopenharmony_ci * along with this file; if not, write to the Free Software
218c2ecf20Sopenharmony_ci * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
228c2ecf20Sopenharmony_ci * or visit http://www.gnu.org/licenses/.
238c2ecf20Sopenharmony_ci *
248c2ecf20Sopenharmony_ci * This file may also be available under a different license from Cavium.
258c2ecf20Sopenharmony_ci * Contact Cavium Networks for more information
268c2ecf20Sopenharmony_ci ***********************license end**************************************/
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci#ifndef __CVMX_SRXX_DEFS_H__
298c2ecf20Sopenharmony_ci#define __CVMX_SRXX_DEFS_H__
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci#define CVMX_SRXX_COM_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000200ull) + ((block_id) & 1) * 0x8000000ull)
328c2ecf20Sopenharmony_ci#define CVMX_SRXX_IGN_RX_FULL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000218ull) + ((block_id) & 1) * 0x8000000ull)
338c2ecf20Sopenharmony_ci#define CVMX_SRXX_SPI4_CALX(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180090000000ull) + (((offset) & 31) + ((block_id) & 1) * 0x1000000ull) * 8)
348c2ecf20Sopenharmony_ci#define CVMX_SRXX_SPI4_STAT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000208ull) + ((block_id) & 1) * 0x8000000ull)
358c2ecf20Sopenharmony_ci#define CVMX_SRXX_SW_TICK_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000220ull) + ((block_id) & 1) * 0x8000000ull)
368c2ecf20Sopenharmony_ci#define CVMX_SRXX_SW_TICK_DAT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000228ull) + ((block_id) & 1) * 0x8000000ull)
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ciunion cvmx_srxx_com_ctl {
398c2ecf20Sopenharmony_ci	uint64_t u64;
408c2ecf20Sopenharmony_ci	struct cvmx_srxx_com_ctl_s {
418c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
428c2ecf20Sopenharmony_ci		uint64_t reserved_8_63:56;
438c2ecf20Sopenharmony_ci		uint64_t prts:4;
448c2ecf20Sopenharmony_ci		uint64_t st_en:1;
458c2ecf20Sopenharmony_ci		uint64_t reserved_1_2:2;
468c2ecf20Sopenharmony_ci		uint64_t inf_en:1;
478c2ecf20Sopenharmony_ci#else
488c2ecf20Sopenharmony_ci		uint64_t inf_en:1;
498c2ecf20Sopenharmony_ci		uint64_t reserved_1_2:2;
508c2ecf20Sopenharmony_ci		uint64_t st_en:1;
518c2ecf20Sopenharmony_ci		uint64_t prts:4;
528c2ecf20Sopenharmony_ci		uint64_t reserved_8_63:56;
538c2ecf20Sopenharmony_ci#endif
548c2ecf20Sopenharmony_ci	} s;
558c2ecf20Sopenharmony_ci};
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ciunion cvmx_srxx_ign_rx_full {
588c2ecf20Sopenharmony_ci	uint64_t u64;
598c2ecf20Sopenharmony_ci	struct cvmx_srxx_ign_rx_full_s {
608c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
618c2ecf20Sopenharmony_ci		uint64_t reserved_16_63:48;
628c2ecf20Sopenharmony_ci		uint64_t ignore:16;
638c2ecf20Sopenharmony_ci#else
648c2ecf20Sopenharmony_ci		uint64_t ignore:16;
658c2ecf20Sopenharmony_ci		uint64_t reserved_16_63:48;
668c2ecf20Sopenharmony_ci#endif
678c2ecf20Sopenharmony_ci	} s;
688c2ecf20Sopenharmony_ci};
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ciunion cvmx_srxx_spi4_calx {
718c2ecf20Sopenharmony_ci	uint64_t u64;
728c2ecf20Sopenharmony_ci	struct cvmx_srxx_spi4_calx_s {
738c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
748c2ecf20Sopenharmony_ci		uint64_t reserved_17_63:47;
758c2ecf20Sopenharmony_ci		uint64_t oddpar:1;
768c2ecf20Sopenharmony_ci		uint64_t prt3:4;
778c2ecf20Sopenharmony_ci		uint64_t prt2:4;
788c2ecf20Sopenharmony_ci		uint64_t prt1:4;
798c2ecf20Sopenharmony_ci		uint64_t prt0:4;
808c2ecf20Sopenharmony_ci#else
818c2ecf20Sopenharmony_ci		uint64_t prt0:4;
828c2ecf20Sopenharmony_ci		uint64_t prt1:4;
838c2ecf20Sopenharmony_ci		uint64_t prt2:4;
848c2ecf20Sopenharmony_ci		uint64_t prt3:4;
858c2ecf20Sopenharmony_ci		uint64_t oddpar:1;
868c2ecf20Sopenharmony_ci		uint64_t reserved_17_63:47;
878c2ecf20Sopenharmony_ci#endif
888c2ecf20Sopenharmony_ci	} s;
898c2ecf20Sopenharmony_ci};
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ciunion cvmx_srxx_spi4_stat {
928c2ecf20Sopenharmony_ci	uint64_t u64;
938c2ecf20Sopenharmony_ci	struct cvmx_srxx_spi4_stat_s {
948c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
958c2ecf20Sopenharmony_ci		uint64_t reserved_16_63:48;
968c2ecf20Sopenharmony_ci		uint64_t m:8;
978c2ecf20Sopenharmony_ci		uint64_t reserved_7_7:1;
988c2ecf20Sopenharmony_ci		uint64_t len:7;
998c2ecf20Sopenharmony_ci#else
1008c2ecf20Sopenharmony_ci		uint64_t len:7;
1018c2ecf20Sopenharmony_ci		uint64_t reserved_7_7:1;
1028c2ecf20Sopenharmony_ci		uint64_t m:8;
1038c2ecf20Sopenharmony_ci		uint64_t reserved_16_63:48;
1048c2ecf20Sopenharmony_ci#endif
1058c2ecf20Sopenharmony_ci	} s;
1068c2ecf20Sopenharmony_ci};
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ciunion cvmx_srxx_sw_tick_ctl {
1098c2ecf20Sopenharmony_ci	uint64_t u64;
1108c2ecf20Sopenharmony_ci	struct cvmx_srxx_sw_tick_ctl_s {
1118c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
1128c2ecf20Sopenharmony_ci		uint64_t reserved_14_63:50;
1138c2ecf20Sopenharmony_ci		uint64_t eop:1;
1148c2ecf20Sopenharmony_ci		uint64_t sop:1;
1158c2ecf20Sopenharmony_ci		uint64_t mod:4;
1168c2ecf20Sopenharmony_ci		uint64_t opc:4;
1178c2ecf20Sopenharmony_ci		uint64_t adr:4;
1188c2ecf20Sopenharmony_ci#else
1198c2ecf20Sopenharmony_ci		uint64_t adr:4;
1208c2ecf20Sopenharmony_ci		uint64_t opc:4;
1218c2ecf20Sopenharmony_ci		uint64_t mod:4;
1228c2ecf20Sopenharmony_ci		uint64_t sop:1;
1238c2ecf20Sopenharmony_ci		uint64_t eop:1;
1248c2ecf20Sopenharmony_ci		uint64_t reserved_14_63:50;
1258c2ecf20Sopenharmony_ci#endif
1268c2ecf20Sopenharmony_ci	} s;
1278c2ecf20Sopenharmony_ci};
1288c2ecf20Sopenharmony_ci
1298c2ecf20Sopenharmony_ciunion cvmx_srxx_sw_tick_dat {
1308c2ecf20Sopenharmony_ci	uint64_t u64;
1318c2ecf20Sopenharmony_ci	struct cvmx_srxx_sw_tick_dat_s {
1328c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
1338c2ecf20Sopenharmony_ci		uint64_t dat:64;
1348c2ecf20Sopenharmony_ci#else
1358c2ecf20Sopenharmony_ci		uint64_t dat:64;
1368c2ecf20Sopenharmony_ci#endif
1378c2ecf20Sopenharmony_ci	} s;
1388c2ecf20Sopenharmony_ci};
1398c2ecf20Sopenharmony_ci
1408c2ecf20Sopenharmony_ci#endif
141