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_PCSXX_DEFS_H__ 2962306a36Sopenharmony_ci#define __CVMX_PCSXX_DEFS_H__ 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_10GBX_STATUS_REG(unsigned long block_id) 3262306a36Sopenharmony_ci{ 3362306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 3462306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 3562306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 3662306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 3762306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000828ull) + (block_id) * 0x8000000ull; 3862306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 3962306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 4062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000828ull) + (block_id) * 0x8000000ull; 4162306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 4262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000828ull) + (block_id) * 0x1000000ull; 4362306a36Sopenharmony_ci } 4462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000828ull) + (block_id) * 0x1000000ull; 4562306a36Sopenharmony_ci} 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_BIST_STATUS_REG(unsigned long block_id) 4862306a36Sopenharmony_ci{ 4962306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 5062306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 5162306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 5262306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 5362306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000870ull) + (block_id) * 0x8000000ull; 5462306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 5562306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 5662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000870ull) + (block_id) * 0x8000000ull; 5762306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 5862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000870ull) + (block_id) * 0x1000000ull; 5962306a36Sopenharmony_ci } 6062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000870ull) + (block_id) * 0x1000000ull; 6162306a36Sopenharmony_ci} 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_BIT_LOCK_STATUS_REG(unsigned long block_id) 6462306a36Sopenharmony_ci{ 6562306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 6662306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 6762306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 6862306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 6962306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000850ull) + (block_id) * 0x8000000ull; 7062306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 7162306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 7262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000850ull) + (block_id) * 0x8000000ull; 7362306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 7462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000850ull) + (block_id) * 0x1000000ull; 7562306a36Sopenharmony_ci } 7662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000850ull) + (block_id) * 0x1000000ull; 7762306a36Sopenharmony_ci} 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_CONTROL1_REG(unsigned long block_id) 8062306a36Sopenharmony_ci{ 8162306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 8262306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 8362306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 8462306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 8562306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000800ull) + (block_id) * 0x8000000ull; 8662306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 8762306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 8862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000800ull) + (block_id) * 0x8000000ull; 8962306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 9062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000800ull) + (block_id) * 0x1000000ull; 9162306a36Sopenharmony_ci } 9262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000800ull) + (block_id) * 0x1000000ull; 9362306a36Sopenharmony_ci} 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_CONTROL2_REG(unsigned long block_id) 9662306a36Sopenharmony_ci{ 9762306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 9862306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 9962306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 10062306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 10162306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000818ull) + (block_id) * 0x8000000ull; 10262306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 10362306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 10462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000818ull) + (block_id) * 0x8000000ull; 10562306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 10662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000818ull) + (block_id) * 0x1000000ull; 10762306a36Sopenharmony_ci } 10862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000818ull) + (block_id) * 0x1000000ull; 10962306a36Sopenharmony_ci} 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_INT_EN_REG(unsigned long block_id) 11262306a36Sopenharmony_ci{ 11362306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 11462306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 11562306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 11662306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 11762306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000860ull) + (block_id) * 0x8000000ull; 11862306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 11962306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 12062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000860ull) + (block_id) * 0x8000000ull; 12162306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 12262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000860ull) + (block_id) * 0x1000000ull; 12362306a36Sopenharmony_ci } 12462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000860ull) + (block_id) * 0x1000000ull; 12562306a36Sopenharmony_ci} 12662306a36Sopenharmony_ci 12762306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_INT_REG(unsigned long block_id) 12862306a36Sopenharmony_ci{ 12962306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 13062306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 13162306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 13262306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 13362306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000858ull) + (block_id) * 0x8000000ull; 13462306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 13562306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 13662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000858ull) + (block_id) * 0x8000000ull; 13762306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 13862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000858ull) + (block_id) * 0x1000000ull; 13962306a36Sopenharmony_ci } 14062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000858ull) + (block_id) * 0x1000000ull; 14162306a36Sopenharmony_ci} 14262306a36Sopenharmony_ci 14362306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_LOG_ANL_REG(unsigned long block_id) 14462306a36Sopenharmony_ci{ 14562306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 14662306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 14762306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 14862306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 14962306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000868ull) + (block_id) * 0x8000000ull; 15062306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 15162306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 15262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000868ull) + (block_id) * 0x8000000ull; 15362306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 15462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000868ull) + (block_id) * 0x1000000ull; 15562306a36Sopenharmony_ci } 15662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000868ull) + (block_id) * 0x1000000ull; 15762306a36Sopenharmony_ci} 15862306a36Sopenharmony_ci 15962306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_MISC_CTL_REG(unsigned long block_id) 16062306a36Sopenharmony_ci{ 16162306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 16262306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 16362306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 16462306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 16562306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000848ull) + (block_id) * 0x8000000ull; 16662306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 16762306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 16862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000848ull) + (block_id) * 0x8000000ull; 16962306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 17062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000848ull) + (block_id) * 0x1000000ull; 17162306a36Sopenharmony_ci } 17262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000848ull) + (block_id) * 0x1000000ull; 17362306a36Sopenharmony_ci} 17462306a36Sopenharmony_ci 17562306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_RX_SYNC_STATES_REG(unsigned long block_id) 17662306a36Sopenharmony_ci{ 17762306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 17862306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 17962306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 18062306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 18162306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000838ull) + (block_id) * 0x8000000ull; 18262306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 18362306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 18462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000838ull) + (block_id) * 0x8000000ull; 18562306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 18662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000838ull) + (block_id) * 0x1000000ull; 18762306a36Sopenharmony_ci } 18862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000838ull) + (block_id) * 0x1000000ull; 18962306a36Sopenharmony_ci} 19062306a36Sopenharmony_ci 19162306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_SPD_ABIL_REG(unsigned long block_id) 19262306a36Sopenharmony_ci{ 19362306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 19462306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 19562306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 19662306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 19762306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000810ull) + (block_id) * 0x8000000ull; 19862306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 19962306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 20062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000810ull) + (block_id) * 0x8000000ull; 20162306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 20262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000810ull) + (block_id) * 0x1000000ull; 20362306a36Sopenharmony_ci } 20462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000810ull) + (block_id) * 0x1000000ull; 20562306a36Sopenharmony_ci} 20662306a36Sopenharmony_ci 20762306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_STATUS1_REG(unsigned long block_id) 20862306a36Sopenharmony_ci{ 20962306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 21062306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 21162306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 21262306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 21362306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000808ull) + (block_id) * 0x8000000ull; 21462306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 21562306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 21662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000808ull) + (block_id) * 0x8000000ull; 21762306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 21862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000808ull) + (block_id) * 0x1000000ull; 21962306a36Sopenharmony_ci } 22062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000808ull) + (block_id) * 0x1000000ull; 22162306a36Sopenharmony_ci} 22262306a36Sopenharmony_ci 22362306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_STATUS2_REG(unsigned long block_id) 22462306a36Sopenharmony_ci{ 22562306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 22662306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 22762306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 22862306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 22962306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000820ull) + (block_id) * 0x8000000ull; 23062306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 23162306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 23262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000820ull) + (block_id) * 0x8000000ull; 23362306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 23462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000820ull) + (block_id) * 0x1000000ull; 23562306a36Sopenharmony_ci } 23662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000820ull) + (block_id) * 0x1000000ull; 23762306a36Sopenharmony_ci} 23862306a36Sopenharmony_ci 23962306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_TX_RX_POLARITY_REG(unsigned long block_id) 24062306a36Sopenharmony_ci{ 24162306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 24262306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 24362306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 24462306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 24562306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000840ull) + (block_id) * 0x8000000ull; 24662306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 24762306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 24862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000840ull) + (block_id) * 0x8000000ull; 24962306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 25062306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000840ull) + (block_id) * 0x1000000ull; 25162306a36Sopenharmony_ci } 25262306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000840ull) + (block_id) * 0x1000000ull; 25362306a36Sopenharmony_ci} 25462306a36Sopenharmony_ci 25562306a36Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_TX_RX_STATES_REG(unsigned long block_id) 25662306a36Sopenharmony_ci{ 25762306a36Sopenharmony_ci switch (cvmx_get_octeon_family()) { 25862306a36Sopenharmony_ci case OCTEON_CN56XX & OCTEON_FAMILY_MASK: 25962306a36Sopenharmony_ci case OCTEON_CN66XX & OCTEON_FAMILY_MASK: 26062306a36Sopenharmony_ci case OCTEON_CN61XX & OCTEON_FAMILY_MASK: 26162306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000830ull) + (block_id) * 0x8000000ull; 26262306a36Sopenharmony_ci case OCTEON_CN52XX & OCTEON_FAMILY_MASK: 26362306a36Sopenharmony_ci case OCTEON_CN63XX & OCTEON_FAMILY_MASK: 26462306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000830ull) + (block_id) * 0x8000000ull; 26562306a36Sopenharmony_ci case OCTEON_CN68XX & OCTEON_FAMILY_MASK: 26662306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000830ull) + (block_id) * 0x1000000ull; 26762306a36Sopenharmony_ci } 26862306a36Sopenharmony_ci return CVMX_ADD_IO_SEG(0x00011800B0000830ull) + (block_id) * 0x1000000ull; 26962306a36Sopenharmony_ci} 27062306a36Sopenharmony_ci 27162306a36Sopenharmony_civoid __cvmx_interrupt_pcsxx_int_en_reg_enable(int index); 27262306a36Sopenharmony_ci 27362306a36Sopenharmony_ciunion cvmx_pcsxx_10gbx_status_reg { 27462306a36Sopenharmony_ci uint64_t u64; 27562306a36Sopenharmony_ci struct cvmx_pcsxx_10gbx_status_reg_s { 27662306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 27762306a36Sopenharmony_ci uint64_t reserved_13_63:51; 27862306a36Sopenharmony_ci uint64_t alignd:1; 27962306a36Sopenharmony_ci uint64_t pattst:1; 28062306a36Sopenharmony_ci uint64_t reserved_4_10:7; 28162306a36Sopenharmony_ci uint64_t l3sync:1; 28262306a36Sopenharmony_ci uint64_t l2sync:1; 28362306a36Sopenharmony_ci uint64_t l1sync:1; 28462306a36Sopenharmony_ci uint64_t l0sync:1; 28562306a36Sopenharmony_ci#else 28662306a36Sopenharmony_ci uint64_t l0sync:1; 28762306a36Sopenharmony_ci uint64_t l1sync:1; 28862306a36Sopenharmony_ci uint64_t l2sync:1; 28962306a36Sopenharmony_ci uint64_t l3sync:1; 29062306a36Sopenharmony_ci uint64_t reserved_4_10:7; 29162306a36Sopenharmony_ci uint64_t pattst:1; 29262306a36Sopenharmony_ci uint64_t alignd:1; 29362306a36Sopenharmony_ci uint64_t reserved_13_63:51; 29462306a36Sopenharmony_ci#endif 29562306a36Sopenharmony_ci } s; 29662306a36Sopenharmony_ci}; 29762306a36Sopenharmony_ci 29862306a36Sopenharmony_ciunion cvmx_pcsxx_bist_status_reg { 29962306a36Sopenharmony_ci uint64_t u64; 30062306a36Sopenharmony_ci struct cvmx_pcsxx_bist_status_reg_s { 30162306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 30262306a36Sopenharmony_ci uint64_t reserved_1_63:63; 30362306a36Sopenharmony_ci uint64_t bist_status:1; 30462306a36Sopenharmony_ci#else 30562306a36Sopenharmony_ci uint64_t bist_status:1; 30662306a36Sopenharmony_ci uint64_t reserved_1_63:63; 30762306a36Sopenharmony_ci#endif 30862306a36Sopenharmony_ci } s; 30962306a36Sopenharmony_ci}; 31062306a36Sopenharmony_ci 31162306a36Sopenharmony_ciunion cvmx_pcsxx_bit_lock_status_reg { 31262306a36Sopenharmony_ci uint64_t u64; 31362306a36Sopenharmony_ci struct cvmx_pcsxx_bit_lock_status_reg_s { 31462306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 31562306a36Sopenharmony_ci uint64_t reserved_4_63:60; 31662306a36Sopenharmony_ci uint64_t bitlck3:1; 31762306a36Sopenharmony_ci uint64_t bitlck2:1; 31862306a36Sopenharmony_ci uint64_t bitlck1:1; 31962306a36Sopenharmony_ci uint64_t bitlck0:1; 32062306a36Sopenharmony_ci#else 32162306a36Sopenharmony_ci uint64_t bitlck0:1; 32262306a36Sopenharmony_ci uint64_t bitlck1:1; 32362306a36Sopenharmony_ci uint64_t bitlck2:1; 32462306a36Sopenharmony_ci uint64_t bitlck3:1; 32562306a36Sopenharmony_ci uint64_t reserved_4_63:60; 32662306a36Sopenharmony_ci#endif 32762306a36Sopenharmony_ci } s; 32862306a36Sopenharmony_ci}; 32962306a36Sopenharmony_ci 33062306a36Sopenharmony_ciunion cvmx_pcsxx_control1_reg { 33162306a36Sopenharmony_ci uint64_t u64; 33262306a36Sopenharmony_ci struct cvmx_pcsxx_control1_reg_s { 33362306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 33462306a36Sopenharmony_ci uint64_t reserved_16_63:48; 33562306a36Sopenharmony_ci uint64_t reset:1; 33662306a36Sopenharmony_ci uint64_t loopbck1:1; 33762306a36Sopenharmony_ci uint64_t spdsel1:1; 33862306a36Sopenharmony_ci uint64_t reserved_12_12:1; 33962306a36Sopenharmony_ci uint64_t lo_pwr:1; 34062306a36Sopenharmony_ci uint64_t reserved_7_10:4; 34162306a36Sopenharmony_ci uint64_t spdsel0:1; 34262306a36Sopenharmony_ci uint64_t spd:4; 34362306a36Sopenharmony_ci uint64_t reserved_0_1:2; 34462306a36Sopenharmony_ci#else 34562306a36Sopenharmony_ci uint64_t reserved_0_1:2; 34662306a36Sopenharmony_ci uint64_t spd:4; 34762306a36Sopenharmony_ci uint64_t spdsel0:1; 34862306a36Sopenharmony_ci uint64_t reserved_7_10:4; 34962306a36Sopenharmony_ci uint64_t lo_pwr:1; 35062306a36Sopenharmony_ci uint64_t reserved_12_12:1; 35162306a36Sopenharmony_ci uint64_t spdsel1:1; 35262306a36Sopenharmony_ci uint64_t loopbck1:1; 35362306a36Sopenharmony_ci uint64_t reset:1; 35462306a36Sopenharmony_ci uint64_t reserved_16_63:48; 35562306a36Sopenharmony_ci#endif 35662306a36Sopenharmony_ci } s; 35762306a36Sopenharmony_ci}; 35862306a36Sopenharmony_ci 35962306a36Sopenharmony_ciunion cvmx_pcsxx_control2_reg { 36062306a36Sopenharmony_ci uint64_t u64; 36162306a36Sopenharmony_ci struct cvmx_pcsxx_control2_reg_s { 36262306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 36362306a36Sopenharmony_ci uint64_t reserved_2_63:62; 36462306a36Sopenharmony_ci uint64_t type:2; 36562306a36Sopenharmony_ci#else 36662306a36Sopenharmony_ci uint64_t type:2; 36762306a36Sopenharmony_ci uint64_t reserved_2_63:62; 36862306a36Sopenharmony_ci#endif 36962306a36Sopenharmony_ci } s; 37062306a36Sopenharmony_ci}; 37162306a36Sopenharmony_ci 37262306a36Sopenharmony_ciunion cvmx_pcsxx_int_en_reg { 37362306a36Sopenharmony_ci uint64_t u64; 37462306a36Sopenharmony_ci struct cvmx_pcsxx_int_en_reg_s { 37562306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 37662306a36Sopenharmony_ci uint64_t reserved_7_63:57; 37762306a36Sopenharmony_ci uint64_t dbg_sync_en:1; 37862306a36Sopenharmony_ci uint64_t algnlos_en:1; 37962306a36Sopenharmony_ci uint64_t synlos_en:1; 38062306a36Sopenharmony_ci uint64_t bitlckls_en:1; 38162306a36Sopenharmony_ci uint64_t rxsynbad_en:1; 38262306a36Sopenharmony_ci uint64_t rxbad_en:1; 38362306a36Sopenharmony_ci uint64_t txflt_en:1; 38462306a36Sopenharmony_ci#else 38562306a36Sopenharmony_ci uint64_t txflt_en:1; 38662306a36Sopenharmony_ci uint64_t rxbad_en:1; 38762306a36Sopenharmony_ci uint64_t rxsynbad_en:1; 38862306a36Sopenharmony_ci uint64_t bitlckls_en:1; 38962306a36Sopenharmony_ci uint64_t synlos_en:1; 39062306a36Sopenharmony_ci uint64_t algnlos_en:1; 39162306a36Sopenharmony_ci uint64_t dbg_sync_en:1; 39262306a36Sopenharmony_ci uint64_t reserved_7_63:57; 39362306a36Sopenharmony_ci#endif 39462306a36Sopenharmony_ci } s; 39562306a36Sopenharmony_ci struct cvmx_pcsxx_int_en_reg_cn52xx { 39662306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 39762306a36Sopenharmony_ci uint64_t reserved_6_63:58; 39862306a36Sopenharmony_ci uint64_t algnlos_en:1; 39962306a36Sopenharmony_ci uint64_t synlos_en:1; 40062306a36Sopenharmony_ci uint64_t bitlckls_en:1; 40162306a36Sopenharmony_ci uint64_t rxsynbad_en:1; 40262306a36Sopenharmony_ci uint64_t rxbad_en:1; 40362306a36Sopenharmony_ci uint64_t txflt_en:1; 40462306a36Sopenharmony_ci#else 40562306a36Sopenharmony_ci uint64_t txflt_en:1; 40662306a36Sopenharmony_ci uint64_t rxbad_en:1; 40762306a36Sopenharmony_ci uint64_t rxsynbad_en:1; 40862306a36Sopenharmony_ci uint64_t bitlckls_en:1; 40962306a36Sopenharmony_ci uint64_t synlos_en:1; 41062306a36Sopenharmony_ci uint64_t algnlos_en:1; 41162306a36Sopenharmony_ci uint64_t reserved_6_63:58; 41262306a36Sopenharmony_ci#endif 41362306a36Sopenharmony_ci } cn52xx; 41462306a36Sopenharmony_ci}; 41562306a36Sopenharmony_ci 41662306a36Sopenharmony_ciunion cvmx_pcsxx_int_reg { 41762306a36Sopenharmony_ci uint64_t u64; 41862306a36Sopenharmony_ci struct cvmx_pcsxx_int_reg_s { 41962306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 42062306a36Sopenharmony_ci uint64_t reserved_7_63:57; 42162306a36Sopenharmony_ci uint64_t dbg_sync:1; 42262306a36Sopenharmony_ci uint64_t algnlos:1; 42362306a36Sopenharmony_ci uint64_t synlos:1; 42462306a36Sopenharmony_ci uint64_t bitlckls:1; 42562306a36Sopenharmony_ci uint64_t rxsynbad:1; 42662306a36Sopenharmony_ci uint64_t rxbad:1; 42762306a36Sopenharmony_ci uint64_t txflt:1; 42862306a36Sopenharmony_ci#else 42962306a36Sopenharmony_ci uint64_t txflt:1; 43062306a36Sopenharmony_ci uint64_t rxbad:1; 43162306a36Sopenharmony_ci uint64_t rxsynbad:1; 43262306a36Sopenharmony_ci uint64_t bitlckls:1; 43362306a36Sopenharmony_ci uint64_t synlos:1; 43462306a36Sopenharmony_ci uint64_t algnlos:1; 43562306a36Sopenharmony_ci uint64_t dbg_sync:1; 43662306a36Sopenharmony_ci uint64_t reserved_7_63:57; 43762306a36Sopenharmony_ci#endif 43862306a36Sopenharmony_ci } s; 43962306a36Sopenharmony_ci struct cvmx_pcsxx_int_reg_cn52xx { 44062306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 44162306a36Sopenharmony_ci uint64_t reserved_6_63:58; 44262306a36Sopenharmony_ci uint64_t algnlos:1; 44362306a36Sopenharmony_ci uint64_t synlos:1; 44462306a36Sopenharmony_ci uint64_t bitlckls:1; 44562306a36Sopenharmony_ci uint64_t rxsynbad:1; 44662306a36Sopenharmony_ci uint64_t rxbad:1; 44762306a36Sopenharmony_ci uint64_t txflt:1; 44862306a36Sopenharmony_ci#else 44962306a36Sopenharmony_ci uint64_t txflt:1; 45062306a36Sopenharmony_ci uint64_t rxbad:1; 45162306a36Sopenharmony_ci uint64_t rxsynbad:1; 45262306a36Sopenharmony_ci uint64_t bitlckls:1; 45362306a36Sopenharmony_ci uint64_t synlos:1; 45462306a36Sopenharmony_ci uint64_t algnlos:1; 45562306a36Sopenharmony_ci uint64_t reserved_6_63:58; 45662306a36Sopenharmony_ci#endif 45762306a36Sopenharmony_ci } cn52xx; 45862306a36Sopenharmony_ci}; 45962306a36Sopenharmony_ci 46062306a36Sopenharmony_ciunion cvmx_pcsxx_log_anl_reg { 46162306a36Sopenharmony_ci uint64_t u64; 46262306a36Sopenharmony_ci struct cvmx_pcsxx_log_anl_reg_s { 46362306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 46462306a36Sopenharmony_ci uint64_t reserved_7_63:57; 46562306a36Sopenharmony_ci uint64_t enc_mode:1; 46662306a36Sopenharmony_ci uint64_t drop_ln:2; 46762306a36Sopenharmony_ci uint64_t lafifovfl:1; 46862306a36Sopenharmony_ci uint64_t la_en:1; 46962306a36Sopenharmony_ci uint64_t pkt_sz:2; 47062306a36Sopenharmony_ci#else 47162306a36Sopenharmony_ci uint64_t pkt_sz:2; 47262306a36Sopenharmony_ci uint64_t la_en:1; 47362306a36Sopenharmony_ci uint64_t lafifovfl:1; 47462306a36Sopenharmony_ci uint64_t drop_ln:2; 47562306a36Sopenharmony_ci uint64_t enc_mode:1; 47662306a36Sopenharmony_ci uint64_t reserved_7_63:57; 47762306a36Sopenharmony_ci#endif 47862306a36Sopenharmony_ci } s; 47962306a36Sopenharmony_ci}; 48062306a36Sopenharmony_ci 48162306a36Sopenharmony_ciunion cvmx_pcsxx_misc_ctl_reg { 48262306a36Sopenharmony_ci uint64_t u64; 48362306a36Sopenharmony_ci struct cvmx_pcsxx_misc_ctl_reg_s { 48462306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 48562306a36Sopenharmony_ci uint64_t reserved_4_63:60; 48662306a36Sopenharmony_ci uint64_t tx_swap:1; 48762306a36Sopenharmony_ci uint64_t rx_swap:1; 48862306a36Sopenharmony_ci uint64_t xaui:1; 48962306a36Sopenharmony_ci uint64_t gmxeno:1; 49062306a36Sopenharmony_ci#else 49162306a36Sopenharmony_ci uint64_t gmxeno:1; 49262306a36Sopenharmony_ci uint64_t xaui:1; 49362306a36Sopenharmony_ci uint64_t rx_swap:1; 49462306a36Sopenharmony_ci uint64_t tx_swap:1; 49562306a36Sopenharmony_ci uint64_t reserved_4_63:60; 49662306a36Sopenharmony_ci#endif 49762306a36Sopenharmony_ci } s; 49862306a36Sopenharmony_ci}; 49962306a36Sopenharmony_ci 50062306a36Sopenharmony_ciunion cvmx_pcsxx_rx_sync_states_reg { 50162306a36Sopenharmony_ci uint64_t u64; 50262306a36Sopenharmony_ci struct cvmx_pcsxx_rx_sync_states_reg_s { 50362306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 50462306a36Sopenharmony_ci uint64_t reserved_16_63:48; 50562306a36Sopenharmony_ci uint64_t sync3st:4; 50662306a36Sopenharmony_ci uint64_t sync2st:4; 50762306a36Sopenharmony_ci uint64_t sync1st:4; 50862306a36Sopenharmony_ci uint64_t sync0st:4; 50962306a36Sopenharmony_ci#else 51062306a36Sopenharmony_ci uint64_t sync0st:4; 51162306a36Sopenharmony_ci uint64_t sync1st:4; 51262306a36Sopenharmony_ci uint64_t sync2st:4; 51362306a36Sopenharmony_ci uint64_t sync3st:4; 51462306a36Sopenharmony_ci uint64_t reserved_16_63:48; 51562306a36Sopenharmony_ci#endif 51662306a36Sopenharmony_ci } s; 51762306a36Sopenharmony_ci}; 51862306a36Sopenharmony_ci 51962306a36Sopenharmony_ciunion cvmx_pcsxx_spd_abil_reg { 52062306a36Sopenharmony_ci uint64_t u64; 52162306a36Sopenharmony_ci struct cvmx_pcsxx_spd_abil_reg_s { 52262306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 52362306a36Sopenharmony_ci uint64_t reserved_2_63:62; 52462306a36Sopenharmony_ci uint64_t tenpasst:1; 52562306a36Sopenharmony_ci uint64_t tengb:1; 52662306a36Sopenharmony_ci#else 52762306a36Sopenharmony_ci uint64_t tengb:1; 52862306a36Sopenharmony_ci uint64_t tenpasst:1; 52962306a36Sopenharmony_ci uint64_t reserved_2_63:62; 53062306a36Sopenharmony_ci#endif 53162306a36Sopenharmony_ci } s; 53262306a36Sopenharmony_ci}; 53362306a36Sopenharmony_ci 53462306a36Sopenharmony_ciunion cvmx_pcsxx_status1_reg { 53562306a36Sopenharmony_ci uint64_t u64; 53662306a36Sopenharmony_ci struct cvmx_pcsxx_status1_reg_s { 53762306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 53862306a36Sopenharmony_ci uint64_t reserved_8_63:56; 53962306a36Sopenharmony_ci uint64_t flt:1; 54062306a36Sopenharmony_ci uint64_t reserved_3_6:4; 54162306a36Sopenharmony_ci uint64_t rcv_lnk:1; 54262306a36Sopenharmony_ci uint64_t lpable:1; 54362306a36Sopenharmony_ci uint64_t reserved_0_0:1; 54462306a36Sopenharmony_ci#else 54562306a36Sopenharmony_ci uint64_t reserved_0_0:1; 54662306a36Sopenharmony_ci uint64_t lpable:1; 54762306a36Sopenharmony_ci uint64_t rcv_lnk:1; 54862306a36Sopenharmony_ci uint64_t reserved_3_6:4; 54962306a36Sopenharmony_ci uint64_t flt:1; 55062306a36Sopenharmony_ci uint64_t reserved_8_63:56; 55162306a36Sopenharmony_ci#endif 55262306a36Sopenharmony_ci } s; 55362306a36Sopenharmony_ci}; 55462306a36Sopenharmony_ci 55562306a36Sopenharmony_ciunion cvmx_pcsxx_status2_reg { 55662306a36Sopenharmony_ci uint64_t u64; 55762306a36Sopenharmony_ci struct cvmx_pcsxx_status2_reg_s { 55862306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 55962306a36Sopenharmony_ci uint64_t reserved_16_63:48; 56062306a36Sopenharmony_ci uint64_t dev:2; 56162306a36Sopenharmony_ci uint64_t reserved_12_13:2; 56262306a36Sopenharmony_ci uint64_t xmtflt:1; 56362306a36Sopenharmony_ci uint64_t rcvflt:1; 56462306a36Sopenharmony_ci uint64_t reserved_3_9:7; 56562306a36Sopenharmony_ci uint64_t tengb_w:1; 56662306a36Sopenharmony_ci uint64_t tengb_x:1; 56762306a36Sopenharmony_ci uint64_t tengb_r:1; 56862306a36Sopenharmony_ci#else 56962306a36Sopenharmony_ci uint64_t tengb_r:1; 57062306a36Sopenharmony_ci uint64_t tengb_x:1; 57162306a36Sopenharmony_ci uint64_t tengb_w:1; 57262306a36Sopenharmony_ci uint64_t reserved_3_9:7; 57362306a36Sopenharmony_ci uint64_t rcvflt:1; 57462306a36Sopenharmony_ci uint64_t xmtflt:1; 57562306a36Sopenharmony_ci uint64_t reserved_12_13:2; 57662306a36Sopenharmony_ci uint64_t dev:2; 57762306a36Sopenharmony_ci uint64_t reserved_16_63:48; 57862306a36Sopenharmony_ci#endif 57962306a36Sopenharmony_ci } s; 58062306a36Sopenharmony_ci}; 58162306a36Sopenharmony_ci 58262306a36Sopenharmony_ciunion cvmx_pcsxx_tx_rx_polarity_reg { 58362306a36Sopenharmony_ci uint64_t u64; 58462306a36Sopenharmony_ci struct cvmx_pcsxx_tx_rx_polarity_reg_s { 58562306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 58662306a36Sopenharmony_ci uint64_t reserved_10_63:54; 58762306a36Sopenharmony_ci uint64_t xor_rxplrt:4; 58862306a36Sopenharmony_ci uint64_t xor_txplrt:4; 58962306a36Sopenharmony_ci uint64_t rxplrt:1; 59062306a36Sopenharmony_ci uint64_t txplrt:1; 59162306a36Sopenharmony_ci#else 59262306a36Sopenharmony_ci uint64_t txplrt:1; 59362306a36Sopenharmony_ci uint64_t rxplrt:1; 59462306a36Sopenharmony_ci uint64_t xor_txplrt:4; 59562306a36Sopenharmony_ci uint64_t xor_rxplrt:4; 59662306a36Sopenharmony_ci uint64_t reserved_10_63:54; 59762306a36Sopenharmony_ci#endif 59862306a36Sopenharmony_ci } s; 59962306a36Sopenharmony_ci struct cvmx_pcsxx_tx_rx_polarity_reg_cn52xxp1 { 60062306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 60162306a36Sopenharmony_ci uint64_t reserved_2_63:62; 60262306a36Sopenharmony_ci uint64_t rxplrt:1; 60362306a36Sopenharmony_ci uint64_t txplrt:1; 60462306a36Sopenharmony_ci#else 60562306a36Sopenharmony_ci uint64_t txplrt:1; 60662306a36Sopenharmony_ci uint64_t rxplrt:1; 60762306a36Sopenharmony_ci uint64_t reserved_2_63:62; 60862306a36Sopenharmony_ci#endif 60962306a36Sopenharmony_ci } cn52xxp1; 61062306a36Sopenharmony_ci}; 61162306a36Sopenharmony_ci 61262306a36Sopenharmony_ciunion cvmx_pcsxx_tx_rx_states_reg { 61362306a36Sopenharmony_ci uint64_t u64; 61462306a36Sopenharmony_ci struct cvmx_pcsxx_tx_rx_states_reg_s { 61562306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 61662306a36Sopenharmony_ci uint64_t reserved_14_63:50; 61762306a36Sopenharmony_ci uint64_t term_err:1; 61862306a36Sopenharmony_ci uint64_t syn3bad:1; 61962306a36Sopenharmony_ci uint64_t syn2bad:1; 62062306a36Sopenharmony_ci uint64_t syn1bad:1; 62162306a36Sopenharmony_ci uint64_t syn0bad:1; 62262306a36Sopenharmony_ci uint64_t rxbad:1; 62362306a36Sopenharmony_ci uint64_t algn_st:3; 62462306a36Sopenharmony_ci uint64_t rx_st:2; 62562306a36Sopenharmony_ci uint64_t tx_st:3; 62662306a36Sopenharmony_ci#else 62762306a36Sopenharmony_ci uint64_t tx_st:3; 62862306a36Sopenharmony_ci uint64_t rx_st:2; 62962306a36Sopenharmony_ci uint64_t algn_st:3; 63062306a36Sopenharmony_ci uint64_t rxbad:1; 63162306a36Sopenharmony_ci uint64_t syn0bad:1; 63262306a36Sopenharmony_ci uint64_t syn1bad:1; 63362306a36Sopenharmony_ci uint64_t syn2bad:1; 63462306a36Sopenharmony_ci uint64_t syn3bad:1; 63562306a36Sopenharmony_ci uint64_t term_err:1; 63662306a36Sopenharmony_ci uint64_t reserved_14_63:50; 63762306a36Sopenharmony_ci#endif 63862306a36Sopenharmony_ci } s; 63962306a36Sopenharmony_ci struct cvmx_pcsxx_tx_rx_states_reg_cn52xxp1 { 64062306a36Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD 64162306a36Sopenharmony_ci uint64_t reserved_13_63:51; 64262306a36Sopenharmony_ci uint64_t syn3bad:1; 64362306a36Sopenharmony_ci uint64_t syn2bad:1; 64462306a36Sopenharmony_ci uint64_t syn1bad:1; 64562306a36Sopenharmony_ci uint64_t syn0bad:1; 64662306a36Sopenharmony_ci uint64_t rxbad:1; 64762306a36Sopenharmony_ci uint64_t algn_st:3; 64862306a36Sopenharmony_ci uint64_t rx_st:2; 64962306a36Sopenharmony_ci uint64_t tx_st:3; 65062306a36Sopenharmony_ci#else 65162306a36Sopenharmony_ci uint64_t tx_st:3; 65262306a36Sopenharmony_ci uint64_t rx_st:2; 65362306a36Sopenharmony_ci uint64_t algn_st:3; 65462306a36Sopenharmony_ci uint64_t rxbad:1; 65562306a36Sopenharmony_ci uint64_t syn0bad:1; 65662306a36Sopenharmony_ci uint64_t syn1bad:1; 65762306a36Sopenharmony_ci uint64_t syn2bad:1; 65862306a36Sopenharmony_ci uint64_t syn3bad:1; 65962306a36Sopenharmony_ci uint64_t reserved_13_63:51; 66062306a36Sopenharmony_ci#endif 66162306a36Sopenharmony_ci } cn52xxp1; 66262306a36Sopenharmony_ci}; 66362306a36Sopenharmony_ci 66462306a36Sopenharmony_ci#endif 665