40 #ifndef _DEV_GTETHREG_H_ 41 #define _DEV_GTETHREG_H_ 43 #define ETH__BIT(bit) (1U << (bit)) 44 #define ETH__LLBIT(bit) (1ULL << (bit)) 45 #define ETH__MASK(bit) (ETH__BIT(bit) - 1) 46 #define ETH__LLMASK(bit) (ETH__LLBIT(bit) - 1) 47 #define ETH__GEN(n, off) (0x2400+((n) << 10)+(ETH__ ## off)) 48 #define ETH__EXT(data, bit, len) (((data) >> (bit)) & ETH__MASK(len)) 49 #define ETH__LLEXT(data, bit, len) (((data) >> (bit)) & ETH__LLMASK(len)) 50 #define ETH__CLR(data, bit, len) ((data) &= ~(ETH__MASK(len) << (bit))) 51 #define ETH__INS(new, bit) ((new) << (bit)) 52 #define ETH__LLINS(new, bit) ((unsigned long long)(new) << (bit)) 62 #if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN 68 #if defined(BYTE_ORDER) && BYTE_ORDER == LITTLE_ENDIAN 77 #define RxBSnoopEn ETH__BIT(6) 78 #define TxBSnoopEn ETH__BIT(14) 79 #define RxDSnoopEn ETH__BIT(22) 80 #define TxDSnoopEn ETH__BIT(30) 83 #define HashSnoopEn ETH__BIT(6) 86 #define GT_CUU_Eth0_AddrCtrlLow 0xf200 87 #define GT_CUU_Eth0_AddrCtrlHigh 0xf204 94 #define TX_STS_LC ETH__BIT(5) 95 #define TX_STS_UR ETH__BIT(6) 96 #define TX_STS_RL ETH__BIT(8) 97 #define TX_STS_COL ETH__BIT(9) 98 #define TX_STS_RC(v) ETH__GETBITS(v, 10, 4) 99 #define TX_STS_ES ETH__BIT(15) 100 #define TX_CMD_L ETH__BIT(16) 101 #define TX_CMD_F ETH__BIT(17) 102 #define TX_CMD_P ETH__BIT(18) 103 #define TX_CMD_GC ETH__BIT(22) 104 #define TX_CMD_EI ETH__BIT(23) 105 #define TX_CMD_AM ETH__BIT(30) 106 #define TX_CMD_O ETH__BIT(31) 108 #define TX_CMD_FIRST (TX_CMD_F|TX_CMD_O) 109 #define TX_CMD_LAST (TX_CMD_L|TX_CMD_GC|TX_CMD_P|TX_CMD_O) 115 #define RX_STS_CE ETH__BIT(0) 116 #define RX_STS_COL ETH__BIT(1) 117 #define RX_STS_LC ETH__BIT(5) 118 #define RX_STS_OR ETH__BIT(6) 119 #define RX_STS_MFL ETH__BIT(7) 120 #define RX_STS_SF ETH__BIT(8) 121 #define RX_STS_FT ETH__BIT(11) 122 #define RX_STS_M ETH__BIT(12) 123 #define RX_STS_HE ETH__BIT(13) 124 #define RX_STS_IGMP ETH__BIT(14) 125 #define RX_STS_ES ETH__BIT(15) 126 #define RX_CMD_L ETH__BIT(16) 127 #define RX_CMD_F ETH__BIT(17) 128 #define RX_CMD_EI ETH__BIT(23) 129 #define RX_CMD_AM ETH__BIT(30) 130 #define RX_CMD_O ETH__BIT(31) 134 #define HSH_V ETH__LLBIT(0) 135 #define HSH_S ETH__LLBIT(1) 136 #define HSH_RD ETH__LLBIT(2) 137 #define HSH_R ETH__LLBIT(2) 138 #define HSH_PRIO_GET(v) ETH__LLEXT(v, 51, 2) 139 #define HSH_PRIO_INS(v) ETH__LLINS(v, 51) 140 #define HSH_ADDR_MASK 0x7fffff8LLU 144 #define ETH_EPAR 0x2000 145 #define ETH_ESMIR 0x2010 147 #define ETH_BASE_ETH0 0x2400 148 #define ETH_BASE_ETH1 0x2800 149 #define ETH_BASE_ETH2 0x2c00 150 #define ETH_SIZE 0x0400 152 #define ETH__EBASE 0x0000 153 #define ETH__EPCR 0x0000 154 #define ETH__EPCXR 0x0008 155 #define ETH__EPCMR 0x0010 156 #define ETH__EPSR 0x0018 157 #define ETH__ESPR 0x0020 158 #define ETH__EHTPR 0x0028 159 #define ETH__EFCSAL 0x0030 160 #define ETH__EFCSAH 0x0038 161 #define ETH__ESDCR 0x0040 162 #define ETH__ESDCMR 0x0048 163 #define ETH__EICR 0x0050 164 #define ETH__EIMR 0x0058 165 #define ETH__EFRDP0 0x0080 166 #define ETH__EFRDP1 0x0084 167 #define ETH__EFRDP2 0x0088 168 #define ETH__EFRDP3 0x008c 169 #define ETH__ECRDP0 0x00a0 170 #define ETH__ECRDP1 0x00a4 171 #define ETH__ECRDP2 0x00a8 172 #define ETH__ECRDP3 0x00ac 173 #define ETH__ECTDP0 0x00e0 174 #define ETH__ECTDP1 0x00e4 175 #define ETH__EDSCP2P0L 0x0060 177 #define ETH__EDSCP2P0H 0x0064 179 #define ETH__EDSCP2P1L 0x0068 181 #define ETH__EDSCP2P1H 0x006c 183 #define ETH__EVPT2P 0x0068 184 #define ETH__EMIBCTRS 0x0100 187 #define ETH0_EBASE 0x2400 188 #define ETH0_EPCR 0x2400 189 #define ETH0_EPCXR 0x2408 190 #define ETH0_EPCMR 0x2410 191 #define ETH0_EPSR 0x2418 192 #define ETH0_ESPR 0x2420 193 #define ETH0_EHTPR 0x2428 194 #define ETH0_EFCSAL 0x2430 195 #define ETH0_EFCSAH 0x2438 196 #define ETH0_ESDCR 0x2440 197 #define ETH0_ESDCMR 0x2448 198 #define ETH0_EICR 0x2450 199 #define ETH0_EIMR 0x2458 200 #define ETH0_EFRDP0 0x2480 201 #define ETH0_EFRDP1 0x2484 202 #define ETH0_EFRDP2 0x2488 203 #define ETH0_EFRDP3 0x248c 204 #define ETH0_ECRDP0 0x24a0 205 #define ETH0_ECRDP1 0x24a4 206 #define ETH0_ECRDP2 0x24a8 207 #define ETH0_ECRDP3 0x24ac 208 #define ETH0_ECTDP0 0x24e0 209 #define ETH0_ECTDP1 0x24e4 210 #define ETH0_EDSCP2P0L 0x2460 212 #define ETH0_EDSCP2P0H 0x2464 214 #define ETH0_EDSCP2P1L 0x2468 216 #define ETH0_EDSCP2P1H 0x246c 218 #define ETH0_EVPT2P 0x2468 219 #define ETH0_EMIBCTRS 0x2500 221 #define ETH_BASE(n) ETH__GEN(n, EBASE) 222 #define ETH_EPCR(n) ETH__GEN(n, EPCR) 223 #define ETH_EPCXR(n) ETH__GEN(n, EPCXR) 224 #define ETH_EPCMR(n) ETH__GEN(n, EPCMR) 225 #define ETH_EPSR(n) ETH__GEN(n, EPSR) 226 #define ETH_ESPR(n) ETH__GEN(n, ESPR) 227 #define ETH_EHTPR(n) ETH__GEN(n, EHPTR) 228 #define ETH_EFCSAL(n) ETH__GEN(n, EFCSAL) 229 #define ETH_EFCSAH(n) ETH__GEN(n, EFCSAH) 230 #define ETH_ESDCR(n) ETH__GEN(n, ESDCR) 231 #define ETH_ESDCMR(n) ETH__GEN(n, ESDCMR) 232 #define ETH_EICR(n) ETH__GEN(n, EICR) 233 #define ETH_EIMR(n) ETH__GEN(n, EIMR) 234 #define ETH_EFRDP0(n) ETH__GEN(n, EFRDP0) 235 #define ETH_EFRDP1(n) ETH__GEN(n, EFRDP1) 236 #define ETH_EFRDP2(n) ETH__GEN(n, EFRDP2) 237 #define ETH_EFRDP3(n) ETH__GEN(n, EFRDP3) 238 #define ETH_ECRDP0(n) ETH__GEN(n, ECRDP0) 239 #define ETH_ECRDP1(n) ETH__GEN(n, ECRDP1) 240 #define ETH_ECRDP2(n) ETH__GEN(n, ECRDP2) 241 #define ETH_ECRDP3(n) ETH__GEN(n, ECRDP3) 242 #define ETH_ECTDP0(n) ETH__GEN(n, ECTDP0) 243 #define ETH_ECTDP1(n) ETH__GEN(n, ECTDP1) 244 #define ETH_EDSCP2P0L(n) ETH__GEN(n, EDSCP2P0L) 246 #define ETH_EDSCP2P0H(n) ETH__GEN(n, EDSCP2P0H) 248 #define ETH_EDSCP2P1L(n) ETH__GEN(n, EDSCP2P1L) 250 #define ETH_EDSCP2P1H(n) ETH__GEN(n, EDSCP1P1H) 252 #define ETH_EVPT2P(n) ETH__GEN(n, EVPT2P) 253 #define ETH_EMIBCTRS(n) ETH__GEN(n, EMIBCTRS) 255 #define ETH_EPAR_PhyAD_GET(v, n) (((v) >> ((n) * 5)) & 0x1f) 257 #define ETH_ESMIR_READ(phy, reg) (ETH__INS(phy, 16)|\ 259 ETH_ESMIR_ReadOpcode) 260 #define ETH_ESMIR_WRITE(phy, reg, val) (ETH__INS(phy, 16)|\ 263 ETH_ESMIR_WriteOpcode) 264 #define ETH_ESMIR_Value_GET(v) ETH__EXT(v, 0, 16) 265 #define ETH_ESMIR_WriteOpcode 0 266 #define ETH_ESMIR_ReadOpcode ETH__BIT(26) 267 #define ETH_ESMIR_ReadValid ETH__BIT(27) 268 #define ETH_ESMIR_Busy ETH__BIT(28) 325 #define ETH_EPCR_PM ETH__BIT(0) 326 #define ETH_EPCR_RBM ETH__BIT(1) 327 #define ETH_EPCR_PBF ETH__BIT(2) 328 #define ETH_EPCR_EN ETH__BIT(7) 329 #define ETH_EPCR_LPBK_GET(v) ETH__BIT(v, 8, 2) 330 #define ETH_EPCR_LPBK_Normal 0 331 #define ETH_EPCR_LPBK_Internal 1 332 #define ETH_EPCR_LPBK_External 2 333 #define ETH_EPCR_FC ETH__BIT(10) 335 #define ETH_EPCR_HS ETH__BIT(12) 336 #define ETH_EPCR_HS_8K 0 337 #define ETH_EPCR_HS_512 ETH_EPCR_HS 339 #define ETH_EPCR_HM ETH__BIT(13) 340 #define ETH_EPCR_HM_0 0 341 #define ETH_EPCR_HM_1 ETH_EPCR_HM 343 #define ETH_EPCR_HDM ETH__BIT(14) 344 #define ETH_EPCR_HDM_Discard 0 345 #define ETH_EPCR_HDM_Pass ETH_EPCR_HDM 347 #define ETH_EPCR_HD_Half 0 348 #define ETH_EPCR_HD_Full ETH_EPCR_HD_Full 350 #define ETH_EPCR_ACCS ETH__BIT(31) 427 #define ETH_EPCXR_IGMP ETH__BIT(0) 428 #define ETH_EPCXR_SPAN ETH__BIT(1) 429 #define ETH_EPCXR_PAR ETH__BIT(2) 430 #define ETH_EPCXR_PRIOtx_GET(v) ETH__EXT(v, 3, 3) 431 #define ETH_EPCXR_PRIOrx_GET(v) ETH__EXT(v, 3, 3) 432 #define ETH_EPCXR_PRIOrx_Override ETH__BIT(8) 433 #define ETH_EPCXR_DLPXen ETH__BIT(9) 434 #define ETH_EPCXR_FCTLen ETH__BIT(10) 435 #define ETH_EPCXR_FLP ETH__BIT(11) 436 #define ETH_EPCXR_FCTL ETH__BIT(12) 437 #define ETH_EPCXR_MFL_GET(v) ETH__EXT(v, 14, 2) 438 #define ETH_EPCXR_MFL_1518 0 439 #define ETH_EPCXR_MFL_1536 1 440 #define ETH_EPCXR_MFL_2048 2 441 #define ETH_EPCXR_MFL_64K 3 442 #define ETH_EPCXR_MIBclrMode ETH__BIT(16) 443 #define ETH_EPCXR_MIBctrMode ETH__BIT(17) 444 #define ETH_EPCXR_Speed ETH__BIT(18) 445 #define ETH_EPCXR_SpeedEn ETH__BIT(19) 446 #define ETH_EPCXR_RMIIEn ETH__BIT(20) 447 #define ETH_EPCXR_DSCPEn ETH__BIT(21) 470 #define ETH_EPCMR_FJ ETH__BIT(15) 498 #define ETH_EPSR_Speed ETH__BIT(0) 499 #define ETH_EPSR_Duplex ETH__BIT(1) 500 #define ETH_EPSR_Fctl ETH__BIT(2) 501 #define ETH_EPSR_Link ETH__BIT(3) 502 #define ETH_EPSR_Pause ETH__BIT(4) 503 #define ETH_EPSR_TxLow ETH__BIT(5) 504 #define ETH_EPSR_TxHigh ETH__BIT(6) 505 #define ETH_EPSR_TXinProg ETH__BIT(7) 549 #define ETH_ESPR_JAM_LENGTH_GET(v) ETH__EXT(v, 0, 2) 550 #define ETH_ESPR_JAM_IPG_GET(v) ETH__EXT(v, 2, 5) 551 #define ETH_ESPR_IPG_JAM_TO_DATA_GET(v) ETH__EXT(v, 7, 5) 552 #define ETH_ESPR_IPG_DATA_GET(v) ETH__EXT(v, 12, 5) 553 #define ETH_ESPR_Data_Bilnd_GET(v) ETH__EXT(v, 17, 5) 554 #define ETH_ESPR_Limit4(v) ETH__BIT(22) 622 #define ETH_ESDCR_RC_GET(v) ETH__EXT(v, 2, 4) 623 #define ETH_ESDCR_BLMR ETH__BIT(6) 624 #define ETH_ESDCR_BLMT ETH__BIT(7) 625 #define ETH_ESDCR_POVR ETH__BIT(8) 626 #define ETH_ESDCR_RIFB ETH__BIT(9) 627 #define ETH_ESDCR_BSZ_GET(v) ETH__EXT(v, 12, 2) 628 #define ETH_ESDCR_BSZ_SET(v, n) (ETH__CLR(v, 12, 2),\ 629 (v) |= ETH__INS(n, 12)) 630 #define ETH_ESDCR_BSZ_1 0 631 #define ETH_ESDCR_BSZ_2 1 632 #define ETH_ESDCR_BSZ_4 2 633 #define ETH_ESDCR_BSZ_8 3 635 #define ETH_ESDCR_BSZ_Strings { "1 64-bit word", "2 64-bit words", \ 636 "4 64-bit words", "8 64-bit words" } 691 #define ETH_ESDCMR_ERD ETH__BIT(7) 692 #define ETH_ESDCMR_AR ETH__BIT(15) 693 #define ETH_ESDCMR_STDH ETH__BIT(16) 694 #define ETH_ESDCMR_STDL ETH__BIT(17) 695 #define ETH_ESDCMR_TXDH ETH__BIT(23) 696 #define ETH_ESDCMR_TXDL ETH__BIT(24) 697 #define ETH_ESDCMR_AT ETH__BIT(31) 810 #define ETH_IR_RxBuffer ETH__BIT(0) 811 #define ETH_IR_TxBufferHigh ETH__BIT(2) 812 #define ETH_IR_TxBufferLow ETH__BIT(3) 813 #define ETH_IR_TxEndHigh ETH__BIT(6) 814 #define ETH_IR_TxEndLow ETH__BIT(7) 815 #define ETH_IR_RxError ETH__BIT(8) 816 #define ETH_IR_TxErrorHigh ETH__BIT(10) 817 #define ETH_IR_TxErrorLow ETH__BIT(11) 818 #define ETH_IR_RxOVR ETH__BIT(12) 819 #define ETH_IR_TxUdr ETH__BIT(13) 820 #define ETH_IR_RxBuffer_0 ETH__BIT(16) 821 #define ETH_IR_RxBuffer_1 ETH__BIT(17) 822 #define ETH_IR_RxBuffer_2 ETH__BIT(18) 823 #define ETH_IR_RxBuffer_3 ETH__BIT(19) 824 #define ETH_IR_RxBuffer_GET(v) ETH__EXT(v, 16, 4) 825 #define ETH_IR_RxError_0 ETH__BIT(20) 826 #define ETH_IR_RxError_1 ETH__BIT(21) 827 #define ETH_IR_RxError_2 ETH__BIT(22) 828 #define ETH_IR_RxError_3 ETH__BIT(23) 829 #define ETH_IR_RxError_GET(v) ETH__EXT(v, 20, 4) 830 #define ETH_IR_RxBits (ETH_IR_RxBuffer_0|\ 838 #define ETH_IR_MIIPhySTC ETH__BIT(28) 839 #define ETH_IR_SMIdone ETH__BIT(29) 840 #define ETH_IR_EtherIntSum (1<<31) 841 #define ETH_IR_Summary (1<<31) 842 #define ETH_IR_ErrorSum 0x803d00 843 #define INTR_RX_ERROR 0x801100 844 #define INTR_TX_ERROR 0x002c00 Definition: GT64260ethreg.h:61