28 #ifndef __CVMX_PCSXX_DEFS_H__
29 #define __CVMX_PCSXX_DEFS_H__
31 static inline uint64_t CVMX_PCSXX_10GBX_STATUS_REG(
unsigned long block_id)
33 switch (cvmx_get_octeon_family()) {
37 return CVMX_ADD_IO_SEG(0x00011800B0000828ull) + (block_id) * 0x8000000ull;
40 return CVMX_ADD_IO_SEG(0x00011800B0000828ull) + (block_id) * 0x8000000ull;
42 return CVMX_ADD_IO_SEG(0x00011800B0000828ull) + (block_id) * 0x1000000ull;
44 return CVMX_ADD_IO_SEG(0x00011800B0000828ull) + (block_id) * 0x1000000ull;
47 static inline uint64_t CVMX_PCSXX_BIST_STATUS_REG(
unsigned long block_id)
49 switch (cvmx_get_octeon_family()) {
53 return CVMX_ADD_IO_SEG(0x00011800B0000870ull) + (block_id) * 0x8000000ull;
56 return CVMX_ADD_IO_SEG(0x00011800B0000870ull) + (block_id) * 0x8000000ull;
58 return CVMX_ADD_IO_SEG(0x00011800B0000870ull) + (block_id) * 0x1000000ull;
60 return CVMX_ADD_IO_SEG(0x00011800B0000870ull) + (block_id) * 0x1000000ull;
63 static inline uint64_t CVMX_PCSXX_BIT_LOCK_STATUS_REG(
unsigned long block_id)
65 switch (cvmx_get_octeon_family()) {
69 return CVMX_ADD_IO_SEG(0x00011800B0000850ull) + (block_id) * 0x8000000ull;
72 return CVMX_ADD_IO_SEG(0x00011800B0000850ull) + (block_id) * 0x8000000ull;
74 return CVMX_ADD_IO_SEG(0x00011800B0000850ull) + (block_id) * 0x1000000ull;
76 return CVMX_ADD_IO_SEG(0x00011800B0000850ull) + (block_id) * 0x1000000ull;
79 static inline uint64_t CVMX_PCSXX_CONTROL1_REG(
unsigned long block_id)
81 switch (cvmx_get_octeon_family()) {
85 return CVMX_ADD_IO_SEG(0x00011800B0000800ull) + (block_id) * 0x8000000ull;
88 return CVMX_ADD_IO_SEG(0x00011800B0000800ull) + (block_id) * 0x8000000ull;
90 return CVMX_ADD_IO_SEG(0x00011800B0000800ull) + (block_id) * 0x1000000ull;
92 return CVMX_ADD_IO_SEG(0x00011800B0000800ull) + (block_id) * 0x1000000ull;
95 static inline uint64_t CVMX_PCSXX_CONTROL2_REG(
unsigned long block_id)
97 switch (cvmx_get_octeon_family()) {
101 return CVMX_ADD_IO_SEG(0x00011800B0000818ull) + (block_id) * 0x8000000ull;
104 return CVMX_ADD_IO_SEG(0x00011800B0000818ull) + (block_id) * 0x8000000ull;
106 return CVMX_ADD_IO_SEG(0x00011800B0000818ull) + (block_id) * 0x1000000ull;
108 return CVMX_ADD_IO_SEG(0x00011800B0000818ull) + (block_id) * 0x1000000ull;
111 static inline uint64_t CVMX_PCSXX_INT_EN_REG(
unsigned long block_id)
113 switch (cvmx_get_octeon_family()) {
117 return CVMX_ADD_IO_SEG(0x00011800B0000860ull) + (block_id) * 0x8000000ull;
120 return CVMX_ADD_IO_SEG(0x00011800B0000860ull) + (block_id) * 0x8000000ull;
122 return CVMX_ADD_IO_SEG(0x00011800B0000860ull) + (block_id) * 0x1000000ull;
124 return CVMX_ADD_IO_SEG(0x00011800B0000860ull) + (block_id) * 0x1000000ull;
127 static inline uint64_t CVMX_PCSXX_INT_REG(
unsigned long block_id)
129 switch (cvmx_get_octeon_family()) {
133 return CVMX_ADD_IO_SEG(0x00011800B0000858ull) + (block_id) * 0x8000000ull;
136 return CVMX_ADD_IO_SEG(0x00011800B0000858ull) + (block_id) * 0x8000000ull;
138 return CVMX_ADD_IO_SEG(0x00011800B0000858ull) + (block_id) * 0x1000000ull;
140 return CVMX_ADD_IO_SEG(0x00011800B0000858ull) + (block_id) * 0x1000000ull;
143 static inline uint64_t CVMX_PCSXX_LOG_ANL_REG(
unsigned long block_id)
145 switch (cvmx_get_octeon_family()) {
149 return CVMX_ADD_IO_SEG(0x00011800B0000868ull) + (block_id) * 0x8000000ull;
152 return CVMX_ADD_IO_SEG(0x00011800B0000868ull) + (block_id) * 0x8000000ull;
154 return CVMX_ADD_IO_SEG(0x00011800B0000868ull) + (block_id) * 0x1000000ull;
156 return CVMX_ADD_IO_SEG(0x00011800B0000868ull) + (block_id) * 0x1000000ull;
159 static inline uint64_t CVMX_PCSXX_MISC_CTL_REG(
unsigned long block_id)
161 switch (cvmx_get_octeon_family()) {
165 return CVMX_ADD_IO_SEG(0x00011800B0000848ull) + (block_id) * 0x8000000ull;
168 return CVMX_ADD_IO_SEG(0x00011800B0000848ull) + (block_id) * 0x8000000ull;
170 return CVMX_ADD_IO_SEG(0x00011800B0000848ull) + (block_id) * 0x1000000ull;
172 return CVMX_ADD_IO_SEG(0x00011800B0000848ull) + (block_id) * 0x1000000ull;
175 static inline uint64_t CVMX_PCSXX_RX_SYNC_STATES_REG(
unsigned long block_id)
177 switch (cvmx_get_octeon_family()) {
181 return CVMX_ADD_IO_SEG(0x00011800B0000838ull) + (block_id) * 0x8000000ull;
184 return CVMX_ADD_IO_SEG(0x00011800B0000838ull) + (block_id) * 0x8000000ull;
186 return CVMX_ADD_IO_SEG(0x00011800B0000838ull) + (block_id) * 0x1000000ull;
188 return CVMX_ADD_IO_SEG(0x00011800B0000838ull) + (block_id) * 0x1000000ull;
191 static inline uint64_t CVMX_PCSXX_SPD_ABIL_REG(
unsigned long block_id)
193 switch (cvmx_get_octeon_family()) {
197 return CVMX_ADD_IO_SEG(0x00011800B0000810ull) + (block_id) * 0x8000000ull;
200 return CVMX_ADD_IO_SEG(0x00011800B0000810ull) + (block_id) * 0x8000000ull;
202 return CVMX_ADD_IO_SEG(0x00011800B0000810ull) + (block_id) * 0x1000000ull;
204 return CVMX_ADD_IO_SEG(0x00011800B0000810ull) + (block_id) * 0x1000000ull;
207 static inline uint64_t CVMX_PCSXX_STATUS1_REG(
unsigned long block_id)
209 switch (cvmx_get_octeon_family()) {
213 return CVMX_ADD_IO_SEG(0x00011800B0000808ull) + (block_id) * 0x8000000ull;
216 return CVMX_ADD_IO_SEG(0x00011800B0000808ull) + (block_id) * 0x8000000ull;
218 return CVMX_ADD_IO_SEG(0x00011800B0000808ull) + (block_id) * 0x1000000ull;
220 return CVMX_ADD_IO_SEG(0x00011800B0000808ull) + (block_id) * 0x1000000ull;
223 static inline uint64_t CVMX_PCSXX_STATUS2_REG(
unsigned long block_id)
225 switch (cvmx_get_octeon_family()) {
229 return CVMX_ADD_IO_SEG(0x00011800B0000820ull) + (block_id) * 0x8000000ull;
232 return CVMX_ADD_IO_SEG(0x00011800B0000820ull) + (block_id) * 0x8000000ull;
234 return CVMX_ADD_IO_SEG(0x00011800B0000820ull) + (block_id) * 0x1000000ull;
236 return CVMX_ADD_IO_SEG(0x00011800B0000820ull) + (block_id) * 0x1000000ull;
239 static inline uint64_t CVMX_PCSXX_TX_RX_POLARITY_REG(
unsigned long block_id)
241 switch (cvmx_get_octeon_family()) {
245 return CVMX_ADD_IO_SEG(0x00011800B0000840ull) + (block_id) * 0x8000000ull;
248 return CVMX_ADD_IO_SEG(0x00011800B0000840ull) + (block_id) * 0x8000000ull;
250 return CVMX_ADD_IO_SEG(0x00011800B0000840ull) + (block_id) * 0x1000000ull;
252 return CVMX_ADD_IO_SEG(0x00011800B0000840ull) + (block_id) * 0x1000000ull;
255 static inline uint64_t CVMX_PCSXX_TX_RX_STATES_REG(
unsigned long block_id)
257 switch (cvmx_get_octeon_family()) {
261 return CVMX_ADD_IO_SEG(0x00011800B0000830ull) + (block_id) * 0x8000000ull;
264 return CVMX_ADD_IO_SEG(0x00011800B0000830ull) + (block_id) * 0x8000000ull;
266 return CVMX_ADD_IO_SEG(0x00011800B0000830ull) + (block_id) * 0x1000000ull;
268 return CVMX_ADD_IO_SEG(0x00011800B0000830ull) + (block_id) * 0x1000000ull;
274 #ifdef __BIG_ENDIAN_BITFIELD
309 #ifdef __BIG_ENDIAN_BITFIELD
332 #ifdef __BIG_ENDIAN_BITFIELD
361 #ifdef __BIG_ENDIAN_BITFIELD
400 #ifdef __BIG_ENDIAN_BITFIELD
423 #ifdef __BIG_ENDIAN_BITFIELD
444 #ifdef __BIG_ENDIAN_BITFIELD
476 #ifdef __BIG_ENDIAN_BITFIELD
497 #ifdef __BIG_ENDIAN_BITFIELD
529 #ifdef __BIG_ENDIAN_BITFIELD
560 #ifdef __BIG_ENDIAN_BITFIELD
589 #ifdef __BIG_ENDIAN_BITFIELD
618 #ifdef __BIG_ENDIAN_BITFIELD
643 #ifdef __BIG_ENDIAN_BITFIELD
674 #ifdef __BIG_ENDIAN_BITFIELD
711 #ifdef __BIG_ENDIAN_BITFIELD
727 #ifdef __BIG_ENDIAN_BITFIELD
750 #ifdef __BIG_ENDIAN_BITFIELD
776 #ifdef __BIG_ENDIAN_BITFIELD