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-2018 Cavium, Inc.
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_PCSXX_DEFS_H__
298c2ecf20Sopenharmony_ci#define __CVMX_PCSXX_DEFS_H__
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_10GBX_STATUS_REG(unsigned long block_id)
328c2ecf20Sopenharmony_ci{
338c2ecf20Sopenharmony_ci	switch (cvmx_get_octeon_family()) {
348c2ecf20Sopenharmony_ci	case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
358c2ecf20Sopenharmony_ci	case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
368c2ecf20Sopenharmony_ci	case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
378c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000828ull) + (block_id) * 0x8000000ull;
388c2ecf20Sopenharmony_ci	case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
398c2ecf20Sopenharmony_ci	case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
408c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000828ull) + (block_id) * 0x8000000ull;
418c2ecf20Sopenharmony_ci	case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
428c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000828ull) + (block_id) * 0x1000000ull;
438c2ecf20Sopenharmony_ci	}
448c2ecf20Sopenharmony_ci	return CVMX_ADD_IO_SEG(0x00011800B0000828ull) + (block_id) * 0x1000000ull;
458c2ecf20Sopenharmony_ci}
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_BIST_STATUS_REG(unsigned long block_id)
488c2ecf20Sopenharmony_ci{
498c2ecf20Sopenharmony_ci	switch (cvmx_get_octeon_family()) {
508c2ecf20Sopenharmony_ci	case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
518c2ecf20Sopenharmony_ci	case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
528c2ecf20Sopenharmony_ci	case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
538c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000870ull) + (block_id) * 0x8000000ull;
548c2ecf20Sopenharmony_ci	case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
558c2ecf20Sopenharmony_ci	case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
568c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000870ull) + (block_id) * 0x8000000ull;
578c2ecf20Sopenharmony_ci	case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
588c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000870ull) + (block_id) * 0x1000000ull;
598c2ecf20Sopenharmony_ci	}
608c2ecf20Sopenharmony_ci	return CVMX_ADD_IO_SEG(0x00011800B0000870ull) + (block_id) * 0x1000000ull;
618c2ecf20Sopenharmony_ci}
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_BIT_LOCK_STATUS_REG(unsigned long block_id)
648c2ecf20Sopenharmony_ci{
658c2ecf20Sopenharmony_ci	switch (cvmx_get_octeon_family()) {
668c2ecf20Sopenharmony_ci	case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
678c2ecf20Sopenharmony_ci	case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
688c2ecf20Sopenharmony_ci	case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
698c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000850ull) + (block_id) * 0x8000000ull;
708c2ecf20Sopenharmony_ci	case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
718c2ecf20Sopenharmony_ci	case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
728c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000850ull) + (block_id) * 0x8000000ull;
738c2ecf20Sopenharmony_ci	case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
748c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000850ull) + (block_id) * 0x1000000ull;
758c2ecf20Sopenharmony_ci	}
768c2ecf20Sopenharmony_ci	return CVMX_ADD_IO_SEG(0x00011800B0000850ull) + (block_id) * 0x1000000ull;
778c2ecf20Sopenharmony_ci}
788c2ecf20Sopenharmony_ci
798c2ecf20Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_CONTROL1_REG(unsigned long block_id)
808c2ecf20Sopenharmony_ci{
818c2ecf20Sopenharmony_ci	switch (cvmx_get_octeon_family()) {
828c2ecf20Sopenharmony_ci	case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
838c2ecf20Sopenharmony_ci	case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
848c2ecf20Sopenharmony_ci	case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
858c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000800ull) + (block_id) * 0x8000000ull;
868c2ecf20Sopenharmony_ci	case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
878c2ecf20Sopenharmony_ci	case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
888c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000800ull) + (block_id) * 0x8000000ull;
898c2ecf20Sopenharmony_ci	case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
908c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000800ull) + (block_id) * 0x1000000ull;
918c2ecf20Sopenharmony_ci	}
928c2ecf20Sopenharmony_ci	return CVMX_ADD_IO_SEG(0x00011800B0000800ull) + (block_id) * 0x1000000ull;
938c2ecf20Sopenharmony_ci}
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_CONTROL2_REG(unsigned long block_id)
968c2ecf20Sopenharmony_ci{
978c2ecf20Sopenharmony_ci	switch (cvmx_get_octeon_family()) {
988c2ecf20Sopenharmony_ci	case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
998c2ecf20Sopenharmony_ci	case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
1008c2ecf20Sopenharmony_ci	case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
1018c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000818ull) + (block_id) * 0x8000000ull;
1028c2ecf20Sopenharmony_ci	case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
1038c2ecf20Sopenharmony_ci	case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
1048c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000818ull) + (block_id) * 0x8000000ull;
1058c2ecf20Sopenharmony_ci	case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
1068c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000818ull) + (block_id) * 0x1000000ull;
1078c2ecf20Sopenharmony_ci	}
1088c2ecf20Sopenharmony_ci	return CVMX_ADD_IO_SEG(0x00011800B0000818ull) + (block_id) * 0x1000000ull;
1098c2ecf20Sopenharmony_ci}
1108c2ecf20Sopenharmony_ci
1118c2ecf20Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_INT_EN_REG(unsigned long block_id)
1128c2ecf20Sopenharmony_ci{
1138c2ecf20Sopenharmony_ci	switch (cvmx_get_octeon_family()) {
1148c2ecf20Sopenharmony_ci	case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
1158c2ecf20Sopenharmony_ci	case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
1168c2ecf20Sopenharmony_ci	case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
1178c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000860ull) + (block_id) * 0x8000000ull;
1188c2ecf20Sopenharmony_ci	case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
1198c2ecf20Sopenharmony_ci	case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
1208c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000860ull) + (block_id) * 0x8000000ull;
1218c2ecf20Sopenharmony_ci	case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
1228c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000860ull) + (block_id) * 0x1000000ull;
1238c2ecf20Sopenharmony_ci	}
1248c2ecf20Sopenharmony_ci	return CVMX_ADD_IO_SEG(0x00011800B0000860ull) + (block_id) * 0x1000000ull;
1258c2ecf20Sopenharmony_ci}
1268c2ecf20Sopenharmony_ci
1278c2ecf20Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_INT_REG(unsigned long block_id)
1288c2ecf20Sopenharmony_ci{
1298c2ecf20Sopenharmony_ci	switch (cvmx_get_octeon_family()) {
1308c2ecf20Sopenharmony_ci	case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
1318c2ecf20Sopenharmony_ci	case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
1328c2ecf20Sopenharmony_ci	case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
1338c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000858ull) + (block_id) * 0x8000000ull;
1348c2ecf20Sopenharmony_ci	case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
1358c2ecf20Sopenharmony_ci	case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
1368c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000858ull) + (block_id) * 0x8000000ull;
1378c2ecf20Sopenharmony_ci	case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
1388c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000858ull) + (block_id) * 0x1000000ull;
1398c2ecf20Sopenharmony_ci	}
1408c2ecf20Sopenharmony_ci	return CVMX_ADD_IO_SEG(0x00011800B0000858ull) + (block_id) * 0x1000000ull;
1418c2ecf20Sopenharmony_ci}
1428c2ecf20Sopenharmony_ci
1438c2ecf20Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_LOG_ANL_REG(unsigned long block_id)
1448c2ecf20Sopenharmony_ci{
1458c2ecf20Sopenharmony_ci	switch (cvmx_get_octeon_family()) {
1468c2ecf20Sopenharmony_ci	case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
1478c2ecf20Sopenharmony_ci	case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
1488c2ecf20Sopenharmony_ci	case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
1498c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000868ull) + (block_id) * 0x8000000ull;
1508c2ecf20Sopenharmony_ci	case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
1518c2ecf20Sopenharmony_ci	case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
1528c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000868ull) + (block_id) * 0x8000000ull;
1538c2ecf20Sopenharmony_ci	case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
1548c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000868ull) + (block_id) * 0x1000000ull;
1558c2ecf20Sopenharmony_ci	}
1568c2ecf20Sopenharmony_ci	return CVMX_ADD_IO_SEG(0x00011800B0000868ull) + (block_id) * 0x1000000ull;
1578c2ecf20Sopenharmony_ci}
1588c2ecf20Sopenharmony_ci
1598c2ecf20Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_MISC_CTL_REG(unsigned long block_id)
1608c2ecf20Sopenharmony_ci{
1618c2ecf20Sopenharmony_ci	switch (cvmx_get_octeon_family()) {
1628c2ecf20Sopenharmony_ci	case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
1638c2ecf20Sopenharmony_ci	case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
1648c2ecf20Sopenharmony_ci	case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
1658c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000848ull) + (block_id) * 0x8000000ull;
1668c2ecf20Sopenharmony_ci	case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
1678c2ecf20Sopenharmony_ci	case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
1688c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000848ull) + (block_id) * 0x8000000ull;
1698c2ecf20Sopenharmony_ci	case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
1708c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000848ull) + (block_id) * 0x1000000ull;
1718c2ecf20Sopenharmony_ci	}
1728c2ecf20Sopenharmony_ci	return CVMX_ADD_IO_SEG(0x00011800B0000848ull) + (block_id) * 0x1000000ull;
1738c2ecf20Sopenharmony_ci}
1748c2ecf20Sopenharmony_ci
1758c2ecf20Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_RX_SYNC_STATES_REG(unsigned long block_id)
1768c2ecf20Sopenharmony_ci{
1778c2ecf20Sopenharmony_ci	switch (cvmx_get_octeon_family()) {
1788c2ecf20Sopenharmony_ci	case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
1798c2ecf20Sopenharmony_ci	case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
1808c2ecf20Sopenharmony_ci	case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
1818c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000838ull) + (block_id) * 0x8000000ull;
1828c2ecf20Sopenharmony_ci	case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
1838c2ecf20Sopenharmony_ci	case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
1848c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000838ull) + (block_id) * 0x8000000ull;
1858c2ecf20Sopenharmony_ci	case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
1868c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000838ull) + (block_id) * 0x1000000ull;
1878c2ecf20Sopenharmony_ci	}
1888c2ecf20Sopenharmony_ci	return CVMX_ADD_IO_SEG(0x00011800B0000838ull) + (block_id) * 0x1000000ull;
1898c2ecf20Sopenharmony_ci}
1908c2ecf20Sopenharmony_ci
1918c2ecf20Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_SPD_ABIL_REG(unsigned long block_id)
1928c2ecf20Sopenharmony_ci{
1938c2ecf20Sopenharmony_ci	switch (cvmx_get_octeon_family()) {
1948c2ecf20Sopenharmony_ci	case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
1958c2ecf20Sopenharmony_ci	case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
1968c2ecf20Sopenharmony_ci	case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
1978c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000810ull) + (block_id) * 0x8000000ull;
1988c2ecf20Sopenharmony_ci	case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
1998c2ecf20Sopenharmony_ci	case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
2008c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000810ull) + (block_id) * 0x8000000ull;
2018c2ecf20Sopenharmony_ci	case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
2028c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000810ull) + (block_id) * 0x1000000ull;
2038c2ecf20Sopenharmony_ci	}
2048c2ecf20Sopenharmony_ci	return CVMX_ADD_IO_SEG(0x00011800B0000810ull) + (block_id) * 0x1000000ull;
2058c2ecf20Sopenharmony_ci}
2068c2ecf20Sopenharmony_ci
2078c2ecf20Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_STATUS1_REG(unsigned long block_id)
2088c2ecf20Sopenharmony_ci{
2098c2ecf20Sopenharmony_ci	switch (cvmx_get_octeon_family()) {
2108c2ecf20Sopenharmony_ci	case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
2118c2ecf20Sopenharmony_ci	case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
2128c2ecf20Sopenharmony_ci	case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
2138c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000808ull) + (block_id) * 0x8000000ull;
2148c2ecf20Sopenharmony_ci	case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
2158c2ecf20Sopenharmony_ci	case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
2168c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000808ull) + (block_id) * 0x8000000ull;
2178c2ecf20Sopenharmony_ci	case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
2188c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000808ull) + (block_id) * 0x1000000ull;
2198c2ecf20Sopenharmony_ci	}
2208c2ecf20Sopenharmony_ci	return CVMX_ADD_IO_SEG(0x00011800B0000808ull) + (block_id) * 0x1000000ull;
2218c2ecf20Sopenharmony_ci}
2228c2ecf20Sopenharmony_ci
2238c2ecf20Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_STATUS2_REG(unsigned long block_id)
2248c2ecf20Sopenharmony_ci{
2258c2ecf20Sopenharmony_ci	switch (cvmx_get_octeon_family()) {
2268c2ecf20Sopenharmony_ci	case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
2278c2ecf20Sopenharmony_ci	case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
2288c2ecf20Sopenharmony_ci	case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
2298c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000820ull) + (block_id) * 0x8000000ull;
2308c2ecf20Sopenharmony_ci	case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
2318c2ecf20Sopenharmony_ci	case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
2328c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000820ull) + (block_id) * 0x8000000ull;
2338c2ecf20Sopenharmony_ci	case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
2348c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000820ull) + (block_id) * 0x1000000ull;
2358c2ecf20Sopenharmony_ci	}
2368c2ecf20Sopenharmony_ci	return CVMX_ADD_IO_SEG(0x00011800B0000820ull) + (block_id) * 0x1000000ull;
2378c2ecf20Sopenharmony_ci}
2388c2ecf20Sopenharmony_ci
2398c2ecf20Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_TX_RX_POLARITY_REG(unsigned long block_id)
2408c2ecf20Sopenharmony_ci{
2418c2ecf20Sopenharmony_ci	switch (cvmx_get_octeon_family()) {
2428c2ecf20Sopenharmony_ci	case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
2438c2ecf20Sopenharmony_ci	case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
2448c2ecf20Sopenharmony_ci	case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
2458c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000840ull) + (block_id) * 0x8000000ull;
2468c2ecf20Sopenharmony_ci	case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
2478c2ecf20Sopenharmony_ci	case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
2488c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000840ull) + (block_id) * 0x8000000ull;
2498c2ecf20Sopenharmony_ci	case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
2508c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000840ull) + (block_id) * 0x1000000ull;
2518c2ecf20Sopenharmony_ci	}
2528c2ecf20Sopenharmony_ci	return CVMX_ADD_IO_SEG(0x00011800B0000840ull) + (block_id) * 0x1000000ull;
2538c2ecf20Sopenharmony_ci}
2548c2ecf20Sopenharmony_ci
2558c2ecf20Sopenharmony_cistatic inline uint64_t CVMX_PCSXX_TX_RX_STATES_REG(unsigned long block_id)
2568c2ecf20Sopenharmony_ci{
2578c2ecf20Sopenharmony_ci	switch (cvmx_get_octeon_family()) {
2588c2ecf20Sopenharmony_ci	case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
2598c2ecf20Sopenharmony_ci	case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
2608c2ecf20Sopenharmony_ci	case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
2618c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000830ull) + (block_id) * 0x8000000ull;
2628c2ecf20Sopenharmony_ci	case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
2638c2ecf20Sopenharmony_ci	case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
2648c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000830ull) + (block_id) * 0x8000000ull;
2658c2ecf20Sopenharmony_ci	case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
2668c2ecf20Sopenharmony_ci		return CVMX_ADD_IO_SEG(0x00011800B0000830ull) + (block_id) * 0x1000000ull;
2678c2ecf20Sopenharmony_ci	}
2688c2ecf20Sopenharmony_ci	return CVMX_ADD_IO_SEG(0x00011800B0000830ull) + (block_id) * 0x1000000ull;
2698c2ecf20Sopenharmony_ci}
2708c2ecf20Sopenharmony_ci
2718c2ecf20Sopenharmony_civoid __cvmx_interrupt_pcsxx_int_en_reg_enable(int index);
2728c2ecf20Sopenharmony_ci
2738c2ecf20Sopenharmony_ciunion cvmx_pcsxx_10gbx_status_reg {
2748c2ecf20Sopenharmony_ci	uint64_t u64;
2758c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_10gbx_status_reg_s {
2768c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
2778c2ecf20Sopenharmony_ci		uint64_t reserved_13_63:51;
2788c2ecf20Sopenharmony_ci		uint64_t alignd:1;
2798c2ecf20Sopenharmony_ci		uint64_t pattst:1;
2808c2ecf20Sopenharmony_ci		uint64_t reserved_4_10:7;
2818c2ecf20Sopenharmony_ci		uint64_t l3sync:1;
2828c2ecf20Sopenharmony_ci		uint64_t l2sync:1;
2838c2ecf20Sopenharmony_ci		uint64_t l1sync:1;
2848c2ecf20Sopenharmony_ci		uint64_t l0sync:1;
2858c2ecf20Sopenharmony_ci#else
2868c2ecf20Sopenharmony_ci		uint64_t l0sync:1;
2878c2ecf20Sopenharmony_ci		uint64_t l1sync:1;
2888c2ecf20Sopenharmony_ci		uint64_t l2sync:1;
2898c2ecf20Sopenharmony_ci		uint64_t l3sync:1;
2908c2ecf20Sopenharmony_ci		uint64_t reserved_4_10:7;
2918c2ecf20Sopenharmony_ci		uint64_t pattst:1;
2928c2ecf20Sopenharmony_ci		uint64_t alignd:1;
2938c2ecf20Sopenharmony_ci		uint64_t reserved_13_63:51;
2948c2ecf20Sopenharmony_ci#endif
2958c2ecf20Sopenharmony_ci	} s;
2968c2ecf20Sopenharmony_ci};
2978c2ecf20Sopenharmony_ci
2988c2ecf20Sopenharmony_ciunion cvmx_pcsxx_bist_status_reg {
2998c2ecf20Sopenharmony_ci	uint64_t u64;
3008c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_bist_status_reg_s {
3018c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
3028c2ecf20Sopenharmony_ci		uint64_t reserved_1_63:63;
3038c2ecf20Sopenharmony_ci		uint64_t bist_status:1;
3048c2ecf20Sopenharmony_ci#else
3058c2ecf20Sopenharmony_ci		uint64_t bist_status:1;
3068c2ecf20Sopenharmony_ci		uint64_t reserved_1_63:63;
3078c2ecf20Sopenharmony_ci#endif
3088c2ecf20Sopenharmony_ci	} s;
3098c2ecf20Sopenharmony_ci};
3108c2ecf20Sopenharmony_ci
3118c2ecf20Sopenharmony_ciunion cvmx_pcsxx_bit_lock_status_reg {
3128c2ecf20Sopenharmony_ci	uint64_t u64;
3138c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_bit_lock_status_reg_s {
3148c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
3158c2ecf20Sopenharmony_ci		uint64_t reserved_4_63:60;
3168c2ecf20Sopenharmony_ci		uint64_t bitlck3:1;
3178c2ecf20Sopenharmony_ci		uint64_t bitlck2:1;
3188c2ecf20Sopenharmony_ci		uint64_t bitlck1:1;
3198c2ecf20Sopenharmony_ci		uint64_t bitlck0:1;
3208c2ecf20Sopenharmony_ci#else
3218c2ecf20Sopenharmony_ci		uint64_t bitlck0:1;
3228c2ecf20Sopenharmony_ci		uint64_t bitlck1:1;
3238c2ecf20Sopenharmony_ci		uint64_t bitlck2:1;
3248c2ecf20Sopenharmony_ci		uint64_t bitlck3:1;
3258c2ecf20Sopenharmony_ci		uint64_t reserved_4_63:60;
3268c2ecf20Sopenharmony_ci#endif
3278c2ecf20Sopenharmony_ci	} s;
3288c2ecf20Sopenharmony_ci};
3298c2ecf20Sopenharmony_ci
3308c2ecf20Sopenharmony_ciunion cvmx_pcsxx_control1_reg {
3318c2ecf20Sopenharmony_ci	uint64_t u64;
3328c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_control1_reg_s {
3338c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
3348c2ecf20Sopenharmony_ci		uint64_t reserved_16_63:48;
3358c2ecf20Sopenharmony_ci		uint64_t reset:1;
3368c2ecf20Sopenharmony_ci		uint64_t loopbck1:1;
3378c2ecf20Sopenharmony_ci		uint64_t spdsel1:1;
3388c2ecf20Sopenharmony_ci		uint64_t reserved_12_12:1;
3398c2ecf20Sopenharmony_ci		uint64_t lo_pwr:1;
3408c2ecf20Sopenharmony_ci		uint64_t reserved_7_10:4;
3418c2ecf20Sopenharmony_ci		uint64_t spdsel0:1;
3428c2ecf20Sopenharmony_ci		uint64_t spd:4;
3438c2ecf20Sopenharmony_ci		uint64_t reserved_0_1:2;
3448c2ecf20Sopenharmony_ci#else
3458c2ecf20Sopenharmony_ci		uint64_t reserved_0_1:2;
3468c2ecf20Sopenharmony_ci		uint64_t spd:4;
3478c2ecf20Sopenharmony_ci		uint64_t spdsel0:1;
3488c2ecf20Sopenharmony_ci		uint64_t reserved_7_10:4;
3498c2ecf20Sopenharmony_ci		uint64_t lo_pwr:1;
3508c2ecf20Sopenharmony_ci		uint64_t reserved_12_12:1;
3518c2ecf20Sopenharmony_ci		uint64_t spdsel1:1;
3528c2ecf20Sopenharmony_ci		uint64_t loopbck1:1;
3538c2ecf20Sopenharmony_ci		uint64_t reset:1;
3548c2ecf20Sopenharmony_ci		uint64_t reserved_16_63:48;
3558c2ecf20Sopenharmony_ci#endif
3568c2ecf20Sopenharmony_ci	} s;
3578c2ecf20Sopenharmony_ci};
3588c2ecf20Sopenharmony_ci
3598c2ecf20Sopenharmony_ciunion cvmx_pcsxx_control2_reg {
3608c2ecf20Sopenharmony_ci	uint64_t u64;
3618c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_control2_reg_s {
3628c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
3638c2ecf20Sopenharmony_ci		uint64_t reserved_2_63:62;
3648c2ecf20Sopenharmony_ci		uint64_t type:2;
3658c2ecf20Sopenharmony_ci#else
3668c2ecf20Sopenharmony_ci		uint64_t type:2;
3678c2ecf20Sopenharmony_ci		uint64_t reserved_2_63:62;
3688c2ecf20Sopenharmony_ci#endif
3698c2ecf20Sopenharmony_ci	} s;
3708c2ecf20Sopenharmony_ci};
3718c2ecf20Sopenharmony_ci
3728c2ecf20Sopenharmony_ciunion cvmx_pcsxx_int_en_reg {
3738c2ecf20Sopenharmony_ci	uint64_t u64;
3748c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_int_en_reg_s {
3758c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
3768c2ecf20Sopenharmony_ci		uint64_t reserved_7_63:57;
3778c2ecf20Sopenharmony_ci		uint64_t dbg_sync_en:1;
3788c2ecf20Sopenharmony_ci		uint64_t algnlos_en:1;
3798c2ecf20Sopenharmony_ci		uint64_t synlos_en:1;
3808c2ecf20Sopenharmony_ci		uint64_t bitlckls_en:1;
3818c2ecf20Sopenharmony_ci		uint64_t rxsynbad_en:1;
3828c2ecf20Sopenharmony_ci		uint64_t rxbad_en:1;
3838c2ecf20Sopenharmony_ci		uint64_t txflt_en:1;
3848c2ecf20Sopenharmony_ci#else
3858c2ecf20Sopenharmony_ci		uint64_t txflt_en:1;
3868c2ecf20Sopenharmony_ci		uint64_t rxbad_en:1;
3878c2ecf20Sopenharmony_ci		uint64_t rxsynbad_en:1;
3888c2ecf20Sopenharmony_ci		uint64_t bitlckls_en:1;
3898c2ecf20Sopenharmony_ci		uint64_t synlos_en:1;
3908c2ecf20Sopenharmony_ci		uint64_t algnlos_en:1;
3918c2ecf20Sopenharmony_ci		uint64_t dbg_sync_en:1;
3928c2ecf20Sopenharmony_ci		uint64_t reserved_7_63:57;
3938c2ecf20Sopenharmony_ci#endif
3948c2ecf20Sopenharmony_ci	} s;
3958c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_int_en_reg_cn52xx {
3968c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
3978c2ecf20Sopenharmony_ci		uint64_t reserved_6_63:58;
3988c2ecf20Sopenharmony_ci		uint64_t algnlos_en:1;
3998c2ecf20Sopenharmony_ci		uint64_t synlos_en:1;
4008c2ecf20Sopenharmony_ci		uint64_t bitlckls_en:1;
4018c2ecf20Sopenharmony_ci		uint64_t rxsynbad_en:1;
4028c2ecf20Sopenharmony_ci		uint64_t rxbad_en:1;
4038c2ecf20Sopenharmony_ci		uint64_t txflt_en:1;
4048c2ecf20Sopenharmony_ci#else
4058c2ecf20Sopenharmony_ci		uint64_t txflt_en:1;
4068c2ecf20Sopenharmony_ci		uint64_t rxbad_en:1;
4078c2ecf20Sopenharmony_ci		uint64_t rxsynbad_en:1;
4088c2ecf20Sopenharmony_ci		uint64_t bitlckls_en:1;
4098c2ecf20Sopenharmony_ci		uint64_t synlos_en:1;
4108c2ecf20Sopenharmony_ci		uint64_t algnlos_en:1;
4118c2ecf20Sopenharmony_ci		uint64_t reserved_6_63:58;
4128c2ecf20Sopenharmony_ci#endif
4138c2ecf20Sopenharmony_ci	} cn52xx;
4148c2ecf20Sopenharmony_ci};
4158c2ecf20Sopenharmony_ci
4168c2ecf20Sopenharmony_ciunion cvmx_pcsxx_int_reg {
4178c2ecf20Sopenharmony_ci	uint64_t u64;
4188c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_int_reg_s {
4198c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
4208c2ecf20Sopenharmony_ci		uint64_t reserved_7_63:57;
4218c2ecf20Sopenharmony_ci		uint64_t dbg_sync:1;
4228c2ecf20Sopenharmony_ci		uint64_t algnlos:1;
4238c2ecf20Sopenharmony_ci		uint64_t synlos:1;
4248c2ecf20Sopenharmony_ci		uint64_t bitlckls:1;
4258c2ecf20Sopenharmony_ci		uint64_t rxsynbad:1;
4268c2ecf20Sopenharmony_ci		uint64_t rxbad:1;
4278c2ecf20Sopenharmony_ci		uint64_t txflt:1;
4288c2ecf20Sopenharmony_ci#else
4298c2ecf20Sopenharmony_ci		uint64_t txflt:1;
4308c2ecf20Sopenharmony_ci		uint64_t rxbad:1;
4318c2ecf20Sopenharmony_ci		uint64_t rxsynbad:1;
4328c2ecf20Sopenharmony_ci		uint64_t bitlckls:1;
4338c2ecf20Sopenharmony_ci		uint64_t synlos:1;
4348c2ecf20Sopenharmony_ci		uint64_t algnlos:1;
4358c2ecf20Sopenharmony_ci		uint64_t dbg_sync:1;
4368c2ecf20Sopenharmony_ci		uint64_t reserved_7_63:57;
4378c2ecf20Sopenharmony_ci#endif
4388c2ecf20Sopenharmony_ci	} s;
4398c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_int_reg_cn52xx {
4408c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
4418c2ecf20Sopenharmony_ci		uint64_t reserved_6_63:58;
4428c2ecf20Sopenharmony_ci		uint64_t algnlos:1;
4438c2ecf20Sopenharmony_ci		uint64_t synlos:1;
4448c2ecf20Sopenharmony_ci		uint64_t bitlckls:1;
4458c2ecf20Sopenharmony_ci		uint64_t rxsynbad:1;
4468c2ecf20Sopenharmony_ci		uint64_t rxbad:1;
4478c2ecf20Sopenharmony_ci		uint64_t txflt:1;
4488c2ecf20Sopenharmony_ci#else
4498c2ecf20Sopenharmony_ci		uint64_t txflt:1;
4508c2ecf20Sopenharmony_ci		uint64_t rxbad:1;
4518c2ecf20Sopenharmony_ci		uint64_t rxsynbad:1;
4528c2ecf20Sopenharmony_ci		uint64_t bitlckls:1;
4538c2ecf20Sopenharmony_ci		uint64_t synlos:1;
4548c2ecf20Sopenharmony_ci		uint64_t algnlos:1;
4558c2ecf20Sopenharmony_ci		uint64_t reserved_6_63:58;
4568c2ecf20Sopenharmony_ci#endif
4578c2ecf20Sopenharmony_ci	} cn52xx;
4588c2ecf20Sopenharmony_ci};
4598c2ecf20Sopenharmony_ci
4608c2ecf20Sopenharmony_ciunion cvmx_pcsxx_log_anl_reg {
4618c2ecf20Sopenharmony_ci	uint64_t u64;
4628c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_log_anl_reg_s {
4638c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
4648c2ecf20Sopenharmony_ci		uint64_t reserved_7_63:57;
4658c2ecf20Sopenharmony_ci		uint64_t enc_mode:1;
4668c2ecf20Sopenharmony_ci		uint64_t drop_ln:2;
4678c2ecf20Sopenharmony_ci		uint64_t lafifovfl:1;
4688c2ecf20Sopenharmony_ci		uint64_t la_en:1;
4698c2ecf20Sopenharmony_ci		uint64_t pkt_sz:2;
4708c2ecf20Sopenharmony_ci#else
4718c2ecf20Sopenharmony_ci		uint64_t pkt_sz:2;
4728c2ecf20Sopenharmony_ci		uint64_t la_en:1;
4738c2ecf20Sopenharmony_ci		uint64_t lafifovfl:1;
4748c2ecf20Sopenharmony_ci		uint64_t drop_ln:2;
4758c2ecf20Sopenharmony_ci		uint64_t enc_mode:1;
4768c2ecf20Sopenharmony_ci		uint64_t reserved_7_63:57;
4778c2ecf20Sopenharmony_ci#endif
4788c2ecf20Sopenharmony_ci	} s;
4798c2ecf20Sopenharmony_ci};
4808c2ecf20Sopenharmony_ci
4818c2ecf20Sopenharmony_ciunion cvmx_pcsxx_misc_ctl_reg {
4828c2ecf20Sopenharmony_ci	uint64_t u64;
4838c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_misc_ctl_reg_s {
4848c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
4858c2ecf20Sopenharmony_ci		uint64_t reserved_4_63:60;
4868c2ecf20Sopenharmony_ci		uint64_t tx_swap:1;
4878c2ecf20Sopenharmony_ci		uint64_t rx_swap:1;
4888c2ecf20Sopenharmony_ci		uint64_t xaui:1;
4898c2ecf20Sopenharmony_ci		uint64_t gmxeno:1;
4908c2ecf20Sopenharmony_ci#else
4918c2ecf20Sopenharmony_ci		uint64_t gmxeno:1;
4928c2ecf20Sopenharmony_ci		uint64_t xaui:1;
4938c2ecf20Sopenharmony_ci		uint64_t rx_swap:1;
4948c2ecf20Sopenharmony_ci		uint64_t tx_swap:1;
4958c2ecf20Sopenharmony_ci		uint64_t reserved_4_63:60;
4968c2ecf20Sopenharmony_ci#endif
4978c2ecf20Sopenharmony_ci	} s;
4988c2ecf20Sopenharmony_ci};
4998c2ecf20Sopenharmony_ci
5008c2ecf20Sopenharmony_ciunion cvmx_pcsxx_rx_sync_states_reg {
5018c2ecf20Sopenharmony_ci	uint64_t u64;
5028c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_rx_sync_states_reg_s {
5038c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
5048c2ecf20Sopenharmony_ci		uint64_t reserved_16_63:48;
5058c2ecf20Sopenharmony_ci		uint64_t sync3st:4;
5068c2ecf20Sopenharmony_ci		uint64_t sync2st:4;
5078c2ecf20Sopenharmony_ci		uint64_t sync1st:4;
5088c2ecf20Sopenharmony_ci		uint64_t sync0st:4;
5098c2ecf20Sopenharmony_ci#else
5108c2ecf20Sopenharmony_ci		uint64_t sync0st:4;
5118c2ecf20Sopenharmony_ci		uint64_t sync1st:4;
5128c2ecf20Sopenharmony_ci		uint64_t sync2st:4;
5138c2ecf20Sopenharmony_ci		uint64_t sync3st:4;
5148c2ecf20Sopenharmony_ci		uint64_t reserved_16_63:48;
5158c2ecf20Sopenharmony_ci#endif
5168c2ecf20Sopenharmony_ci	} s;
5178c2ecf20Sopenharmony_ci};
5188c2ecf20Sopenharmony_ci
5198c2ecf20Sopenharmony_ciunion cvmx_pcsxx_spd_abil_reg {
5208c2ecf20Sopenharmony_ci	uint64_t u64;
5218c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_spd_abil_reg_s {
5228c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
5238c2ecf20Sopenharmony_ci		uint64_t reserved_2_63:62;
5248c2ecf20Sopenharmony_ci		uint64_t tenpasst:1;
5258c2ecf20Sopenharmony_ci		uint64_t tengb:1;
5268c2ecf20Sopenharmony_ci#else
5278c2ecf20Sopenharmony_ci		uint64_t tengb:1;
5288c2ecf20Sopenharmony_ci		uint64_t tenpasst:1;
5298c2ecf20Sopenharmony_ci		uint64_t reserved_2_63:62;
5308c2ecf20Sopenharmony_ci#endif
5318c2ecf20Sopenharmony_ci	} s;
5328c2ecf20Sopenharmony_ci};
5338c2ecf20Sopenharmony_ci
5348c2ecf20Sopenharmony_ciunion cvmx_pcsxx_status1_reg {
5358c2ecf20Sopenharmony_ci	uint64_t u64;
5368c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_status1_reg_s {
5378c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
5388c2ecf20Sopenharmony_ci		uint64_t reserved_8_63:56;
5398c2ecf20Sopenharmony_ci		uint64_t flt:1;
5408c2ecf20Sopenharmony_ci		uint64_t reserved_3_6:4;
5418c2ecf20Sopenharmony_ci		uint64_t rcv_lnk:1;
5428c2ecf20Sopenharmony_ci		uint64_t lpable:1;
5438c2ecf20Sopenharmony_ci		uint64_t reserved_0_0:1;
5448c2ecf20Sopenharmony_ci#else
5458c2ecf20Sopenharmony_ci		uint64_t reserved_0_0:1;
5468c2ecf20Sopenharmony_ci		uint64_t lpable:1;
5478c2ecf20Sopenharmony_ci		uint64_t rcv_lnk:1;
5488c2ecf20Sopenharmony_ci		uint64_t reserved_3_6:4;
5498c2ecf20Sopenharmony_ci		uint64_t flt:1;
5508c2ecf20Sopenharmony_ci		uint64_t reserved_8_63:56;
5518c2ecf20Sopenharmony_ci#endif
5528c2ecf20Sopenharmony_ci	} s;
5538c2ecf20Sopenharmony_ci};
5548c2ecf20Sopenharmony_ci
5558c2ecf20Sopenharmony_ciunion cvmx_pcsxx_status2_reg {
5568c2ecf20Sopenharmony_ci	uint64_t u64;
5578c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_status2_reg_s {
5588c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
5598c2ecf20Sopenharmony_ci		uint64_t reserved_16_63:48;
5608c2ecf20Sopenharmony_ci		uint64_t dev:2;
5618c2ecf20Sopenharmony_ci		uint64_t reserved_12_13:2;
5628c2ecf20Sopenharmony_ci		uint64_t xmtflt:1;
5638c2ecf20Sopenharmony_ci		uint64_t rcvflt:1;
5648c2ecf20Sopenharmony_ci		uint64_t reserved_3_9:7;
5658c2ecf20Sopenharmony_ci		uint64_t tengb_w:1;
5668c2ecf20Sopenharmony_ci		uint64_t tengb_x:1;
5678c2ecf20Sopenharmony_ci		uint64_t tengb_r:1;
5688c2ecf20Sopenharmony_ci#else
5698c2ecf20Sopenharmony_ci		uint64_t tengb_r:1;
5708c2ecf20Sopenharmony_ci		uint64_t tengb_x:1;
5718c2ecf20Sopenharmony_ci		uint64_t tengb_w:1;
5728c2ecf20Sopenharmony_ci		uint64_t reserved_3_9:7;
5738c2ecf20Sopenharmony_ci		uint64_t rcvflt:1;
5748c2ecf20Sopenharmony_ci		uint64_t xmtflt:1;
5758c2ecf20Sopenharmony_ci		uint64_t reserved_12_13:2;
5768c2ecf20Sopenharmony_ci		uint64_t dev:2;
5778c2ecf20Sopenharmony_ci		uint64_t reserved_16_63:48;
5788c2ecf20Sopenharmony_ci#endif
5798c2ecf20Sopenharmony_ci	} s;
5808c2ecf20Sopenharmony_ci};
5818c2ecf20Sopenharmony_ci
5828c2ecf20Sopenharmony_ciunion cvmx_pcsxx_tx_rx_polarity_reg {
5838c2ecf20Sopenharmony_ci	uint64_t u64;
5848c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_tx_rx_polarity_reg_s {
5858c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
5868c2ecf20Sopenharmony_ci		uint64_t reserved_10_63:54;
5878c2ecf20Sopenharmony_ci		uint64_t xor_rxplrt:4;
5888c2ecf20Sopenharmony_ci		uint64_t xor_txplrt:4;
5898c2ecf20Sopenharmony_ci		uint64_t rxplrt:1;
5908c2ecf20Sopenharmony_ci		uint64_t txplrt:1;
5918c2ecf20Sopenharmony_ci#else
5928c2ecf20Sopenharmony_ci		uint64_t txplrt:1;
5938c2ecf20Sopenharmony_ci		uint64_t rxplrt:1;
5948c2ecf20Sopenharmony_ci		uint64_t xor_txplrt:4;
5958c2ecf20Sopenharmony_ci		uint64_t xor_rxplrt:4;
5968c2ecf20Sopenharmony_ci		uint64_t reserved_10_63:54;
5978c2ecf20Sopenharmony_ci#endif
5988c2ecf20Sopenharmony_ci	} s;
5998c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_tx_rx_polarity_reg_cn52xxp1 {
6008c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
6018c2ecf20Sopenharmony_ci		uint64_t reserved_2_63:62;
6028c2ecf20Sopenharmony_ci		uint64_t rxplrt:1;
6038c2ecf20Sopenharmony_ci		uint64_t txplrt:1;
6048c2ecf20Sopenharmony_ci#else
6058c2ecf20Sopenharmony_ci		uint64_t txplrt:1;
6068c2ecf20Sopenharmony_ci		uint64_t rxplrt:1;
6078c2ecf20Sopenharmony_ci		uint64_t reserved_2_63:62;
6088c2ecf20Sopenharmony_ci#endif
6098c2ecf20Sopenharmony_ci	} cn52xxp1;
6108c2ecf20Sopenharmony_ci};
6118c2ecf20Sopenharmony_ci
6128c2ecf20Sopenharmony_ciunion cvmx_pcsxx_tx_rx_states_reg {
6138c2ecf20Sopenharmony_ci	uint64_t u64;
6148c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_tx_rx_states_reg_s {
6158c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
6168c2ecf20Sopenharmony_ci		uint64_t reserved_14_63:50;
6178c2ecf20Sopenharmony_ci		uint64_t term_err:1;
6188c2ecf20Sopenharmony_ci		uint64_t syn3bad:1;
6198c2ecf20Sopenharmony_ci		uint64_t syn2bad:1;
6208c2ecf20Sopenharmony_ci		uint64_t syn1bad:1;
6218c2ecf20Sopenharmony_ci		uint64_t syn0bad:1;
6228c2ecf20Sopenharmony_ci		uint64_t rxbad:1;
6238c2ecf20Sopenharmony_ci		uint64_t algn_st:3;
6248c2ecf20Sopenharmony_ci		uint64_t rx_st:2;
6258c2ecf20Sopenharmony_ci		uint64_t tx_st:3;
6268c2ecf20Sopenharmony_ci#else
6278c2ecf20Sopenharmony_ci		uint64_t tx_st:3;
6288c2ecf20Sopenharmony_ci		uint64_t rx_st:2;
6298c2ecf20Sopenharmony_ci		uint64_t algn_st:3;
6308c2ecf20Sopenharmony_ci		uint64_t rxbad:1;
6318c2ecf20Sopenharmony_ci		uint64_t syn0bad:1;
6328c2ecf20Sopenharmony_ci		uint64_t syn1bad:1;
6338c2ecf20Sopenharmony_ci		uint64_t syn2bad:1;
6348c2ecf20Sopenharmony_ci		uint64_t syn3bad:1;
6358c2ecf20Sopenharmony_ci		uint64_t term_err:1;
6368c2ecf20Sopenharmony_ci		uint64_t reserved_14_63:50;
6378c2ecf20Sopenharmony_ci#endif
6388c2ecf20Sopenharmony_ci	} s;
6398c2ecf20Sopenharmony_ci	struct cvmx_pcsxx_tx_rx_states_reg_cn52xxp1 {
6408c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN_BITFIELD
6418c2ecf20Sopenharmony_ci		uint64_t reserved_13_63:51;
6428c2ecf20Sopenharmony_ci		uint64_t syn3bad:1;
6438c2ecf20Sopenharmony_ci		uint64_t syn2bad:1;
6448c2ecf20Sopenharmony_ci		uint64_t syn1bad:1;
6458c2ecf20Sopenharmony_ci		uint64_t syn0bad:1;
6468c2ecf20Sopenharmony_ci		uint64_t rxbad:1;
6478c2ecf20Sopenharmony_ci		uint64_t algn_st:3;
6488c2ecf20Sopenharmony_ci		uint64_t rx_st:2;
6498c2ecf20Sopenharmony_ci		uint64_t tx_st:3;
6508c2ecf20Sopenharmony_ci#else
6518c2ecf20Sopenharmony_ci		uint64_t tx_st:3;
6528c2ecf20Sopenharmony_ci		uint64_t rx_st:2;
6538c2ecf20Sopenharmony_ci		uint64_t algn_st:3;
6548c2ecf20Sopenharmony_ci		uint64_t rxbad:1;
6558c2ecf20Sopenharmony_ci		uint64_t syn0bad:1;
6568c2ecf20Sopenharmony_ci		uint64_t syn1bad:1;
6578c2ecf20Sopenharmony_ci		uint64_t syn2bad:1;
6588c2ecf20Sopenharmony_ci		uint64_t syn3bad:1;
6598c2ecf20Sopenharmony_ci		uint64_t reserved_13_63:51;
6608c2ecf20Sopenharmony_ci#endif
6618c2ecf20Sopenharmony_ci	} cn52xxp1;
6628c2ecf20Sopenharmony_ci};
6638c2ecf20Sopenharmony_ci
6648c2ecf20Sopenharmony_ci#endif
665