28 #ifndef __CVMX_GMXX_DEFS_H__
29 #define __CVMX_GMXX_DEFS_H__
31 static inline uint64_t CVMX_GMXX_BAD_REG(
unsigned long block_id)
33 switch (cvmx_get_octeon_family()) {
40 return CVMX_ADD_IO_SEG(0x0001180008000518ull) + (block_id) * 0x8000000ull;
46 return CVMX_ADD_IO_SEG(0x0001180008000518ull) + (block_id) * 0x8000000ull;
48 return CVMX_ADD_IO_SEG(0x0001180008000518ull) + (block_id) * 0x1000000ull;
50 return CVMX_ADD_IO_SEG(0x0001180008000518ull) + (block_id) * 0x8000000ull;
53 static inline uint64_t CVMX_GMXX_BIST(
unsigned long block_id)
55 switch (cvmx_get_octeon_family()) {
62 return CVMX_ADD_IO_SEG(0x0001180008000400ull) + (block_id) * 0x8000000ull;
68 return CVMX_ADD_IO_SEG(0x0001180008000400ull) + (block_id) * 0x8000000ull;
70 return CVMX_ADD_IO_SEG(0x0001180008000400ull) + (block_id) * 0x1000000ull;
72 return CVMX_ADD_IO_SEG(0x0001180008000400ull) + (block_id) * 0x8000000ull;
75 #define CVMX_GMXX_BPID_MAPX(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000680ull) + (((offset) & 15) + ((block_id) & 7) * 0x200000ull) * 8)
76 #define CVMX_GMXX_BPID_MSK(block_id) (CVMX_ADD_IO_SEG(0x0001180008000700ull) + ((block_id) & 7) * 0x1000000ull)
77 static inline uint64_t CVMX_GMXX_CLK_EN(
unsigned long block_id)
79 switch (cvmx_get_octeon_family()) {
83 return CVMX_ADD_IO_SEG(0x00011800080007F0ull) + (block_id) * 0x8000000ull;
87 return CVMX_ADD_IO_SEG(0x00011800080007F0ull) + (block_id) * 0x8000000ull;
89 return CVMX_ADD_IO_SEG(0x00011800080007F0ull) + (block_id) * 0x1000000ull;
91 return CVMX_ADD_IO_SEG(0x00011800080007F0ull) + (block_id) * 0x8000000ull;
94 #define CVMX_GMXX_EBP_DIS(block_id) (CVMX_ADD_IO_SEG(0x0001180008000608ull) + ((block_id) & 7) * 0x1000000ull)
95 #define CVMX_GMXX_EBP_MSK(block_id) (CVMX_ADD_IO_SEG(0x0001180008000600ull) + ((block_id) & 7) * 0x1000000ull)
96 static inline uint64_t CVMX_GMXX_HG2_CONTROL(
unsigned long block_id)
98 switch (cvmx_get_octeon_family()) {
102 return CVMX_ADD_IO_SEG(0x0001180008000550ull) + (block_id) * 0x8000000ull;
106 return CVMX_ADD_IO_SEG(0x0001180008000550ull) + (block_id) * 0x8000000ull;
108 return CVMX_ADD_IO_SEG(0x0001180008000550ull) + (block_id) * 0x1000000ull;
110 return CVMX_ADD_IO_SEG(0x0001180008000550ull) + (block_id) * 0x8000000ull;
113 static inline uint64_t CVMX_GMXX_INF_MODE(
unsigned long block_id)
115 switch (cvmx_get_octeon_family()) {
122 return CVMX_ADD_IO_SEG(0x00011800080007F8ull) + (block_id) * 0x8000000ull;
128 return CVMX_ADD_IO_SEG(0x00011800080007F8ull) + (block_id) * 0x8000000ull;
130 return CVMX_ADD_IO_SEG(0x00011800080007F8ull) + (block_id) * 0x1000000ull;
132 return CVMX_ADD_IO_SEG(0x00011800080007F8ull) + (block_id) * 0x8000000ull;
135 static inline uint64_t CVMX_GMXX_NXA_ADR(
unsigned long block_id)
137 switch (cvmx_get_octeon_family()) {
144 return CVMX_ADD_IO_SEG(0x0001180008000510ull) + (block_id) * 0x8000000ull;
150 return CVMX_ADD_IO_SEG(0x0001180008000510ull) + (block_id) * 0x8000000ull;
152 return CVMX_ADD_IO_SEG(0x0001180008000510ull) + (block_id) * 0x1000000ull;
154 return CVMX_ADD_IO_SEG(0x0001180008000510ull) + (block_id) * 0x8000000ull;
157 #define CVMX_GMXX_PIPE_STATUS(block_id) (CVMX_ADD_IO_SEG(0x0001180008000760ull) + ((block_id) & 7) * 0x1000000ull)
158 static inline uint64_t CVMX_GMXX_PRTX_CBFC_CTL(
unsigned long offset,
unsigned long block_id)
160 switch (cvmx_get_octeon_family()) {
164 return CVMX_ADD_IO_SEG(0x0001180008000580ull) + (block_id) * 0x8000000ull;
168 return CVMX_ADD_IO_SEG(0x0001180008000580ull) + (block_id) * 0x8000000ull;
170 return CVMX_ADD_IO_SEG(0x0001180008000580ull) + (block_id) * 0x1000000ull;
172 return CVMX_ADD_IO_SEG(0x0001180008000580ull) + (block_id) * 0x8000000ull;
175 static inline uint64_t CVMX_GMXX_PRTX_CFG(
unsigned long offset,
unsigned long block_id)
177 switch (cvmx_get_octeon_family()) {
200 #define CVMX_GMXX_RXAUI_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180008000740ull) + ((block_id) & 7) * 0x1000000ull)
201 static inline uint64_t CVMX_GMXX_RXX_ADR_CAM0(
unsigned long offset,
unsigned long block_id)
203 switch (cvmx_get_octeon_family()) {
225 static inline uint64_t CVMX_GMXX_RXX_ADR_CAM1(
unsigned long offset,
unsigned long block_id)
227 switch (cvmx_get_octeon_family()) {
249 static inline uint64_t CVMX_GMXX_RXX_ADR_CAM2(
unsigned long offset,
unsigned long block_id)
251 switch (cvmx_get_octeon_family()) {
273 static inline uint64_t CVMX_GMXX_RXX_ADR_CAM3(
unsigned long offset,
unsigned long block_id)
275 switch (cvmx_get_octeon_family()) {
297 static inline uint64_t CVMX_GMXX_RXX_ADR_CAM4(
unsigned long offset,
unsigned long block_id)
299 switch (cvmx_get_octeon_family()) {
321 static inline uint64_t CVMX_GMXX_RXX_ADR_CAM5(
unsigned long offset,
unsigned long block_id)
323 switch (cvmx_get_octeon_family()) {
345 static inline uint64_t CVMX_GMXX_RXX_ADR_CAM_ALL_EN(
unsigned long offset,
unsigned long block_id)
347 switch (cvmx_get_octeon_family()) {
359 static inline uint64_t CVMX_GMXX_RXX_ADR_CAM_EN(
unsigned long offset,
unsigned long block_id)
361 switch (cvmx_get_octeon_family()) {
384 static inline uint64_t CVMX_GMXX_RXX_ADR_CTL(
unsigned long offset,
unsigned long block_id)
386 switch (cvmx_get_octeon_family()) {
409 static inline uint64_t CVMX_GMXX_RXX_DECISION(
unsigned long offset,
unsigned long block_id)
411 switch (cvmx_get_octeon_family()) {
434 static inline uint64_t CVMX_GMXX_RXX_FRM_CHK(
unsigned long offset,
unsigned long block_id)
436 switch (cvmx_get_octeon_family()) {
459 static inline uint64_t CVMX_GMXX_RXX_FRM_CTL(
unsigned long offset,
unsigned long block_id)
461 switch (cvmx_get_octeon_family()) {
484 #define CVMX_GMXX_RXX_FRM_MAX(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000030ull) + (((offset) & 3) + ((block_id) & 1) * 0x10000ull) * 2048)
485 #define CVMX_GMXX_RXX_FRM_MIN(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000028ull) + (((offset) & 3) + ((block_id) & 1) * 0x10000ull) * 2048)
486 static inline uint64_t CVMX_GMXX_RXX_IFG(
unsigned long offset,
unsigned long block_id)
488 switch (cvmx_get_octeon_family()) {
511 static inline uint64_t CVMX_GMXX_RXX_INT_EN(
unsigned long offset,
unsigned long block_id)
513 switch (cvmx_get_octeon_family()) {
536 static inline uint64_t CVMX_GMXX_RXX_INT_REG(
unsigned long offset,
unsigned long block_id)
538 switch (cvmx_get_octeon_family()) {
561 static inline uint64_t CVMX_GMXX_RXX_JABBER(
unsigned long offset,
unsigned long block_id)
563 switch (cvmx_get_octeon_family()) {
586 static inline uint64_t CVMX_GMXX_RXX_PAUSE_DROP_TIME(
unsigned long offset,
unsigned long block_id)
588 switch (cvmx_get_octeon_family()) {
608 #define CVMX_GMXX_RXX_RX_INBND(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000060ull) + (((offset) & 3) + ((block_id) & 1) * 0x10000ull) * 2048)
609 static inline uint64_t CVMX_GMXX_RXX_STATS_CTL(
unsigned long offset,
unsigned long block_id)
611 switch (cvmx_get_octeon_family()) {
634 static inline uint64_t CVMX_GMXX_RXX_STATS_OCTS(
unsigned long offset,
unsigned long block_id)
636 switch (cvmx_get_octeon_family()) {
659 static inline uint64_t CVMX_GMXX_RXX_STATS_OCTS_CTL(
unsigned long offset,
unsigned long block_id)
661 switch (cvmx_get_octeon_family()) {
684 static inline uint64_t CVMX_GMXX_RXX_STATS_OCTS_DMAC(
unsigned long offset,
unsigned long block_id)
686 switch (cvmx_get_octeon_family()) {
709 static inline uint64_t CVMX_GMXX_RXX_STATS_OCTS_DRP(
unsigned long offset,
unsigned long block_id)
711 switch (cvmx_get_octeon_family()) {
734 static inline uint64_t CVMX_GMXX_RXX_STATS_PKTS(
unsigned long offset,
unsigned long block_id)
736 switch (cvmx_get_octeon_family()) {
759 static inline uint64_t CVMX_GMXX_RXX_STATS_PKTS_BAD(
unsigned long offset,
unsigned long block_id)
761 switch (cvmx_get_octeon_family()) {
784 static inline uint64_t CVMX_GMXX_RXX_STATS_PKTS_CTL(
unsigned long offset,
unsigned long block_id)
786 switch (cvmx_get_octeon_family()) {
809 static inline uint64_t CVMX_GMXX_RXX_STATS_PKTS_DMAC(
unsigned long offset,
unsigned long block_id)
811 switch (cvmx_get_octeon_family()) {
834 static inline uint64_t CVMX_GMXX_RXX_STATS_PKTS_DRP(
unsigned long offset,
unsigned long block_id)
836 switch (cvmx_get_octeon_family()) {
859 static inline uint64_t CVMX_GMXX_RXX_UDD_SKP(
unsigned long offset,
unsigned long block_id)
861 switch (cvmx_get_octeon_family()) {
884 static inline uint64_t CVMX_GMXX_RX_BP_DROPX(
unsigned long offset,
unsigned long block_id)
886 switch (cvmx_get_octeon_family()) {
909 static inline uint64_t CVMX_GMXX_RX_BP_OFFX(
unsigned long offset,
unsigned long block_id)
911 switch (cvmx_get_octeon_family()) {
934 static inline uint64_t CVMX_GMXX_RX_BP_ONX(
unsigned long offset,
unsigned long block_id)
936 switch (cvmx_get_octeon_family()) {
959 static inline uint64_t CVMX_GMXX_RX_HG2_STATUS(
unsigned long block_id)
961 switch (cvmx_get_octeon_family()) {
965 return CVMX_ADD_IO_SEG(0x0001180008000548ull) + (block_id) * 0x8000000ull;
969 return CVMX_ADD_IO_SEG(0x0001180008000548ull) + (block_id) * 0x8000000ull;
971 return CVMX_ADD_IO_SEG(0x0001180008000548ull) + (block_id) * 0x1000000ull;
973 return CVMX_ADD_IO_SEG(0x0001180008000548ull) + (block_id) * 0x8000000ull;
976 #define CVMX_GMXX_RX_PASS_EN(block_id) (CVMX_ADD_IO_SEG(0x00011800080005F8ull) + ((block_id) & 1) * 0x8000000ull)
977 #define CVMX_GMXX_RX_PASS_MAPX(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000600ull) + (((offset) & 15) + ((block_id) & 1) * 0x1000000ull) * 8)
978 static inline uint64_t CVMX_GMXX_RX_PRTS(
unsigned long block_id)
980 switch (cvmx_get_octeon_family()) {
987 return CVMX_ADD_IO_SEG(0x0001180008000410ull) + (block_id) * 0x8000000ull;
993 return CVMX_ADD_IO_SEG(0x0001180008000410ull) + (block_id) * 0x8000000ull;
995 return CVMX_ADD_IO_SEG(0x0001180008000410ull) + (block_id) * 0x1000000ull;
997 return CVMX_ADD_IO_SEG(0x0001180008000410ull) + (block_id) * 0x8000000ull;
1000 static inline uint64_t CVMX_GMXX_RX_PRT_INFO(
unsigned long block_id)
1002 switch (cvmx_get_octeon_family()) {
1009 return CVMX_ADD_IO_SEG(0x00011800080004E8ull) + (block_id) * 0x8000000ull;
1015 return CVMX_ADD_IO_SEG(0x00011800080004E8ull) + (block_id) * 0x8000000ull;
1017 return CVMX_ADD_IO_SEG(0x00011800080004E8ull) + (block_id) * 0x1000000ull;
1019 return CVMX_ADD_IO_SEG(0x00011800080004E8ull) + (block_id) * 0x8000000ull;
1022 #define CVMX_GMXX_RX_TX_STATUS(block_id) (CVMX_ADD_IO_SEG(0x00011800080007E8ull))
1023 static inline uint64_t CVMX_GMXX_RX_XAUI_BAD_COL(
unsigned long block_id)
1025 switch (cvmx_get_octeon_family()) {
1029 return CVMX_ADD_IO_SEG(0x0001180008000538ull) + (block_id) * 0x8000000ull;
1033 return CVMX_ADD_IO_SEG(0x0001180008000538ull) + (block_id) * 0x8000000ull;
1035 return CVMX_ADD_IO_SEG(0x0001180008000538ull) + (block_id) * 0x1000000ull;
1037 return CVMX_ADD_IO_SEG(0x0001180008000538ull) + (block_id) * 0x8000000ull;
1040 static inline uint64_t CVMX_GMXX_RX_XAUI_CTL(
unsigned long block_id)
1042 switch (cvmx_get_octeon_family()) {
1046 return CVMX_ADD_IO_SEG(0x0001180008000530ull) + (block_id) * 0x8000000ull;
1050 return CVMX_ADD_IO_SEG(0x0001180008000530ull) + (block_id) * 0x8000000ull;
1052 return CVMX_ADD_IO_SEG(0x0001180008000530ull) + (block_id) * 0x1000000ull;
1054 return CVMX_ADD_IO_SEG(0x0001180008000530ull) + (block_id) * 0x8000000ull;
1057 static inline uint64_t CVMX_GMXX_SMACX(
unsigned long offset,
unsigned long block_id)
1059 switch (cvmx_get_octeon_family()) {
1082 static inline uint64_t CVMX_GMXX_SOFT_BIST(
unsigned long block_id)
1084 switch (cvmx_get_octeon_family()) {
1086 return CVMX_ADD_IO_SEG(0x00011800080007E8ull) + (block_id) * 0x8000000ull;
1088 return CVMX_ADD_IO_SEG(0x00011800080007E8ull) + (block_id) * 0x8000000ull;
1090 return CVMX_ADD_IO_SEG(0x00011800080007E8ull) + (block_id) * 0x1000000ull;
1092 return CVMX_ADD_IO_SEG(0x00011800080007E8ull) + (block_id) * 0x1000000ull;
1095 static inline uint64_t CVMX_GMXX_STAT_BP(
unsigned long block_id)
1097 switch (cvmx_get_octeon_family()) {
1104 return CVMX_ADD_IO_SEG(0x0001180008000520ull) + (block_id) * 0x8000000ull;
1110 return CVMX_ADD_IO_SEG(0x0001180008000520ull) + (block_id) * 0x8000000ull;
1112 return CVMX_ADD_IO_SEG(0x0001180008000520ull) + (block_id) * 0x1000000ull;
1114 return CVMX_ADD_IO_SEG(0x0001180008000520ull) + (block_id) * 0x8000000ull;
1117 static inline uint64_t CVMX_GMXX_TB_REG(
unsigned long block_id)
1119 switch (cvmx_get_octeon_family()) {
1122 return CVMX_ADD_IO_SEG(0x00011800080007E0ull) + (block_id) * 0x8000000ull;
1124 return CVMX_ADD_IO_SEG(0x00011800080007E0ull) + (block_id) * 0x8000000ull;
1126 return CVMX_ADD_IO_SEG(0x00011800080007E0ull) + (block_id) * 0x1000000ull;
1128 return CVMX_ADD_IO_SEG(0x00011800080007E0ull) + (block_id) * 0x8000000ull;
1131 static inline uint64_t CVMX_GMXX_TXX_APPEND(
unsigned long offset,
unsigned long block_id)
1133 switch (cvmx_get_octeon_family()) {
1156 static inline uint64_t CVMX_GMXX_TXX_BURST(
unsigned long offset,
unsigned long block_id)
1158 switch (cvmx_get_octeon_family()) {
1181 static inline uint64_t CVMX_GMXX_TXX_CBFC_XOFF(
unsigned long offset,
unsigned long block_id)
1183 switch (cvmx_get_octeon_family()) {
1187 return CVMX_ADD_IO_SEG(0x00011800080005A0ull) + (block_id) * 0x8000000ull;
1191 return CVMX_ADD_IO_SEG(0x00011800080005A0ull) + (block_id) * 0x8000000ull;
1193 return CVMX_ADD_IO_SEG(0x00011800080005A0ull) + (block_id) * 0x1000000ull;
1195 return CVMX_ADD_IO_SEG(0x00011800080005A0ull) + (block_id) * 0x8000000ull;
1198 static inline uint64_t CVMX_GMXX_TXX_CBFC_XON(
unsigned long offset,
unsigned long block_id)
1200 switch (cvmx_get_octeon_family()) {
1204 return CVMX_ADD_IO_SEG(0x00011800080005C0ull) + (block_id) * 0x8000000ull;
1208 return CVMX_ADD_IO_SEG(0x00011800080005C0ull) + (block_id) * 0x8000000ull;
1210 return CVMX_ADD_IO_SEG(0x00011800080005C0ull) + (block_id) * 0x1000000ull;
1212 return CVMX_ADD_IO_SEG(0x00011800080005C0ull) + (block_id) * 0x8000000ull;
1215 #define CVMX_GMXX_TXX_CLK(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000208ull) + (((offset) & 3) + ((block_id) & 1) * 0x10000ull) * 2048)
1216 static inline uint64_t CVMX_GMXX_TXX_CTL(
unsigned long offset,
unsigned long block_id)
1218 switch (cvmx_get_octeon_family()) {
1241 static inline uint64_t CVMX_GMXX_TXX_MIN_PKT(
unsigned long offset,
unsigned long block_id)
1243 switch (cvmx_get_octeon_family()) {
1266 static inline uint64_t CVMX_GMXX_TXX_PAUSE_PKT_INTERVAL(
unsigned long offset,
unsigned long block_id)
1268 switch (cvmx_get_octeon_family()) {
1291 static inline uint64_t CVMX_GMXX_TXX_PAUSE_PKT_TIME(
unsigned long offset,
unsigned long block_id)
1293 switch (cvmx_get_octeon_family()) {
1316 static inline uint64_t CVMX_GMXX_TXX_PAUSE_TOGO(
unsigned long offset,
unsigned long block_id)
1318 switch (cvmx_get_octeon_family()) {
1341 static inline uint64_t CVMX_GMXX_TXX_PAUSE_ZERO(
unsigned long offset,
unsigned long block_id)
1343 switch (cvmx_get_octeon_family()) {
1366 #define CVMX_GMXX_TXX_PIPE(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000310ull) + (((offset) & 3) + ((block_id) & 7) * 0x2000ull) * 2048)
1367 static inline uint64_t CVMX_GMXX_TXX_SGMII_CTL(
unsigned long offset,
unsigned long block_id)
1369 switch (cvmx_get_octeon_family()) {
1385 static inline uint64_t CVMX_GMXX_TXX_SLOT(
unsigned long offset,
unsigned long block_id)
1387 switch (cvmx_get_octeon_family()) {
1410 static inline uint64_t CVMX_GMXX_TXX_SOFT_PAUSE(
unsigned long offset,
unsigned long block_id)
1412 switch (cvmx_get_octeon_family()) {
1435 static inline uint64_t CVMX_GMXX_TXX_STAT0(
unsigned long offset,
unsigned long block_id)
1437 switch (cvmx_get_octeon_family()) {
1460 static inline uint64_t CVMX_GMXX_TXX_STAT1(
unsigned long offset,
unsigned long block_id)
1462 switch (cvmx_get_octeon_family()) {
1485 static inline uint64_t CVMX_GMXX_TXX_STAT2(
unsigned long offset,
unsigned long block_id)
1487 switch (cvmx_get_octeon_family()) {
1510 static inline uint64_t CVMX_GMXX_TXX_STAT3(
unsigned long offset,
unsigned long block_id)
1512 switch (cvmx_get_octeon_family()) {
1535 static inline uint64_t CVMX_GMXX_TXX_STAT4(
unsigned long offset,
unsigned long block_id)
1537 switch (cvmx_get_octeon_family()) {
1560 static inline uint64_t CVMX_GMXX_TXX_STAT5(
unsigned long offset,
unsigned long block_id)
1562 switch (cvmx_get_octeon_family()) {
1585 static inline uint64_t CVMX_GMXX_TXX_STAT6(
unsigned long offset,
unsigned long block_id)
1587 switch (cvmx_get_octeon_family()) {
1610 static inline uint64_t CVMX_GMXX_TXX_STAT7(
unsigned long offset,
unsigned long block_id)
1612 switch (cvmx_get_octeon_family()) {
1635 static inline uint64_t CVMX_GMXX_TXX_STAT8(
unsigned long offset,
unsigned long block_id)
1637 switch (cvmx_get_octeon_family()) {
1660 static inline uint64_t CVMX_GMXX_TXX_STAT9(
unsigned long offset,
unsigned long block_id)
1662 switch (cvmx_get_octeon_family()) {
1685 static inline uint64_t CVMX_GMXX_TXX_STATS_CTL(
unsigned long offset,
unsigned long block_id)
1687 switch (cvmx_get_octeon_family()) {
1710 static inline uint64_t CVMX_GMXX_TXX_THRESH(
unsigned long offset,
unsigned long block_id)
1712 switch (cvmx_get_octeon_family()) {
1735 static inline uint64_t CVMX_GMXX_TX_BP(
unsigned long block_id)
1737 switch (cvmx_get_octeon_family()) {
1744 return CVMX_ADD_IO_SEG(0x00011800080004D0ull) + (block_id) * 0x8000000ull;
1750 return CVMX_ADD_IO_SEG(0x00011800080004D0ull) + (block_id) * 0x8000000ull;
1752 return CVMX_ADD_IO_SEG(0x00011800080004D0ull) + (block_id) * 0x1000000ull;
1754 return CVMX_ADD_IO_SEG(0x00011800080004D0ull) + (block_id) * 0x8000000ull;
1757 #define CVMX_GMXX_TX_CLK_MSKX(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000780ull) + (((offset) & 1) + ((block_id) & 0) * 0x0ull) * 8)
1758 static inline uint64_t CVMX_GMXX_TX_COL_ATTEMPT(
unsigned long block_id)
1760 switch (cvmx_get_octeon_family()) {
1767 return CVMX_ADD_IO_SEG(0x0001180008000498ull) + (block_id) * 0x8000000ull;
1773 return CVMX_ADD_IO_SEG(0x0001180008000498ull) + (block_id) * 0x8000000ull;
1775 return CVMX_ADD_IO_SEG(0x0001180008000498ull) + (block_id) * 0x1000000ull;
1777 return CVMX_ADD_IO_SEG(0x0001180008000498ull) + (block_id) * 0x8000000ull;
1780 static inline uint64_t CVMX_GMXX_TX_CORRUPT(
unsigned long block_id)
1782 switch (cvmx_get_octeon_family()) {
1789 return CVMX_ADD_IO_SEG(0x00011800080004D8ull) + (block_id) * 0x8000000ull;
1795 return CVMX_ADD_IO_SEG(0x00011800080004D8ull) + (block_id) * 0x8000000ull;
1797 return CVMX_ADD_IO_SEG(0x00011800080004D8ull) + (block_id) * 0x1000000ull;
1799 return CVMX_ADD_IO_SEG(0x00011800080004D8ull) + (block_id) * 0x8000000ull;
1802 static inline uint64_t CVMX_GMXX_TX_HG2_REG1(
unsigned long block_id)
1804 switch (cvmx_get_octeon_family()) {
1808 return CVMX_ADD_IO_SEG(0x0001180008000558ull) + (block_id) * 0x8000000ull;
1812 return CVMX_ADD_IO_SEG(0x0001180008000558ull) + (block_id) * 0x8000000ull;
1814 return CVMX_ADD_IO_SEG(0x0001180008000558ull) + (block_id) * 0x1000000ull;
1816 return CVMX_ADD_IO_SEG(0x0001180008000558ull) + (block_id) * 0x8000000ull;
1819 static inline uint64_t CVMX_GMXX_TX_HG2_REG2(
unsigned long block_id)
1821 switch (cvmx_get_octeon_family()) {
1825 return CVMX_ADD_IO_SEG(0x0001180008000560ull) + (block_id) * 0x8000000ull;
1829 return CVMX_ADD_IO_SEG(0x0001180008000560ull) + (block_id) * 0x8000000ull;
1831 return CVMX_ADD_IO_SEG(0x0001180008000560ull) + (block_id) * 0x1000000ull;
1833 return CVMX_ADD_IO_SEG(0x0001180008000560ull) + (block_id) * 0x8000000ull;
1836 static inline uint64_t CVMX_GMXX_TX_IFG(
unsigned long block_id)
1838 switch (cvmx_get_octeon_family()) {
1845 return CVMX_ADD_IO_SEG(0x0001180008000488ull) + (block_id) * 0x8000000ull;
1851 return CVMX_ADD_IO_SEG(0x0001180008000488ull) + (block_id) * 0x8000000ull;
1853 return CVMX_ADD_IO_SEG(0x0001180008000488ull) + (block_id) * 0x1000000ull;
1855 return CVMX_ADD_IO_SEG(0x0001180008000488ull) + (block_id) * 0x8000000ull;
1858 static inline uint64_t CVMX_GMXX_TX_INT_EN(
unsigned long block_id)
1860 switch (cvmx_get_octeon_family()) {
1867 return CVMX_ADD_IO_SEG(0x0001180008000508ull) + (block_id) * 0x8000000ull;
1873 return CVMX_ADD_IO_SEG(0x0001180008000508ull) + (block_id) * 0x8000000ull;
1875 return CVMX_ADD_IO_SEG(0x0001180008000508ull) + (block_id) * 0x1000000ull;
1877 return CVMX_ADD_IO_SEG(0x0001180008000508ull) + (block_id) * 0x8000000ull;
1880 static inline uint64_t CVMX_GMXX_TX_INT_REG(
unsigned long block_id)
1882 switch (cvmx_get_octeon_family()) {
1889 return CVMX_ADD_IO_SEG(0x0001180008000500ull) + (block_id) * 0x8000000ull;
1895 return CVMX_ADD_IO_SEG(0x0001180008000500ull) + (block_id) * 0x8000000ull;
1897 return CVMX_ADD_IO_SEG(0x0001180008000500ull) + (block_id) * 0x1000000ull;
1899 return CVMX_ADD_IO_SEG(0x0001180008000500ull) + (block_id) * 0x8000000ull;
1902 static inline uint64_t CVMX_GMXX_TX_JAM(
unsigned long block_id)
1904 switch (cvmx_get_octeon_family()) {
1911 return CVMX_ADD_IO_SEG(0x0001180008000490ull) + (block_id) * 0x8000000ull;
1917 return CVMX_ADD_IO_SEG(0x0001180008000490ull) + (block_id) * 0x8000000ull;
1919 return CVMX_ADD_IO_SEG(0x0001180008000490ull) + (block_id) * 0x1000000ull;
1921 return CVMX_ADD_IO_SEG(0x0001180008000490ull) + (block_id) * 0x8000000ull;
1924 static inline uint64_t CVMX_GMXX_TX_LFSR(
unsigned long block_id)
1926 switch (cvmx_get_octeon_family()) {
1933 return CVMX_ADD_IO_SEG(0x00011800080004F8ull) + (block_id) * 0x8000000ull;
1939 return CVMX_ADD_IO_SEG(0x00011800080004F8ull) + (block_id) * 0x8000000ull;
1941 return CVMX_ADD_IO_SEG(0x00011800080004F8ull) + (block_id) * 0x1000000ull;
1943 return CVMX_ADD_IO_SEG(0x00011800080004F8ull) + (block_id) * 0x8000000ull;
1946 static inline uint64_t CVMX_GMXX_TX_OVR_BP(
unsigned long block_id)
1948 switch (cvmx_get_octeon_family()) {
1955 return CVMX_ADD_IO_SEG(0x00011800080004C8ull) + (block_id) * 0x8000000ull;
1961 return CVMX_ADD_IO_SEG(0x00011800080004C8ull) + (block_id) * 0x8000000ull;
1963 return CVMX_ADD_IO_SEG(0x00011800080004C8ull) + (block_id) * 0x1000000ull;
1965 return CVMX_ADD_IO_SEG(0x00011800080004C8ull) + (block_id) * 0x8000000ull;
1968 static inline uint64_t CVMX_GMXX_TX_PAUSE_PKT_DMAC(
unsigned long block_id)
1970 switch (cvmx_get_octeon_family()) {
1977 return CVMX_ADD_IO_SEG(0x00011800080004A0ull) + (block_id) * 0x8000000ull;
1983 return CVMX_ADD_IO_SEG(0x00011800080004A0ull) + (block_id) * 0x8000000ull;
1985 return CVMX_ADD_IO_SEG(0x00011800080004A0ull) + (block_id) * 0x1000000ull;
1987 return CVMX_ADD_IO_SEG(0x00011800080004A0ull) + (block_id) * 0x8000000ull;
1990 static inline uint64_t CVMX_GMXX_TX_PAUSE_PKT_TYPE(
unsigned long block_id)
1992 switch (cvmx_get_octeon_family()) {
1999 return CVMX_ADD_IO_SEG(0x00011800080004A8ull) + (block_id) * 0x8000000ull;
2005 return CVMX_ADD_IO_SEG(0x00011800080004A8ull) + (block_id) * 0x8000000ull;
2007 return CVMX_ADD_IO_SEG(0x00011800080004A8ull) + (block_id) * 0x1000000ull;
2009 return CVMX_ADD_IO_SEG(0x00011800080004A8ull) + (block_id) * 0x8000000ull;
2012 static inline uint64_t CVMX_GMXX_TX_PRTS(
unsigned long block_id)
2014 switch (cvmx_get_octeon_family()) {
2021 return CVMX_ADD_IO_SEG(0x0001180008000480ull) + (block_id) * 0x8000000ull;
2027 return CVMX_ADD_IO_SEG(0x0001180008000480ull) + (block_id) * 0x8000000ull;
2029 return CVMX_ADD_IO_SEG(0x0001180008000480ull) + (block_id) * 0x1000000ull;
2031 return CVMX_ADD_IO_SEG(0x0001180008000480ull) + (block_id) * 0x8000000ull;
2034 #define CVMX_GMXX_TX_SPI_CTL(block_id) (CVMX_ADD_IO_SEG(0x00011800080004C0ull) + ((block_id) & 1) * 0x8000000ull)
2035 #define CVMX_GMXX_TX_SPI_DRAIN(block_id) (CVMX_ADD_IO_SEG(0x00011800080004E0ull) + ((block_id) & 1) * 0x8000000ull)
2036 #define CVMX_GMXX_TX_SPI_MAX(block_id) (CVMX_ADD_IO_SEG(0x00011800080004B0ull) + ((block_id) & 1) * 0x8000000ull)
2037 #define CVMX_GMXX_TX_SPI_ROUNDX(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180008000680ull) + (((offset) & 31) + ((block_id) & 1) * 0x1000000ull) * 8)
2038 #define CVMX_GMXX_TX_SPI_THRESH(block_id) (CVMX_ADD_IO_SEG(0x00011800080004B8ull) + ((block_id) & 1) * 0x8000000ull)
2039 static inline uint64_t CVMX_GMXX_TX_XAUI_CTL(
unsigned long block_id)
2041 switch (cvmx_get_octeon_family()) {
2045 return CVMX_ADD_IO_SEG(0x0001180008000528ull) + (block_id) * 0x8000000ull;
2049 return CVMX_ADD_IO_SEG(0x0001180008000528ull) + (block_id) * 0x8000000ull;
2051 return CVMX_ADD_IO_SEG(0x0001180008000528ull) + (block_id) * 0x1000000ull;
2053 return CVMX_ADD_IO_SEG(0x0001180008000528ull) + (block_id) * 0x8000000ull;
2056 static inline uint64_t CVMX_GMXX_XAUI_EXT_LOOPBACK(
unsigned long block_id)
2058 switch (cvmx_get_octeon_family()) {
2062 return CVMX_ADD_IO_SEG(0x0001180008000540ull) + (block_id) * 0x8000000ull;
2066 return CVMX_ADD_IO_SEG(0x0001180008000540ull) + (block_id) * 0x8000000ull;
2068 return CVMX_ADD_IO_SEG(0x0001180008000540ull) + (block_id) * 0x1000000ull;
2070 return CVMX_ADD_IO_SEG(0x0001180008000540ull) + (block_id) * 0x8000000ull;
2076 #ifdef __BIG_ENDIAN_BITFIELD
2097 #ifdef __BIG_ENDIAN_BITFIELD
2122 #ifdef __BIG_ENDIAN_BITFIELD
2157 #ifdef __BIG_ENDIAN_BITFIELD
2166 #ifdef __BIG_ENDIAN_BITFIELD
2178 #ifdef __BIG_ENDIAN_BITFIELD
2187 #ifdef __BIG_ENDIAN_BITFIELD
2199 #ifdef __BIG_ENDIAN_BITFIELD
2220 #ifdef __BIG_ENDIAN_BITFIELD
2243 #ifdef __BIG_ENDIAN_BITFIELD
2262 #ifdef __BIG_ENDIAN_BITFIELD
2286 #ifdef __BIG_ENDIAN_BITFIELD
2301 #ifdef __BIG_ENDIAN_BITFIELD
2316 #ifdef __BIG_ENDIAN_BITFIELD
2345 #ifdef __BIG_ENDIAN_BITFIELD
2370 #ifdef __BIG_ENDIAN_BITFIELD
2383 #ifdef __BIG_ENDIAN_BITFIELD
2397 #ifdef __BIG_ENDIAN_BITFIELD
2421 #ifdef __BIG_ENDIAN_BITFIELD
2442 #ifdef __BIG_ENDIAN_BITFIELD
2465 #ifdef __BIG_ENDIAN_BITFIELD
2490 #ifdef __BIG_ENDIAN_BITFIELD
2503 #ifdef __BIG_ENDIAN_BITFIELD
2533 #ifdef __BIG_ENDIAN_BITFIELD
2556 #ifdef __BIG_ENDIAN_BITFIELD
2590 #ifdef __BIG_ENDIAN_BITFIELD
2619 #ifdef __BIG_ENDIAN_BITFIELD
2638 #ifdef __BIG_ENDIAN_BITFIELD
2679 #ifdef __BIG_ENDIAN_BITFIELD
2708 #ifdef __BIG_ENDIAN_BITFIELD
2737 #ifdef __BIG_ENDIAN_BITFIELD
2766 #ifdef __BIG_ENDIAN_BITFIELD
2795 #ifdef __BIG_ENDIAN_BITFIELD
2824 #ifdef __BIG_ENDIAN_BITFIELD
2853 #ifdef __BIG_ENDIAN_BITFIELD
2870 #ifdef __BIG_ENDIAN_BITFIELD
2901 #ifdef __BIG_ENDIAN_BITFIELD
2936 #ifdef __BIG_ENDIAN_BITFIELD
2967 #ifdef __BIG_ENDIAN_BITFIELD
2998 #ifdef __BIG_ENDIAN_BITFIELD
3025 #ifdef __BIG_ENDIAN_BITFIELD
3053 #ifdef __BIG_ENDIAN_BITFIELD
3086 #ifdef __BIG_ENDIAN_BITFIELD
3119 #ifdef __BIG_ENDIAN_BITFIELD
3144 #ifdef __BIG_ENDIAN_BITFIELD
3169 #ifdef __BIG_ENDIAN_BITFIELD
3199 #ifdef __BIG_ENDIAN_BITFIELD
3224 #ifdef __BIG_ENDIAN_BITFIELD
3254 #ifdef __BIG_ENDIAN_BITFIELD
3295 #ifdef __BIG_ENDIAN_BITFIELD
3314 #ifdef __BIG_ENDIAN_BITFIELD
3333 #ifdef __BIG_ENDIAN_BITFIELD
3364 #ifdef __BIG_ENDIAN_BITFIELD
3429 #ifdef __BIG_ENDIAN_BITFIELD
3477 #ifdef __BIG_ENDIAN_BITFIELD
3524 #ifdef __BIG_ENDIAN_BITFIELD
3585 #ifdef __BIG_ENDIAN_BITFIELD
3640 #ifdef __BIG_ENDIAN_BITFIELD
3688 #ifdef __BIG_ENDIAN_BITFIELD
3757 #ifdef __BIG_ENDIAN_BITFIELD
3822 #ifdef __BIG_ENDIAN_BITFIELD
3870 #ifdef __BIG_ENDIAN_BITFIELD
3917 #ifdef __BIG_ENDIAN_BITFIELD
3978 #ifdef __BIG_ENDIAN_BITFIELD
4033 #ifdef __BIG_ENDIAN_BITFIELD
4081 #ifdef __BIG_ENDIAN_BITFIELD
4150 #ifdef __BIG_ENDIAN_BITFIELD
4181 #ifdef __BIG_ENDIAN_BITFIELD
4208 #ifdef __BIG_ENDIAN_BITFIELD
4232 #ifdef __BIG_ENDIAN_BITFIELD
4263 #ifdef __BIG_ENDIAN_BITFIELD
4294 #ifdef __BIG_ENDIAN_BITFIELD
4325 #ifdef __BIG_ENDIAN_BITFIELD
4356 #ifdef __BIG_ENDIAN_BITFIELD
4387 #ifdef __BIG_ENDIAN_BITFIELD
4418 #ifdef __BIG_ENDIAN_BITFIELD
4449 #ifdef __BIG_ENDIAN_BITFIELD
4480 #ifdef __BIG_ENDIAN_BITFIELD
4511 #ifdef __BIG_ENDIAN_BITFIELD
4542 #ifdef __BIG_ENDIAN_BITFIELD
4577 #ifdef __BIG_ENDIAN_BITFIELD
4608 #ifdef __BIG_ENDIAN_BITFIELD
4639 #ifdef __BIG_ENDIAN_BITFIELD
4648 #ifdef __BIG_ENDIAN_BITFIELD
4678 #ifdef __BIG_ENDIAN_BITFIELD
4705 #ifdef __BIG_ENDIAN_BITFIELD
4722 #ifdef __BIG_ENDIAN_BITFIELD
4739 #ifdef __BIG_ENDIAN_BITFIELD
4750 #ifdef __BIG_ENDIAN_BITFIELD
4766 #ifdef __BIG_ENDIAN_BITFIELD
4790 #ifdef __BIG_ENDIAN_BITFIELD
4807 #ifdef __BIG_ENDIAN_BITFIELD
4838 #ifdef __BIG_ENDIAN_BITFIELD
4858 #ifdef __BIG_ENDIAN_BITFIELD
4888 #ifdef __BIG_ENDIAN_BITFIELD
4912 #ifdef __BIG_ENDIAN_BITFIELD
4927 #ifdef __BIG_ENDIAN_BITFIELD
4958 #ifdef __BIG_ENDIAN_BITFIELD
4978 #ifdef __BIG_ENDIAN_BITFIELD
5011 #ifdef __BIG_ENDIAN_BITFIELD
5028 #ifdef __BIG_ENDIAN_BITFIELD
5065 #ifdef __BIG_ENDIAN_BITFIELD
5096 #ifdef __BIG_ENDIAN_BITFIELD
5118 #ifdef __BIG_ENDIAN_BITFIELD
5140 #ifdef __BIG_ENDIAN_BITFIELD
5160 #ifdef __BIG_ENDIAN_BITFIELD
5193 #ifdef __BIG_ENDIAN_BITFIELD
5224 #ifdef __BIG_ENDIAN_BITFIELD
5255 #ifdef __BIG_ENDIAN_BITFIELD
5286 #ifdef __BIG_ENDIAN_BITFIELD
5297 #ifdef __BIG_ENDIAN_BITFIELD
5327 #ifdef __BIG_ENDIAN_BITFIELD
5358 #ifdef __BIG_ENDIAN_BITFIELD
5381 #ifdef __BIG_ENDIAN_BITFIELD
5405 #ifdef __BIG_ENDIAN_BITFIELD
5436 #ifdef __BIG_ENDIAN_BITFIELD
5467 #ifdef __BIG_ENDIAN_BITFIELD
5498 #ifdef __BIG_ENDIAN_BITFIELD
5529 #ifdef __BIG_ENDIAN_BITFIELD
5560 #ifdef __BIG_ENDIAN_BITFIELD
5591 #ifdef __BIG_ENDIAN_BITFIELD
5622 #ifdef __BIG_ENDIAN_BITFIELD
5653 #ifdef __BIG_ENDIAN_BITFIELD
5684 #ifdef __BIG_ENDIAN_BITFIELD
5715 #ifdef __BIG_ENDIAN_BITFIELD
5746 #ifdef __BIG_ENDIAN_BITFIELD
5777 #ifdef __BIG_ENDIAN_BITFIELD
5808 #ifdef __BIG_ENDIAN_BITFIELD
5817 #ifdef __BIG_ENDIAN_BITFIELD
5827 #ifdef __BIG_ENDIAN_BITFIELD
5855 #ifdef __BIG_ENDIAN_BITFIELD
5864 #ifdef __BIG_ENDIAN_BITFIELD
5889 #ifdef __BIG_ENDIAN_BITFIELD
5902 #ifdef __BIG_ENDIAN_BITFIELD
5917 #ifdef __BIG_ENDIAN_BITFIELD
5948 #ifdef __BIG_ENDIAN_BITFIELD
5957 #ifdef __BIG_ENDIAN_BITFIELD
5982 #ifdef __BIG_ENDIAN_BITFIELD
5995 #ifdef __BIG_ENDIAN_BITFIELD
6018 #ifdef __BIG_ENDIAN_BITFIELD
6041 #ifdef __BIG_ENDIAN_BITFIELD
6074 #ifdef __BIG_ENDIAN_BITFIELD
6099 #ifdef __BIG_ENDIAN_BITFIELD
6124 #ifdef __BIG_ENDIAN_BITFIELD
6145 #ifdef __BIG_ENDIAN_BITFIELD
6166 #ifdef __BIG_ENDIAN_BITFIELD
6186 #ifdef __BIG_ENDIAN_BITFIELD
6213 #ifdef __BIG_ENDIAN_BITFIELD
6238 #ifdef __BIG_ENDIAN_BITFIELD
6264 #ifdef __BIG_ENDIAN_BITFIELD
6301 #ifdef __BIG_ENDIAN_BITFIELD
6326 #ifdef __BIG_ENDIAN_BITFIELD
6351 #ifdef __BIG_ENDIAN_BITFIELD
6372 #ifdef __BIG_ENDIAN_BITFIELD
6393 #ifdef __BIG_ENDIAN_BITFIELD
6413 #ifdef __BIG_ENDIAN_BITFIELD
6440 #ifdef __BIG_ENDIAN_BITFIELD
6465 #ifdef __BIG_ENDIAN_BITFIELD
6491 #ifdef __BIG_ENDIAN_BITFIELD
6528 #ifdef __BIG_ENDIAN_BITFIELD
6559 #ifdef __BIG_ENDIAN_BITFIELD
6590 #ifdef __BIG_ENDIAN_BITFIELD
6607 #ifdef __BIG_ENDIAN_BITFIELD
6625 #ifdef __BIG_ENDIAN_BITFIELD
6652 #ifdef __BIG_ENDIAN_BITFIELD
6677 #ifdef __BIG_ENDIAN_BITFIELD
6708 #ifdef __BIG_ENDIAN_BITFIELD
6739 #ifdef __BIG_ENDIAN_BITFIELD
6770 #ifdef __BIG_ENDIAN_BITFIELD
6789 #ifdef __BIG_ENDIAN_BITFIELD
6805 #ifdef __BIG_ENDIAN_BITFIELD
6818 #ifdef __BIG_ENDIAN_BITFIELD
6836 #ifdef __BIG_ENDIAN_BITFIELD
6851 #ifdef __BIG_ENDIAN_BITFIELD
6868 #ifdef __BIG_ENDIAN_BITFIELD
6906 #ifdef __BIG_ENDIAN_BITFIELD