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-2018 Cavium, Inc. 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_PCSX_DEFS_H__ 2962306a36Sopenharmony_ci#define __CVMX_PCSX_DEFS_H__ 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSX_ANX_ADV_REG(unsigned long offset, unsigned long block_id) 3262306a36Sopenharmony_ci{ 3362306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 3462306a36Sopenharmony_ci case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: 3562306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001010ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 3662306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 3762306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 3862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001010ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 3962306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 4062306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 4162306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 4262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001010ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 4362306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 4462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001010ull) + ((offset) + (block_id) * 0x4000ull) * 1024; 4562306a36Sopenharmony_ci } 4662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001010ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 4762306a36Sopenharmony_ci} 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSX_ANX_EXT_ST_REG(unsigned long offset, unsigned long block_id) 5062306a36Sopenharmony_ci{ 5162306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 5262306a36Sopenharmony_ci case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: 5362306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001028ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 5462306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 5562306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 5662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001028ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 5762306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 5862306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 5962306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 6062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001028ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 6162306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 6262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001028ull) + ((offset) + (block_id) * 0x4000ull) * 1024; 6362306a36Sopenharmony_ci } 6462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001028ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 6562306a36Sopenharmony_ci} 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSX_ANX_LP_ABIL_REG(unsigned long offset, unsigned long block_id) 6862306a36Sopenharmony_ci{ 6962306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 7062306a36Sopenharmony_ci case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: 7162306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001018ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 7262306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 7362306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 7462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001018ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 7562306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 7662306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 7762306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 7862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001018ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 7962306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 8062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001018ull) + ((offset) + (block_id) * 0x4000ull) * 1024; 8162306a36Sopenharmony_ci } 8262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001018ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 8362306a36Sopenharmony_ci} 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSX_ANX_RESULTS_REG(unsigned long offset, unsigned long block_id) 8662306a36Sopenharmony_ci{ 8762306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 8862306a36Sopenharmony_ci case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: 8962306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001020ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 9062306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 9162306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 9262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001020ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 9362306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 9462306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 9562306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 9662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001020ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 9762306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 9862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001020ull) + ((offset) + (block_id) * 0x4000ull) * 1024; 9962306a36Sopenharmony_ci } 10062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001020ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 10162306a36Sopenharmony_ci} 10262306a36Sopenharmony_ci 10362306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSX_INTX_EN_REG(unsigned long offset, unsigned long block_id) 10462306a36Sopenharmony_ci{ 10562306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 10662306a36Sopenharmony_ci case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: 10762306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001088ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 10862306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 10962306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 11062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001088ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 11162306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 11262306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 11362306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 11462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001088ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 11562306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 11662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001088ull) + ((offset) + (block_id) * 0x4000ull) * 1024; 11762306a36Sopenharmony_ci } 11862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001088ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 11962306a36Sopenharmony_ci} 12062306a36Sopenharmony_ci 12162306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSX_INTX_REG(unsigned long offset, unsigned long block_id) 12262306a36Sopenharmony_ci{ 12362306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 12462306a36Sopenharmony_ci case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: 12562306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001080ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 12662306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 12762306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 12862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001080ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 12962306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 13062306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 13162306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 13262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001080ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 13362306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 13462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001080ull) + ((offset) + (block_id) * 0x4000ull) * 1024; 13562306a36Sopenharmony_ci } 13662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001080ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 13762306a36Sopenharmony_ci} 13862306a36Sopenharmony_ci 13962306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSX_LINKX_TIMER_COUNT_REG(unsigned long offset, unsigned long block_id) 14062306a36Sopenharmony_ci{ 14162306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 14262306a36Sopenharmony_ci case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: 14362306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001040ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 14462306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 14562306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 14662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001040ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 14762306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 14862306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 14962306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 15062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001040ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 15162306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 15262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001040ull) + ((offset) + (block_id) * 0x4000ull) * 1024; 15362306a36Sopenharmony_ci } 15462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001040ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 15562306a36Sopenharmony_ci} 15662306a36Sopenharmony_ci 15762306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSX_LOG_ANLX_REG(unsigned long offset, unsigned long block_id) 15862306a36Sopenharmony_ci{ 15962306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 16062306a36Sopenharmony_ci case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: 16162306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001090ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 16262306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 16362306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 16462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001090ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 16562306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 16662306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 16762306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 16862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001090ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 16962306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 17062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001090ull) + ((offset) + (block_id) * 0x4000ull) * 1024; 17162306a36Sopenharmony_ci } 17262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001090ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 17362306a36Sopenharmony_ci} 17462306a36Sopenharmony_ci 17562306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSX_MISCX_CTL_REG(unsigned long offset, unsigned long block_id) 17662306a36Sopenharmony_ci{ 17762306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 17862306a36Sopenharmony_ci case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: 17962306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001078ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 18062306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 18162306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 18262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001078ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 18362306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 18462306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 18562306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 18662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001078ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 18762306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 18862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001078ull) + ((offset) + (block_id) * 0x4000ull) * 1024; 18962306a36Sopenharmony_ci } 19062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001078ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 19162306a36Sopenharmony_ci} 19262306a36Sopenharmony_ci 19362306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSX_MRX_CONTROL_REG(unsigned long offset, unsigned long block_id) 19462306a36Sopenharmony_ci{ 19562306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 19662306a36Sopenharmony_ci case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: 19762306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001000ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 19862306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 19962306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 20062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001000ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 20162306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 20262306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 20362306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 20462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001000ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 20562306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 20662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001000ull) + ((offset) + (block_id) * 0x4000ull) * 1024; 20762306a36Sopenharmony_ci } 20862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001000ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 20962306a36Sopenharmony_ci} 21062306a36Sopenharmony_ci 21162306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSX_MRX_STATUS_REG(unsigned long offset, unsigned long block_id) 21262306a36Sopenharmony_ci{ 21362306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 21462306a36Sopenharmony_ci case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: 21562306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001008ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 21662306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 21762306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 21862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001008ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 21962306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 22062306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 22162306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 22262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001008ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 22362306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 22462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001008ull) + ((offset) + (block_id) * 0x4000ull) * 1024; 22562306a36Sopenharmony_ci } 22662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001008ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 22762306a36Sopenharmony_ci} 22862306a36Sopenharmony_ci 22962306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSX_RXX_STATES_REG(unsigned long offset, unsigned long block_id) 23062306a36Sopenharmony_ci{ 23162306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 23262306a36Sopenharmony_ci case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: 23362306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001058ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 23462306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 23562306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 23662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001058ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 23762306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 23862306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 23962306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 24062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001058ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 24162306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 24262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001058ull) + ((offset) + (block_id) * 0x4000ull) * 1024; 24362306a36Sopenharmony_ci } 24462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001058ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 24562306a36Sopenharmony_ci} 24662306a36Sopenharmony_ci 24762306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSX_RXX_SYNC_REG(unsigned long offset, unsigned long block_id) 24862306a36Sopenharmony_ci{ 24962306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 25062306a36Sopenharmony_ci case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: 25162306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001050ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 25262306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 25362306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 25462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001050ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 25562306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 25662306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 25762306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 25862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001050ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 25962306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 26062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001050ull) + ((offset) + (block_id) * 0x4000ull) * 1024; 26162306a36Sopenharmony_ci } 26262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001050ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 26362306a36Sopenharmony_ci} 26462306a36Sopenharmony_ci 26562306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSX_SGMX_AN_ADV_REG(unsigned long offset, unsigned long block_id) 26662306a36Sopenharmony_ci{ 26762306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 26862306a36Sopenharmony_ci case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: 26962306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001068ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 27062306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 27162306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 27262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001068ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 27362306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 27462306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 27562306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 27662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001068ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 27762306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 27862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001068ull) + ((offset) + (block_id) * 0x4000ull) * 1024; 27962306a36Sopenharmony_ci } 28062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001068ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 28162306a36Sopenharmony_ci} 28262306a36Sopenharmony_ci 28362306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSX_SGMX_LP_ADV_REG(unsigned long offset, unsigned long block_id) 28462306a36Sopenharmony_ci{ 28562306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 28662306a36Sopenharmony_ci case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: 28762306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001070ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 28862306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 28962306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 29062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001070ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 29162306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 29262306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 29362306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 29462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001070ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 29562306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 29662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001070ull) + ((offset) + (block_id) * 0x4000ull) * 1024; 29762306a36Sopenharmony_ci } 29862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001070ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 29962306a36Sopenharmony_ci} 30062306a36Sopenharmony_ci 30162306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSX_TXX_STATES_REG(unsigned long offset, unsigned long block_id) 30262306a36Sopenharmony_ci{ 30362306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 30462306a36Sopenharmony_ci case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: 30562306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001060ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 30662306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 30762306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 30862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001060ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 30962306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 31062306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 31162306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 31262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001060ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 31362306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 31462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001060ull) + ((offset) + (block_id) * 0x4000ull) * 1024; 31562306a36Sopenharmony_ci } 31662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001060ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 31762306a36Sopenharmony_ci} 31862306a36Sopenharmony_ci 31962306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSX_TX_RXX_POLARITY_REG(unsigned long offset, unsigned long block_id) 32062306a36Sopenharmony_ci{ 32162306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 32262306a36Sopenharmony_ci case OCTEON_CNF71XX & OCTEON_FAMILY_MASK: 32362306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001048ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 32462306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 32562306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 32662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001048ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 32762306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 32862306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 32962306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 33062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001048ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 33162306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 33262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001048ull) + ((offset) + (block_id) * 0x4000ull) * 1024; 33362306a36Sopenharmony_ci } 33462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0001048ull) + ((offset) + (block_id) * 0x20000ull) * 1024; 33562306a36Sopenharmony_ci} 33662306a36Sopenharmony_ci 33762306a36Sopenharmony_civoid __cvmx_interrupt_pcsx_intx_en_reg_enable(int index, int block); 33862306a36Sopenharmony_ci 33962306a36Sopenharmony_ciunion cvmx_pcsx_anx_adv_reg { 34062306a36Sopenharmony_ci uint64_t u64; 34162306a36Sopenharmony_ci struct cvmx_pcsx_anx_adv_reg_s { 34262306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 34362306a36Sopenharmony_ci uint64_t reserved_16_63:48; 34462306a36Sopenharmony_ci uint64_t np:1; 34562306a36Sopenharmony_ci uint64_t reserved_14_14:1; 34662306a36Sopenharmony_ci uint64_t rem_flt:2; 34762306a36Sopenharmony_ci uint64_t reserved_9_11:3; 34862306a36Sopenharmony_ci uint64_t pause:2; 34962306a36Sopenharmony_ci uint64_t hfd:1; 35062306a36Sopenharmony_ci uint64_t fd:1; 35162306a36Sopenharmony_ci uint64_t reserved_0_4:5; 35262306a36Sopenharmony_ci#else 35362306a36Sopenharmony_ci uint64_t reserved_0_4:5; 35462306a36Sopenharmony_ci uint64_t fd:1; 35562306a36Sopenharmony_ci uint64_t hfd:1; 35662306a36Sopenharmony_ci uint64_t pause:2; 35762306a36Sopenharmony_ci uint64_t reserved_9_11:3; 35862306a36Sopenharmony_ci uint64_t rem_flt:2; 35962306a36Sopenharmony_ci uint64_t reserved_14_14:1; 36062306a36Sopenharmony_ci uint64_t np:1; 36162306a36Sopenharmony_ci uint64_t reserved_16_63:48; 36262306a36Sopenharmony_ci#endif 36362306a36Sopenharmony_ci } s; 36462306a36Sopenharmony_ci}; 36562306a36Sopenharmony_ci 36662306a36Sopenharmony_ciunion cvmx_pcsx_anx_ext_st_reg { 36762306a36Sopenharmony_ci uint64_t u64; 36862306a36Sopenharmony_ci struct cvmx_pcsx_anx_ext_st_reg_s { 36962306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 37062306a36Sopenharmony_ci uint64_t reserved_16_63:48; 37162306a36Sopenharmony_ci uint64_t thou_xfd:1; 37262306a36Sopenharmony_ci uint64_t thou_xhd:1; 37362306a36Sopenharmony_ci uint64_t thou_tfd:1; 37462306a36Sopenharmony_ci uint64_t thou_thd:1; 37562306a36Sopenharmony_ci uint64_t reserved_0_11:12; 37662306a36Sopenharmony_ci#else 37762306a36Sopenharmony_ci uint64_t reserved_0_11:12; 37862306a36Sopenharmony_ci uint64_t thou_thd:1; 37962306a36Sopenharmony_ci uint64_t thou_tfd:1; 38062306a36Sopenharmony_ci uint64_t thou_xhd:1; 38162306a36Sopenharmony_ci uint64_t thou_xfd:1; 38262306a36Sopenharmony_ci uint64_t reserved_16_63:48; 38362306a36Sopenharmony_ci#endif 38462306a36Sopenharmony_ci } s; 38562306a36Sopenharmony_ci}; 38662306a36Sopenharmony_ci 38762306a36Sopenharmony_ciunion cvmx_pcsx_anx_lp_abil_reg { 38862306a36Sopenharmony_ci uint64_t u64; 38962306a36Sopenharmony_ci struct cvmx_pcsx_anx_lp_abil_reg_s { 39062306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 39162306a36Sopenharmony_ci uint64_t reserved_16_63:48; 39262306a36Sopenharmony_ci uint64_t np:1; 39362306a36Sopenharmony_ci uint64_t ack:1; 39462306a36Sopenharmony_ci uint64_t rem_flt:2; 39562306a36Sopenharmony_ci uint64_t reserved_9_11:3; 39662306a36Sopenharmony_ci uint64_t pause:2; 39762306a36Sopenharmony_ci uint64_t hfd:1; 39862306a36Sopenharmony_ci uint64_t fd:1; 39962306a36Sopenharmony_ci uint64_t reserved_0_4:5; 40062306a36Sopenharmony_ci#else 40162306a36Sopenharmony_ci uint64_t reserved_0_4:5; 40262306a36Sopenharmony_ci uint64_t fd:1; 40362306a36Sopenharmony_ci uint64_t hfd:1; 40462306a36Sopenharmony_ci uint64_t pause:2; 40562306a36Sopenharmony_ci uint64_t reserved_9_11:3; 40662306a36Sopenharmony_ci uint64_t rem_flt:2; 40762306a36Sopenharmony_ci uint64_t ack:1; 40862306a36Sopenharmony_ci uint64_t np:1; 40962306a36Sopenharmony_ci uint64_t reserved_16_63:48; 41062306a36Sopenharmony_ci#endif 41162306a36Sopenharmony_ci } s; 41262306a36Sopenharmony_ci}; 41362306a36Sopenharmony_ci 41462306a36Sopenharmony_ciunion cvmx_pcsx_anx_results_reg { 41562306a36Sopenharmony_ci uint64_t u64; 41662306a36Sopenharmony_ci struct cvmx_pcsx_anx_results_reg_s { 41762306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 41862306a36Sopenharmony_ci uint64_t reserved_7_63:57; 41962306a36Sopenharmony_ci uint64_t pause:2; 42062306a36Sopenharmony_ci uint64_t spd:2; 42162306a36Sopenharmony_ci uint64_t an_cpt:1; 42262306a36Sopenharmony_ci uint64_t dup:1; 42362306a36Sopenharmony_ci uint64_t link_ok:1; 42462306a36Sopenharmony_ci#else 42562306a36Sopenharmony_ci uint64_t link_ok:1; 42662306a36Sopenharmony_ci uint64_t dup:1; 42762306a36Sopenharmony_ci uint64_t an_cpt:1; 42862306a36Sopenharmony_ci uint64_t spd:2; 42962306a36Sopenharmony_ci uint64_t pause:2; 43062306a36Sopenharmony_ci uint64_t reserved_7_63:57; 43162306a36Sopenharmony_ci#endif 43262306a36Sopenharmony_ci } s; 43362306a36Sopenharmony_ci}; 43462306a36Sopenharmony_ci 43562306a36Sopenharmony_ciunion cvmx_pcsx_intx_en_reg { 43662306a36Sopenharmony_ci uint64_t u64; 43762306a36Sopenharmony_ci struct cvmx_pcsx_intx_en_reg_s { 43862306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 43962306a36Sopenharmony_ci uint64_t reserved_13_63:51; 44062306a36Sopenharmony_ci uint64_t dbg_sync_en:1; 44162306a36Sopenharmony_ci uint64_t dup:1; 44262306a36Sopenharmony_ci uint64_t sync_bad_en:1; 44362306a36Sopenharmony_ci uint64_t an_bad_en:1; 44462306a36Sopenharmony_ci uint64_t rxlock_en:1; 44562306a36Sopenharmony_ci uint64_t rxbad_en:1; 44662306a36Sopenharmony_ci uint64_t rxerr_en:1; 44762306a36Sopenharmony_ci uint64_t txbad_en:1; 44862306a36Sopenharmony_ci uint64_t txfifo_en:1; 44962306a36Sopenharmony_ci uint64_t txfifu_en:1; 45062306a36Sopenharmony_ci uint64_t an_err_en:1; 45162306a36Sopenharmony_ci uint64_t xmit_en:1; 45262306a36Sopenharmony_ci uint64_t lnkspd_en:1; 45362306a36Sopenharmony_ci#else 45462306a36Sopenharmony_ci uint64_t lnkspd_en:1; 45562306a36Sopenharmony_ci uint64_t xmit_en:1; 45662306a36Sopenharmony_ci uint64_t an_err_en:1; 45762306a36Sopenharmony_ci uint64_t txfifu_en:1; 45862306a36Sopenharmony_ci uint64_t txfifo_en:1; 45962306a36Sopenharmony_ci uint64_t txbad_en:1; 46062306a36Sopenharmony_ci uint64_t rxerr_en:1; 46162306a36Sopenharmony_ci uint64_t rxbad_en:1; 46262306a36Sopenharmony_ci uint64_t rxlock_en:1; 46362306a36Sopenharmony_ci uint64_t an_bad_en:1; 46462306a36Sopenharmony_ci uint64_t sync_bad_en:1; 46562306a36Sopenharmony_ci uint64_t dup:1; 46662306a36Sopenharmony_ci uint64_t dbg_sync_en:1; 46762306a36Sopenharmony_ci uint64_t reserved_13_63:51; 46862306a36Sopenharmony_ci#endif 46962306a36Sopenharmony_ci } s; 47062306a36Sopenharmony_ci struct cvmx_pcsx_intx_en_reg_cn52xx { 47162306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 47262306a36Sopenharmony_ci uint64_t reserved_12_63:52; 47362306a36Sopenharmony_ci uint64_t dup:1; 47462306a36Sopenharmony_ci uint64_t sync_bad_en:1; 47562306a36Sopenharmony_ci uint64_t an_bad_en:1; 47662306a36Sopenharmony_ci uint64_t rxlock_en:1; 47762306a36Sopenharmony_ci uint64_t rxbad_en:1; 47862306a36Sopenharmony_ci uint64_t rxerr_en:1; 47962306a36Sopenharmony_ci uint64_t txbad_en:1; 48062306a36Sopenharmony_ci uint64_t txfifo_en:1; 48162306a36Sopenharmony_ci uint64_t txfifu_en:1; 48262306a36Sopenharmony_ci uint64_t an_err_en:1; 48362306a36Sopenharmony_ci uint64_t xmit_en:1; 48462306a36Sopenharmony_ci uint64_t lnkspd_en:1; 48562306a36Sopenharmony_ci#else 48662306a36Sopenharmony_ci uint64_t lnkspd_en:1; 48762306a36Sopenharmony_ci uint64_t xmit_en:1; 48862306a36Sopenharmony_ci uint64_t an_err_en:1; 48962306a36Sopenharmony_ci uint64_t txfifu_en:1; 49062306a36Sopenharmony_ci uint64_t txfifo_en:1; 49162306a36Sopenharmony_ci uint64_t txbad_en:1; 49262306a36Sopenharmony_ci uint64_t rxerr_en:1; 49362306a36Sopenharmony_ci uint64_t rxbad_en:1; 49462306a36Sopenharmony_ci uint64_t rxlock_en:1; 49562306a36Sopenharmony_ci uint64_t an_bad_en:1; 49662306a36Sopenharmony_ci uint64_t sync_bad_en:1; 49762306a36Sopenharmony_ci uint64_t dup:1; 49862306a36Sopenharmony_ci uint64_t reserved_12_63:52; 49962306a36Sopenharmony_ci#endif 50062306a36Sopenharmony_ci } cn52xx; 50162306a36Sopenharmony_ci}; 50262306a36Sopenharmony_ci 50362306a36Sopenharmony_ciunion cvmx_pcsx_intx_reg { 50462306a36Sopenharmony_ci uint64_t u64; 50562306a36Sopenharmony_ci struct cvmx_pcsx_intx_reg_s { 50662306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 50762306a36Sopenharmony_ci uint64_t reserved_13_63:51; 50862306a36Sopenharmony_ci uint64_t dbg_sync:1; 50962306a36Sopenharmony_ci uint64_t dup:1; 51062306a36Sopenharmony_ci uint64_t sync_bad:1; 51162306a36Sopenharmony_ci uint64_t an_bad:1; 51262306a36Sopenharmony_ci uint64_t rxlock:1; 51362306a36Sopenharmony_ci uint64_t rxbad:1; 51462306a36Sopenharmony_ci uint64_t rxerr:1; 51562306a36Sopenharmony_ci uint64_t txbad:1; 51662306a36Sopenharmony_ci uint64_t txfifo:1; 51762306a36Sopenharmony_ci uint64_t txfifu:1; 51862306a36Sopenharmony_ci uint64_t an_err:1; 51962306a36Sopenharmony_ci uint64_t xmit:1; 52062306a36Sopenharmony_ci uint64_t lnkspd:1; 52162306a36Sopenharmony_ci#else 52262306a36Sopenharmony_ci uint64_t lnkspd:1; 52362306a36Sopenharmony_ci uint64_t xmit:1; 52462306a36Sopenharmony_ci uint64_t an_err:1; 52562306a36Sopenharmony_ci uint64_t txfifu:1; 52662306a36Sopenharmony_ci uint64_t txfifo:1; 52762306a36Sopenharmony_ci uint64_t txbad:1; 52862306a36Sopenharmony_ci uint64_t rxerr:1; 52962306a36Sopenharmony_ci uint64_t rxbad:1; 53062306a36Sopenharmony_ci uint64_t rxlock:1; 53162306a36Sopenharmony_ci uint64_t an_bad:1; 53262306a36Sopenharmony_ci uint64_t sync_bad:1; 53362306a36Sopenharmony_ci uint64_t dup:1; 53462306a36Sopenharmony_ci uint64_t dbg_sync:1; 53562306a36Sopenharmony_ci uint64_t reserved_13_63:51; 53662306a36Sopenharmony_ci#endif 53762306a36Sopenharmony_ci } s; 53862306a36Sopenharmony_ci struct cvmx_pcsx_intx_reg_cn52xx { 53962306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 54062306a36Sopenharmony_ci uint64_t reserved_12_63:52; 54162306a36Sopenharmony_ci uint64_t dup:1; 54262306a36Sopenharmony_ci uint64_t sync_bad:1; 54362306a36Sopenharmony_ci uint64_t an_bad:1; 54462306a36Sopenharmony_ci uint64_t rxlock:1; 54562306a36Sopenharmony_ci uint64_t rxbad:1; 54662306a36Sopenharmony_ci uint64_t rxerr:1; 54762306a36Sopenharmony_ci uint64_t txbad:1; 54862306a36Sopenharmony_ci uint64_t txfifo:1; 54962306a36Sopenharmony_ci uint64_t txfifu:1; 55062306a36Sopenharmony_ci uint64_t an_err:1; 55162306a36Sopenharmony_ci uint64_t xmit:1; 55262306a36Sopenharmony_ci uint64_t lnkspd:1; 55362306a36Sopenharmony_ci#else 55462306a36Sopenharmony_ci uint64_t lnkspd:1; 55562306a36Sopenharmony_ci uint64_t xmit:1; 55662306a36Sopenharmony_ci uint64_t an_err:1; 55762306a36Sopenharmony_ci uint64_t txfifu:1; 55862306a36Sopenharmony_ci uint64_t txfifo:1; 55962306a36Sopenharmony_ci uint64_t txbad:1; 56062306a36Sopenharmony_ci uint64_t rxerr:1; 56162306a36Sopenharmony_ci uint64_t rxbad:1; 56262306a36Sopenharmony_ci uint64_t rxlock:1; 56362306a36Sopenharmony_ci uint64_t an_bad:1; 56462306a36Sopenharmony_ci uint64_t sync_bad:1; 56562306a36Sopenharmony_ci uint64_t dup:1; 56662306a36Sopenharmony_ci uint64_t reserved_12_63:52; 56762306a36Sopenharmony_ci#endif 56862306a36Sopenharmony_ci } cn52xx; 56962306a36Sopenharmony_ci}; 57062306a36Sopenharmony_ci 57162306a36Sopenharmony_ciunion cvmx_pcsx_linkx_timer_count_reg { 57262306a36Sopenharmony_ci uint64_t u64; 57362306a36Sopenharmony_ci struct cvmx_pcsx_linkx_timer_count_reg_s { 57462306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 57562306a36Sopenharmony_ci uint64_t reserved_16_63:48; 57662306a36Sopenharmony_ci uint64_t count:16; 57762306a36Sopenharmony_ci#else 57862306a36Sopenharmony_ci uint64_t count:16; 57962306a36Sopenharmony_ci uint64_t reserved_16_63:48; 58062306a36Sopenharmony_ci#endif 58162306a36Sopenharmony_ci } s; 58262306a36Sopenharmony_ci}; 58362306a36Sopenharmony_ci 58462306a36Sopenharmony_ciunion cvmx_pcsx_log_anlx_reg { 58562306a36Sopenharmony_ci uint64_t u64; 58662306a36Sopenharmony_ci struct cvmx_pcsx_log_anlx_reg_s { 58762306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 58862306a36Sopenharmony_ci uint64_t reserved_4_63:60; 58962306a36Sopenharmony_ci uint64_t lafifovfl:1; 59062306a36Sopenharmony_ci uint64_t la_en:1; 59162306a36Sopenharmony_ci uint64_t pkt_sz:2; 59262306a36Sopenharmony_ci#else 59362306a36Sopenharmony_ci uint64_t pkt_sz:2; 59462306a36Sopenharmony_ci uint64_t la_en:1; 59562306a36Sopenharmony_ci uint64_t lafifovfl:1; 59662306a36Sopenharmony_ci uint64_t reserved_4_63:60; 59762306a36Sopenharmony_ci#endif 59862306a36Sopenharmony_ci } s; 59962306a36Sopenharmony_ci}; 60062306a36Sopenharmony_ci 60162306a36Sopenharmony_ciunion cvmx_pcsx_miscx_ctl_reg { 60262306a36Sopenharmony_ci uint64_t u64; 60362306a36Sopenharmony_ci struct cvmx_pcsx_miscx_ctl_reg_s { 60462306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 60562306a36Sopenharmony_ci uint64_t reserved_13_63:51; 60662306a36Sopenharmony_ci uint64_t sgmii:1; 60762306a36Sopenharmony_ci uint64_t gmxeno:1; 60862306a36Sopenharmony_ci uint64_t loopbck2:1; 60962306a36Sopenharmony_ci uint64_t mac_phy:1; 61062306a36Sopenharmony_ci uint64_t mode:1; 61162306a36Sopenharmony_ci uint64_t an_ovrd:1; 61262306a36Sopenharmony_ci uint64_t samp_pt:7; 61362306a36Sopenharmony_ci#else 61462306a36Sopenharmony_ci uint64_t samp_pt:7; 61562306a36Sopenharmony_ci uint64_t an_ovrd:1; 61662306a36Sopenharmony_ci uint64_t mode:1; 61762306a36Sopenharmony_ci uint64_t mac_phy:1; 61862306a36Sopenharmony_ci uint64_t loopbck2:1; 61962306a36Sopenharmony_ci uint64_t gmxeno:1; 62062306a36Sopenharmony_ci uint64_t sgmii:1; 62162306a36Sopenharmony_ci uint64_t reserved_13_63:51; 62262306a36Sopenharmony_ci#endif 62362306a36Sopenharmony_ci } s; 62462306a36Sopenharmony_ci}; 62562306a36Sopenharmony_ci 62662306a36Sopenharmony_ciunion cvmx_pcsx_mrx_control_reg { 62762306a36Sopenharmony_ci uint64_t u64; 62862306a36Sopenharmony_ci struct cvmx_pcsx_mrx_control_reg_s { 62962306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 63062306a36Sopenharmony_ci uint64_t reserved_16_63:48; 63162306a36Sopenharmony_ci uint64_t reset:1; 63262306a36Sopenharmony_ci uint64_t loopbck1:1; 63362306a36Sopenharmony_ci uint64_t spdlsb:1; 63462306a36Sopenharmony_ci uint64_t an_en:1; 63562306a36Sopenharmony_ci uint64_t pwr_dn:1; 63662306a36Sopenharmony_ci uint64_t reserved_10_10:1; 63762306a36Sopenharmony_ci uint64_t rst_an:1; 63862306a36Sopenharmony_ci uint64_t dup:1; 63962306a36Sopenharmony_ci uint64_t coltst:1; 64062306a36Sopenharmony_ci uint64_t spdmsb:1; 64162306a36Sopenharmony_ci uint64_t uni:1; 64262306a36Sopenharmony_ci uint64_t reserved_0_4:5; 64362306a36Sopenharmony_ci#else 64462306a36Sopenharmony_ci uint64_t reserved_0_4:5; 64562306a36Sopenharmony_ci uint64_t uni:1; 64662306a36Sopenharmony_ci uint64_t spdmsb:1; 64762306a36Sopenharmony_ci uint64_t coltst:1; 64862306a36Sopenharmony_ci uint64_t dup:1; 64962306a36Sopenharmony_ci uint64_t rst_an:1; 65062306a36Sopenharmony_ci uint64_t reserved_10_10:1; 65162306a36Sopenharmony_ci uint64_t pwr_dn:1; 65262306a36Sopenharmony_ci uint64_t an_en:1; 65362306a36Sopenharmony_ci uint64_t spdlsb:1; 65462306a36Sopenharmony_ci uint64_t loopbck1:1; 65562306a36Sopenharmony_ci uint64_t reset:1; 65662306a36Sopenharmony_ci uint64_t reserved_16_63:48; 65762306a36Sopenharmony_ci#endif 65862306a36Sopenharmony_ci } s; 65962306a36Sopenharmony_ci}; 66062306a36Sopenharmony_ci 66162306a36Sopenharmony_ciunion cvmx_pcsx_mrx_status_reg { 66262306a36Sopenharmony_ci uint64_t u64; 66362306a36Sopenharmony_ci struct cvmx_pcsx_mrx_status_reg_s { 66462306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 66562306a36Sopenharmony_ci uint64_t reserved_16_63:48; 66662306a36Sopenharmony_ci uint64_t hun_t4:1; 66762306a36Sopenharmony_ci uint64_t hun_xfd:1; 66862306a36Sopenharmony_ci uint64_t hun_xhd:1; 66962306a36Sopenharmony_ci uint64_t ten_fd:1; 67062306a36Sopenharmony_ci uint64_t ten_hd:1; 67162306a36Sopenharmony_ci uint64_t hun_t2fd:1; 67262306a36Sopenharmony_ci uint64_t hun_t2hd:1; 67362306a36Sopenharmony_ci uint64_t ext_st:1; 67462306a36Sopenharmony_ci uint64_t reserved_7_7:1; 67562306a36Sopenharmony_ci uint64_t prb_sup:1; 67662306a36Sopenharmony_ci uint64_t an_cpt:1; 67762306a36Sopenharmony_ci uint64_t rm_flt:1; 67862306a36Sopenharmony_ci uint64_t an_abil:1; 67962306a36Sopenharmony_ci uint64_t lnk_st:1; 68062306a36Sopenharmony_ci uint64_t reserved_1_1:1; 68162306a36Sopenharmony_ci uint64_t extnd:1; 68262306a36Sopenharmony_ci#else 68362306a36Sopenharmony_ci uint64_t extnd:1; 68462306a36Sopenharmony_ci uint64_t reserved_1_1:1; 68562306a36Sopenharmony_ci uint64_t lnk_st:1; 68662306a36Sopenharmony_ci uint64_t an_abil:1; 68762306a36Sopenharmony_ci uint64_t rm_flt:1; 68862306a36Sopenharmony_ci uint64_t an_cpt:1; 68962306a36Sopenharmony_ci uint64_t prb_sup:1; 69062306a36Sopenharmony_ci uint64_t reserved_7_7:1; 69162306a36Sopenharmony_ci uint64_t ext_st:1; 69262306a36Sopenharmony_ci uint64_t hun_t2hd:1; 69362306a36Sopenharmony_ci uint64_t hun_t2fd:1; 69462306a36Sopenharmony_ci uint64_t ten_hd:1; 69562306a36Sopenharmony_ci uint64_t ten_fd:1; 69662306a36Sopenharmony_ci uint64_t hun_xhd:1; 69762306a36Sopenharmony_ci uint64_t hun_xfd:1; 69862306a36Sopenharmony_ci uint64_t hun_t4:1; 69962306a36Sopenharmony_ci uint64_t reserved_16_63:48; 70062306a36Sopenharmony_ci#endif 70162306a36Sopenharmony_ci } s; 70262306a36Sopenharmony_ci}; 70362306a36Sopenharmony_ci 70462306a36Sopenharmony_ciunion cvmx_pcsx_rxx_states_reg { 70562306a36Sopenharmony_ci uint64_t u64; 70662306a36Sopenharmony_ci struct cvmx_pcsx_rxx_states_reg_s { 70762306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 70862306a36Sopenharmony_ci uint64_t reserved_16_63:48; 70962306a36Sopenharmony_ci uint64_t rx_bad:1; 71062306a36Sopenharmony_ci uint64_t rx_st:5; 71162306a36Sopenharmony_ci uint64_t sync_bad:1; 71262306a36Sopenharmony_ci uint64_t sync:4; 71362306a36Sopenharmony_ci uint64_t an_bad:1; 71462306a36Sopenharmony_ci uint64_t an_st:4; 71562306a36Sopenharmony_ci#else 71662306a36Sopenharmony_ci uint64_t an_st:4; 71762306a36Sopenharmony_ci uint64_t an_bad:1; 71862306a36Sopenharmony_ci uint64_t sync:4; 71962306a36Sopenharmony_ci uint64_t sync_bad:1; 72062306a36Sopenharmony_ci uint64_t rx_st:5; 72162306a36Sopenharmony_ci uint64_t rx_bad:1; 72262306a36Sopenharmony_ci uint64_t reserved_16_63:48; 72362306a36Sopenharmony_ci#endif 72462306a36Sopenharmony_ci } s; 72562306a36Sopenharmony_ci}; 72662306a36Sopenharmony_ci 72762306a36Sopenharmony_ciunion cvmx_pcsx_rxx_sync_reg { 72862306a36Sopenharmony_ci uint64_t u64; 72962306a36Sopenharmony_ci struct cvmx_pcsx_rxx_sync_reg_s { 73062306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 73162306a36Sopenharmony_ci uint64_t reserved_2_63:62; 73262306a36Sopenharmony_ci uint64_t sync:1; 73362306a36Sopenharmony_ci uint64_t bit_lock:1; 73462306a36Sopenharmony_ci#else 73562306a36Sopenharmony_ci uint64_t bit_lock:1; 73662306a36Sopenharmony_ci uint64_t sync:1; 73762306a36Sopenharmony_ci uint64_t reserved_2_63:62; 73862306a36Sopenharmony_ci#endif 73962306a36Sopenharmony_ci } s; 74062306a36Sopenharmony_ci}; 74162306a36Sopenharmony_ci 74262306a36Sopenharmony_ciunion cvmx_pcsx_sgmx_an_adv_reg { 74362306a36Sopenharmony_ci uint64_t u64; 74462306a36Sopenharmony_ci struct cvmx_pcsx_sgmx_an_adv_reg_s { 74562306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 74662306a36Sopenharmony_ci uint64_t reserved_16_63:48; 74762306a36Sopenharmony_ci uint64_t link:1; 74862306a36Sopenharmony_ci uint64_t ack:1; 74962306a36Sopenharmony_ci uint64_t reserved_13_13:1; 75062306a36Sopenharmony_ci uint64_t dup:1; 75162306a36Sopenharmony_ci uint64_t speed:2; 75262306a36Sopenharmony_ci uint64_t reserved_1_9:9; 75362306a36Sopenharmony_ci uint64_t one:1; 75462306a36Sopenharmony_ci#else 75562306a36Sopenharmony_ci uint64_t one:1; 75662306a36Sopenharmony_ci uint64_t reserved_1_9:9; 75762306a36Sopenharmony_ci uint64_t speed:2; 75862306a36Sopenharmony_ci uint64_t dup:1; 75962306a36Sopenharmony_ci uint64_t reserved_13_13:1; 76062306a36Sopenharmony_ci uint64_t ack:1; 76162306a36Sopenharmony_ci uint64_t link:1; 76262306a36Sopenharmony_ci uint64_t reserved_16_63:48; 76362306a36Sopenharmony_ci#endif 76462306a36Sopenharmony_ci } s; 76562306a36Sopenharmony_ci}; 76662306a36Sopenharmony_ci 76762306a36Sopenharmony_ciunion cvmx_pcsx_sgmx_lp_adv_reg { 76862306a36Sopenharmony_ci uint64_t u64; 76962306a36Sopenharmony_ci struct cvmx_pcsx_sgmx_lp_adv_reg_s { 77062306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 77162306a36Sopenharmony_ci uint64_t reserved_16_63:48; 77262306a36Sopenharmony_ci uint64_t link:1; 77362306a36Sopenharmony_ci uint64_t reserved_13_14:2; 77462306a36Sopenharmony_ci uint64_t dup:1; 77562306a36Sopenharmony_ci uint64_t speed:2; 77662306a36Sopenharmony_ci uint64_t reserved_1_9:9; 77762306a36Sopenharmony_ci uint64_t one:1; 77862306a36Sopenharmony_ci#else 77962306a36Sopenharmony_ci uint64_t one:1; 78062306a36Sopenharmony_ci uint64_t reserved_1_9:9; 78162306a36Sopenharmony_ci uint64_t speed:2; 78262306a36Sopenharmony_ci uint64_t dup:1; 78362306a36Sopenharmony_ci uint64_t reserved_13_14:2; 78462306a36Sopenharmony_ci uint64_t link:1; 78562306a36Sopenharmony_ci uint64_t reserved_16_63:48; 78662306a36Sopenharmony_ci#endif 78762306a36Sopenharmony_ci } s; 78862306a36Sopenharmony_ci}; 78962306a36Sopenharmony_ci 79062306a36Sopenharmony_ciunion cvmx_pcsx_txx_states_reg { 79162306a36Sopenharmony_ci uint64_t u64; 79262306a36Sopenharmony_ci struct cvmx_pcsx_txx_states_reg_s { 79362306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 79462306a36Sopenharmony_ci uint64_t reserved_7_63:57; 79562306a36Sopenharmony_ci uint64_t xmit:2; 79662306a36Sopenharmony_ci uint64_t tx_bad:1; 79762306a36Sopenharmony_ci uint64_t ord_st:4; 79862306a36Sopenharmony_ci#else 79962306a36Sopenharmony_ci uint64_t ord_st:4; 80062306a36Sopenharmony_ci uint64_t tx_bad:1; 80162306a36Sopenharmony_ci uint64_t xmit:2; 80262306a36Sopenharmony_ci uint64_t reserved_7_63:57; 80362306a36Sopenharmony_ci#endif 80462306a36Sopenharmony_ci } s; 80562306a36Sopenharmony_ci}; 80662306a36Sopenharmony_ci 80762306a36Sopenharmony_ciunion cvmx_pcsx_tx_rxx_polarity_reg { 80862306a36Sopenharmony_ci uint64_t u64; 80962306a36Sopenharmony_ci struct cvmx_pcsx_tx_rxx_polarity_reg_s { 81062306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 81162306a36Sopenharmony_ci uint64_t reserved_4_63:60; 81262306a36Sopenharmony_ci uint64_t rxovrd:1; 81362306a36Sopenharmony_ci uint64_t autorxpl:1; 81462306a36Sopenharmony_ci uint64_t rxplrt:1; 81562306a36Sopenharmony_ci uint64_t txplrt:1; 81662306a36Sopenharmony_ci#else 81762306a36Sopenharmony_ci uint64_t txplrt:1; 81862306a36Sopenharmony_ci uint64_t rxplrt:1; 81962306a36Sopenharmony_ci uint64_t autorxpl:1; 82062306a36Sopenharmony_ci uint64_t rxovrd:1; 82162306a36Sopenharmony_ci uint64_t reserved_4_63:60; 82262306a36Sopenharmony_ci#endif 82362306a36Sopenharmony_ci } s; 82462306a36Sopenharmony_ci}; 82562306a36Sopenharmony_ci 82662306a36Sopenharmony_ci#endif 827