1 /* 2 * Copyright (c) 2021-2022 HPMicro 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 */ 7 8 9 #ifndef HPM_ENET_H 10 #define HPM_ENET_H 11 12 typedef struct { 13 __RW uint32_t MACCFG; /* 0x0: MAC Configuration Register */ 14 __RW uint32_t MACFF; /* 0x4: MAC Frame Filter */ 15 __RW uint32_t HASH_H; /* 0x8: Hash Table High Register */ 16 __RW uint32_t HASH_L; /* 0xC: Hash Table Low Register */ 17 __RW uint32_t GMII_ADDR; /* 0x10: GMII Address Register */ 18 __RW uint32_t GMII_DATA; /* 0x14: GMII Data Register */ 19 __RW uint32_t FLOWCTRL; /* 0x18: Flow Control Register */ 20 __RW uint32_t VLAN_TAG; /* 0x1C: VLAN Tag Register */ 21 __R uint32_t VERSION; /* 0x20: Version Register */ 22 __R uint32_t DEBUGGING; /* 0x24: Debug Register */ 23 __RW uint32_t RWKFRMFILT; /* 0x28: Remote Wake-Up Frame Filter Register */ 24 __RW uint32_t PMT_CSR; /* 0x2C: PMT Control and Status Register */ 25 __RW uint32_t LPI_CSR; /* 0x30: LPI Control and Status Regsiter */ 26 __RW uint32_t LPI_TCR; /* 0x34: LPI Timers Control Register */ 27 __R uint32_t INTR_STATUS; /* 0x38: Interrupt Status Register */ 28 __RW uint32_t INTR_MASK; /* 0x3C: Interrupt Mask Register */ 29 __RW uint32_t MAC_ADDR_0_HIGH; /* 0x40: MAC Address 0 High Register */ 30 __RW uint32_t MAC_ADDR_0_LOW; /* 0x44: MAC Address 0 Low Register */ 31 struct { 32 __RW uint32_t HIGH; /* 0x48: MAC Address High Register */ 33 __RW uint32_t LOW; /* 0x4C: MAC Address Low Register */ 34 } MAC_ADDR[4]; 35 __R uint8_t RESERVED0[112]; /* 0x68 - 0xD7: Reserved */ 36 __RW uint32_t XMII_CSR; /* 0xD8: SGMII/RGMII/SMII Control and Status Register */ 37 __RW uint32_t WDOG_WTO; /* 0xDC: Watchdog Timeout Register */ 38 __RW uint32_t GPIO; /* 0xE0: General Purpose IO Register */ 39 __R uint8_t RESERVED1[28]; /* 0xE4 - 0xFF: Reserved */ 40 __RW uint32_t MMC_CNTRL; /* 0x100: MMC Control establishes the operating mode of MMC. */ 41 __RW uint32_t MMC_INTR_RX; /* 0x104: MMC Receive Interrupt maintains the interrupt generated from all 42 of the receive statistic counters. */ 43 __RW uint32_t MMC_INTR_TX; /* 0x108: MMC Transmit Interrupt maintains the interrupt generated from all 44 of the transmit statistic counters */ 45 __RW uint32_t MMC_INTR_MASK_RX; /* 0x10C: MMC Receive Interrupt mask maintains the mask for the interrupt 46 generated from all of the receive statistic counters */ 47 __RW uint32_t MMC_INTR_MASK_TX; /* 0x110: MMC Transmit Interrupt Mask */ 48 __RW uint32_t TXOCTETCOUNT_GB; /* 0x114: Number of bytes transmitted, exclusive of preamble and retried 49 bytes, in good and bad frames. */ 50 __RW uint32_t TXFRAMECOUNT_GB; /* 0x118: Number of good and bad frames transmitted, exclusive of retried 51 frames. */ 52 __RW uint32_t TXBROADCASTFRAMES_G; /* 0x11C: Number of good broadcast frames transmitted */ 53 __RW uint32_t TXMLTICASTFRAMES_G; /* 0x120: Number of good multicast frames transmitted */ 54 __RW uint32_t TX64OCTETS_GB; /* 0x124: Number of good and bad frames transmitted with length 64 bytes, 55 exclusive of preamble and retried frames. */ 56 __RW uint32_t TX65TO127OCTETS_GB; /* 0x128: Number of good and bad frames transmitted with length between 57 65 and 127 (inclusive) bytes, exclusive of preamble and retried 58 frames. */ 59 __RW uint32_t TX128TO255OCTETS_GB; /* 0x12C: Number of good and bad frames transmitted with length between 60 128 and 255 (inclusive) bytes, exclusive of preamble and retried 61 frames. */ 62 __RW uint32_t TX256TO511OCTETS_GB; /* 0x130: Number of good and bad frames transmitted with length between 63 256 and 511 (inclusive) bytes, exclusive of preamble and retried 64 frames. */ 65 __RW uint32_t TX512TO1023OCTETS_GB; /* 0x134: Number of good and bad frames transmitted with length between 66 512 and 1,023 (inclusive) bytes, exclusive of preamble and retried 67 frames. */ 68 __RW uint32_t TX1024TOMAXOCTETS_GB; /* 0x138: Number of good and bad frames transmitted with length between 69 1,024 and maxsize (inclusive) bytes, exclusive of preamble and 70 retried frames. */ 71 __RW uint32_t TXUNICASTFRAMES_GB; /* 0x13C: Number of good and bad unicast frames transmitted. */ 72 __RW uint32_t TXMULTICASTFRAMES_GB; /* 0x140: Number of good and bad multicast frames transmitted. */ 73 __RW uint32_t TXBROADCASTFRAMES_GB; /* 0x144: Number of good and bad broadcast frames transmitted. */ 74 __RW uint32_t TXUNDERFLOWERROR; /* 0x148: Number of frames aborted because of frame underflow error. */ 75 __RW uint32_t TXSINGLECOL_G; /* 0x14C: Number of successfully transmitted frames after a single collision 76 in the half-duplex mode. */ 77 __RW uint32_t TXMULTICOL_G; /* 0x150: Number of successfully transmitted frames after multiple collisions 78 in the half-duplex mode. */ 79 __RW uint32_t TXDEFERRED; /* 0x154: Number of successfully transmitted frames after a deferral in the 80 half-duplex mode. */ 81 __RW uint32_t TXLATECOL; /* 0x158: Number of frames aborted because of late collision error */ 82 __RW uint32_t TXEXESSCOL; /* 0x15C: Number of frames aborted because of excessive (16) collision 83 errors */ 84 __RW uint32_t TXCARRIERERROR; /* 0x160: Number of frames aborted because of carrier sense error (no 85 carrier or loss of carrier). */ 86 __RW uint32_t TXOCTETCOUNT_G; /* 0x164: Number of bytes transmitted, exclusive of preamble, only in good 87 frames. */ 88 __RW uint32_t TXFRAMECOUNT_G; /* 0x168: Number of good frames transmitted */ 89 __RW uint32_t TXEXCESSDEF; /* 0x16C: Number of frames aborted because of excessive deferral error 90 (deferred for more than two max-sized frame times). */ 91 __RW uint32_t TXPAUSEFRAMES; /* 0x170: Number of good Pause frames transmitted */ 92 __RW uint32_t TXVLANFRAMES_G; /* 0x174: Number of good VLAN frames transmitted, exclusive of retried 93 frames. */ 94 __RW uint32_t TXOVERSIZE_G; /* 0x178: Number of frames transmitted without errors and with length 95 greater than the maxsize (1,518 or 1,522 bytes for VLAN tagged 96 frames; 2000 bytes if enabled in Bit 27 of Register 0 (MAC 97 Configuration Register)). */ 98 __R uint8_t RESERVED2[4]; /* 0x17C - 0x17F: Reserved */ 99 __RW uint32_t RXFRAMECOUNT_GB; /* 0x180: Number of good and bad frames received */ 100 __RW uint32_t RXOCTETCOUNT_G; /* 0x184: Number of bytes received, exclusive of preamble, only in good 101 frames. */ 102 __RW uint32_t RXOCTETCOUNT_GB; /* 0x188: Number of bytes received, exclusive of preamble, in good and bad 103 frames. */ 104 __RW uint32_t RXBROADCASTFRAMES_G; /* 0x18C: Number of good broadcast frames received */ 105 __RW uint32_t RXMULTICASTFRAMES_G; /* 0x190: Number of good multicast frames received */ 106 __RW uint32_t RXCRCERROR; /* 0x194: Number of frames received with CRC error */ 107 __RW uint32_t RXALIGNMENTERROR; /* 0x198: Number of frames received with alignment (dribble) error. Valid 108 only in 10/100 mode */ 109 __RW uint32_t RXRUNTERROR; /* 0x19C: Number of frames received with runt (<64 bytes and CRC error) 110 error. */ 111 __RW uint32_t RXJABBERERROR; /* 0x1A0: Number of giant frames received with length (including CRC) 112 greater than 1,518 bytes (1,522 bytes for VLAN tagged) and with 113 CRC error. If Jumbo Frame mode is enabled, then frames of 114 length greater than 9,018 bytes (9,022 for VLAN tagged) are 115 considered as giant frames. */ 116 __RW uint32_t RXUNDERSIZE_G; /* 0x1A4: Number of frames received with length less than 64 bytes, without 117 any errors. */ 118 __RW uint32_t RXOVERSIZE_G; /* 0x1A8: Number of frames received without errors, with length greater 119 than the maxsize (1,518 or 1,522 for VLAN tagged frames; 2,000 120 bytes if enabled in Bit 27 of Register 0 (MAC Configuration 121 Register)) */ 122 __RW uint32_t RX64OCTETS_GB; /* 0x1AC: Number of good and bad frames received with length 64 bytes, 123 exclusive of preamble. */ 124 __RW uint32_t RX65TO127OCTETS_GB; /* 0x1B0: */ 125 __RW uint32_t RX128TO255OCTETS_GB; /* 0x1B4: */ 126 __RW uint32_t RX256TO511OCTETS_GB; /* 0x1B8: Number of good and bad frames received with length between 127 256 and 511 (inclusive) bytes, exclusive of preamble. */ 128 __RW uint32_t RX512TO1023OCTETS_GB; /* 0x1BC: Number of good and bad frames received with length between 129 512 and 1023 (inclusive) bytes, exclusive of preamble. */ 130 __RW uint32_t RX1024TOMAXOCTETS_GB; /* 0x1C0: Number of good and bad frames received with length between 131 1024 and maxsize (inclusive) bytes, exclusive of preamble. */ 132 __RW uint32_t RXUNICASTFRAMES_G; /* 0x1C4: Number of received good unicast frames. */ 133 __RW uint32_t RXLENGTHERROR; /* 0x1C8: Number of frames received with length error (Length type field ≠ 134 frame size), for all frames with valid length field. */ 135 __RW uint32_t RXOUTOFRANGETYPE; /* 0x1CC: Number of frames received with length field not equal to the valid 136 frame size (greater than 1,500 but less than 1,536). */ 137 __RW uint32_t RXPAUSEFRAMES; /* 0x1D0: Number of good and valid Pause frames received. */ 138 __RW uint32_t RXFIFOOVERFLOW; /* 0x1D4: Number of missed received frames because of FIFO overflow. 139 This counter is not present in the GMAC-CORE configuration. */ 140 __RW uint32_t RXVLANFRAMES_GB; /* 0x1D8: Number of good and bad VLAN frames received. */ 141 __RW uint32_t RXWATCHDOGERROR; /* 0x1DC: Number of frames received with error because of watchdog 142 timeout error (frames with a data load larger than 2,048 bytes or 143 the value programmed in Register 55 (Watchdog Timeout 144 Register)). */ 145 __RW uint32_t RXRCVERROR; /* 0x1E0: Number of frames received with Receive error or Frame Extension 146 error on the GMII or MII interface. */ 147 __RW uint32_t RXCTRLFRAMES_G; /* 0x1E4: Number of received good control frames */ 148 __R uint8_t RESERVED3[24]; /* 0x1E8 - 0x1FF: Reserved */ 149 __RW uint32_t MMC_IPC_INTR_MASK_RX; /* 0x200: MMC IPC Receive Checksum Offload Interrupt Mask maintains 150 the mask for the interrupt generated from the receive IPC statistic 151 counters. */ 152 __R uint8_t RESERVED4[4]; /* 0x204 - 0x207: Reserved */ 153 __RW uint32_t MMC_IPC_INTR_RX; /* 0x208: MMC Receive Checksum Offload Interrupt maintains the interrupt 154 that the receive IPC statistic counters generate. See Table 4-25 155 for further detail. */ 156 __R uint8_t RESERVED5[4]; /* 0x20C - 0x20F: Reserved */ 157 __RW uint32_t RXIPV4_GD_FMS; /* 0x210: Number of good IPv4 datagrams received with the TCP, UDP, or 158 ICMP payload */ 159 __RW uint32_t RXIPV4_HDRERR_FRMS; /* 0x214: Number of IPv4 datagrams received with header (checksum, 160 length, or version mismatch) errors */ 161 __RW uint32_t RXIPV4_NOPAY_FRMS; /* 0x218: Number of IPv4 datagram frames received that did not have a 162 TCP, UDP, or ICMP payload processed by the Checksum engine */ 163 __RW uint32_t RXIPV4_FRAG_FRMS; /* 0x21C: Number of good IPv4 datagrams with fragmentation */ 164 __RW uint32_t RXIPV4_UDSBL_FRMS; /* 0x220: Number of good IPv4 datagrams received that had a UDP 165 payload with checksum disabled */ 166 __RW uint32_t RXIPV6_GD_FRMS; /* 0x224: Number of good IPv6 datagrams received with TCP, UDP, or 167 ICMP payloads */ 168 __RW uint32_t RXIPV6_HDRERR_FRMS; /* 0x228: Number of IPv6 datagrams received with header errors (length or 169 version mismatch) */ 170 __RW uint32_t RXIPV6_NOPAY_FRMS; /* 0x22C: Number of IPv6 datagram frames received that did not have a 171 TCP, UDP, or ICMP payload. This includes all IPv6 datagrams with 172 fragmentation or security extension headers */ 173 __RW uint32_t RXUDP_GD_FRMS; /* 0x230: Number of good IP datagrams with a good UDP payload. This 174 counter is not updated when the rxipv4_udsbl_frms counter is 175 incremented. */ 176 __RW uint32_t RXUDP_ERR_FRMS; /* 0x234: Number of good IP datagrams whose UDP payload has a 177 checksum error */ 178 __RW uint32_t RXTCP_GD_FRMS; /* 0x238: Number of good IP datagrams with a good TCP payload */ 179 __RW uint32_t RXTCP_ERR_FRMS; /* 0x23C: Number of good IP datagrams whose TCP payload has a 180 checksum error */ 181 __RW uint32_t RXICMP_GD_FRMS; /* 0x240: Number of good IP datagrams with a good ICMP payload */ 182 __RW uint32_t RXICMP_ERR_FRMS; /* 0x244: Number of good IP datagrams whose ICMP payload has a 183 checksum error */ 184 __R uint8_t RESERVED6[8]; /* 0x248 - 0x24F: Reserved */ 185 __RW uint32_t RXIPV4_GD_OCTETS; /* 0x250: Number of bytes received in good IPv4 datagrams encapsulating 186 TCP, UDP, or ICMP data. (Ethernet header, FCS, pad, or IP pad 187 bytes are not included in this counter or in the octet counters listed 188 below). */ 189 __RW uint32_t RXIPV4_HDRERR_OCTETS; /* 0x254: Number of bytes received in IPv4 datagrams with header errors 190 (checksum, length, version mismatch). The value in the Length 191 field of IPv4 header is used to update this counter. */ 192 __RW uint32_t RXIPV4_NOPAY_OCTETS; /* 0x258: Number of bytes received in IPv4 datagrams that did not have a 193 TCP, UDP, or ICMP payload. The value in the IPv4 header’s 194 Length field is used to update this counter. */ 195 __RW uint32_t RXIPV4_FRAG_OCTETS; /* 0x25C: Number of bytes received in fragmented IPv4 datagrams. The 196 value in the IPv4 header’s Length field is used to update this 197 counter */ 198 __RW uint32_t RXIPV4_UDSBL_OCTETS; /* 0x260: Number of bytes received in a UDP segment that had the UDP 199 checksum disabled. This counter does not count IP Header bytes. */ 200 __RW uint32_t RXIPV6_GD_OCTETS; /* 0x264: Number of bytes received in good IPv6 datagrams encapsulating 201 TCP, UDP or ICMPv6 data */ 202 __RW uint32_t RXIPV6_HDRERR_OCTETS; /* 0x268: Number of bytes received in IPv6 datagrams with header errors 203 (length, version mismatch). The value in the IPv6 header’s Length 204 field is used to update this counter. */ 205 __RW uint32_t RXIPV6_NOPAY_OCTETS; /* 0x26C: Number of bytes received in IPv6 datagrams that did not have a 206 TCP, UDP, or ICMP payload. The value in the IPv6 header’s 207 Length field is used to update this counter. */ 208 __RW uint32_t RXUDP_GD_OCTETS; /* 0x270: Number of bytes received in a good UDP segment. This counter 209 (and the counters below) does not count IP header bytes. */ 210 __RW uint32_t RXUDP_ERR_OCTETS; /* 0x274: Number of bytes received in a UDP segment that had checksum 211 errors */ 212 __RW uint32_t RXTCP_GD_OCTETS; /* 0x278: Number of bytes received in a good TCP segment */ 213 __RW uint32_t RXTCP_ERR_OCTETS; /* 0x27C: Number of bytes received in a TCP segment with checksum 214 errors */ 215 __RW uint32_t RXICMP_GD_OCTETS; /* 0x280: Number of bytes received in a good ICMP segment */ 216 __R uint8_t RESERVED7[380]; /* 0x284 - 0x3FF: Reserved */ 217 struct { 218 __RW uint32_t L3_L4_CTRL; /* 0x400: Layer 3 and Layer 4 Control Register */ 219 __RW uint32_t L4_ADDR; /* 0x404: Layer 4 Address Register */ 220 __R uint8_t RESERVED0[8]; /* 0x408 - 0x40F: Reserved */ 221 __RW uint32_t L3_ADDR_0; /* 0x410: Layer 3 Address 0 Register */ 222 __RW uint32_t L3_ADDR_1; /* 0x414: Layer 3 Address 1 Register */ 223 __RW uint32_t L3_ADDR_2; /* 0x418: Layer 3 Address 2 Register */ 224 __RW uint32_t L3_ADDR_3; /* 0x41C: Layer 3 Address 3 Register */ 225 __R uint8_t RESERVED1[16]; /* 0x420 - 0x42F: Reserved */ 226 } L3_L4_CFG[4]; 227 __R uint8_t RESERVED8[64]; /* 0x4C0 - 0x4FF: Reserved */ 228 __RW uint32_t HASH_TABLE[8]; /* 0x500 - 0x51C: Hash Table Register 0 */ 229 __R uint8_t RESERVED9[100]; /* 0x520 - 0x583: Reserved */ 230 __RW uint32_t VLAN_TAG_INC_RPL; /* 0x584: VLAN Tag Inclusion or Replacement Register */ 231 __RW uint32_t VLAN_HASH; /* 0x588: VLAN Hash Table Register */ 232 __R uint8_t RESERVED10[372]; /* 0x58C - 0x6FF: Reserved */ 233 __RW uint32_t TS_CTRL; /* 0x700: Timestamp Control Register */ 234 __RW uint32_t SUB_SEC_INCR; /* 0x704: Sub-Second Increment Register */ 235 __R uint32_t SYST_SEC; /* 0x708: System Time - Seconds Register */ 236 __R uint32_t SYST_NSEC; /* 0x70C: System Time - Nanoseconds Register */ 237 __RW uint32_t SYST_SEC_UPD; /* 0x710: System Time - Seconds Update Register */ 238 __RW uint32_t SYST_NSEC_UPD; /* 0x714: System Time - Nanoseconds Update Register */ 239 __RW uint32_t TS_ADDEND; /* 0x718: Timestamp Addend Register */ 240 __RW uint32_t TGTTM_SEC; /* 0x71C: Target Time Seconds Register */ 241 __RW uint32_t TGTTM_NSEC; /* 0x720: Target Time Nanoseconds Register */ 242 __RW uint32_t SYSTM_H_SEC; /* 0x724: System Time - Higher Word Seconds Register */ 243 __R uint32_t TS_STATUS; /* 0x728: Timestamp Status Register */ 244 __RW uint32_t PPS_CTRL; /* 0x72C: PPS Control Register */ 245 __R uint32_t AUX_TS_NSEC; /* 0x730: Auxiliary Timestamp - Nanoseconds Register */ 246 __R uint32_t AUX_TS_SEC; /* 0x734: Auxiliary Timestamp - Seconds Register */ 247 __R uint8_t RESERVED11[40]; /* 0x738 - 0x75F: Reserved */ 248 __RW uint32_t PPS0_INTERVAL; /* 0x760: PPS0 Interval Register */ 249 __RW uint32_t PPS0_WIDTH; /* 0x764: PPS0 Width Register */ 250 __R uint8_t RESERVED12[24]; /* 0x768 - 0x77F: Reserved */ 251 struct { 252 __RW uint32_t TGTTM_SEC; /* 0x780: PPS Target Time Seconds Register */ 253 __RW uint32_t TGTTM_NSEC; /* 0x784: PPS Target Time Nanoseconds Register */ 254 __RW uint32_t INTERVAL; /* 0x788: PPS Interval Register */ 255 __RW uint32_t WIDTH; /* 0x78C: PPS Width Register */ 256 __R uint8_t RESERVED0[16]; /* 0x790 - 0x79F: Reserved */ 257 } PPS[3]; 258 __R uint8_t RESERVED13[2080]; /* 0x7E0 - 0xFFF: Reserved */ 259 __RW uint32_t DMA_BUS_MODE; /* 0x1000: Bus Mode Register */ 260 __RW uint32_t DMA_TX_POLL_DEMAND; /* 0x1004: Transmit Poll Demand Register */ 261 __RW uint32_t DMA_RX_POLL_DEMAND; /* 0x1008: Receive Poll Demand Register */ 262 __RW uint32_t DMA_RX_DESC_LIST_ADDR; /* 0x100C: Receive Descriptor List Address Register */ 263 __RW uint32_t DMA_TX_DESC_LIST_ADDR; /* 0x1010: Transmit Descriptor List Address Register */ 264 __RW uint32_t DMA_STATUS; /* 0x1014: Status Register */ 265 __RW uint32_t DMA_OP_MODE; /* 0x1018: Operation Mode Register */ 266 __RW uint32_t DMA_INTR_EN; /* 0x101C: Interrupt Enable Register */ 267 __RW uint32_t DMA_MISS_OVF_CNT; /* 0x1020: Missed Frame And Buffer Overflow Counter Register */ 268 __RW uint32_t DMA_RX_INTR_WDOG; /* 0x1024: Receive Interrupt Watchdog Timer Register */ 269 __RW uint32_t DMA_AXI_MODE; /* 0x1028: AXI Bus Mode Register */ 270 __RW uint32_t DMA_BUS_STATUS; /* 0x102C: AHB or AXI Status Register */ 271 __R uint8_t RESERVED14[24]; /* 0x1030 - 0x1047: Reserved */ 272 __RW uint32_t DMA_CURR_HOST_TX_DESC; /* 0x1048: Current Host Transmit Descriptor Register */ 273 __RW uint32_t DMA_CURR_HOST_RX_DESC; /* 0x104C: Current Host Receive Descriptor Register */ 274 __RW uint32_t DMA_CURR_HOST_TX_BUF; /* 0x1050: Current Host Transmit Buffer Address Register */ 275 __RW uint32_t DMA_CURR_HOST_RX_BUF; /* 0x1054: Current Host Receive Buffer Address Register */ 276 __RW uint32_t DMA_HW_FEATURE; /* 0x1058: HW Feature Register */ 277 __R uint8_t RESERVED15[8100]; /* 0x105C - 0x2FFF: Reserved */ 278 __RW uint32_t CTRL0; /* 0x3000: Control Register 0 */ 279 __R uint8_t RESERVED16[4]; /* 0x3004 - 0x3007: Reserved */ 280 __RW uint32_t CTRL2; /* 0x3008: Control Register 1 */ 281 __R uint8_t RESERVED17[28]; /* 0x300C - 0x3027: Reserved */ 282 } ENET_Type; 283 284 285 /* Bitfield definition for register: MACCFG */ 286 /* 287 * SARC (RW) 288 * 289 * Source Address Insertion or Replacement Control 290 * This field controls the source address insertion or replacement for all transmitted frames. Bit 30 specifies which MAC Address register (0 or 1) is used for source address insertion or replacement based on the values of Bits [29:28]: 291 * - 2'b0x: The input signals mti_sa_ctrl_i and ati_sa_ctrl_i control the SA field generation. 292 * - 2'b10: - If Bit 30 is set to 0, the MAC inserts the content of the MAC Address 0 registers (registers 16 and 17) in the SA field of all transmitted frames. - If Bit 30 is set to 1 and the Enable MAC Address Register 1 option is selected during core configuration, the MAC inserts the content of the MAC Address 1 registers (registers 18 and 19) in the SA field of all transmitted frames. 293 * - 2'b11: - If Bit 30 is set to 0, the MAC replaces the content of the MAC Address 0 registers (registers 16 and 17) in the SA field of all transmitted frames. - If Bit 30 is set to 1 and the Enable MAC Address Register 1 option is selected during core configuration, the MAC replaces the content of the MAC Address 1 registers (registers 18 and 19) in the SA field of all transmitted frames. Note: - Changes to this field take effect only on the start of a frame. If you write this register field when a frame is being transmitted, only the subsequent frame can use the updated value, that is, the current frame does not use the updated value. - These bits are reserved and RO when the Enable SA, VLAN, and CRC Insertion on TX feature is not selected during core configuration. 294 */ 295 #define ENET_MACCFG_SARC_MASK (0x70000000UL) 296 #define ENET_MACCFG_SARC_SHIFT (28U) 297 #define ENET_MACCFG_SARC_SET(x) (((uint32_t)(x) << ENET_MACCFG_SARC_SHIFT) & ENET_MACCFG_SARC_MASK) 298 #define ENET_MACCFG_SARC_GET(x) (((uint32_t)(x) & ENET_MACCFG_SARC_MASK) >> ENET_MACCFG_SARC_SHIFT) 299 300 /* 301 * TWOKPE (RW) 302 * 303 * IEEE 802.3as Support for 2K Packets 304 * When set, the MAC considers all frames, with up to 2,000 bytes length, as normal packets. When Bit 20 (JE) is not set, the MAC considers all received frames of size more than 2K bytes as Giant frames. When this bit is reset and Bit 20 (JE) is not set, the MAC considers all received frames of size more than 1,518 bytes (1,522 bytes for tagged) as Giant frames. When Bit 20 is set, setting this bit has no effect on Giant Frame status. 305 */ 306 #define ENET_MACCFG_TWOKPE_MASK (0x8000000UL) 307 #define ENET_MACCFG_TWOKPE_SHIFT (27U) 308 #define ENET_MACCFG_TWOKPE_SET(x) (((uint32_t)(x) << ENET_MACCFG_TWOKPE_SHIFT) & ENET_MACCFG_TWOKPE_MASK) 309 #define ENET_MACCFG_TWOKPE_GET(x) (((uint32_t)(x) & ENET_MACCFG_TWOKPE_MASK) >> ENET_MACCFG_TWOKPE_SHIFT) 310 311 /* 312 * SFTERR (RW) 313 * 314 * SMII Force Transmit Error 315 * When set, this bit indicates to the PHY to force a transmit error in the SMII frame being transmitted. This bit is reserved if the SMII PHY port is not selected during core configuration. 316 */ 317 #define ENET_MACCFG_SFTERR_MASK (0x4000000UL) 318 #define ENET_MACCFG_SFTERR_SHIFT (26U) 319 #define ENET_MACCFG_SFTERR_SET(x) (((uint32_t)(x) << ENET_MACCFG_SFTERR_SHIFT) & ENET_MACCFG_SFTERR_MASK) 320 #define ENET_MACCFG_SFTERR_GET(x) (((uint32_t)(x) & ENET_MACCFG_SFTERR_MASK) >> ENET_MACCFG_SFTERR_SHIFT) 321 322 /* 323 * CST (RW) 324 * 325 * CRC Stripping for Type Frames 326 * When this bit is set, the last 4 bytes (FCS) of all frames of Ether type (Length/Type field greater than or equal to 1,536) are stripped and dropped before forwarding the frame to the application. This function is not valid when the IP Checksum Engine (Type 1) is enabled in the MAC receiver. This function is valid when Type 2 Checksum Offload Engine is enabled. 327 */ 328 #define ENET_MACCFG_CST_MASK (0x2000000UL) 329 #define ENET_MACCFG_CST_SHIFT (25U) 330 #define ENET_MACCFG_CST_SET(x) (((uint32_t)(x) << ENET_MACCFG_CST_SHIFT) & ENET_MACCFG_CST_MASK) 331 #define ENET_MACCFG_CST_GET(x) (((uint32_t)(x) & ENET_MACCFG_CST_MASK) >> ENET_MACCFG_CST_SHIFT) 332 333 /* 334 * TC (RW) 335 * 336 * Transmit Configuration in RGMII, SGMII, or SMII 337 * When set, this bit enables the transmission of duplex mode, link speed, and link up or down information to the PHY in the RGMII, SMII, or SGMII port. When this bit is reset, no such information is driven to the PHY. This bit is reserved (and RO) if the RGMII, SMII, or SGMII PHY port is not selected during core configuration. 338 */ 339 #define ENET_MACCFG_TC_MASK (0x1000000UL) 340 #define ENET_MACCFG_TC_SHIFT (24U) 341 #define ENET_MACCFG_TC_SET(x) (((uint32_t)(x) << ENET_MACCFG_TC_SHIFT) & ENET_MACCFG_TC_MASK) 342 #define ENET_MACCFG_TC_GET(x) (((uint32_t)(x) & ENET_MACCFG_TC_MASK) >> ENET_MACCFG_TC_SHIFT) 343 344 /* 345 * WD (RW) 346 * 347 * Watchdog Disable 348 * When this bit is set, the MAC disables the watchdog timer on the receiver. The MAC can receive frames of up to 16,383 bytes. 349 */ 350 #define ENET_MACCFG_WD_MASK (0x800000UL) 351 #define ENET_MACCFG_WD_SHIFT (23U) 352 #define ENET_MACCFG_WD_SET(x) (((uint32_t)(x) << ENET_MACCFG_WD_SHIFT) & ENET_MACCFG_WD_MASK) 353 #define ENET_MACCFG_WD_GET(x) (((uint32_t)(x) & ENET_MACCFG_WD_MASK) >> ENET_MACCFG_WD_SHIFT) 354 355 /* 356 * JD (RW) 357 * 358 * Jabber Disable 359 * When this bit is set, the MAC disables the jabber timer on the transmitter. The MAC can transfer frames of up to 16,383 bytes. When this bit is reset, the MAC cuts off the transmitter if the application sends out more than 2,048 bytes of data (10,240 if JE is set high) during transmission. 360 */ 361 #define ENET_MACCFG_JD_MASK (0x400000UL) 362 #define ENET_MACCFG_JD_SHIFT (22U) 363 #define ENET_MACCFG_JD_SET(x) (((uint32_t)(x) << ENET_MACCFG_JD_SHIFT) & ENET_MACCFG_JD_MASK) 364 #define ENET_MACCFG_JD_GET(x) (((uint32_t)(x) & ENET_MACCFG_JD_MASK) >> ENET_MACCFG_JD_SHIFT) 365 366 /* 367 * BE (RW) 368 * 369 * Frame Burst Enable 370 * When this bit is set, the MAC allows frame bursting during transmission in the GMII half-duplex mode. This bit is reserved (and RO) in the 10/100 Mbps only or full-duplex-only configurations. 371 */ 372 #define ENET_MACCFG_BE_MASK (0x200000UL) 373 #define ENET_MACCFG_BE_SHIFT (21U) 374 #define ENET_MACCFG_BE_SET(x) (((uint32_t)(x) << ENET_MACCFG_BE_SHIFT) & ENET_MACCFG_BE_MASK) 375 #define ENET_MACCFG_BE_GET(x) (((uint32_t)(x) & ENET_MACCFG_BE_MASK) >> ENET_MACCFG_BE_SHIFT) 376 377 /* 378 * JE (RW) 379 * 380 * Jumbo Frame Enable 381 * When this bit is set, the MAC allows Jumbo frames of 9,018 bytes (9,022 bytes for VLAN tagged frames) without reporting a giant frame error in the receive frame status. 382 */ 383 #define ENET_MACCFG_JE_MASK (0x100000UL) 384 #define ENET_MACCFG_JE_SHIFT (20U) 385 #define ENET_MACCFG_JE_SET(x) (((uint32_t)(x) << ENET_MACCFG_JE_SHIFT) & ENET_MACCFG_JE_MASK) 386 #define ENET_MACCFG_JE_GET(x) (((uint32_t)(x) & ENET_MACCFG_JE_MASK) >> ENET_MACCFG_JE_SHIFT) 387 388 /* 389 * IFG (RW) 390 * 391 * Inter-Frame Gap 392 * These bits control the minimum IFG between frames during transmission. 393 * - 000: 96 bit times 394 * - 001: 88 bit times 395 * - 010: 80 bit times - ... 396 * - 111: 40 bit times In the half-duplex mode, the minimum IFG can be configured only for 64 bit times (IFG = 100). Lower values are not considered. In the 1000-Mbps mode, the minimum IFG supported is 64 bit times (and above) in the GMAC-CORE configuration and 80 bit times (and above) in other configurations. When a JAM pattern is being transmitted because of backpressure activation, the MAC does not consider the minimum IFG. 397 */ 398 #define ENET_MACCFG_IFG_MASK (0xE0000UL) 399 #define ENET_MACCFG_IFG_SHIFT (17U) 400 #define ENET_MACCFG_IFG_SET(x) (((uint32_t)(x) << ENET_MACCFG_IFG_SHIFT) & ENET_MACCFG_IFG_MASK) 401 #define ENET_MACCFG_IFG_GET(x) (((uint32_t)(x) & ENET_MACCFG_IFG_MASK) >> ENET_MACCFG_IFG_SHIFT) 402 403 /* 404 * DCRS (RW) 405 * 406 * Disable Carrier Sense During Transmission 407 * When set high, this bit makes the MAC transmitter ignore the (G)MII CRS signal during frame transmission in the half-duplex mode. This request results in no errors generated because of Loss of Carrier or No Carrier during such transmission. When this bit is low, the MAC transmitter generates such errors because of Carrier Sense and can even abort the transmissions. 408 */ 409 #define ENET_MACCFG_DCRS_MASK (0x10000UL) 410 #define ENET_MACCFG_DCRS_SHIFT (16U) 411 #define ENET_MACCFG_DCRS_SET(x) (((uint32_t)(x) << ENET_MACCFG_DCRS_SHIFT) & ENET_MACCFG_DCRS_MASK) 412 #define ENET_MACCFG_DCRS_GET(x) (((uint32_t)(x) & ENET_MACCFG_DCRS_MASK) >> ENET_MACCFG_DCRS_SHIFT) 413 414 /* 415 * PS (RW) 416 * 417 * Port Select 418 * This bit selects the Ethernet line speed. 419 * - 0: For 1000 Mbps operations 420 * - 1: For 10 or 100 Mbps operations In 10 or 100 Mbps operations, this bit, along with FES bit, selects the exact line speed. In the 10/100 Mbps-only (always 1) or 1000 Mbps-only (always 0) configurations, this bit is read-only with the appropriate value. In default 10/100/1000 Mbps configuration, this bit is R_W. The mac_portselect_o or mac_speed_o[1] signal reflects the value of this bit. 421 */ 422 #define ENET_MACCFG_PS_MASK (0x8000U) 423 #define ENET_MACCFG_PS_SHIFT (15U) 424 #define ENET_MACCFG_PS_SET(x) (((uint32_t)(x) << ENET_MACCFG_PS_SHIFT) & ENET_MACCFG_PS_MASK) 425 #define ENET_MACCFG_PS_GET(x) (((uint32_t)(x) & ENET_MACCFG_PS_MASK) >> ENET_MACCFG_PS_SHIFT) 426 427 /* 428 * FES (RW) 429 * 430 * Speed 431 * This bit selects the speed in the MII, RMII, SMII, RGMII, SGMII, or RevMII interface: 432 * - 0: 10 Mbps 433 * - 1: 100 Mbps This bit is reserved (RO) by default and is enabled only when the parameter SPEED_SELECT = Enabled. This bit generates link speed encoding when Bit 24 (TC) is set in the RGMII, SMII, or SGMII mode. This bit is always enabled for RGMII, SGMII, SMII, or RevMII interface. In configurations with RGMII, SGMII, SMII, or RevMII interface, this bit is driven as an output signal (mac_speed_o[0]) to reflect the value of this bit in the mac_speed_o signal. In configurations with RMII, MII, or GMII interface, you can optionally drive this bit as an output signal (mac_speed_o[0]) to reflect its value in the mac_speed_o signal. 434 */ 435 #define ENET_MACCFG_FES_MASK (0x4000U) 436 #define ENET_MACCFG_FES_SHIFT (14U) 437 #define ENET_MACCFG_FES_SET(x) (((uint32_t)(x) << ENET_MACCFG_FES_SHIFT) & ENET_MACCFG_FES_MASK) 438 #define ENET_MACCFG_FES_GET(x) (((uint32_t)(x) & ENET_MACCFG_FES_MASK) >> ENET_MACCFG_FES_SHIFT) 439 440 /* 441 * DO (RW) 442 * 443 * Disable Receive Own 444 * When this bit is set, the MAC disables the reception of frames when the phy_txen_o is asserted in the half-duplex mode. When this bit is reset, the MAC receives all packets that are given by the PHY while transmitting. This bit is not applicable if the MAC is operating in the full-duplex mode. This bit is reserved (RO with default value) if the MAC is configured for the full-duplex-only operation. 445 */ 446 #define ENET_MACCFG_DO_MASK (0x2000U) 447 #define ENET_MACCFG_DO_SHIFT (13U) 448 #define ENET_MACCFG_DO_SET(x) (((uint32_t)(x) << ENET_MACCFG_DO_SHIFT) & ENET_MACCFG_DO_MASK) 449 #define ENET_MACCFG_DO_GET(x) (((uint32_t)(x) & ENET_MACCFG_DO_MASK) >> ENET_MACCFG_DO_SHIFT) 450 451 /* 452 * LM (RW) 453 * 454 * Loopback Mode 455 * When this bit is set, the MAC operates in the loopback mode at GMII or MII. The (G)MII Receive clock input (clk_rx_i) is required for the loopback to work properly, because the Transmit clock is not looped-back internally. 456 */ 457 #define ENET_MACCFG_LM_MASK (0x1000U) 458 #define ENET_MACCFG_LM_SHIFT (12U) 459 #define ENET_MACCFG_LM_SET(x) (((uint32_t)(x) << ENET_MACCFG_LM_SHIFT) & ENET_MACCFG_LM_MASK) 460 #define ENET_MACCFG_LM_GET(x) (((uint32_t)(x) & ENET_MACCFG_LM_MASK) >> ENET_MACCFG_LM_SHIFT) 461 462 /* 463 * DM (RW) 464 * 465 * Duplex Mode 466 * When this bit is set, the MAC operates in the full-duplex mode where it can transmit and receive simultaneously. This bit is RO with default value of 1'b1 in the full-duplex-only configuration. 467 */ 468 #define ENET_MACCFG_DM_MASK (0x800U) 469 #define ENET_MACCFG_DM_SHIFT (11U) 470 #define ENET_MACCFG_DM_SET(x) (((uint32_t)(x) << ENET_MACCFG_DM_SHIFT) & ENET_MACCFG_DM_MASK) 471 #define ENET_MACCFG_DM_GET(x) (((uint32_t)(x) & ENET_MACCFG_DM_MASK) >> ENET_MACCFG_DM_SHIFT) 472 473 /* 474 * IPC (RW) 475 * 476 * Checksum Offload 477 * When this bit is set, the MAC calculates the 16-bit one’s complement of the one’s complement sum of all received Ethernet frame payloads. It also checks whether the IPv4 Header checksum (assumed to be bytes 25–26 or 29–30 (VLAN-tagged) of the received Ethernet frame) is correct for the received frame and gives the status in the receive status word. The MAC also appends the 16-bit checksum calculated for the IP header datagram payload (bytes after the IPv4 header) and appends it to the Ethernet frame transferred to the application (when Type 2 COE is deselected). When this bit is reset, this function is disabled. When Type 2 COE is selected, this bit, when set, enables the IPv4 header checksum checking and IPv4 or IPv6 TCP, UDP, or ICMP payload checksum checking. 478 */ 479 #define ENET_MACCFG_IPC_MASK (0x400U) 480 #define ENET_MACCFG_IPC_SHIFT (10U) 481 #define ENET_MACCFG_IPC_SET(x) (((uint32_t)(x) << ENET_MACCFG_IPC_SHIFT) & ENET_MACCFG_IPC_MASK) 482 #define ENET_MACCFG_IPC_GET(x) (((uint32_t)(x) & ENET_MACCFG_IPC_MASK) >> ENET_MACCFG_IPC_SHIFT) 483 484 /* 485 * DR (RW) 486 * 487 * Disable Retry 488 * When this bit is set, the MAC attempts only one transmission. When a collision occurs on the GMII or MII interface, the MAC ignores the current frame transmission and reports a Frame Abort with excessive collision error in the transmit frame status. When this bit is reset, the MAC attempts retries based on the settings of the BL field (Bits [6:5]). 489 */ 490 #define ENET_MACCFG_DR_MASK (0x200U) 491 #define ENET_MACCFG_DR_SHIFT (9U) 492 #define ENET_MACCFG_DR_SET(x) (((uint32_t)(x) << ENET_MACCFG_DR_SHIFT) & ENET_MACCFG_DR_MASK) 493 #define ENET_MACCFG_DR_GET(x) (((uint32_t)(x) & ENET_MACCFG_DR_MASK) >> ENET_MACCFG_DR_SHIFT) 494 495 /* 496 * LUD (RW) 497 * 498 * Link Up or Down 499 * This bit indicates whether the link is up or down during the transmission of configuration in the RGMII, SGMII, or SMII interface: 500 * - 0: Link Down 501 * - 1: Link Up 502 */ 503 #define ENET_MACCFG_LUD_MASK (0x100U) 504 #define ENET_MACCFG_LUD_SHIFT (8U) 505 #define ENET_MACCFG_LUD_SET(x) (((uint32_t)(x) << ENET_MACCFG_LUD_SHIFT) & ENET_MACCFG_LUD_MASK) 506 #define ENET_MACCFG_LUD_GET(x) (((uint32_t)(x) & ENET_MACCFG_LUD_MASK) >> ENET_MACCFG_LUD_SHIFT) 507 508 /* 509 * ACS (RW) 510 * 511 * Automatic Pad or CRC Stripping 512 * When this bit is set, the MAC strips the Pad or FCS field on the incoming frames only if the value of the length field is less than 1,536 bytes. All received frames with length field greater than or equal to 1,536 bytes are passed to the application without stripping the Pad or FCS field. When this bit is reset, the MAC passes all incoming frames, without modifying them, to the Host. 513 */ 514 #define ENET_MACCFG_ACS_MASK (0x80U) 515 #define ENET_MACCFG_ACS_SHIFT (7U) 516 #define ENET_MACCFG_ACS_SET(x) (((uint32_t)(x) << ENET_MACCFG_ACS_SHIFT) & ENET_MACCFG_ACS_MASK) 517 #define ENET_MACCFG_ACS_GET(x) (((uint32_t)(x) & ENET_MACCFG_ACS_MASK) >> ENET_MACCFG_ACS_SHIFT) 518 519 /* 520 * BL (RW) 521 * 522 * Back-Off Limit 523 * The Back-Off limit determines the random integer number (r) of slot time delays (4,096 bit times for 1000 Mbps and 512 bit times for 10/100 Mbps) for which the MAC waits before rescheduling a transmission attempt during retries after a collision. This bit is applicable only in the half-duplex mode and is reserved (RO) in the full-duplex-only configuration. 524 * - 00: k= min (n, 10) 525 * - 01: k = min (n, 8) 526 * - 10: k = min (n, 4) 527 * - 11: k = min (n, 1) where n = retransmission attempt. The random integer r takes the value in the range 0 ≤ r < 2k 528 */ 529 #define ENET_MACCFG_BL_MASK (0x60U) 530 #define ENET_MACCFG_BL_SHIFT (5U) 531 #define ENET_MACCFG_BL_SET(x) (((uint32_t)(x) << ENET_MACCFG_BL_SHIFT) & ENET_MACCFG_BL_MASK) 532 #define ENET_MACCFG_BL_GET(x) (((uint32_t)(x) & ENET_MACCFG_BL_MASK) >> ENET_MACCFG_BL_SHIFT) 533 534 /* 535 * DC (RW) 536 * 537 * Deferral Check 538 * When this bit is set, the deferral check function is enabled in the MAC. The MAC issues a Frame Abort status, along with the excessive deferral error bit set in the transmit frame status, when the transmit state machine is deferred for more than 24,288 bit times in the 10 or 100 Mbps mode. If the MAC is configured for 1000 Mbps operation or if the Jumbo frame mode is enabled in the 10 or 100 Mbps mode, the threshold for deferral is 155,680 bits times. Deferral begins when the transmitter is ready to transmit, but it is prevented because of an active carrier sense signal (CRS) on GMII or MII. The defer time is not cumulative. For example, if the transmitter defers for 10,000 bit times because the CRS signal is active and then the CRS signal becomes inactive, the transmitter transmits and collision happens. Because of collision, the transmitter needs to back off and then defer again after back off completion. In such a scenario, the deferral timer is reset to 0 and it is restarted. 539 */ 540 #define ENET_MACCFG_DC_MASK (0x10U) 541 #define ENET_MACCFG_DC_SHIFT (4U) 542 #define ENET_MACCFG_DC_SET(x) (((uint32_t)(x) << ENET_MACCFG_DC_SHIFT) & ENET_MACCFG_DC_MASK) 543 #define ENET_MACCFG_DC_GET(x) (((uint32_t)(x) & ENET_MACCFG_DC_MASK) >> ENET_MACCFG_DC_SHIFT) 544 545 /* 546 * TE (RW) 547 * 548 * Transmitter Enable 549 * When this bit is set, the transmit state machine of the MAC is enabled for transmission on the GMII or MII. When this bit is reset, the MAC transmit state machine is disabled after the completion of the transmission of the current frame, and does not transmit any further frames. 550 */ 551 #define ENET_MACCFG_TE_MASK (0x8U) 552 #define ENET_MACCFG_TE_SHIFT (3U) 553 #define ENET_MACCFG_TE_SET(x) (((uint32_t)(x) << ENET_MACCFG_TE_SHIFT) & ENET_MACCFG_TE_MASK) 554 #define ENET_MACCFG_TE_GET(x) (((uint32_t)(x) & ENET_MACCFG_TE_MASK) >> ENET_MACCFG_TE_SHIFT) 555 556 /* 557 * RE (RW) 558 * 559 * Receiver Enable 560 * When this bit is set, the receiver state machine of the MAC is enabled for receiving frames from the GMII or MII. When this bit is reset, the MAC receive state machine is disabled after the completion of the reception of the current frame, and does not receive any further frames from the GMII or MII. 561 */ 562 #define ENET_MACCFG_RE_MASK (0x4U) 563 #define ENET_MACCFG_RE_SHIFT (2U) 564 #define ENET_MACCFG_RE_SET(x) (((uint32_t)(x) << ENET_MACCFG_RE_SHIFT) & ENET_MACCFG_RE_MASK) 565 #define ENET_MACCFG_RE_GET(x) (((uint32_t)(x) & ENET_MACCFG_RE_MASK) >> ENET_MACCFG_RE_SHIFT) 566 567 /* 568 * PRELEN (RW) 569 * 570 * Preamble Length for Transmit frames 571 * These bits control the number of preamble bytes that are added to the beginning of every Transmit frame. The preamble reduction occurs only when the MAC is operating in the full-duplex mode. 572 * - 2'b00: 7 bytes of preamble 573 * - 2'b01: 5 bytes of preamble 574 * - 2'b10: 3 bytes of preamble 575 * - 2'b11: Reserved 576 */ 577 #define ENET_MACCFG_PRELEN_MASK (0x3U) 578 #define ENET_MACCFG_PRELEN_SHIFT (0U) 579 #define ENET_MACCFG_PRELEN_SET(x) (((uint32_t)(x) << ENET_MACCFG_PRELEN_SHIFT) & ENET_MACCFG_PRELEN_MASK) 580 #define ENET_MACCFG_PRELEN_GET(x) (((uint32_t)(x) & ENET_MACCFG_PRELEN_MASK) >> ENET_MACCFG_PRELEN_SHIFT) 581 582 /* Bitfield definition for register: MACFF */ 583 /* 584 * RA (RW) 585 * 586 * Receive All 587 * When this bit is set, the MAC Receiver module passes all received frames, irrespective of whether they pass the address filter or not, to the Application. The result of the SA or DA filtering is updated (pass or fail) in the corresponding bits in the Receive Status Word. When this bit is reset, the Receiver module passes only those frames to the Application that pass the SA or DA address filter. 588 */ 589 #define ENET_MACFF_RA_MASK (0x80000000UL) 590 #define ENET_MACFF_RA_SHIFT (31U) 591 #define ENET_MACFF_RA_SET(x) (((uint32_t)(x) << ENET_MACFF_RA_SHIFT) & ENET_MACFF_RA_MASK) 592 #define ENET_MACFF_RA_GET(x) (((uint32_t)(x) & ENET_MACFF_RA_MASK) >> ENET_MACFF_RA_SHIFT) 593 594 /* 595 * DNTU (RW) 596 * 597 * Drop non-TCP/UDP over IP Frames 598 * When set, this bit enables the MAC to drop the non-TCP or UDP over IP frames. The MAC forward only those frames that are processed by the Layer 4 filter. When reset, this bit enables the MAC to forward all non-TCP or UDP over IP frames. 599 */ 600 #define ENET_MACFF_DNTU_MASK (0x200000UL) 601 #define ENET_MACFF_DNTU_SHIFT (21U) 602 #define ENET_MACFF_DNTU_SET(x) (((uint32_t)(x) << ENET_MACFF_DNTU_SHIFT) & ENET_MACFF_DNTU_MASK) 603 #define ENET_MACFF_DNTU_GET(x) (((uint32_t)(x) & ENET_MACFF_DNTU_MASK) >> ENET_MACFF_DNTU_SHIFT) 604 605 /* 606 * IPFE (RW) 607 * 608 * Layer 3 and Layer 4 Filter Enable 609 * When set, this bit enables the MAC to drop frames that do not match the enabled Layer 3 and Layer 4 filters. If Layer 3 or Layer 4 filters are not enabled for matching, this bit does not have any effect. When reset, the MAC forwards all frames irrespective of the match status of the Layer 3 and Layer 4 fields. 610 */ 611 #define ENET_MACFF_IPFE_MASK (0x100000UL) 612 #define ENET_MACFF_IPFE_SHIFT (20U) 613 #define ENET_MACFF_IPFE_SET(x) (((uint32_t)(x) << ENET_MACFF_IPFE_SHIFT) & ENET_MACFF_IPFE_MASK) 614 #define ENET_MACFF_IPFE_GET(x) (((uint32_t)(x) & ENET_MACFF_IPFE_MASK) >> ENET_MACFF_IPFE_SHIFT) 615 616 /* 617 * VTFE (RW) 618 * 619 * VLAN Tag Filter Enable 620 * When set, this bit enables the MAC to drop VLAN tagged frames that do not match the VLAN Tag comparison. When reset, the MAC forwards all frames irrespective of the match status of the VLAN Tag. 621 */ 622 #define ENET_MACFF_VTFE_MASK (0x8000U) 623 #define ENET_MACFF_VTFE_SHIFT (15U) 624 #define ENET_MACFF_VTFE_SET(x) (((uint32_t)(x) << ENET_MACFF_VTFE_SHIFT) & ENET_MACFF_VTFE_MASK) 625 #define ENET_MACFF_VTFE_GET(x) (((uint32_t)(x) & ENET_MACFF_VTFE_MASK) >> ENET_MACFF_VTFE_SHIFT) 626 627 /* 628 * HPF (RW) 629 * 630 * Hash or Perfect Filter 631 * When this bit is set, it configures the address filter to pass a frame if it matches either the perfect filtering or the hash filtering as set by the HMC or HUC bits. When this bit is low and the HUC or HMC bit is set, the frame is passed only if it matches the Hash filter. 632 */ 633 #define ENET_MACFF_HPF_MASK (0x400U) 634 #define ENET_MACFF_HPF_SHIFT (10U) 635 #define ENET_MACFF_HPF_SET(x) (((uint32_t)(x) << ENET_MACFF_HPF_SHIFT) & ENET_MACFF_HPF_MASK) 636 #define ENET_MACFF_HPF_GET(x) (((uint32_t)(x) & ENET_MACFF_HPF_MASK) >> ENET_MACFF_HPF_SHIFT) 637 638 /* 639 * SAF (RW) 640 * 641 * Source Address Filter Enable 642 * When this bit is set, the MAC compares the SA field of the received frames with the values programmed in the enabled SA registers. If the comparison fails, the MAC drops the frame. When this bit is reset, the MAC forwards the received frame to the application with updated SAF bit of the Rx Status depending on the SA address comparison. 643 */ 644 #define ENET_MACFF_SAF_MASK (0x200U) 645 #define ENET_MACFF_SAF_SHIFT (9U) 646 #define ENET_MACFF_SAF_SET(x) (((uint32_t)(x) << ENET_MACFF_SAF_SHIFT) & ENET_MACFF_SAF_MASK) 647 #define ENET_MACFF_SAF_GET(x) (((uint32_t)(x) & ENET_MACFF_SAF_MASK) >> ENET_MACFF_SAF_SHIFT) 648 649 /* 650 * SAIF (RW) 651 * 652 * SA Inverse Filtering 653 * When this bit is set, the Address Check block operates in inverse filtering mode for the SA address comparison. The frames whose SA matches the SA registers are marked as failing the SA Address filter. When this bit is reset, frames whose SA does not match the SA registers are marked as failing the SA Address filter. 654 */ 655 #define ENET_MACFF_SAIF_MASK (0x100U) 656 #define ENET_MACFF_SAIF_SHIFT (8U) 657 #define ENET_MACFF_SAIF_SET(x) (((uint32_t)(x) << ENET_MACFF_SAIF_SHIFT) & ENET_MACFF_SAIF_MASK) 658 #define ENET_MACFF_SAIF_GET(x) (((uint32_t)(x) & ENET_MACFF_SAIF_MASK) >> ENET_MACFF_SAIF_SHIFT) 659 660 /* 661 * PCF (RW) 662 * 663 * Pass Control Frames 664 * These bits control the forwarding of all control frames (including unicast and multicast Pause frames). 665 * - 00: MAC filters all control frames from reaching the application. 666 * - 01: MAC forwards all control frames except Pause frames to application even if they fail the Address filter. 667 * - 10: MAC forwards all control frames to application even if they fail the Address Filter. 668 * - 11: MAC forwards control frames that pass the Address Filter. The following conditions should be true for the Pause frames processing: - Condition 1: The MAC is in the full-duplex mode and flow control is enabled by setting Bit 2 (RFE) of Register 6 (Flow Control Register) to 1. - Condition 2: The destination address (DA) of the received frame matches the special multicast address or the MAC Address 0 when Bit 3 (UP) of the Register 6 (Flow Control Register) is set. - Condition 3: The Type field of the received frame is 0x8808 and the OPCODE field is 0x0001. Note: This field should be set to 01 only when the Condition 1 is true, that is, the MAC is programmed to operate in the full-duplex mode and the RFE bit is enabled. Otherwise, the Pause frame filtering may be inconsistent. When Condition 1 is false, the Pause frames are considered as generic control frames. Therefore, to pass all control frames (including Pause frames) when the full-duplex mode and flow control is not enabled, you should set the PCF field to 10 or 11 (as required by the application). 669 */ 670 #define ENET_MACFF_PCF_MASK (0xC0U) 671 #define ENET_MACFF_PCF_SHIFT (6U) 672 #define ENET_MACFF_PCF_SET(x) (((uint32_t)(x) << ENET_MACFF_PCF_SHIFT) & ENET_MACFF_PCF_MASK) 673 #define ENET_MACFF_PCF_GET(x) (((uint32_t)(x) & ENET_MACFF_PCF_MASK) >> ENET_MACFF_PCF_SHIFT) 674 675 /* 676 * DBF (RW) 677 * 678 * Disable Broadcast Frames 679 * When this bit is set, the AFM module blocks all incoming broadcast frames. In addition, it overrides all other filter settings. When this bit is reset, the AFM module passes all received broadcast frames. 680 */ 681 #define ENET_MACFF_DBF_MASK (0x20U) 682 #define ENET_MACFF_DBF_SHIFT (5U) 683 #define ENET_MACFF_DBF_SET(x) (((uint32_t)(x) << ENET_MACFF_DBF_SHIFT) & ENET_MACFF_DBF_MASK) 684 #define ENET_MACFF_DBF_GET(x) (((uint32_t)(x) & ENET_MACFF_DBF_MASK) >> ENET_MACFF_DBF_SHIFT) 685 686 /* 687 * PM (RW) 688 * 689 * Pass All Multicast 690 * When set, this bit indicates that all received frames with a multicast destination address (first bit in the destination address field is '1') are passed. When reset, filtering of multicast frame depends on HMC bit. 691 */ 692 #define ENET_MACFF_PM_MASK (0x10U) 693 #define ENET_MACFF_PM_SHIFT (4U) 694 #define ENET_MACFF_PM_SET(x) (((uint32_t)(x) << ENET_MACFF_PM_SHIFT) & ENET_MACFF_PM_MASK) 695 #define ENET_MACFF_PM_GET(x) (((uint32_t)(x) & ENET_MACFF_PM_MASK) >> ENET_MACFF_PM_SHIFT) 696 697 /* 698 * DAIF (RW) 699 * 700 * DA Inverse Filtering 701 * When this bit is set, the Address Check block operates in inverse filtering mode for the DA address comparison for both unicast and multicast frames. When reset, normal filtering of frames is performed. 702 */ 703 #define ENET_MACFF_DAIF_MASK (0x8U) 704 #define ENET_MACFF_DAIF_SHIFT (3U) 705 #define ENET_MACFF_DAIF_SET(x) (((uint32_t)(x) << ENET_MACFF_DAIF_SHIFT) & ENET_MACFF_DAIF_MASK) 706 #define ENET_MACFF_DAIF_GET(x) (((uint32_t)(x) & ENET_MACFF_DAIF_MASK) >> ENET_MACFF_DAIF_SHIFT) 707 708 /* 709 * HMC (RW) 710 * 711 * Hash Multicast 712 * When set, the MAC performs destination address filtering of received multicast frames according to the hash table. When reset, the MAC performs a perfect destination address filtering for multicast frames, that is, it compares the DA field with the values programmed in DA registers. 713 */ 714 #define ENET_MACFF_HMC_MASK (0x4U) 715 #define ENET_MACFF_HMC_SHIFT (2U) 716 #define ENET_MACFF_HMC_SET(x) (((uint32_t)(x) << ENET_MACFF_HMC_SHIFT) & ENET_MACFF_HMC_MASK) 717 #define ENET_MACFF_HMC_GET(x) (((uint32_t)(x) & ENET_MACFF_HMC_MASK) >> ENET_MACFF_HMC_SHIFT) 718 719 /* 720 * HUC (RW) 721 * 722 * Hash Unicast 723 * When set, the MAC performs destination address filtering of unicast frames according to the hash table. When reset, the MAC performs a perfect destination address filtering for unicast frames, that is, it compares the DA field with the values programmed in DA registers. 724 */ 725 #define ENET_MACFF_HUC_MASK (0x2U) 726 #define ENET_MACFF_HUC_SHIFT (1U) 727 #define ENET_MACFF_HUC_SET(x) (((uint32_t)(x) << ENET_MACFF_HUC_SHIFT) & ENET_MACFF_HUC_MASK) 728 #define ENET_MACFF_HUC_GET(x) (((uint32_t)(x) & ENET_MACFF_HUC_MASK) >> ENET_MACFF_HUC_SHIFT) 729 730 /* 731 * PR (RW) 732 * 733 * Promiscuous Mode 734 * When this bit is set, the Address Filter module passes all incoming frames irrespective of the destination or source address. The SA or DA Filter Fails status bits of the Receive Status Word are always cleared when PR is set. 735 */ 736 #define ENET_MACFF_PR_MASK (0x1U) 737 #define ENET_MACFF_PR_SHIFT (0U) 738 #define ENET_MACFF_PR_SET(x) (((uint32_t)(x) << ENET_MACFF_PR_SHIFT) & ENET_MACFF_PR_MASK) 739 #define ENET_MACFF_PR_GET(x) (((uint32_t)(x) & ENET_MACFF_PR_MASK) >> ENET_MACFF_PR_SHIFT) 740 741 /* Bitfield definition for register: HASH_H */ 742 /* 743 * HTH (RW) 744 * 745 * Hash Table High 746 * This field contains the upper 32 bits of the Hash table. 747 */ 748 #define ENET_HASH_H_HTH_MASK (0xFFFFFFFFUL) 749 #define ENET_HASH_H_HTH_SHIFT (0U) 750 #define ENET_HASH_H_HTH_SET(x) (((uint32_t)(x) << ENET_HASH_H_HTH_SHIFT) & ENET_HASH_H_HTH_MASK) 751 #define ENET_HASH_H_HTH_GET(x) (((uint32_t)(x) & ENET_HASH_H_HTH_MASK) >> ENET_HASH_H_HTH_SHIFT) 752 753 /* Bitfield definition for register: HASH_L */ 754 /* 755 * HTL (RW) 756 * 757 * Hash Table Low 758 * This field contains the lower 32 bits of the Hash table. 759 */ 760 #define ENET_HASH_L_HTL_MASK (0xFFFFFFFFUL) 761 #define ENET_HASH_L_HTL_SHIFT (0U) 762 #define ENET_HASH_L_HTL_SET(x) (((uint32_t)(x) << ENET_HASH_L_HTL_SHIFT) & ENET_HASH_L_HTL_MASK) 763 #define ENET_HASH_L_HTL_GET(x) (((uint32_t)(x) & ENET_HASH_L_HTL_MASK) >> ENET_HASH_L_HTL_SHIFT) 764 765 /* Bitfield definition for register: GMII_ADDR */ 766 /* 767 * PA (RW) 768 * 769 * Physical Layer Address 770 * This field indicates which of the 32 possible PHY devices are being accessed. For RevMII, this field gives the PHY Address of the RevMII module. 771 */ 772 #define ENET_GMII_ADDR_PA_MASK (0xF800U) 773 #define ENET_GMII_ADDR_PA_SHIFT (11U) 774 #define ENET_GMII_ADDR_PA_SET(x) (((uint32_t)(x) << ENET_GMII_ADDR_PA_SHIFT) & ENET_GMII_ADDR_PA_MASK) 775 #define ENET_GMII_ADDR_PA_GET(x) (((uint32_t)(x) & ENET_GMII_ADDR_PA_MASK) >> ENET_GMII_ADDR_PA_SHIFT) 776 777 /* 778 * GR (RW) 779 * 780 * GMII Register 781 * These bits select the desired GMII register in the selected PHY device. For RevMII, these bits select the desired CSR register in the RevMII Registers set. 782 */ 783 #define ENET_GMII_ADDR_GR_MASK (0x7C0U) 784 #define ENET_GMII_ADDR_GR_SHIFT (6U) 785 #define ENET_GMII_ADDR_GR_SET(x) (((uint32_t)(x) << ENET_GMII_ADDR_GR_SHIFT) & ENET_GMII_ADDR_GR_MASK) 786 #define ENET_GMII_ADDR_GR_GET(x) (((uint32_t)(x) & ENET_GMII_ADDR_GR_MASK) >> ENET_GMII_ADDR_GR_SHIFT) 787 788 /* 789 * CR (RW) 790 * 791 * CSR Clock Range 792 * The CSR Clock Range selection determines the frequency of the MDC clock according to the CSR clock frequency used in your design. The CSR clock corresponding to different GMAC configurations is given in Table 9-2 on page 564. The suggested range of CSR clock frequency applicable for each value (when Bit[5] = 0) ensures that the MDC clock is approximately between the frequency range 1.0 MHz–2.5 MHz. 793 * - 0000: The CSR clock frequency is 60–100 MHz and the MDC clock frequency is CSR clock/42. 794 * - 0001: The CSR clock frequency is 100–150 MHz and the MDC clock frequency is CSR clock/62. 795 * - 0010: The CSR clock frequency is 20–35 MHz and the MDC clock frequency is CSR clock/16. 796 * - 0011: The CSR clock frequency is 35–60 MHz and the MDC clock frequency is CSR clock/26. 797 * - 0100: The CSR clock frequency is 150–250 MHz and the MDC clock frequency is CSR clock/102. 798 * - 0101: The CSR clock frequency is 250–300 MHz and the MDC clock is CSR clock/124. 799 * - 0110, 0111: Reserved When Bit 5 is set, you can achieve higher frequency of the MDC clock than the frequency limit of 2.5 MHz (specified in the IEEE Std 802.3) and program a clock divider of lower value. For example, when CSR clock is of 100 MHz frequency and you program these bits as 1010, then the resultant MDC clock is of 12.5 MHz which is outside the limit of IEEE 802.3 specified range. Program the following values only if the interfacing chips support faster MDC clocks. 800 * - 1000: CSR clock/4 801 * - 1001: CSR clock/6 802 * - 1010: CSR clock/8 803 * - 1011: CSR clock/10 804 * - 1100: CSR clock/12 805 * - 1101: CSR clock/14 806 * - 1110: CSR clock/16 807 * - 1111: CSR clock/18 These bits are not used for accessing RevMII. These bits are read-only if the RevMII interface is selected as single PHY interface. 808 */ 809 #define ENET_GMII_ADDR_CR_MASK (0x3CU) 810 #define ENET_GMII_ADDR_CR_SHIFT (2U) 811 #define ENET_GMII_ADDR_CR_SET(x) (((uint32_t)(x) << ENET_GMII_ADDR_CR_SHIFT) & ENET_GMII_ADDR_CR_MASK) 812 #define ENET_GMII_ADDR_CR_GET(x) (((uint32_t)(x) & ENET_GMII_ADDR_CR_MASK) >> ENET_GMII_ADDR_CR_SHIFT) 813 814 /* 815 * GW (RW) 816 * 817 * GMII Write 818 * When set, this bit indicates to the PHY or RevMII that this is a Write operation using the GMII Data register. If this bit is not set, it indicates that this is a Read operation, that is, placing the data in the GMII Data register. 819 */ 820 #define ENET_GMII_ADDR_GW_MASK (0x2U) 821 #define ENET_GMII_ADDR_GW_SHIFT (1U) 822 #define ENET_GMII_ADDR_GW_SET(x) (((uint32_t)(x) << ENET_GMII_ADDR_GW_SHIFT) & ENET_GMII_ADDR_GW_MASK) 823 #define ENET_GMII_ADDR_GW_GET(x) (((uint32_t)(x) & ENET_GMII_ADDR_GW_MASK) >> ENET_GMII_ADDR_GW_SHIFT) 824 825 /* 826 * GB (RW) 827 * 828 * GMII Busy 829 * This bit should read logic 0 before writing to Register 4 and Register 5. During a PHY or RevMII register access, the software sets this bit to 1’b1 to indicate that a Read or Write access is in progress. Register 5 is invalid until this bit is cleared by the MAC. Therefore, Register 5 (GMII Data) should be kept valid until the MAC clears this bit during a PHY Write operation. Similarly for a read operation, the contents of Register 5 are not valid until this bit is cleared. The subsequent read or write operation should happen only after the previous operation is complete. Because there is no acknowledgment from the PHY to MAC after a read or write operation is completed, there is no change in the functionality of this bit even when the PHY is not present. 830 */ 831 #define ENET_GMII_ADDR_GB_MASK (0x1U) 832 #define ENET_GMII_ADDR_GB_SHIFT (0U) 833 #define ENET_GMII_ADDR_GB_SET(x) (((uint32_t)(x) << ENET_GMII_ADDR_GB_SHIFT) & ENET_GMII_ADDR_GB_MASK) 834 #define ENET_GMII_ADDR_GB_GET(x) (((uint32_t)(x) & ENET_GMII_ADDR_GB_MASK) >> ENET_GMII_ADDR_GB_SHIFT) 835 836 /* Bitfield definition for register: GMII_DATA */ 837 /* 838 * GD (RW) 839 * 840 * GMII Data 841 * This field contains the 16-bit data value read from the PHY or RevMII after a Management Read operation or the 16-bit data value to be written to the PHY or RevMII before a Management Write operation. 842 */ 843 #define ENET_GMII_DATA_GD_MASK (0xFFFFU) 844 #define ENET_GMII_DATA_GD_SHIFT (0U) 845 #define ENET_GMII_DATA_GD_SET(x) (((uint32_t)(x) << ENET_GMII_DATA_GD_SHIFT) & ENET_GMII_DATA_GD_MASK) 846 #define ENET_GMII_DATA_GD_GET(x) (((uint32_t)(x) & ENET_GMII_DATA_GD_MASK) >> ENET_GMII_DATA_GD_SHIFT) 847 848 /* Bitfield definition for register: FLOWCTRL */ 849 /* 850 * PT (RW) 851 * 852 * Pause Time 853 * This field holds the value to be used in the Pause Time field in the transmit control frame. If the Pause Time bits is configured to be double-synchronized to the (G)MII clock domain, then consecutive writes to this register should be performed only after at least four clock cycles in the destination clock domain. 854 */ 855 #define ENET_FLOWCTRL_PT_MASK (0xFFFF0000UL) 856 #define ENET_FLOWCTRL_PT_SHIFT (16U) 857 #define ENET_FLOWCTRL_PT_SET(x) (((uint32_t)(x) << ENET_FLOWCTRL_PT_SHIFT) & ENET_FLOWCTRL_PT_MASK) 858 #define ENET_FLOWCTRL_PT_GET(x) (((uint32_t)(x) & ENET_FLOWCTRL_PT_MASK) >> ENET_FLOWCTRL_PT_SHIFT) 859 860 /* 861 * DZPQ (RW) 862 * 863 * Disable Zero-Quanta Pause 864 * When this bit is set, it disables the automatic generation of the Zero-Quanta Pause frames on the de-assertion of the flow-control signal from the FIFO layer (MTL or external sideband flow control signal sbd_flowctrl_i/mti_flowctrl_i). When this bit is reset, normal operation with automatic Zero-Quanta Pause frame generation is enabled. 865 */ 866 #define ENET_FLOWCTRL_DZPQ_MASK (0x80U) 867 #define ENET_FLOWCTRL_DZPQ_SHIFT (7U) 868 #define ENET_FLOWCTRL_DZPQ_SET(x) (((uint32_t)(x) << ENET_FLOWCTRL_DZPQ_SHIFT) & ENET_FLOWCTRL_DZPQ_MASK) 869 #define ENET_FLOWCTRL_DZPQ_GET(x) (((uint32_t)(x) & ENET_FLOWCTRL_DZPQ_MASK) >> ENET_FLOWCTRL_DZPQ_SHIFT) 870 871 /* 872 * PLT (RW) 873 * 874 * Pause Low Threshold 875 * This field configures the threshold of the Pause timer at which the input flow control signal mti_flowctrl_i (or sbd_flowctrl_i) is checked for automatic retransmission of the Pause frame. The threshold values should be always less than the Pause Time configured in Bits[31:16]. For example, if PT = 100H (256 slot-times), and PLT = 01, then a second Pause frame is automatically transmitted if the mti_flowctrl_i signal is asserted at 228 (256 – 28) slot times after the first Pause frame is transmitted. The following list provides the threshold values for different values: 876 * - 00: The threshold is Pause time minus 4 slot times (PT – 4 slot times). 877 * - 01: The threshold is Pause time minus 28 slot times (PT – 28 slot times). 878 * - 10: The threshold is Pause time minus 144 slot times (PT – 144 slot times). 879 * - 11: The threshold is Pause time minus 256 slot times (PT – 256 slot times). The slot time is defined as the time taken to transmit 512 bits (64 bytes) on the GMII or MII interface. 880 */ 881 #define ENET_FLOWCTRL_PLT_MASK (0x30U) 882 #define ENET_FLOWCTRL_PLT_SHIFT (4U) 883 #define ENET_FLOWCTRL_PLT_SET(x) (((uint32_t)(x) << ENET_FLOWCTRL_PLT_SHIFT) & ENET_FLOWCTRL_PLT_MASK) 884 #define ENET_FLOWCTRL_PLT_GET(x) (((uint32_t)(x) & ENET_FLOWCTRL_PLT_MASK) >> ENET_FLOWCTRL_PLT_SHIFT) 885 886 /* 887 * UP (RW) 888 * 889 * Unicast Pause Frame Detect A pause frame is processed when it has the unique multicast address specified in the IEEE Std 802.3. When this bit is set, the MAC can also detect Pause frames with unicast address of the station. This unicast address should be as specified in the MAC Address0 High Register and MAC Address0 Low Register. When this bit is reset, the MAC only detects Pause frames with unique multicast address. 890 */ 891 #define ENET_FLOWCTRL_UP_MASK (0x8U) 892 #define ENET_FLOWCTRL_UP_SHIFT (3U) 893 #define ENET_FLOWCTRL_UP_SET(x) (((uint32_t)(x) << ENET_FLOWCTRL_UP_SHIFT) & ENET_FLOWCTRL_UP_MASK) 894 #define ENET_FLOWCTRL_UP_GET(x) (((uint32_t)(x) & ENET_FLOWCTRL_UP_MASK) >> ENET_FLOWCTRL_UP_SHIFT) 895 896 /* 897 * RFE (RW) 898 * 899 * Receive Flow Control Enable 900 * When this bit is set, the MAC decodes the received Pause frame and disables its transmitter for a specified (Pause) time. When this bit is reset, the decode function of the Pause frame is disabled. 901 */ 902 #define ENET_FLOWCTRL_RFE_MASK (0x4U) 903 #define ENET_FLOWCTRL_RFE_SHIFT (2U) 904 #define ENET_FLOWCTRL_RFE_SET(x) (((uint32_t)(x) << ENET_FLOWCTRL_RFE_SHIFT) & ENET_FLOWCTRL_RFE_MASK) 905 #define ENET_FLOWCTRL_RFE_GET(x) (((uint32_t)(x) & ENET_FLOWCTRL_RFE_MASK) >> ENET_FLOWCTRL_RFE_SHIFT) 906 907 /* 908 * TFE (RW) 909 * 910 * Transmit Flow Control Enable 911 * In the full-duplex mode, when this bit is set, the MAC enables the flow control operation to transmit Pause frames. When this bit is reset, the flow control operation in the MAC is disabled, and the MAC does not transmit any Pause frames. In the half-duplex mode, when this bit is set, the MAC enables the backpressure operation. When this bit is reset, the backpressure feature is disabled. 912 */ 913 #define ENET_FLOWCTRL_TFE_MASK (0x2U) 914 #define ENET_FLOWCTRL_TFE_SHIFT (1U) 915 #define ENET_FLOWCTRL_TFE_SET(x) (((uint32_t)(x) << ENET_FLOWCTRL_TFE_SHIFT) & ENET_FLOWCTRL_TFE_MASK) 916 #define ENET_FLOWCTRL_TFE_GET(x) (((uint32_t)(x) & ENET_FLOWCTRL_TFE_MASK) >> ENET_FLOWCTRL_TFE_SHIFT) 917 918 /* 919 * FCB_BPA (RW) 920 * 921 * Flow Control Busy or Backpressure Activate 922 * This bit initiates a Pause frame in the full-duplex mode and activates the backpressure function in the half-duplex mode if the TFE bit is set. In the full-duplex mode, this bit should be read as 1'b0 before writing to the Flow Control register. To initiate a Pause frame, the Application must set this bit to 1'b1. During a transfer of the Control Frame, this bit continues to be set to signify that a frame transmission is in progress. After the completion of Pause frame transmission, the MAC resets this bit to 1'b0. The Flow Control register should not be written to until this bit is cleared. In the half-duplex mode, when this bit is set (and TFE is set), then backpressure is asserted by the MAC. During backpressure, when the MAC receives a new frame, the transmitter starts sending a JAM pattern resulting in a collision. This control register bit is logically ORed with the mti_flowctrl_i input signal for the backpressure function. When the MAC is configured for the full-duplex mode, the BPA is automatically disabled. 923 */ 924 #define ENET_FLOWCTRL_FCB_BPA_MASK (0x1U) 925 #define ENET_FLOWCTRL_FCB_BPA_SHIFT (0U) 926 #define ENET_FLOWCTRL_FCB_BPA_SET(x) (((uint32_t)(x) << ENET_FLOWCTRL_FCB_BPA_SHIFT) & ENET_FLOWCTRL_FCB_BPA_MASK) 927 #define ENET_FLOWCTRL_FCB_BPA_GET(x) (((uint32_t)(x) & ENET_FLOWCTRL_FCB_BPA_MASK) >> ENET_FLOWCTRL_FCB_BPA_SHIFT) 928 929 /* Bitfield definition for register: VLAN_TAG */ 930 /* 931 * VTHM (RW) 932 * 933 * VLAN Tag Hash Table Match Enable 934 * When set, the most significant four bits of the VLAN tag’s CRC are used to index the content of Register 354 (VLAN Hash Table Register). A value of 1 in the VLAN Hash Table register, corresponding to the index, indicates that the frame matched the VLAN hash table. When Bit 16 (ETV) is set, the CRC of the 12-bit VLAN Identifier (VID) is used for comparison whereas when ETV is reset, the CRC of the 16-bit VLAN tag is used for comparison. When reset, the VLAN Hash Match operation is not performed. 935 */ 936 #define ENET_VLAN_TAG_VTHM_MASK (0x80000UL) 937 #define ENET_VLAN_TAG_VTHM_SHIFT (19U) 938 #define ENET_VLAN_TAG_VTHM_SET(x) (((uint32_t)(x) << ENET_VLAN_TAG_VTHM_SHIFT) & ENET_VLAN_TAG_VTHM_MASK) 939 #define ENET_VLAN_TAG_VTHM_GET(x) (((uint32_t)(x) & ENET_VLAN_TAG_VTHM_MASK) >> ENET_VLAN_TAG_VTHM_SHIFT) 940 941 /* 942 * ESVL (RW) 943 * 944 * Enable S-VLAN 945 * When this bit is set, the MAC transmitter and receiver also consider the S-VLAN (Type = 0x88A8) frames as valid VLAN tagged frames. 946 */ 947 #define ENET_VLAN_TAG_ESVL_MASK (0x40000UL) 948 #define ENET_VLAN_TAG_ESVL_SHIFT (18U) 949 #define ENET_VLAN_TAG_ESVL_SET(x) (((uint32_t)(x) << ENET_VLAN_TAG_ESVL_SHIFT) & ENET_VLAN_TAG_ESVL_MASK) 950 #define ENET_VLAN_TAG_ESVL_GET(x) (((uint32_t)(x) & ENET_VLAN_TAG_ESVL_MASK) >> ENET_VLAN_TAG_ESVL_SHIFT) 951 952 /* 953 * VTIM (RW) 954 * 955 * VLAN Tag Inverse Match Enable 956 * When set, this bit enables the VLAN Tag inverse matching. The frames that do not have matching VLAN Tag are marked as matched. When reset, this bit enables the VLAN Tag perfect matching. The frames with matched VLAN Tag are marked as matched. 957 */ 958 #define ENET_VLAN_TAG_VTIM_MASK (0x20000UL) 959 #define ENET_VLAN_TAG_VTIM_SHIFT (17U) 960 #define ENET_VLAN_TAG_VTIM_SET(x) (((uint32_t)(x) << ENET_VLAN_TAG_VTIM_SHIFT) & ENET_VLAN_TAG_VTIM_MASK) 961 #define ENET_VLAN_TAG_VTIM_GET(x) (((uint32_t)(x) & ENET_VLAN_TAG_VTIM_MASK) >> ENET_VLAN_TAG_VTIM_SHIFT) 962 963 /* 964 * ETV (RW) 965 * 966 * Enable 12-Bit VLAN Tag Comparison 967 * When this bit is set, a 12-bit VLAN identifier is used for comparing and filtering instead of the complete 16-bit VLAN tag. Bits [11:0] of VLAN tag are compared with the corresponding field in the received VLAN-tagged frame. Similarly, when enabled, only 12 bits of the VLAN tag in the received frame are used for hash-based VLAN filtering. When this bit is reset, all 16 bits of the 15th and 16th bytes of the received VLAN frame are used for comparison and VLAN hash filtering. 968 */ 969 #define ENET_VLAN_TAG_ETV_MASK (0x10000UL) 970 #define ENET_VLAN_TAG_ETV_SHIFT (16U) 971 #define ENET_VLAN_TAG_ETV_SET(x) (((uint32_t)(x) << ENET_VLAN_TAG_ETV_SHIFT) & ENET_VLAN_TAG_ETV_MASK) 972 #define ENET_VLAN_TAG_ETV_GET(x) (((uint32_t)(x) & ENET_VLAN_TAG_ETV_MASK) >> ENET_VLAN_TAG_ETV_SHIFT) 973 974 /* 975 * VL (RW) 976 * 977 * VLAN Tag Identifier for Receive Frames 978 * This field contains the 802.1Q VLAN tag to identify the VLAN frames and is compared to the 15th and 16th bytes of the frames being received for VLAN frames. The following list describes the bits of this field: - Bits [15:13]: User Priority - Bit 12: Canonical Format Indicator (CFI) or Drop Eligible Indicator (DEI) - Bits[11:0]: VLAN tag’s VLAN Identifier (VID) field When the ETV bit is set, only the VID (Bits[11:0]) is used for comparison. If VL (VL[11:0] if ETV is set) is all zeros, the MAC does not check the fifteenth and 16th bytes for VLAN tag comparison, and declares all frames with a Type field value of 0x8100 or 0x88a8 as VLAN frames. 979 */ 980 #define ENET_VLAN_TAG_VL_MASK (0xFFFFU) 981 #define ENET_VLAN_TAG_VL_SHIFT (0U) 982 #define ENET_VLAN_TAG_VL_SET(x) (((uint32_t)(x) << ENET_VLAN_TAG_VL_SHIFT) & ENET_VLAN_TAG_VL_MASK) 983 #define ENET_VLAN_TAG_VL_GET(x) (((uint32_t)(x) & ENET_VLAN_TAG_VL_MASK) >> ENET_VLAN_TAG_VL_SHIFT) 984 985 /* Bitfield definition for register: VERSION */ 986 /* 987 * USERVER (RO) 988 * 989 * User-defined Version 990 */ 991 #define ENET_VERSION_USERVER_MASK (0xFF00U) 992 #define ENET_VERSION_USERVER_SHIFT (8U) 993 #define ENET_VERSION_USERVER_GET(x) (((uint32_t)(x) & ENET_VERSION_USERVER_MASK) >> ENET_VERSION_USERVER_SHIFT) 994 995 /* 996 * SNPSVER (RO) 997 * 998 * Synopsys-defined Version (3.7) 999 */ 1000 #define ENET_VERSION_SNPSVER_MASK (0xFFU) 1001 #define ENET_VERSION_SNPSVER_SHIFT (0U) 1002 #define ENET_VERSION_SNPSVER_GET(x) (((uint32_t)(x) & ENET_VERSION_SNPSVER_MASK) >> ENET_VERSION_SNPSVER_SHIFT) 1003 1004 /* Bitfield definition for register: DEBUGGING */ 1005 /* 1006 * TXSTSFSTS (RO) 1007 * 1008 * MTL TxStatus FIFO Full Status 1009 * When high, this bit indicates that the MTL TxStatus FIFO is full. Therefore, the MTL cannot accept any more frames for transmission. This bit is reserved in the GMAC-AHB and GMAC-DMA configurations. 1010 */ 1011 #define ENET_DEBUGGING_TXSTSFSTS_MASK (0x2000000UL) 1012 #define ENET_DEBUGGING_TXSTSFSTS_SHIFT (25U) 1013 #define ENET_DEBUGGING_TXSTSFSTS_GET(x) (((uint32_t)(x) & ENET_DEBUGGING_TXSTSFSTS_MASK) >> ENET_DEBUGGING_TXSTSFSTS_SHIFT) 1014 1015 /* 1016 * TXFSTS (RO) 1017 * 1018 * MTL Tx FIFO Not Empty Status 1019 * When high, this bit indicates that the MTL Tx FIFO is not empty and some data is left for transmission. 1020 */ 1021 #define ENET_DEBUGGING_TXFSTS_MASK (0x1000000UL) 1022 #define ENET_DEBUGGING_TXFSTS_SHIFT (24U) 1023 #define ENET_DEBUGGING_TXFSTS_GET(x) (((uint32_t)(x) & ENET_DEBUGGING_TXFSTS_MASK) >> ENET_DEBUGGING_TXFSTS_SHIFT) 1024 1025 /* 1026 * TWCSTS (RO) 1027 * 1028 * MTL Tx FIFO Write Controller Status 1029 * When high, this bit indicates that the MTL Tx FIFO Write Controller is active and is transferring data to the Tx FIFO. 1030 */ 1031 #define ENET_DEBUGGING_TWCSTS_MASK (0x400000UL) 1032 #define ENET_DEBUGGING_TWCSTS_SHIFT (22U) 1033 #define ENET_DEBUGGING_TWCSTS_GET(x) (((uint32_t)(x) & ENET_DEBUGGING_TWCSTS_MASK) >> ENET_DEBUGGING_TWCSTS_SHIFT) 1034 1035 /* 1036 * TRCSTS (RO) 1037 * 1038 * MTL Tx FIFO Read Controller Status 1039 * This field indicates the state of the Tx FIFO Read Controller: 1040 * - 00: IDLE state 1041 * - 01: READ state (transferring data to the MAC transmitter) 1042 * - 10: Waiting for TxStatus from the MAC transmitter 1043 * - 11: Writing the received TxStatus or flushing the Tx FIFO 1044 */ 1045 #define ENET_DEBUGGING_TRCSTS_MASK (0x300000UL) 1046 #define ENET_DEBUGGING_TRCSTS_SHIFT (20U) 1047 #define ENET_DEBUGGING_TRCSTS_GET(x) (((uint32_t)(x) & ENET_DEBUGGING_TRCSTS_MASK) >> ENET_DEBUGGING_TRCSTS_SHIFT) 1048 1049 /* 1050 * TXPAUSED (RO) 1051 * 1052 * MAC Transmitter in Pause 1053 * When high, this bit indicates that the MAC transmitter is in the Pause condition (in the full-duplex-only mode) and hence does not schedule any frame for transmission. 1054 */ 1055 #define ENET_DEBUGGING_TXPAUSED_MASK (0x80000UL) 1056 #define ENET_DEBUGGING_TXPAUSED_SHIFT (19U) 1057 #define ENET_DEBUGGING_TXPAUSED_GET(x) (((uint32_t)(x) & ENET_DEBUGGING_TXPAUSED_MASK) >> ENET_DEBUGGING_TXPAUSED_SHIFT) 1058 1059 /* 1060 * TFCSTS (RO) 1061 * 1062 * MAC Transmit Frame Controller Status 1063 * This field indicates the state of the MAC Transmit Frame Controller module: 1064 * - 00: IDLE state 1065 * - 01: Waiting for status of previous frame or IFG or backoff period to be over 1066 * - 10: Generating and transmitting a Pause frame (in the full-duplex mode) 1067 * - 11: Transferring input frame for transmission 1068 */ 1069 #define ENET_DEBUGGING_TFCSTS_MASK (0x60000UL) 1070 #define ENET_DEBUGGING_TFCSTS_SHIFT (17U) 1071 #define ENET_DEBUGGING_TFCSTS_GET(x) (((uint32_t)(x) & ENET_DEBUGGING_TFCSTS_MASK) >> ENET_DEBUGGING_TFCSTS_SHIFT) 1072 1073 /* 1074 * TPESTS (RO) 1075 * 1076 * MAC GMII or MII Transmit Protocol Engine Status 1077 * When high, this bit indicates that the MAC GMII or MII transmit protocol engine is actively transmitting data and is not in the IDLE state. 1078 */ 1079 #define ENET_DEBUGGING_TPESTS_MASK (0x10000UL) 1080 #define ENET_DEBUGGING_TPESTS_SHIFT (16U) 1081 #define ENET_DEBUGGING_TPESTS_GET(x) (((uint32_t)(x) & ENET_DEBUGGING_TPESTS_MASK) >> ENET_DEBUGGING_TPESTS_SHIFT) 1082 1083 /* 1084 * RXFSTS (RO) 1085 * 1086 * MTL RxFIFO Fill-Level Status 1087 * This field gives the status of the fill-level of the Rx FIFO: 1088 * - 00: Rx FIFO Empty 1089 * - 01: Rx FIFO fill-level below flow-control deactivate threshold 1090 * - 10: Rx FIFO fill-level above flow-control activate threshold 1091 * - 11: Rx FIFO Full 1092 */ 1093 #define ENET_DEBUGGING_RXFSTS_MASK (0x300U) 1094 #define ENET_DEBUGGING_RXFSTS_SHIFT (8U) 1095 #define ENET_DEBUGGING_RXFSTS_GET(x) (((uint32_t)(x) & ENET_DEBUGGING_RXFSTS_MASK) >> ENET_DEBUGGING_RXFSTS_SHIFT) 1096 1097 /* 1098 * RRCSTS (RO) 1099 * 1100 * MTL RxFIFO Read Controller State 1101 * This field gives the state of the Rx FIFO read Controller: 1102 * - 00: IDLE state 1103 * - 01: Reading frame data 1104 * - 10: Reading frame status (or timestamp) 1105 * - 11: Flushing the frame data and status 1106 */ 1107 #define ENET_DEBUGGING_RRCSTS_MASK (0x60U) 1108 #define ENET_DEBUGGING_RRCSTS_SHIFT (5U) 1109 #define ENET_DEBUGGING_RRCSTS_GET(x) (((uint32_t)(x) & ENET_DEBUGGING_RRCSTS_MASK) >> ENET_DEBUGGING_RRCSTS_SHIFT) 1110 1111 /* 1112 * RWCSTS (RO) 1113 * 1114 * MTL Rx FIFO Write Controller Active Status 1115 * When high, this bit indicates that the MTL Rx FIFO Write Controller is active and is transferring a received frame to the FIFO. 1116 */ 1117 #define ENET_DEBUGGING_RWCSTS_MASK (0x10U) 1118 #define ENET_DEBUGGING_RWCSTS_SHIFT (4U) 1119 #define ENET_DEBUGGING_RWCSTS_GET(x) (((uint32_t)(x) & ENET_DEBUGGING_RWCSTS_MASK) >> ENET_DEBUGGING_RWCSTS_SHIFT) 1120 1121 /* 1122 * RFCFCSTS (RO) 1123 * 1124 * MAC Receive Frame FIFO Controller Status 1125 * When high, this field indicates the active state of the small FIFO Read and Write controllers of the MAC Receive Frame Controller Module. - RFCFCSTS[1] represents the status of small FIFO Read controller. - RFCFCSTS[0] represents the status of small FIFO Write controller. 1126 */ 1127 #define ENET_DEBUGGING_RFCFCSTS_MASK (0x6U) 1128 #define ENET_DEBUGGING_RFCFCSTS_SHIFT (1U) 1129 #define ENET_DEBUGGING_RFCFCSTS_GET(x) (((uint32_t)(x) & ENET_DEBUGGING_RFCFCSTS_MASK) >> ENET_DEBUGGING_RFCFCSTS_SHIFT) 1130 1131 /* 1132 * RPESTS (RO) 1133 * 1134 * MAC GMII or MII Receive Protocol Engine Status 1135 * When high, this bit indicates that the MAC GMII or MII receive protocol engine is actively receiving data and not in IDLE state. 1136 */ 1137 #define ENET_DEBUGGING_RPESTS_MASK (0x1U) 1138 #define ENET_DEBUGGING_RPESTS_SHIFT (0U) 1139 #define ENET_DEBUGGING_RPESTS_GET(x) (((uint32_t)(x) & ENET_DEBUGGING_RPESTS_MASK) >> ENET_DEBUGGING_RPESTS_SHIFT) 1140 1141 /* Bitfield definition for register: RWKFRMFILT */ 1142 /* 1143 * WKUPFRMFILT (RW) 1144 * 1145 * This is the address through which the application writes or reads the remote wake-up frame filter registers (wkupfmfilter_reg). The wkupfmfilter_reg register is a pointer to eight wkupfmfilter_reg registers. The wkupfmfilter_reg register is loaded by sequentially loading the eight register values. Eight sequential writes to this address (0x0028) write all wkupfmfilter_reg registers. Similarly, eight sequential reads from this address (0x0028) read all wkupfmfilter_reg registers 1146 */ 1147 #define ENET_RWKFRMFILT_WKUPFRMFILT_MASK (0xFFFFFFFFUL) 1148 #define ENET_RWKFRMFILT_WKUPFRMFILT_SHIFT (0U) 1149 #define ENET_RWKFRMFILT_WKUPFRMFILT_SET(x) (((uint32_t)(x) << ENET_RWKFRMFILT_WKUPFRMFILT_SHIFT) & ENET_RWKFRMFILT_WKUPFRMFILT_MASK) 1150 #define ENET_RWKFRMFILT_WKUPFRMFILT_GET(x) (((uint32_t)(x) & ENET_RWKFRMFILT_WKUPFRMFILT_MASK) >> ENET_RWKFRMFILT_WKUPFRMFILT_SHIFT) 1151 1152 /* Bitfield definition for register: PMT_CSR */ 1153 /* 1154 * RWKFILTRST (RW) 1155 * 1156 * Remote Wake-Up Frame Filter Register Pointer Reset 1157 * When this bit is set, it resets the remote wake-up frame filter register pointer to 3’b000. It is automatically cleared after 1 clock cycle. 1158 */ 1159 #define ENET_PMT_CSR_RWKFILTRST_MASK (0x80000000UL) 1160 #define ENET_PMT_CSR_RWKFILTRST_SHIFT (31U) 1161 #define ENET_PMT_CSR_RWKFILTRST_SET(x) (((uint32_t)(x) << ENET_PMT_CSR_RWKFILTRST_SHIFT) & ENET_PMT_CSR_RWKFILTRST_MASK) 1162 #define ENET_PMT_CSR_RWKFILTRST_GET(x) (((uint32_t)(x) & ENET_PMT_CSR_RWKFILTRST_MASK) >> ENET_PMT_CSR_RWKFILTRST_SHIFT) 1163 1164 /* 1165 * RWKPTR (RW) 1166 * 1167 * Remote Wake-up FIFO Pointer 1168 * This field gives the current value (0 to 31) of the Remote Wake-up Frame filter register pointer. When the value of this pointer is equal to 7, 15, 23 or 31, the contents of the Remote Wake-up Frame Filter Register are transferred to the clk_rx_i domain when a write occurs to that register. The maximum value of the pointer is 7, 15, 23 and 31 respectively depending on the number of Remote Wakeup Filters selected during configuration. 1169 */ 1170 #define ENET_PMT_CSR_RWKPTR_MASK (0x1F000000UL) 1171 #define ENET_PMT_CSR_RWKPTR_SHIFT (24U) 1172 #define ENET_PMT_CSR_RWKPTR_SET(x) (((uint32_t)(x) << ENET_PMT_CSR_RWKPTR_SHIFT) & ENET_PMT_CSR_RWKPTR_MASK) 1173 #define ENET_PMT_CSR_RWKPTR_GET(x) (((uint32_t)(x) & ENET_PMT_CSR_RWKPTR_MASK) >> ENET_PMT_CSR_RWKPTR_SHIFT) 1174 1175 /* 1176 * GLBLUCAST (RW) 1177 * 1178 * Global Unicast 1179 * When set, enables any unicast packet filtered by the MAC (DAF) address recognition to be a remote wake-up frame. 1180 */ 1181 #define ENET_PMT_CSR_GLBLUCAST_MASK (0x200U) 1182 #define ENET_PMT_CSR_GLBLUCAST_SHIFT (9U) 1183 #define ENET_PMT_CSR_GLBLUCAST_SET(x) (((uint32_t)(x) << ENET_PMT_CSR_GLBLUCAST_SHIFT) & ENET_PMT_CSR_GLBLUCAST_MASK) 1184 #define ENET_PMT_CSR_GLBLUCAST_GET(x) (((uint32_t)(x) & ENET_PMT_CSR_GLBLUCAST_MASK) >> ENET_PMT_CSR_GLBLUCAST_SHIFT) 1185 1186 /* 1187 * RWKPRCVD (RW) 1188 * 1189 * Remote Wake-Up Frame Received 1190 * When set, this bit indicates the power management event is generated because of the reception of a remote wake-up frame. This bit is cleared by a Read into this register. 1191 */ 1192 #define ENET_PMT_CSR_RWKPRCVD_MASK (0x40U) 1193 #define ENET_PMT_CSR_RWKPRCVD_SHIFT (6U) 1194 #define ENET_PMT_CSR_RWKPRCVD_SET(x) (((uint32_t)(x) << ENET_PMT_CSR_RWKPRCVD_SHIFT) & ENET_PMT_CSR_RWKPRCVD_MASK) 1195 #define ENET_PMT_CSR_RWKPRCVD_GET(x) (((uint32_t)(x) & ENET_PMT_CSR_RWKPRCVD_MASK) >> ENET_PMT_CSR_RWKPRCVD_SHIFT) 1196 1197 /* 1198 * MGKPRCVD (RW) 1199 * 1200 * Magic Packet Received 1201 * When set, this bit indicates that the power management event is generated because of the reception of a magic packet. This bit is cleared by a Read into this register. 1202 */ 1203 #define ENET_PMT_CSR_MGKPRCVD_MASK (0x20U) 1204 #define ENET_PMT_CSR_MGKPRCVD_SHIFT (5U) 1205 #define ENET_PMT_CSR_MGKPRCVD_SET(x) (((uint32_t)(x) << ENET_PMT_CSR_MGKPRCVD_SHIFT) & ENET_PMT_CSR_MGKPRCVD_MASK) 1206 #define ENET_PMT_CSR_MGKPRCVD_GET(x) (((uint32_t)(x) & ENET_PMT_CSR_MGKPRCVD_MASK) >> ENET_PMT_CSR_MGKPRCVD_SHIFT) 1207 1208 /* 1209 * RWKPKTEN (RW) 1210 * 1211 * Remote Wake-Up Frame Enable 1212 * When set, enables generation of a power management event because of remote wake-up frame reception. 1213 */ 1214 #define ENET_PMT_CSR_RWKPKTEN_MASK (0x4U) 1215 #define ENET_PMT_CSR_RWKPKTEN_SHIFT (2U) 1216 #define ENET_PMT_CSR_RWKPKTEN_SET(x) (((uint32_t)(x) << ENET_PMT_CSR_RWKPKTEN_SHIFT) & ENET_PMT_CSR_RWKPKTEN_MASK) 1217 #define ENET_PMT_CSR_RWKPKTEN_GET(x) (((uint32_t)(x) & ENET_PMT_CSR_RWKPKTEN_MASK) >> ENET_PMT_CSR_RWKPKTEN_SHIFT) 1218 1219 /* 1220 * MGKPKTEN (RW) 1221 * 1222 * Magic Packet Enable 1223 * When set, enables generation of a power management event because of magic packet reception. 1224 */ 1225 #define ENET_PMT_CSR_MGKPKTEN_MASK (0x2U) 1226 #define ENET_PMT_CSR_MGKPKTEN_SHIFT (1U) 1227 #define ENET_PMT_CSR_MGKPKTEN_SET(x) (((uint32_t)(x) << ENET_PMT_CSR_MGKPKTEN_SHIFT) & ENET_PMT_CSR_MGKPKTEN_MASK) 1228 #define ENET_PMT_CSR_MGKPKTEN_GET(x) (((uint32_t)(x) & ENET_PMT_CSR_MGKPKTEN_MASK) >> ENET_PMT_CSR_MGKPKTEN_SHIFT) 1229 1230 /* 1231 * PWRDWN (RW) 1232 * 1233 * Power Down 1234 * When set, the MAC receiver drops all received frames until it receives the expected magic packet or remote wake-up frame. This bit is then self-cleared and the power-down mode is disabled. The Software can also clear this bit before the expected magic packet or remote wake-up frame is received. The frames, received by the MAC after this bit is cleared, are forwarded to the application. This bit must only be set when the Magic Packet Enable, Global Unicast, or Remote Wake-Up Frame Enable bit is set high. Note: You can gate-off the CSR clock during the power-down mode. However, when the CSR clock is gated-off, you cannot perform any read or write operations on this register. Therefore, the Software cannot clear this bit. 1235 */ 1236 #define ENET_PMT_CSR_PWRDWN_MASK (0x1U) 1237 #define ENET_PMT_CSR_PWRDWN_SHIFT (0U) 1238 #define ENET_PMT_CSR_PWRDWN_SET(x) (((uint32_t)(x) << ENET_PMT_CSR_PWRDWN_SHIFT) & ENET_PMT_CSR_PWRDWN_MASK) 1239 #define ENET_PMT_CSR_PWRDWN_GET(x) (((uint32_t)(x) & ENET_PMT_CSR_PWRDWN_MASK) >> ENET_PMT_CSR_PWRDWN_SHIFT) 1240 1241 /* Bitfield definition for register: LPI_CSR */ 1242 /* 1243 * LPITXA (RW) 1244 * 1245 * LPI TX Automate 1246 * This bit controls the behavior of the MAC when it is entering or coming out of the LPI mode on the transmit side. This bit is not functional in the GMAC-CORE configuration in which the Tx clock gating is done during the LPI mode. If the LPITXA and LPIEN bits are set to 1, the MAC enters the LPI mode only after all outstanding frames (in the core) and pending frames (in the application interface) have been transmitted. The MAC comes out of the LPI mode when the application sends any frame for transmission or the application issues a TX FIFO Flush command. In addition, the MAC automatically clears the LPIEN bit when it exits the LPI state. If TX FIFO Flush is set in Bit 20 of Register 6 (Operation Mode Register), when the MAC is in the LPI mode, the MAC exits the LPI mode. When this bit is 0, the LPIEN bit directly controls behavior of the MAC when it is entering or coming out of the LPI mode. 1247 */ 1248 #define ENET_LPI_CSR_LPITXA_MASK (0x80000UL) 1249 #define ENET_LPI_CSR_LPITXA_SHIFT (19U) 1250 #define ENET_LPI_CSR_LPITXA_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_LPITXA_SHIFT) & ENET_LPI_CSR_LPITXA_MASK) 1251 #define ENET_LPI_CSR_LPITXA_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_LPITXA_MASK) >> ENET_LPI_CSR_LPITXA_SHIFT) 1252 1253 /* 1254 * PLSEN (RW) 1255 * 1256 * PHY Link Status Enable 1257 * This bit enables the link status received on the RGMII, SGMII, or SMII receive paths to be used for activating the LPI LS TIMER. When set, the MAC uses the link-status bits of Register 54 (SGMII/RGMII/SMII Control and Status Register) and Bit 17 (PLS) for the LPI LS Timer trigger. When cleared, the MAC ignores the link-status bits of Register 54 and takes only the PLS bit. This bit is RO and reserved if you have not selected the RGMII, SGMII, or SMII PHY interface. 1258 */ 1259 #define ENET_LPI_CSR_PLSEN_MASK (0x40000UL) 1260 #define ENET_LPI_CSR_PLSEN_SHIFT (18U) 1261 #define ENET_LPI_CSR_PLSEN_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_PLSEN_SHIFT) & ENET_LPI_CSR_PLSEN_MASK) 1262 #define ENET_LPI_CSR_PLSEN_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_PLSEN_MASK) >> ENET_LPI_CSR_PLSEN_SHIFT) 1263 1264 /* 1265 * PLS (RW) 1266 * 1267 * PHY Link Status 1268 * This bit indicates the link status of the PHY. The MAC Transmitter asserts the LPI pattern only when the link status is up (okay) at least for the time indicated by the LPI LS TIMER. When set, the link is considered to be okay (up) and when reset, the link is considered to be down. 1269 */ 1270 #define ENET_LPI_CSR_PLS_MASK (0x20000UL) 1271 #define ENET_LPI_CSR_PLS_SHIFT (17U) 1272 #define ENET_LPI_CSR_PLS_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_PLS_SHIFT) & ENET_LPI_CSR_PLS_MASK) 1273 #define ENET_LPI_CSR_PLS_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_PLS_MASK) >> ENET_LPI_CSR_PLS_SHIFT) 1274 1275 /* 1276 * LPIEN (RW) 1277 * 1278 * LPI Enable 1279 * When set, this bit instructs the MAC Transmitter to enter the LPI state. When reset, this bit instructs the MAC to exit the LPI state and resume normal transmission. This bit is cleared when the LPITXA bit is set and the MAC exits the LPI state because of the arrival of a new packet for transmission. 1280 */ 1281 #define ENET_LPI_CSR_LPIEN_MASK (0x10000UL) 1282 #define ENET_LPI_CSR_LPIEN_SHIFT (16U) 1283 #define ENET_LPI_CSR_LPIEN_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_LPIEN_SHIFT) & ENET_LPI_CSR_LPIEN_MASK) 1284 #define ENET_LPI_CSR_LPIEN_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_LPIEN_MASK) >> ENET_LPI_CSR_LPIEN_SHIFT) 1285 1286 /* 1287 * RLPIST (RW) 1288 * 1289 * Receive LPI State 1290 * When set, this bit indicates that the MAC is receiving the LPI pattern on the GMII or MII interface. 1291 */ 1292 #define ENET_LPI_CSR_RLPIST_MASK (0x200U) 1293 #define ENET_LPI_CSR_RLPIST_SHIFT (9U) 1294 #define ENET_LPI_CSR_RLPIST_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_RLPIST_SHIFT) & ENET_LPI_CSR_RLPIST_MASK) 1295 #define ENET_LPI_CSR_RLPIST_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_RLPIST_MASK) >> ENET_LPI_CSR_RLPIST_SHIFT) 1296 1297 /* 1298 * TLPIST (RW) 1299 * 1300 * Transmit LPI State 1301 * When set, this bit indicates that the MAC is transmitting the LPI pattern on the GMII or MII interface. 1302 */ 1303 #define ENET_LPI_CSR_TLPIST_MASK (0x100U) 1304 #define ENET_LPI_CSR_TLPIST_SHIFT (8U) 1305 #define ENET_LPI_CSR_TLPIST_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_TLPIST_SHIFT) & ENET_LPI_CSR_TLPIST_MASK) 1306 #define ENET_LPI_CSR_TLPIST_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_TLPIST_MASK) >> ENET_LPI_CSR_TLPIST_SHIFT) 1307 1308 /* 1309 * RLPIEX (RW) 1310 * 1311 * Receive LPI Exit 1312 * When set, this bit indicates that the MAC Receiver has stopped receiving the LPI pattern on the GMII or MII interface, exited the LPI state, and resumed the normal reception. This bit is cleared by a read into this register. Note: This bit may not get set if the MAC stops receiving the LPI pattern for a very short duration, such as, less than 3 clock cycles of CSR clock. 1313 */ 1314 #define ENET_LPI_CSR_RLPIEX_MASK (0x8U) 1315 #define ENET_LPI_CSR_RLPIEX_SHIFT (3U) 1316 #define ENET_LPI_CSR_RLPIEX_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_RLPIEX_SHIFT) & ENET_LPI_CSR_RLPIEX_MASK) 1317 #define ENET_LPI_CSR_RLPIEX_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_RLPIEX_MASK) >> ENET_LPI_CSR_RLPIEX_SHIFT) 1318 1319 /* 1320 * RLPIEN (RW) 1321 * 1322 * Receive LPI Entry 1323 * When set, this bit indicates that the MAC Receiver has received an LPI pattern and entered the LPI state. This bit is cleared by a read into this register. Note: This bit may not get set if the MAC stops receiving the LPI pattern for a very short duration, such as, less than 3 clock cycles of CSR clock. 1324 */ 1325 #define ENET_LPI_CSR_RLPIEN_MASK (0x4U) 1326 #define ENET_LPI_CSR_RLPIEN_SHIFT (2U) 1327 #define ENET_LPI_CSR_RLPIEN_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_RLPIEN_SHIFT) & ENET_LPI_CSR_RLPIEN_MASK) 1328 #define ENET_LPI_CSR_RLPIEN_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_RLPIEN_MASK) >> ENET_LPI_CSR_RLPIEN_SHIFT) 1329 1330 /* 1331 * TLPIEX (RW) 1332 * 1333 * Transmit LPI Exit 1334 * When set, this bit indicates that the MAC transmitter has exited the LPI state after the user has cleared the LPIEN bit and the LPI TW Timer has expired. This bit is cleared by a read into this register. 1335 */ 1336 #define ENET_LPI_CSR_TLPIEX_MASK (0x2U) 1337 #define ENET_LPI_CSR_TLPIEX_SHIFT (1U) 1338 #define ENET_LPI_CSR_TLPIEX_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_TLPIEX_SHIFT) & ENET_LPI_CSR_TLPIEX_MASK) 1339 #define ENET_LPI_CSR_TLPIEX_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_TLPIEX_MASK) >> ENET_LPI_CSR_TLPIEX_SHIFT) 1340 1341 /* 1342 * TLPIEN (RW) 1343 * 1344 * Transmit LPI Entry 1345 * When set, this bit indicates that the MAC Transmitter has entered the LPI state because of the setting of the LPIEN bit. This bit is cleared by a read into this register. 1346 */ 1347 #define ENET_LPI_CSR_TLPIEN_MASK (0x1U) 1348 #define ENET_LPI_CSR_TLPIEN_SHIFT (0U) 1349 #define ENET_LPI_CSR_TLPIEN_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_TLPIEN_SHIFT) & ENET_LPI_CSR_TLPIEN_MASK) 1350 #define ENET_LPI_CSR_TLPIEN_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_TLPIEN_MASK) >> ENET_LPI_CSR_TLPIEN_SHIFT) 1351 1352 /* Bitfield definition for register: LPI_TCR */ 1353 /* 1354 * LST (RW) 1355 * 1356 * LPI LS TIMER 1357 * This field specifies the minimum time (in milliseconds) for which the link status from the PHY should be up (OKAY) before the LPI pattern can be transmitted to the PHY. The MAC does not transmit the LPI pattern even when the LPIEN bit is set unless the LPI LS Timer reaches the programmed terminal count. The default value of the LPI LS Timer is 1000 (1 sec) as defined in the IEEE standard. 1358 */ 1359 #define ENET_LPI_TCR_LST_MASK (0x3FF0000UL) 1360 #define ENET_LPI_TCR_LST_SHIFT (16U) 1361 #define ENET_LPI_TCR_LST_SET(x) (((uint32_t)(x) << ENET_LPI_TCR_LST_SHIFT) & ENET_LPI_TCR_LST_MASK) 1362 #define ENET_LPI_TCR_LST_GET(x) (((uint32_t)(x) & ENET_LPI_TCR_LST_MASK) >> ENET_LPI_TCR_LST_SHIFT) 1363 1364 /* 1365 * TWT (RW) 1366 * 1367 * LPI TW TIMER 1368 * This field specifies the minimum time (in microseconds) for which the MAC waits after it stops transmitting the LPI pattern to the PHY and before it resumes the normal transmission. The TLPIEX status bit is set after the expiry of this timer. 1369 */ 1370 #define ENET_LPI_TCR_TWT_MASK (0xFFFFU) 1371 #define ENET_LPI_TCR_TWT_SHIFT (0U) 1372 #define ENET_LPI_TCR_TWT_SET(x) (((uint32_t)(x) << ENET_LPI_TCR_TWT_SHIFT) & ENET_LPI_TCR_TWT_MASK) 1373 #define ENET_LPI_TCR_TWT_GET(x) (((uint32_t)(x) & ENET_LPI_TCR_TWT_MASK) >> ENET_LPI_TCR_TWT_SHIFT) 1374 1375 /* Bitfield definition for register: INTR_STATUS */ 1376 /* 1377 * GPIIS (RO) 1378 * 1379 * GPI Interrupt Status 1380 * When the GPIO feature is enabled, this bit is set when any active event (LL or LH) occurs on the GPIS field (Bits [3:0]) of Register 56 (General Purpose IO Register) and the corresponding GPIE bit is enabled. This bit is cleared on reading lane 0 (GPIS) of Register 56 (General Purpose IO Register). When the GPIO feature is not enabled, this bit is reserved. 1381 */ 1382 #define ENET_INTR_STATUS_GPIIS_MASK (0x800U) 1383 #define ENET_INTR_STATUS_GPIIS_SHIFT (11U) 1384 #define ENET_INTR_STATUS_GPIIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_GPIIS_MASK) >> ENET_INTR_STATUS_GPIIS_SHIFT) 1385 1386 /* 1387 * LPIIS (RO) 1388 * 1389 * LPI Interrupt Status 1390 * When the Energy Efficient Ethernet feature is enabled, this bit is set for any LPI state entry or exit in the MAC Transmitter or Receiver. This bit is cleared on reading Bit 0 of Register 12 (LPI Control and Status Register). In all other modes, this bit is reserved. 1391 */ 1392 #define ENET_INTR_STATUS_LPIIS_MASK (0x400U) 1393 #define ENET_INTR_STATUS_LPIIS_SHIFT (10U) 1394 #define ENET_INTR_STATUS_LPIIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_LPIIS_MASK) >> ENET_INTR_STATUS_LPIIS_SHIFT) 1395 1396 /* 1397 * TSIS (RO) 1398 * 1399 * Timestamp Interrupt Status 1400 * When the Advanced Timestamp feature is enabled, this bit is set when any of the following conditions is true: - The system time value equals or exceeds the value specified in the Target Time High and Low registers. - There is an overflow in the seconds register. - The Auxiliary snapshot trigger is asserted. This bit is cleared on reading Bit 0 of Register 458 (Timestamp Status Register). 1401 */ 1402 #define ENET_INTR_STATUS_TSIS_MASK (0x200U) 1403 #define ENET_INTR_STATUS_TSIS_SHIFT (9U) 1404 #define ENET_INTR_STATUS_TSIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_TSIS_MASK) >> ENET_INTR_STATUS_TSIS_SHIFT) 1405 1406 /* 1407 * MMCRXIPIS (RO) 1408 * 1409 * MMC Receive Checksum Offload Interrupt Status 1410 * This bit is set high when an interrupt is generated in the MMC Receive Checksum Offload Interrupt Register. This bit is cleared when all the bits in this interrupt register are cleared. 1411 */ 1412 #define ENET_INTR_STATUS_MMCRXIPIS_MASK (0x80U) 1413 #define ENET_INTR_STATUS_MMCRXIPIS_SHIFT (7U) 1414 #define ENET_INTR_STATUS_MMCRXIPIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_MMCRXIPIS_MASK) >> ENET_INTR_STATUS_MMCRXIPIS_SHIFT) 1415 1416 /* 1417 * MMCTXIS (RO) 1418 * 1419 * MMC Transmit Interrupt Status 1420 * This bit is set high when an interrupt is generated in the MMC Transmit Interrupt Register. This bit is cleared when all the bits in this interrupt register are cleared. 1421 */ 1422 #define ENET_INTR_STATUS_MMCTXIS_MASK (0x40U) 1423 #define ENET_INTR_STATUS_MMCTXIS_SHIFT (6U) 1424 #define ENET_INTR_STATUS_MMCTXIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_MMCTXIS_MASK) >> ENET_INTR_STATUS_MMCTXIS_SHIFT) 1425 1426 /* 1427 * MMCRXIS (RO) 1428 * 1429 * MMC Receive Interrupt Status 1430 * This bit is set high when an interrupt is generated in the MMC Receive Interrupt Register. This bit is cleared when all the bits in this interrupt register are cleared. 1431 */ 1432 #define ENET_INTR_STATUS_MMCRXIS_MASK (0x20U) 1433 #define ENET_INTR_STATUS_MMCRXIS_SHIFT (5U) 1434 #define ENET_INTR_STATUS_MMCRXIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_MMCRXIS_MASK) >> ENET_INTR_STATUS_MMCRXIS_SHIFT) 1435 1436 /* 1437 * MMCIS (RO) 1438 * 1439 * MMC Interrupt Status 1440 * This bit is set high when any of the Bits [7:5] is set high and cleared only when all of these bits are low. 1441 */ 1442 #define ENET_INTR_STATUS_MMCIS_MASK (0x10U) 1443 #define ENET_INTR_STATUS_MMCIS_SHIFT (4U) 1444 #define ENET_INTR_STATUS_MMCIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_MMCIS_MASK) >> ENET_INTR_STATUS_MMCIS_SHIFT) 1445 1446 /* 1447 * PMTIS (RO) 1448 * 1449 * PMT Interrupt Status 1450 * This bit is set when a magic packet or remote wake-up frame is received in the power-down mode (see Bits 5 and 6 in the PMT Control and Status Register). This bit is cleared when both Bits[6:5] are cleared because of a read operation to the PMT Control and Status register. 1451 */ 1452 #define ENET_INTR_STATUS_PMTIS_MASK (0x8U) 1453 #define ENET_INTR_STATUS_PMTIS_SHIFT (3U) 1454 #define ENET_INTR_STATUS_PMTIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_PMTIS_MASK) >> ENET_INTR_STATUS_PMTIS_SHIFT) 1455 1456 /* 1457 * PCSANCIS (RO) 1458 * 1459 * PCS Auto-Negotiation Complete 1460 * This bit is set when the Auto-negotiation is completed in the TBI, RTBI, or SGMII PHY interface (Bit 5 in Register 49 (AN Status Register)). This bit is cleared when you perform a read operation to the AN Status register. 1461 */ 1462 #define ENET_INTR_STATUS_PCSANCIS_MASK (0x4U) 1463 #define ENET_INTR_STATUS_PCSANCIS_SHIFT (2U) 1464 #define ENET_INTR_STATUS_PCSANCIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_PCSANCIS_MASK) >> ENET_INTR_STATUS_PCSANCIS_SHIFT) 1465 1466 /* 1467 * PCSLCHGIS (RO) 1468 * 1469 * PCS Link Status Changed 1470 * This bit is set because of any change in Link Status in the TBI, RTBI, or SGMII PHY interface (Bit 2 in Register 49 (AN Status Register)). This bit is cleared when you perform a read operation on the AN Status register. 1471 */ 1472 #define ENET_INTR_STATUS_PCSLCHGIS_MASK (0x2U) 1473 #define ENET_INTR_STATUS_PCSLCHGIS_SHIFT (1U) 1474 #define ENET_INTR_STATUS_PCSLCHGIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_PCSLCHGIS_MASK) >> ENET_INTR_STATUS_PCSLCHGIS_SHIFT) 1475 1476 /* 1477 * RGSMIIIS (RO) 1478 * 1479 * RGMII or SMII Interrupt Status 1480 * This bit is set because of any change in value of the Link Status of RGMII or SMII interface (Bit 3 in Register 54 (SGMII/RGMII/SMII Control and Status Register)). This bit is cleared when you perform a read operation on the SGMII/RGMII/SMII Control and Status Register. 1481 */ 1482 #define ENET_INTR_STATUS_RGSMIIIS_MASK (0x1U) 1483 #define ENET_INTR_STATUS_RGSMIIIS_SHIFT (0U) 1484 #define ENET_INTR_STATUS_RGSMIIIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_RGSMIIIS_MASK) >> ENET_INTR_STATUS_RGSMIIIS_SHIFT) 1485 1486 /* Bitfield definition for register: INTR_MASK */ 1487 /* 1488 * LPIIM (RW) 1489 * 1490 * LPI Interrupt Mask 1491 * When set, this bit disables the assertion of the interrupt signal because of the setting of the LPI Interrupt Status bit in Register 14 (Interrupt Status Register). 1492 */ 1493 #define ENET_INTR_MASK_LPIIM_MASK (0x400U) 1494 #define ENET_INTR_MASK_LPIIM_SHIFT (10U) 1495 #define ENET_INTR_MASK_LPIIM_SET(x) (((uint32_t)(x) << ENET_INTR_MASK_LPIIM_SHIFT) & ENET_INTR_MASK_LPIIM_MASK) 1496 #define ENET_INTR_MASK_LPIIM_GET(x) (((uint32_t)(x) & ENET_INTR_MASK_LPIIM_MASK) >> ENET_INTR_MASK_LPIIM_SHIFT) 1497 1498 /* 1499 * TSIM (RW) 1500 * 1501 * Timestamp Interrupt Mask 1502 * When set, this bit disables the assertion of the interrupt signal because of the setting of Timestamp Interrupt Status bit in Register 14 (Interrupt Status Register). 1503 */ 1504 #define ENET_INTR_MASK_TSIM_MASK (0x200U) 1505 #define ENET_INTR_MASK_TSIM_SHIFT (9U) 1506 #define ENET_INTR_MASK_TSIM_SET(x) (((uint32_t)(x) << ENET_INTR_MASK_TSIM_SHIFT) & ENET_INTR_MASK_TSIM_MASK) 1507 #define ENET_INTR_MASK_TSIM_GET(x) (((uint32_t)(x) & ENET_INTR_MASK_TSIM_MASK) >> ENET_INTR_MASK_TSIM_SHIFT) 1508 1509 /* 1510 * PMTIM (RW) 1511 * 1512 * PMT Interrupt Mask 1513 * When set, this bit disables the assertion of the interrupt signal because of the setting of PMT Interrupt Status bit in Register 14 (Interrupt Status Register). 1514 */ 1515 #define ENET_INTR_MASK_PMTIM_MASK (0x8U) 1516 #define ENET_INTR_MASK_PMTIM_SHIFT (3U) 1517 #define ENET_INTR_MASK_PMTIM_SET(x) (((uint32_t)(x) << ENET_INTR_MASK_PMTIM_SHIFT) & ENET_INTR_MASK_PMTIM_MASK) 1518 #define ENET_INTR_MASK_PMTIM_GET(x) (((uint32_t)(x) & ENET_INTR_MASK_PMTIM_MASK) >> ENET_INTR_MASK_PMTIM_SHIFT) 1519 1520 /* 1521 * PCSANCIM (RW) 1522 * 1523 * PCS AN Completion Interrupt Mask 1524 * When set, this bit disables the assertion of the interrupt signal because of the setting of PCS Auto-negotiation complete bit in Register 14 (Interrupt Status Register). 1525 */ 1526 #define ENET_INTR_MASK_PCSANCIM_MASK (0x4U) 1527 #define ENET_INTR_MASK_PCSANCIM_SHIFT (2U) 1528 #define ENET_INTR_MASK_PCSANCIM_SET(x) (((uint32_t)(x) << ENET_INTR_MASK_PCSANCIM_SHIFT) & ENET_INTR_MASK_PCSANCIM_MASK) 1529 #define ENET_INTR_MASK_PCSANCIM_GET(x) (((uint32_t)(x) & ENET_INTR_MASK_PCSANCIM_MASK) >> ENET_INTR_MASK_PCSANCIM_SHIFT) 1530 1531 /* 1532 * PCSLCHGIM (RW) 1533 * 1534 * PCS Link Status Interrupt Mask 1535 * When set, this bit disables the assertion of the interrupt signal because of the setting of the PCS Link-status changed bit in Register 14 (Interrupt Status Register). 1536 */ 1537 #define ENET_INTR_MASK_PCSLCHGIM_MASK (0x2U) 1538 #define ENET_INTR_MASK_PCSLCHGIM_SHIFT (1U) 1539 #define ENET_INTR_MASK_PCSLCHGIM_SET(x) (((uint32_t)(x) << ENET_INTR_MASK_PCSLCHGIM_SHIFT) & ENET_INTR_MASK_PCSLCHGIM_MASK) 1540 #define ENET_INTR_MASK_PCSLCHGIM_GET(x) (((uint32_t)(x) & ENET_INTR_MASK_PCSLCHGIM_MASK) >> ENET_INTR_MASK_PCSLCHGIM_SHIFT) 1541 1542 /* 1543 * RGSMIIIM (RW) 1544 * 1545 * RGMII or SMII Interrupt Mask 1546 * When set, this bit disables the assertion of the interrupt signal because of the setting of the RGMII or SMII Interrupt Status bit in Register 14 (Interrupt Status Register). 1547 */ 1548 #define ENET_INTR_MASK_RGSMIIIM_MASK (0x1U) 1549 #define ENET_INTR_MASK_RGSMIIIM_SHIFT (0U) 1550 #define ENET_INTR_MASK_RGSMIIIM_SET(x) (((uint32_t)(x) << ENET_INTR_MASK_RGSMIIIM_SHIFT) & ENET_INTR_MASK_RGSMIIIM_MASK) 1551 #define ENET_INTR_MASK_RGSMIIIM_GET(x) (((uint32_t)(x) & ENET_INTR_MASK_RGSMIIIM_MASK) >> ENET_INTR_MASK_RGSMIIIM_SHIFT) 1552 1553 /* Bitfield definition for register: MAC_ADDR_0_HIGH */ 1554 /* 1555 * AE (RO) 1556 * 1557 * Address Enable 1558 * This bit is always set to 1. 1559 */ 1560 #define ENET_MAC_ADDR_0_HIGH_AE_MASK (0x80000000UL) 1561 #define ENET_MAC_ADDR_0_HIGH_AE_SHIFT (31U) 1562 #define ENET_MAC_ADDR_0_HIGH_AE_GET(x) (((uint32_t)(x) & ENET_MAC_ADDR_0_HIGH_AE_MASK) >> ENET_MAC_ADDR_0_HIGH_AE_SHIFT) 1563 1564 /* 1565 * ADDRHI (RW) 1566 * 1567 * MAC Address0 [47:32] 1568 * This field contains the upper 16 bits (47:32) of the first 6-byte MAC address. The MAC uses this field for filtering the received frames and inserting the MAC address in the Transmit Flow Control (Pause) Frames. 1569 */ 1570 #define ENET_MAC_ADDR_0_HIGH_ADDRHI_MASK (0xFFFFU) 1571 #define ENET_MAC_ADDR_0_HIGH_ADDRHI_SHIFT (0U) 1572 #define ENET_MAC_ADDR_0_HIGH_ADDRHI_SET(x) (((uint32_t)(x) << ENET_MAC_ADDR_0_HIGH_ADDRHI_SHIFT) & ENET_MAC_ADDR_0_HIGH_ADDRHI_MASK) 1573 #define ENET_MAC_ADDR_0_HIGH_ADDRHI_GET(x) (((uint32_t)(x) & ENET_MAC_ADDR_0_HIGH_ADDRHI_MASK) >> ENET_MAC_ADDR_0_HIGH_ADDRHI_SHIFT) 1574 1575 /* Bitfield definition for register: MAC_ADDR_0_LOW */ 1576 /* 1577 * ADDRLO (RW) 1578 * 1579 * MAC Address0 [31:0] 1580 * This field contains the lower 32 bits of the first 6-byte MAC address. This is used by the MAC for filtering the received frames and inserting the MAC address in the Transmit Flow Control (Pause) Frames. 1581 */ 1582 #define ENET_MAC_ADDR_0_LOW_ADDRLO_MASK (0xFFFFFFFFUL) 1583 #define ENET_MAC_ADDR_0_LOW_ADDRLO_SHIFT (0U) 1584 #define ENET_MAC_ADDR_0_LOW_ADDRLO_SET(x) (((uint32_t)(x) << ENET_MAC_ADDR_0_LOW_ADDRLO_SHIFT) & ENET_MAC_ADDR_0_LOW_ADDRLO_MASK) 1585 #define ENET_MAC_ADDR_0_LOW_ADDRLO_GET(x) (((uint32_t)(x) & ENET_MAC_ADDR_0_LOW_ADDRLO_MASK) >> ENET_MAC_ADDR_0_LOW_ADDRLO_SHIFT) 1586 1587 /* Bitfield definition for register of struct array MAC_ADDR: HIGH */ 1588 /* 1589 * AE (RW) 1590 * 1591 * Address Enable 1592 * When this bit is set, the address filter module uses the second MAC address for perfect filtering. When this bit is reset, the address filter module ignores the address for filtering. 1593 */ 1594 #define ENET_MAC_ADDR_HIGH_AE_MASK (0x80000000UL) 1595 #define ENET_MAC_ADDR_HIGH_AE_SHIFT (31U) 1596 #define ENET_MAC_ADDR_HIGH_AE_SET(x) (((uint32_t)(x) << ENET_MAC_ADDR_HIGH_AE_SHIFT) & ENET_MAC_ADDR_HIGH_AE_MASK) 1597 #define ENET_MAC_ADDR_HIGH_AE_GET(x) (((uint32_t)(x) & ENET_MAC_ADDR_HIGH_AE_MASK) >> ENET_MAC_ADDR_HIGH_AE_SHIFT) 1598 1599 /* 1600 * SA (RW) 1601 * 1602 * Source Address 1603 * When this bit is set, the MAC Address1[47:0] is used to compare with the SA fields of the received frame. When this bit is reset, the MAC Address1[47:0] is used to compare with the DA fields of the received frame. 1604 */ 1605 #define ENET_MAC_ADDR_HIGH_SA_MASK (0x40000000UL) 1606 #define ENET_MAC_ADDR_HIGH_SA_SHIFT (30U) 1607 #define ENET_MAC_ADDR_HIGH_SA_SET(x) (((uint32_t)(x) << ENET_MAC_ADDR_HIGH_SA_SHIFT) & ENET_MAC_ADDR_HIGH_SA_MASK) 1608 #define ENET_MAC_ADDR_HIGH_SA_GET(x) (((uint32_t)(x) & ENET_MAC_ADDR_HIGH_SA_MASK) >> ENET_MAC_ADDR_HIGH_SA_SHIFT) 1609 1610 /* 1611 * MBC (RW) 1612 * 1613 * Mask Byte Control 1614 * These bits are mask control bits for comparison of each of the MAC Address bytes. When set high, the MAC does not compare the corresponding byte of received DA or SA with the contents of MAC Address1 registers. Each bit controls the masking of the bytes as follows: - Bit 29: Register 18[15:8] - Bit 28: Register 18[7:0] - Bit 27: Register 19[31:24] - ... - Bit 24: Register 19[7:0] You can filter a group of addresses (known as group address filtering) by masking one or more bytes of the address. 1615 */ 1616 #define ENET_MAC_ADDR_HIGH_MBC_MASK (0x3F000000UL) 1617 #define ENET_MAC_ADDR_HIGH_MBC_SHIFT (24U) 1618 #define ENET_MAC_ADDR_HIGH_MBC_SET(x) (((uint32_t)(x) << ENET_MAC_ADDR_HIGH_MBC_SHIFT) & ENET_MAC_ADDR_HIGH_MBC_MASK) 1619 #define ENET_MAC_ADDR_HIGH_MBC_GET(x) (((uint32_t)(x) & ENET_MAC_ADDR_HIGH_MBC_MASK) >> ENET_MAC_ADDR_HIGH_MBC_SHIFT) 1620 1621 /* 1622 * ADDRHI (RW) 1623 * 1624 * MAC Address1 [47:32] 1625 * This field contains the upper 16 bits (47:32) of the second 6-byte MAC address. 1626 */ 1627 #define ENET_MAC_ADDR_HIGH_ADDRHI_MASK (0xFFFFU) 1628 #define ENET_MAC_ADDR_HIGH_ADDRHI_SHIFT (0U) 1629 #define ENET_MAC_ADDR_HIGH_ADDRHI_SET(x) (((uint32_t)(x) << ENET_MAC_ADDR_HIGH_ADDRHI_SHIFT) & ENET_MAC_ADDR_HIGH_ADDRHI_MASK) 1630 #define ENET_MAC_ADDR_HIGH_ADDRHI_GET(x) (((uint32_t)(x) & ENET_MAC_ADDR_HIGH_ADDRHI_MASK) >> ENET_MAC_ADDR_HIGH_ADDRHI_SHIFT) 1631 1632 /* Bitfield definition for register of struct array MAC_ADDR: LOW */ 1633 /* 1634 * ADDRLO (RW) 1635 * 1636 * MAC Address1 [31:0] 1637 * This field contains the lower 32 bits of the second 6-byte MAC address. The content of this field is undefined until loaded by the Application after the initialization process. 1638 */ 1639 #define ENET_MAC_ADDR_LOW_ADDRLO_MASK (0xFFFFFFFFUL) 1640 #define ENET_MAC_ADDR_LOW_ADDRLO_SHIFT (0U) 1641 #define ENET_MAC_ADDR_LOW_ADDRLO_SET(x) (((uint32_t)(x) << ENET_MAC_ADDR_LOW_ADDRLO_SHIFT) & ENET_MAC_ADDR_LOW_ADDRLO_MASK) 1642 #define ENET_MAC_ADDR_LOW_ADDRLO_GET(x) (((uint32_t)(x) & ENET_MAC_ADDR_LOW_ADDRLO_MASK) >> ENET_MAC_ADDR_LOW_ADDRLO_SHIFT) 1643 1644 /* Bitfield definition for register: XMII_CSR */ 1645 /* 1646 * SMIDRXS (RO) 1647 * 1648 * Delay SMII RX Data Sampling with respect to the SMII SYNC Signal When set, the first bit of the SMII RX data is sampled one cycle after the SMII SYNC signal. When reset, the first bit of the SMII RX data is sampled along with the SMII SYNC signal. If the SMII PHY Interface with source synchronous mode is selected during core configuration, this bit is reserved (RO with default value). 1649 */ 1650 #define ENET_XMII_CSR_SMIDRXS_MASK (0x10000UL) 1651 #define ENET_XMII_CSR_SMIDRXS_SHIFT (16U) 1652 #define ENET_XMII_CSR_SMIDRXS_GET(x) (((uint32_t)(x) & ENET_XMII_CSR_SMIDRXS_MASK) >> ENET_XMII_CSR_SMIDRXS_SHIFT) 1653 1654 /* 1655 * FALSCARDET (RW) 1656 * 1657 * False Carrier Detected 1658 * This bit indicates whether the SMII PHY detected false carrier (1'b1). This bit is reserved when the MAC is configured for the SGMII or RGMII PHY interface. 1659 */ 1660 #define ENET_XMII_CSR_FALSCARDET_MASK (0x20U) 1661 #define ENET_XMII_CSR_FALSCARDET_SHIFT (5U) 1662 #define ENET_XMII_CSR_FALSCARDET_SET(x) (((uint32_t)(x) << ENET_XMII_CSR_FALSCARDET_SHIFT) & ENET_XMII_CSR_FALSCARDET_MASK) 1663 #define ENET_XMII_CSR_FALSCARDET_GET(x) (((uint32_t)(x) & ENET_XMII_CSR_FALSCARDET_MASK) >> ENET_XMII_CSR_FALSCARDET_SHIFT) 1664 1665 /* 1666 * JABTO (RW) 1667 * 1668 * Jabber Timeout 1669 * This bit indicates whether there is jabber timeout error (1'b1) in the received frame. This bit is reserved when the MAC is configured for the SGMII or RGMII PHY interface. 1670 */ 1671 #define ENET_XMII_CSR_JABTO_MASK (0x10U) 1672 #define ENET_XMII_CSR_JABTO_SHIFT (4U) 1673 #define ENET_XMII_CSR_JABTO_SET(x) (((uint32_t)(x) << ENET_XMII_CSR_JABTO_SHIFT) & ENET_XMII_CSR_JABTO_MASK) 1674 #define ENET_XMII_CSR_JABTO_GET(x) (((uint32_t)(x) & ENET_XMII_CSR_JABTO_MASK) >> ENET_XMII_CSR_JABTO_SHIFT) 1675 1676 /* 1677 * LNKSTS (RW) 1678 * 1679 * Link Status 1680 * This bit indicates whether the link between the local PHY and the remote PHY is up or down. It gives the status of the link between the SGMII of MAC and the SGMII of the local PHY. The status bits are received from the local PHY during ANEG betweent he MAC and PHY on the SGMII link. 1681 */ 1682 #define ENET_XMII_CSR_LNKSTS_MASK (0x8U) 1683 #define ENET_XMII_CSR_LNKSTS_SHIFT (3U) 1684 #define ENET_XMII_CSR_LNKSTS_SET(x) (((uint32_t)(x) << ENET_XMII_CSR_LNKSTS_SHIFT) & ENET_XMII_CSR_LNKSTS_MASK) 1685 #define ENET_XMII_CSR_LNKSTS_GET(x) (((uint32_t)(x) & ENET_XMII_CSR_LNKSTS_MASK) >> ENET_XMII_CSR_LNKSTS_SHIFT) 1686 1687 /* 1688 * LNKSPEED (RW) 1689 * 1690 * Link Speed 1691 * This bit indicates the current speed of the link: 1692 * - 00: 2.5 MHz 1693 * - 01: 25 MHz 1694 * - 10: 125 MHz Bit 2 is reserved when the MAC is configured for the SMII PHY interface. 1695 */ 1696 #define ENET_XMII_CSR_LNKSPEED_MASK (0x6U) 1697 #define ENET_XMII_CSR_LNKSPEED_SHIFT (1U) 1698 #define ENET_XMII_CSR_LNKSPEED_SET(x) (((uint32_t)(x) << ENET_XMII_CSR_LNKSPEED_SHIFT) & ENET_XMII_CSR_LNKSPEED_MASK) 1699 #define ENET_XMII_CSR_LNKSPEED_GET(x) (((uint32_t)(x) & ENET_XMII_CSR_LNKSPEED_MASK) >> ENET_XMII_CSR_LNKSPEED_SHIFT) 1700 1701 /* 1702 * LNKMOD (RW) 1703 * 1704 * Link Mode 1705 * This bit indicates the current mode of operation of the link: 1706 * - 1’b0: Half-duplex mode 1707 * - 1’b1: Full-duplex mode 1708 */ 1709 #define ENET_XMII_CSR_LNKMOD_MASK (0x1U) 1710 #define ENET_XMII_CSR_LNKMOD_SHIFT (0U) 1711 #define ENET_XMII_CSR_LNKMOD_SET(x) (((uint32_t)(x) << ENET_XMII_CSR_LNKMOD_SHIFT) & ENET_XMII_CSR_LNKMOD_MASK) 1712 #define ENET_XMII_CSR_LNKMOD_GET(x) (((uint32_t)(x) & ENET_XMII_CSR_LNKMOD_MASK) >> ENET_XMII_CSR_LNKMOD_SHIFT) 1713 1714 /* Bitfield definition for register: WDOG_WTO */ 1715 /* 1716 * PWE (RW) 1717 * 1718 * Programmable Watchdog Enable 1719 * When this bit is set and Bit 23 (WD) of Register 0 (MAC Configuration Register) is reset, the WTO field (Bits[13:0]) is used as watchdog timeout for a received frame. When this bit is cleared, the watchdog timeout for a received frame is controlled by the setting of Bit 23 (WD) and Bit 20 (JE) in Register 0 (MAC Configuration Register). 1720 */ 1721 #define ENET_WDOG_WTO_PWE_MASK (0x10000UL) 1722 #define ENET_WDOG_WTO_PWE_SHIFT (16U) 1723 #define ENET_WDOG_WTO_PWE_SET(x) (((uint32_t)(x) << ENET_WDOG_WTO_PWE_SHIFT) & ENET_WDOG_WTO_PWE_MASK) 1724 #define ENET_WDOG_WTO_PWE_GET(x) (((uint32_t)(x) & ENET_WDOG_WTO_PWE_MASK) >> ENET_WDOG_WTO_PWE_SHIFT) 1725 1726 /* 1727 * WTO (RW) 1728 * 1729 * Watchdog Timeout 1730 * When Bit 16 (PWE) is set and Bit 23 (WD) of Register 0 (MAC Configuration Register) is reset, this field is used as watchdog timeout for a received frame. If the length of a received frame exceeds the value of this field, such frame is terminated and declared as an error frame. Note: When Bit 16 (PWE) is set, the value in this field should be more than 1,522 (0x05F2). Otherwise, the IEEE Std 802.3-specified valid tagged frames are declared as error frames and are dropped. 1731 */ 1732 #define ENET_WDOG_WTO_WTO_MASK (0x3FFFU) 1733 #define ENET_WDOG_WTO_WTO_SHIFT (0U) 1734 #define ENET_WDOG_WTO_WTO_SET(x) (((uint32_t)(x) << ENET_WDOG_WTO_WTO_SHIFT) & ENET_WDOG_WTO_WTO_MASK) 1735 #define ENET_WDOG_WTO_WTO_GET(x) (((uint32_t)(x) & ENET_WDOG_WTO_WTO_MASK) >> ENET_WDOG_WTO_WTO_SHIFT) 1736 1737 /* Bitfield definition for register: GPIO */ 1738 /* 1739 * GPIT (RW) 1740 * 1741 */ 1742 #define ENET_GPIO_GPIT_MASK (0xF000000UL) 1743 #define ENET_GPIO_GPIT_SHIFT (24U) 1744 #define ENET_GPIO_GPIT_SET(x) (((uint32_t)(x) << ENET_GPIO_GPIT_SHIFT) & ENET_GPIO_GPIT_MASK) 1745 #define ENET_GPIO_GPIT_GET(x) (((uint32_t)(x) & ENET_GPIO_GPIT_MASK) >> ENET_GPIO_GPIT_SHIFT) 1746 1747 /* 1748 * GPIE (RW) 1749 * 1750 */ 1751 #define ENET_GPIO_GPIE_MASK (0xF0000UL) 1752 #define ENET_GPIO_GPIE_SHIFT (16U) 1753 #define ENET_GPIO_GPIE_SET(x) (((uint32_t)(x) << ENET_GPIO_GPIE_SHIFT) & ENET_GPIO_GPIE_MASK) 1754 #define ENET_GPIO_GPIE_GET(x) (((uint32_t)(x) & ENET_GPIO_GPIE_MASK) >> ENET_GPIO_GPIE_SHIFT) 1755 1756 /* 1757 * GPO (RW) 1758 * 1759 */ 1760 #define ENET_GPIO_GPO_MASK (0xF00U) 1761 #define ENET_GPIO_GPO_SHIFT (8U) 1762 #define ENET_GPIO_GPO_SET(x) (((uint32_t)(x) << ENET_GPIO_GPO_SHIFT) & ENET_GPIO_GPO_MASK) 1763 #define ENET_GPIO_GPO_GET(x) (((uint32_t)(x) & ENET_GPIO_GPO_MASK) >> ENET_GPIO_GPO_SHIFT) 1764 1765 /* 1766 * GPIS (RW) 1767 * 1768 */ 1769 #define ENET_GPIO_GPIS_MASK (0xFU) 1770 #define ENET_GPIO_GPIS_SHIFT (0U) 1771 #define ENET_GPIO_GPIS_SET(x) (((uint32_t)(x) << ENET_GPIO_GPIS_SHIFT) & ENET_GPIO_GPIS_MASK) 1772 #define ENET_GPIO_GPIS_GET(x) (((uint32_t)(x) & ENET_GPIO_GPIS_MASK) >> ENET_GPIO_GPIS_SHIFT) 1773 1774 /* Bitfield definition for register: MMC_CNTRL */ 1775 /* 1776 * UCDBC (RW) 1777 * 1778 * Update MMC Counters for Dropped Broadcast Frames 1779 * When set, the MAC updates all related MMC Counters for Broadcast frames that are dropped because of the setting of Bit 5 (DBF) of Register 1 (MAC Frame Filter). When reset, the MMC Counters are not updated for dropped Broadcast frames. 1780 */ 1781 #define ENET_MMC_CNTRL_UCDBC_MASK (0x100U) 1782 #define ENET_MMC_CNTRL_UCDBC_SHIFT (8U) 1783 #define ENET_MMC_CNTRL_UCDBC_SET(x) (((uint32_t)(x) << ENET_MMC_CNTRL_UCDBC_SHIFT) & ENET_MMC_CNTRL_UCDBC_MASK) 1784 #define ENET_MMC_CNTRL_UCDBC_GET(x) (((uint32_t)(x) & ENET_MMC_CNTRL_UCDBC_MASK) >> ENET_MMC_CNTRL_UCDBC_SHIFT) 1785 1786 /* 1787 * CNTPRSTLVL (RW) 1788 * 1789 * Full-Half Preset 1790 * When this bit is low and Bit 4 is set, all MMC counters get preset to almost-half value. All octet counters get preset to 0x7FFF_F800 (half 1791 * - 2KBytes) and all frame-counters gets preset to 0x7FFF_FFF0 (half 1792 * - 16). When this bit is high and Bit 4 is set, all MMC counters get preset to almost-full value. All octet counters get preset to 0xFFFF_F800 (full 1793 * - 2KBytes) and all frame-counters gets preset to 0xFFFF_FFF0 (full 1794 * - 16). For 16-bit counters, the almost-half preset values are 0x7800 and 0x7FF0 for the respective octet and frame counters. Similarly, the almost-full preset values for the 16-bit counters are 0xF800 and 0xFFF0. 1795 */ 1796 #define ENET_MMC_CNTRL_CNTPRSTLVL_MASK (0x20U) 1797 #define ENET_MMC_CNTRL_CNTPRSTLVL_SHIFT (5U) 1798 #define ENET_MMC_CNTRL_CNTPRSTLVL_SET(x) (((uint32_t)(x) << ENET_MMC_CNTRL_CNTPRSTLVL_SHIFT) & ENET_MMC_CNTRL_CNTPRSTLVL_MASK) 1799 #define ENET_MMC_CNTRL_CNTPRSTLVL_GET(x) (((uint32_t)(x) & ENET_MMC_CNTRL_CNTPRSTLVL_MASK) >> ENET_MMC_CNTRL_CNTPRSTLVL_SHIFT) 1800 1801 /* 1802 * CNTPRST (RW) 1803 * 1804 * Counters Preset 1805 * When this bit is set, all counters are initialized or preset to almost full or almost half according to Bit 5. This bit is cleared automatically after 1 clock cycle. This bit, along with Bit 5, is useful for debugging and testing the assertion of interrupts because of MMC counter becoming half-full or full. 1806 */ 1807 #define ENET_MMC_CNTRL_CNTPRST_MASK (0x10U) 1808 #define ENET_MMC_CNTRL_CNTPRST_SHIFT (4U) 1809 #define ENET_MMC_CNTRL_CNTPRST_SET(x) (((uint32_t)(x) << ENET_MMC_CNTRL_CNTPRST_SHIFT) & ENET_MMC_CNTRL_CNTPRST_MASK) 1810 #define ENET_MMC_CNTRL_CNTPRST_GET(x) (((uint32_t)(x) & ENET_MMC_CNTRL_CNTPRST_MASK) >> ENET_MMC_CNTRL_CNTPRST_SHIFT) 1811 1812 /* 1813 * CNTFREEZ (RW) 1814 * 1815 * MMC Counter Freeze 1816 * When this bit is set, it freezes all MMC counters to their current value. Until this bit is reset to 0, no MMC counter is updated because of any transmitted or received frame. If any MMC counter is read with the Reset on Read bit set, then that counter is also cleared in this mode. 1817 */ 1818 #define ENET_MMC_CNTRL_CNTFREEZ_MASK (0x8U) 1819 #define ENET_MMC_CNTRL_CNTFREEZ_SHIFT (3U) 1820 #define ENET_MMC_CNTRL_CNTFREEZ_SET(x) (((uint32_t)(x) << ENET_MMC_CNTRL_CNTFREEZ_SHIFT) & ENET_MMC_CNTRL_CNTFREEZ_MASK) 1821 #define ENET_MMC_CNTRL_CNTFREEZ_GET(x) (((uint32_t)(x) & ENET_MMC_CNTRL_CNTFREEZ_MASK) >> ENET_MMC_CNTRL_CNTFREEZ_SHIFT) 1822 1823 /* 1824 * RSTONRD (RW) 1825 * 1826 * Reset on Read 1827 * When this bit is set, the MMC counters are reset to zero after Read (self-clearing after reset). The counters are cleared when the least significant byte lane (Bits[7:0]) is read. 1828 */ 1829 #define ENET_MMC_CNTRL_RSTONRD_MASK (0x4U) 1830 #define ENET_MMC_CNTRL_RSTONRD_SHIFT (2U) 1831 #define ENET_MMC_CNTRL_RSTONRD_SET(x) (((uint32_t)(x) << ENET_MMC_CNTRL_RSTONRD_SHIFT) & ENET_MMC_CNTRL_RSTONRD_MASK) 1832 #define ENET_MMC_CNTRL_RSTONRD_GET(x) (((uint32_t)(x) & ENET_MMC_CNTRL_RSTONRD_MASK) >> ENET_MMC_CNTRL_RSTONRD_SHIFT) 1833 1834 /* 1835 * CNTSTOPRO (RW) 1836 * 1837 * Counter Stop Rollover 1838 * When this bit is set, the counter does not roll over to zero after reaching the maximum value. 1839 */ 1840 #define ENET_MMC_CNTRL_CNTSTOPRO_MASK (0x2U) 1841 #define ENET_MMC_CNTRL_CNTSTOPRO_SHIFT (1U) 1842 #define ENET_MMC_CNTRL_CNTSTOPRO_SET(x) (((uint32_t)(x) << ENET_MMC_CNTRL_CNTSTOPRO_SHIFT) & ENET_MMC_CNTRL_CNTSTOPRO_MASK) 1843 #define ENET_MMC_CNTRL_CNTSTOPRO_GET(x) (((uint32_t)(x) & ENET_MMC_CNTRL_CNTSTOPRO_MASK) >> ENET_MMC_CNTRL_CNTSTOPRO_SHIFT) 1844 1845 /* 1846 * CNTRST (RW) 1847 * 1848 * Counters Reset 1849 * When this bit is set, all counters are reset. This bit is cleared automatically after 1 clock cycle 1850 */ 1851 #define ENET_MMC_CNTRL_CNTRST_MASK (0x1U) 1852 #define ENET_MMC_CNTRL_CNTRST_SHIFT (0U) 1853 #define ENET_MMC_CNTRL_CNTRST_SET(x) (((uint32_t)(x) << ENET_MMC_CNTRL_CNTRST_SHIFT) & ENET_MMC_CNTRL_CNTRST_MASK) 1854 #define ENET_MMC_CNTRL_CNTRST_GET(x) (((uint32_t)(x) & ENET_MMC_CNTRL_CNTRST_MASK) >> ENET_MMC_CNTRL_CNTRST_SHIFT) 1855 1856 /* Bitfield definition for register: MMC_INTR_RX */ 1857 /* 1858 * RXCTRLFIS (RW) 1859 * 1860 * MMC Receive Control Frame Counter Interrupt Status 1861 * This bit is set when the rxctrlframes_g counter reaches half of the maximum value or the maximum value. 1862 */ 1863 #define ENET_MMC_INTR_RX_RXCTRLFIS_MASK (0x2000000UL) 1864 #define ENET_MMC_INTR_RX_RXCTRLFIS_SHIFT (25U) 1865 #define ENET_MMC_INTR_RX_RXCTRLFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXCTRLFIS_SHIFT) & ENET_MMC_INTR_RX_RXCTRLFIS_MASK) 1866 #define ENET_MMC_INTR_RX_RXCTRLFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXCTRLFIS_MASK) >> ENET_MMC_INTR_RX_RXCTRLFIS_SHIFT) 1867 1868 /* 1869 * RXRCVERRFIS (RW) 1870 * 1871 * MMC Receive Error Frame Counter Interrupt Status 1872 * This bit is set when the rxrcverror counter reaches half of the maximum value or the maximum value. 1873 */ 1874 #define ENET_MMC_INTR_RX_RXRCVERRFIS_MASK (0x1000000UL) 1875 #define ENET_MMC_INTR_RX_RXRCVERRFIS_SHIFT (24U) 1876 #define ENET_MMC_INTR_RX_RXRCVERRFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXRCVERRFIS_SHIFT) & ENET_MMC_INTR_RX_RXRCVERRFIS_MASK) 1877 #define ENET_MMC_INTR_RX_RXRCVERRFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXRCVERRFIS_MASK) >> ENET_MMC_INTR_RX_RXRCVERRFIS_SHIFT) 1878 1879 /* 1880 * RXWDOGFIS (RW) 1881 * 1882 * MMC Receive Watchdog Error Frame Counter Interrupt Status 1883 * This bit is set when the rxwatchdog error counter reaches half of the maximum value or the maximum value. 1884 */ 1885 #define ENET_MMC_INTR_RX_RXWDOGFIS_MASK (0x800000UL) 1886 #define ENET_MMC_INTR_RX_RXWDOGFIS_SHIFT (23U) 1887 #define ENET_MMC_INTR_RX_RXWDOGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXWDOGFIS_SHIFT) & ENET_MMC_INTR_RX_RXWDOGFIS_MASK) 1888 #define ENET_MMC_INTR_RX_RXWDOGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXWDOGFIS_MASK) >> ENET_MMC_INTR_RX_RXWDOGFIS_SHIFT) 1889 1890 /* 1891 * RXVLANGBFIS (RW) 1892 * 1893 * MMC Receive VLAN Good Bad Frame Counter Interrupt Status 1894 * This bit is set when the rxvlanframes_gb counter reaches half of the maximum value or the maximum value. 1895 */ 1896 #define ENET_MMC_INTR_RX_RXVLANGBFIS_MASK (0x400000UL) 1897 #define ENET_MMC_INTR_RX_RXVLANGBFIS_SHIFT (22U) 1898 #define ENET_MMC_INTR_RX_RXVLANGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXVLANGBFIS_SHIFT) & ENET_MMC_INTR_RX_RXVLANGBFIS_MASK) 1899 #define ENET_MMC_INTR_RX_RXVLANGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXVLANGBFIS_MASK) >> ENET_MMC_INTR_RX_RXVLANGBFIS_SHIFT) 1900 1901 /* 1902 * RXFOVFIS (RW) 1903 * 1904 * MMC Receive FIFO Overflow Frame Counter Interrupt Status 1905 * This bit is set when the rxfifooverflow counter reaches half of the maximum value or the maximum value. 1906 */ 1907 #define ENET_MMC_INTR_RX_RXFOVFIS_MASK (0x200000UL) 1908 #define ENET_MMC_INTR_RX_RXFOVFIS_SHIFT (21U) 1909 #define ENET_MMC_INTR_RX_RXFOVFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXFOVFIS_SHIFT) & ENET_MMC_INTR_RX_RXFOVFIS_MASK) 1910 #define ENET_MMC_INTR_RX_RXFOVFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXFOVFIS_MASK) >> ENET_MMC_INTR_RX_RXFOVFIS_SHIFT) 1911 1912 /* 1913 * RXPAUSFIS (RW) 1914 * 1915 * MMC Receive Pause Frame Counter Interrupt Status 1916 * This bit is set when the rxpauseframes counter reaches half of the maximum value or the maximum value. 1917 */ 1918 #define ENET_MMC_INTR_RX_RXPAUSFIS_MASK (0x100000UL) 1919 #define ENET_MMC_INTR_RX_RXPAUSFIS_SHIFT (20U) 1920 #define ENET_MMC_INTR_RX_RXPAUSFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXPAUSFIS_SHIFT) & ENET_MMC_INTR_RX_RXPAUSFIS_MASK) 1921 #define ENET_MMC_INTR_RX_RXPAUSFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXPAUSFIS_MASK) >> ENET_MMC_INTR_RX_RXPAUSFIS_SHIFT) 1922 1923 /* 1924 * RXORANGEFIS (RW) 1925 * 1926 * MMC Receive Out Of Range Error Frame Counter Interrupt Status. 1927 * This bit is set when the rxoutofrangetype counter reaches half of the maximum value or the maximum value. 1928 */ 1929 #define ENET_MMC_INTR_RX_RXORANGEFIS_MASK (0x80000UL) 1930 #define ENET_MMC_INTR_RX_RXORANGEFIS_SHIFT (19U) 1931 #define ENET_MMC_INTR_RX_RXORANGEFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXORANGEFIS_SHIFT) & ENET_MMC_INTR_RX_RXORANGEFIS_MASK) 1932 #define ENET_MMC_INTR_RX_RXORANGEFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXORANGEFIS_MASK) >> ENET_MMC_INTR_RX_RXORANGEFIS_SHIFT) 1933 1934 /* 1935 * RXLENERFIS (RW) 1936 * 1937 * MMC Receive Length Error Frame Counter Interrupt Status 1938 * This bit is set when the rxlengtherror counter reaches half of the maximum value or the maximum value. 1939 */ 1940 #define ENET_MMC_INTR_RX_RXLENERFIS_MASK (0x40000UL) 1941 #define ENET_MMC_INTR_RX_RXLENERFIS_SHIFT (18U) 1942 #define ENET_MMC_INTR_RX_RXLENERFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXLENERFIS_SHIFT) & ENET_MMC_INTR_RX_RXLENERFIS_MASK) 1943 #define ENET_MMC_INTR_RX_RXLENERFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXLENERFIS_MASK) >> ENET_MMC_INTR_RX_RXLENERFIS_SHIFT) 1944 1945 /* 1946 * RXUCGFIS (RW) 1947 * 1948 * MMC Receive Unicast Good Frame Counter Interrupt Status 1949 * This bit is set when the rxunicastframes_g counter reaches half of the maximum value or the maximum value. 1950 */ 1951 #define ENET_MMC_INTR_RX_RXUCGFIS_MASK (0x20000UL) 1952 #define ENET_MMC_INTR_RX_RXUCGFIS_SHIFT (17U) 1953 #define ENET_MMC_INTR_RX_RXUCGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXUCGFIS_SHIFT) & ENET_MMC_INTR_RX_RXUCGFIS_MASK) 1954 #define ENET_MMC_INTR_RX_RXUCGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXUCGFIS_MASK) >> ENET_MMC_INTR_RX_RXUCGFIS_SHIFT) 1955 1956 /* 1957 * RX1024TMAXOCTGBFIS (RW) 1958 * 1959 * MMC Receive 1024 to Maximum Octet Good Bad Frame Counter Interrupt Status. 1960 * This bit is set when the rx1024tomaxoctets_gb counter reaches half of the maximum value or the maximum value. 1961 */ 1962 #define ENET_MMC_INTR_RX_RX1024TMAXOCTGBFIS_MASK (0x10000UL) 1963 #define ENET_MMC_INTR_RX_RX1024TMAXOCTGBFIS_SHIFT (16U) 1964 #define ENET_MMC_INTR_RX_RX1024TMAXOCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RX1024TMAXOCTGBFIS_SHIFT) & ENET_MMC_INTR_RX_RX1024TMAXOCTGBFIS_MASK) 1965 #define ENET_MMC_INTR_RX_RX1024TMAXOCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RX1024TMAXOCTGBFIS_MASK) >> ENET_MMC_INTR_RX_RX1024TMAXOCTGBFIS_SHIFT) 1966 1967 /* 1968 * RX512T1023OCTGBFIS (RW) 1969 * 1970 * MMC Receive 512 to 1023 Octet Good Bad Frame Counter Interrupt Status 1971 * This bit is set when the rx512to1023octets_gb counter reaches half of the maximum value or the maximum value. 1972 */ 1973 #define ENET_MMC_INTR_RX_RX512T1023OCTGBFIS_MASK (0x8000U) 1974 #define ENET_MMC_INTR_RX_RX512T1023OCTGBFIS_SHIFT (15U) 1975 #define ENET_MMC_INTR_RX_RX512T1023OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RX512T1023OCTGBFIS_SHIFT) & ENET_MMC_INTR_RX_RX512T1023OCTGBFIS_MASK) 1976 #define ENET_MMC_INTR_RX_RX512T1023OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RX512T1023OCTGBFIS_MASK) >> ENET_MMC_INTR_RX_RX512T1023OCTGBFIS_SHIFT) 1977 1978 /* 1979 * RX256T511OCTGBFIS (RW) 1980 * 1981 * MMC Receive 256 to 511 Octet Good Bad Frame Counter Interrupt Status 1982 * This bit is set when the rx256to511octets_gb counter reaches half of the maximum value or the maximum value. 1983 */ 1984 #define ENET_MMC_INTR_RX_RX256T511OCTGBFIS_MASK (0x4000U) 1985 #define ENET_MMC_INTR_RX_RX256T511OCTGBFIS_SHIFT (14U) 1986 #define ENET_MMC_INTR_RX_RX256T511OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RX256T511OCTGBFIS_SHIFT) & ENET_MMC_INTR_RX_RX256T511OCTGBFIS_MASK) 1987 #define ENET_MMC_INTR_RX_RX256T511OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RX256T511OCTGBFIS_MASK) >> ENET_MMC_INTR_RX_RX256T511OCTGBFIS_SHIFT) 1988 1989 /* 1990 * RX128T255OCTGBFIS (RW) 1991 * 1992 * MMC Receive 128 to 255 Octet Good Bad Frame Counter Interrupt Status 1993 * This bit is set when the rx128to255octets_gb counter reaches half of the maximum value or the maximum value. 1994 */ 1995 #define ENET_MMC_INTR_RX_RX128T255OCTGBFIS_MASK (0x2000U) 1996 #define ENET_MMC_INTR_RX_RX128T255OCTGBFIS_SHIFT (13U) 1997 #define ENET_MMC_INTR_RX_RX128T255OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RX128T255OCTGBFIS_SHIFT) & ENET_MMC_INTR_RX_RX128T255OCTGBFIS_MASK) 1998 #define ENET_MMC_INTR_RX_RX128T255OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RX128T255OCTGBFIS_MASK) >> ENET_MMC_INTR_RX_RX128T255OCTGBFIS_SHIFT) 1999 2000 /* 2001 * RX65T127OCTGBFIS (RW) 2002 * 2003 * MMC Receive 65 to 127 Octet Good Bad Frame Counter Interrupt Status 2004 * This bit is set when the rx65to127octets_gb counter reaches half of the maximum value or the maximum value. 2005 */ 2006 #define ENET_MMC_INTR_RX_RX65T127OCTGBFIS_MASK (0x1000U) 2007 #define ENET_MMC_INTR_RX_RX65T127OCTGBFIS_SHIFT (12U) 2008 #define ENET_MMC_INTR_RX_RX65T127OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RX65T127OCTGBFIS_SHIFT) & ENET_MMC_INTR_RX_RX65T127OCTGBFIS_MASK) 2009 #define ENET_MMC_INTR_RX_RX65T127OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RX65T127OCTGBFIS_MASK) >> ENET_MMC_INTR_RX_RX65T127OCTGBFIS_SHIFT) 2010 2011 /* 2012 * RX64OCTGBFIS (RW) 2013 * 2014 * MMC Receive 64 Octet Good Bad Frame Counter Interrupt Status 2015 * This bit is set when the rx64octets_gb counter reaches half of the maximum value or the maximum value. 2016 */ 2017 #define ENET_MMC_INTR_RX_RX64OCTGBFIS_MASK (0x800U) 2018 #define ENET_MMC_INTR_RX_RX64OCTGBFIS_SHIFT (11U) 2019 #define ENET_MMC_INTR_RX_RX64OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RX64OCTGBFIS_SHIFT) & ENET_MMC_INTR_RX_RX64OCTGBFIS_MASK) 2020 #define ENET_MMC_INTR_RX_RX64OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RX64OCTGBFIS_MASK) >> ENET_MMC_INTR_RX_RX64OCTGBFIS_SHIFT) 2021 2022 /* 2023 * RXOSIZEGFIS (RW) 2024 * 2025 * MMC Receive Oversize Good Frame Counter Interrupt Status 2026 * This bit is set when the rxoversize_g counter reaches half of the maximum value or the maximum value. 2027 */ 2028 #define ENET_MMC_INTR_RX_RXOSIZEGFIS_MASK (0x400U) 2029 #define ENET_MMC_INTR_RX_RXOSIZEGFIS_SHIFT (10U) 2030 #define ENET_MMC_INTR_RX_RXOSIZEGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXOSIZEGFIS_SHIFT) & ENET_MMC_INTR_RX_RXOSIZEGFIS_MASK) 2031 #define ENET_MMC_INTR_RX_RXOSIZEGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXOSIZEGFIS_MASK) >> ENET_MMC_INTR_RX_RXOSIZEGFIS_SHIFT) 2032 2033 /* 2034 * RXUSIZEGFIS (RW) 2035 * 2036 * MMC Receive Undersize Good Frame Counter Interrupt Status 2037 * This bit is set when the rxundersize_g counter reaches half of the maximum value or the maximum value. 2038 */ 2039 #define ENET_MMC_INTR_RX_RXUSIZEGFIS_MASK (0x200U) 2040 #define ENET_MMC_INTR_RX_RXUSIZEGFIS_SHIFT (9U) 2041 #define ENET_MMC_INTR_RX_RXUSIZEGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXUSIZEGFIS_SHIFT) & ENET_MMC_INTR_RX_RXUSIZEGFIS_MASK) 2042 #define ENET_MMC_INTR_RX_RXUSIZEGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXUSIZEGFIS_MASK) >> ENET_MMC_INTR_RX_RXUSIZEGFIS_SHIFT) 2043 2044 /* 2045 * RXJABERFIS (RW) 2046 * 2047 * MMC Receive Jabber Error Frame Counter Interrupt Status 2048 * This bit is set when the rxjabbererror counter reaches half of the maximum value or the maximum value. 2049 */ 2050 #define ENET_MMC_INTR_RX_RXJABERFIS_MASK (0x100U) 2051 #define ENET_MMC_INTR_RX_RXJABERFIS_SHIFT (8U) 2052 #define ENET_MMC_INTR_RX_RXJABERFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXJABERFIS_SHIFT) & ENET_MMC_INTR_RX_RXJABERFIS_MASK) 2053 #define ENET_MMC_INTR_RX_RXJABERFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXJABERFIS_MASK) >> ENET_MMC_INTR_RX_RXJABERFIS_SHIFT) 2054 2055 /* 2056 * RXRUNTFIS (RW) 2057 * 2058 * MMC Receive Runt Frame Counter Interrupt Status 2059 * This bit is set when the rxrunterror counter reaches half of the maximum value or the maximum value. 2060 */ 2061 #define ENET_MMC_INTR_RX_RXRUNTFIS_MASK (0x80U) 2062 #define ENET_MMC_INTR_RX_RXRUNTFIS_SHIFT (7U) 2063 #define ENET_MMC_INTR_RX_RXRUNTFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXRUNTFIS_SHIFT) & ENET_MMC_INTR_RX_RXRUNTFIS_MASK) 2064 #define ENET_MMC_INTR_RX_RXRUNTFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXRUNTFIS_MASK) >> ENET_MMC_INTR_RX_RXRUNTFIS_SHIFT) 2065 2066 /* 2067 * RXALGNERFIS (RW) 2068 * 2069 * MMC Receive Alignment Error Frame Counter Interrupt Status 2070 * This bit is set when the rxalignmenterror counter reaches half of the maximum value or the maximum value. 2071 */ 2072 #define ENET_MMC_INTR_RX_RXALGNERFIS_MASK (0x40U) 2073 #define ENET_MMC_INTR_RX_RXALGNERFIS_SHIFT (6U) 2074 #define ENET_MMC_INTR_RX_RXALGNERFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXALGNERFIS_SHIFT) & ENET_MMC_INTR_RX_RXALGNERFIS_MASK) 2075 #define ENET_MMC_INTR_RX_RXALGNERFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXALGNERFIS_MASK) >> ENET_MMC_INTR_RX_RXALGNERFIS_SHIFT) 2076 2077 /* 2078 * RXCRCERFIS (RW) 2079 * 2080 * MMC Receive CRC Error Frame Counter Interrupt Status 2081 * This bit is set when the rxcrcerror counter reaches half of the maximum value or the maximum value. 2082 */ 2083 #define ENET_MMC_INTR_RX_RXCRCERFIS_MASK (0x20U) 2084 #define ENET_MMC_INTR_RX_RXCRCERFIS_SHIFT (5U) 2085 #define ENET_MMC_INTR_RX_RXCRCERFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXCRCERFIS_SHIFT) & ENET_MMC_INTR_RX_RXCRCERFIS_MASK) 2086 #define ENET_MMC_INTR_RX_RXCRCERFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXCRCERFIS_MASK) >> ENET_MMC_INTR_RX_RXCRCERFIS_SHIFT) 2087 2088 /* 2089 * RXMCGFIS (RW) 2090 * 2091 * MMC Receive Multicast Good Frame Counter Interrupt Status 2092 * This bit is set when the rxmulticastframes_g counter reaches half of the maximum value or the maximum value. 2093 */ 2094 #define ENET_MMC_INTR_RX_RXMCGFIS_MASK (0x10U) 2095 #define ENET_MMC_INTR_RX_RXMCGFIS_SHIFT (4U) 2096 #define ENET_MMC_INTR_RX_RXMCGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXMCGFIS_SHIFT) & ENET_MMC_INTR_RX_RXMCGFIS_MASK) 2097 #define ENET_MMC_INTR_RX_RXMCGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXMCGFIS_MASK) >> ENET_MMC_INTR_RX_RXMCGFIS_SHIFT) 2098 2099 /* 2100 * RXBCGFIS (RW) 2101 * 2102 * MMC Receive Broadcast Good Frame Counter Interrupt Status 2103 * This bit is set when the rxbroadcastframes_g counter reaches half of the maximum value or the maximum value. 2104 */ 2105 #define ENET_MMC_INTR_RX_RXBCGFIS_MASK (0x8U) 2106 #define ENET_MMC_INTR_RX_RXBCGFIS_SHIFT (3U) 2107 #define ENET_MMC_INTR_RX_RXBCGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXBCGFIS_SHIFT) & ENET_MMC_INTR_RX_RXBCGFIS_MASK) 2108 #define ENET_MMC_INTR_RX_RXBCGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXBCGFIS_MASK) >> ENET_MMC_INTR_RX_RXBCGFIS_SHIFT) 2109 2110 /* 2111 * RXGOCTIS (RW) 2112 * 2113 * MMC Receive Good Octet Counter Interrupt Status 2114 * This bit is set when the rxoctetcount_g counter reaches half of the maximum value or the maximum value. 2115 */ 2116 #define ENET_MMC_INTR_RX_RXGOCTIS_MASK (0x4U) 2117 #define ENET_MMC_INTR_RX_RXGOCTIS_SHIFT (2U) 2118 #define ENET_MMC_INTR_RX_RXGOCTIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXGOCTIS_SHIFT) & ENET_MMC_INTR_RX_RXGOCTIS_MASK) 2119 #define ENET_MMC_INTR_RX_RXGOCTIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXGOCTIS_MASK) >> ENET_MMC_INTR_RX_RXGOCTIS_SHIFT) 2120 2121 /* 2122 * RXGBOCTIS (RW) 2123 * 2124 * MMC Receive Good Bad Octet Counter Interrupt Status 2125 * This bit is set when the rxoctetcount_gb counter reaches half of the maximum value or the maximum value. 2126 */ 2127 #define ENET_MMC_INTR_RX_RXGBOCTIS_MASK (0x2U) 2128 #define ENET_MMC_INTR_RX_RXGBOCTIS_SHIFT (1U) 2129 #define ENET_MMC_INTR_RX_RXGBOCTIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXGBOCTIS_SHIFT) & ENET_MMC_INTR_RX_RXGBOCTIS_MASK) 2130 #define ENET_MMC_INTR_RX_RXGBOCTIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXGBOCTIS_MASK) >> ENET_MMC_INTR_RX_RXGBOCTIS_SHIFT) 2131 2132 /* 2133 * RXGBFRMIS (RW) 2134 * 2135 * MMC Receive Good Bad Frame Counter Interrupt Status 2136 * This bit is set when the rxframecount_gb counter reaches half of the maximum value or the maximum value. 2137 */ 2138 #define ENET_MMC_INTR_RX_RXGBFRMIS_MASK (0x1U) 2139 #define ENET_MMC_INTR_RX_RXGBFRMIS_SHIFT (0U) 2140 #define ENET_MMC_INTR_RX_RXGBFRMIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXGBFRMIS_SHIFT) & ENET_MMC_INTR_RX_RXGBFRMIS_MASK) 2141 #define ENET_MMC_INTR_RX_RXGBFRMIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXGBFRMIS_MASK) >> ENET_MMC_INTR_RX_RXGBFRMIS_SHIFT) 2142 2143 /* Bitfield definition for register: MMC_INTR_TX */ 2144 /* 2145 * TXOSIZEGFIS (RW) 2146 * 2147 * MMC Transmit Oversize Good Frame Counter Interrupt Status 2148 * This bit is set when the txoversize_g counter reaches half of the maximum value or the maximum value. 2149 */ 2150 #define ENET_MMC_INTR_TX_TXOSIZEGFIS_MASK (0x2000000UL) 2151 #define ENET_MMC_INTR_TX_TXOSIZEGFIS_SHIFT (25U) 2152 #define ENET_MMC_INTR_TX_TXOSIZEGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXOSIZEGFIS_SHIFT) & ENET_MMC_INTR_TX_TXOSIZEGFIS_MASK) 2153 #define ENET_MMC_INTR_TX_TXOSIZEGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXOSIZEGFIS_MASK) >> ENET_MMC_INTR_TX_TXOSIZEGFIS_SHIFT) 2154 2155 /* 2156 * TXVLANGFIS (RW) 2157 * 2158 * MMC Transmit VLAN Good Frame Counter Interrupt Status 2159 * This bit is set when the txvlanframes_g counter reaches half of the maximum value or the maximum value. 2160 */ 2161 #define ENET_MMC_INTR_TX_TXVLANGFIS_MASK (0x1000000UL) 2162 #define ENET_MMC_INTR_TX_TXVLANGFIS_SHIFT (24U) 2163 #define ENET_MMC_INTR_TX_TXVLANGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXVLANGFIS_SHIFT) & ENET_MMC_INTR_TX_TXVLANGFIS_MASK) 2164 #define ENET_MMC_INTR_TX_TXVLANGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXVLANGFIS_MASK) >> ENET_MMC_INTR_TX_TXVLANGFIS_SHIFT) 2165 2166 /* 2167 * TXPAUSFIS (RW) 2168 * 2169 * MMC Transmit Pause Frame Counter Interrupt Status 2170 * This bit is set when the txpauseframeserror counter reaches half of the maximum value or the maximum value. 2171 */ 2172 #define ENET_MMC_INTR_TX_TXPAUSFIS_MASK (0x800000UL) 2173 #define ENET_MMC_INTR_TX_TXPAUSFIS_SHIFT (23U) 2174 #define ENET_MMC_INTR_TX_TXPAUSFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXPAUSFIS_SHIFT) & ENET_MMC_INTR_TX_TXPAUSFIS_MASK) 2175 #define ENET_MMC_INTR_TX_TXPAUSFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXPAUSFIS_MASK) >> ENET_MMC_INTR_TX_TXPAUSFIS_SHIFT) 2176 2177 /* 2178 * TXEXDEFFIS (RW) 2179 * 2180 * MMC Transmit Excessive Deferral Frame Counter Interrupt Status 2181 * This bit is set when the txexcessdef counter reaches half of the maximum value or the maximum value. 2182 */ 2183 #define ENET_MMC_INTR_TX_TXEXDEFFIS_MASK (0x400000UL) 2184 #define ENET_MMC_INTR_TX_TXEXDEFFIS_SHIFT (22U) 2185 #define ENET_MMC_INTR_TX_TXEXDEFFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXEXDEFFIS_SHIFT) & ENET_MMC_INTR_TX_TXEXDEFFIS_MASK) 2186 #define ENET_MMC_INTR_TX_TXEXDEFFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXEXDEFFIS_MASK) >> ENET_MMC_INTR_TX_TXEXDEFFIS_SHIFT) 2187 2188 /* 2189 * TXGFRMIS (RW) 2190 * 2191 * MMC Transmit Good Frame Counter Interrupt Status 2192 * This bit is set when the txframecount_g counter reaches half of the maximum value or the maximum value. 2193 */ 2194 #define ENET_MMC_INTR_TX_TXGFRMIS_MASK (0x200000UL) 2195 #define ENET_MMC_INTR_TX_TXGFRMIS_SHIFT (21U) 2196 #define ENET_MMC_INTR_TX_TXGFRMIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXGFRMIS_SHIFT) & ENET_MMC_INTR_TX_TXGFRMIS_MASK) 2197 #define ENET_MMC_INTR_TX_TXGFRMIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXGFRMIS_MASK) >> ENET_MMC_INTR_TX_TXGFRMIS_SHIFT) 2198 2199 /* 2200 * TXGOCTIS (RW) 2201 * 2202 * MMC Transmit Good Octet Counter Interrupt Status 2203 * This bit is set when the txoctetcount_g counter reaches half of the maximum value or the maximum value. 2204 */ 2205 #define ENET_MMC_INTR_TX_TXGOCTIS_MASK (0x100000UL) 2206 #define ENET_MMC_INTR_TX_TXGOCTIS_SHIFT (20U) 2207 #define ENET_MMC_INTR_TX_TXGOCTIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXGOCTIS_SHIFT) & ENET_MMC_INTR_TX_TXGOCTIS_MASK) 2208 #define ENET_MMC_INTR_TX_TXGOCTIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXGOCTIS_MASK) >> ENET_MMC_INTR_TX_TXGOCTIS_SHIFT) 2209 2210 /* 2211 * TXCARERFIS (RW) 2212 * 2213 * MMC Transmit Carrier Error Frame Counter Interrupt Status 2214 * This bit is set when the txcarriererror counter reaches half of the maximum value or the maximum value. 2215 */ 2216 #define ENET_MMC_INTR_TX_TXCARERFIS_MASK (0x80000UL) 2217 #define ENET_MMC_INTR_TX_TXCARERFIS_SHIFT (19U) 2218 #define ENET_MMC_INTR_TX_TXCARERFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXCARERFIS_SHIFT) & ENET_MMC_INTR_TX_TXCARERFIS_MASK) 2219 #define ENET_MMC_INTR_TX_TXCARERFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXCARERFIS_MASK) >> ENET_MMC_INTR_TX_TXCARERFIS_SHIFT) 2220 2221 /* 2222 * TXEXCOLFIS (RW) 2223 * 2224 * MMC Transmit Excessive Collision Frame Counter Interrupt Status 2225 * This bit is set when the txexesscol counter reaches half of the maximum value or the maximum value. 2226 */ 2227 #define ENET_MMC_INTR_TX_TXEXCOLFIS_MASK (0x40000UL) 2228 #define ENET_MMC_INTR_TX_TXEXCOLFIS_SHIFT (18U) 2229 #define ENET_MMC_INTR_TX_TXEXCOLFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXEXCOLFIS_SHIFT) & ENET_MMC_INTR_TX_TXEXCOLFIS_MASK) 2230 #define ENET_MMC_INTR_TX_TXEXCOLFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXEXCOLFIS_MASK) >> ENET_MMC_INTR_TX_TXEXCOLFIS_SHIFT) 2231 2232 /* 2233 * TXLATCOLFIS (RW) 2234 * 2235 * MMC Transmit Late Collision Frame Counter Interrupt Status 2236 * This bit is set when the txlatecol counter reaches half of the maximum value or the maximum value. 2237 */ 2238 #define ENET_MMC_INTR_TX_TXLATCOLFIS_MASK (0x20000UL) 2239 #define ENET_MMC_INTR_TX_TXLATCOLFIS_SHIFT (17U) 2240 #define ENET_MMC_INTR_TX_TXLATCOLFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXLATCOLFIS_SHIFT) & ENET_MMC_INTR_TX_TXLATCOLFIS_MASK) 2241 #define ENET_MMC_INTR_TX_TXLATCOLFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXLATCOLFIS_MASK) >> ENET_MMC_INTR_TX_TXLATCOLFIS_SHIFT) 2242 2243 /* 2244 * TXDEFFIS (RW) 2245 * 2246 * MMC Transmit Deferred Frame Counter Interrupt Status 2247 * This bit is set when the txdeferred counter reaches half of the maximum value or the maximum value. 2248 */ 2249 #define ENET_MMC_INTR_TX_TXDEFFIS_MASK (0x10000UL) 2250 #define ENET_MMC_INTR_TX_TXDEFFIS_SHIFT (16U) 2251 #define ENET_MMC_INTR_TX_TXDEFFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXDEFFIS_SHIFT) & ENET_MMC_INTR_TX_TXDEFFIS_MASK) 2252 #define ENET_MMC_INTR_TX_TXDEFFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXDEFFIS_MASK) >> ENET_MMC_INTR_TX_TXDEFFIS_SHIFT) 2253 2254 /* 2255 * TXMCOLGFIS (RW) 2256 * 2257 * MMC Transmit Multiple Collision Good Frame Counter Interrupt Status 2258 * This bit is set when the txmulticol_g counter reaches half of the maximum value or the maximum value. 2259 */ 2260 #define ENET_MMC_INTR_TX_TXMCOLGFIS_MASK (0x8000U) 2261 #define ENET_MMC_INTR_TX_TXMCOLGFIS_SHIFT (15U) 2262 #define ENET_MMC_INTR_TX_TXMCOLGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXMCOLGFIS_SHIFT) & ENET_MMC_INTR_TX_TXMCOLGFIS_MASK) 2263 #define ENET_MMC_INTR_TX_TXMCOLGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXMCOLGFIS_MASK) >> ENET_MMC_INTR_TX_TXMCOLGFIS_SHIFT) 2264 2265 /* 2266 * TXSCOLGFIS (RW) 2267 * 2268 * MMC Transmit Single Collision Good Frame Counter Interrupt Status 2269 * This bit is set when the txsinglecol_g counter reaches half of the maximum value or the maximum value. 2270 */ 2271 #define ENET_MMC_INTR_TX_TXSCOLGFIS_MASK (0x4000U) 2272 #define ENET_MMC_INTR_TX_TXSCOLGFIS_SHIFT (14U) 2273 #define ENET_MMC_INTR_TX_TXSCOLGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXSCOLGFIS_SHIFT) & ENET_MMC_INTR_TX_TXSCOLGFIS_MASK) 2274 #define ENET_MMC_INTR_TX_TXSCOLGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXSCOLGFIS_MASK) >> ENET_MMC_INTR_TX_TXSCOLGFIS_SHIFT) 2275 2276 /* 2277 * TXUFLOWERFIS (RW) 2278 * 2279 * MMC Transmit Underflow Error Frame Counter Interrupt Status 2280 * This bit is set when the txunderflowerror counter reaches half of the maximum value or the maximum value. 2281 */ 2282 #define ENET_MMC_INTR_TX_TXUFLOWERFIS_MASK (0x2000U) 2283 #define ENET_MMC_INTR_TX_TXUFLOWERFIS_SHIFT (13U) 2284 #define ENET_MMC_INTR_TX_TXUFLOWERFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXUFLOWERFIS_SHIFT) & ENET_MMC_INTR_TX_TXUFLOWERFIS_MASK) 2285 #define ENET_MMC_INTR_TX_TXUFLOWERFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXUFLOWERFIS_MASK) >> ENET_MMC_INTR_TX_TXUFLOWERFIS_SHIFT) 2286 2287 /* 2288 * TXBCGBFIS (RW) 2289 * 2290 * MMC Transmit Broadcast Good Bad Frame Counter Interrupt Status 2291 * This bit is set when the txbroadcastframes_gb counter reaches half of the maximum value or the maximum value. 2292 */ 2293 #define ENET_MMC_INTR_TX_TXBCGBFIS_MASK (0x1000U) 2294 #define ENET_MMC_INTR_TX_TXBCGBFIS_SHIFT (12U) 2295 #define ENET_MMC_INTR_TX_TXBCGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXBCGBFIS_SHIFT) & ENET_MMC_INTR_TX_TXBCGBFIS_MASK) 2296 #define ENET_MMC_INTR_TX_TXBCGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXBCGBFIS_MASK) >> ENET_MMC_INTR_TX_TXBCGBFIS_SHIFT) 2297 2298 /* 2299 * TXMCGBFIS (RW) 2300 * 2301 * MMC Transmit Multicast Good Bad Frame Counter Interrupt Status 2302 * The bit is set when the txmulticastframes_gb counter reaches half of the maximum value or the maximum value. 2303 */ 2304 #define ENET_MMC_INTR_TX_TXMCGBFIS_MASK (0x800U) 2305 #define ENET_MMC_INTR_TX_TXMCGBFIS_SHIFT (11U) 2306 #define ENET_MMC_INTR_TX_TXMCGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXMCGBFIS_SHIFT) & ENET_MMC_INTR_TX_TXMCGBFIS_MASK) 2307 #define ENET_MMC_INTR_TX_TXMCGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXMCGBFIS_MASK) >> ENET_MMC_INTR_TX_TXMCGBFIS_SHIFT) 2308 2309 /* 2310 * TXUCGBFIS (RW) 2311 * 2312 * MMC Transmit Unicast Good Bad Frame Counter Interrupt Status 2313 * This bit is set when the txunicastframes_gb counter reaches half of the maximum value or the maximum value. 2314 */ 2315 #define ENET_MMC_INTR_TX_TXUCGBFIS_MASK (0x400U) 2316 #define ENET_MMC_INTR_TX_TXUCGBFIS_SHIFT (10U) 2317 #define ENET_MMC_INTR_TX_TXUCGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXUCGBFIS_SHIFT) & ENET_MMC_INTR_TX_TXUCGBFIS_MASK) 2318 #define ENET_MMC_INTR_TX_TXUCGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXUCGBFIS_MASK) >> ENET_MMC_INTR_TX_TXUCGBFIS_SHIFT) 2319 2320 /* 2321 * TX1024TMAXOCTGBFIS (RW) 2322 * 2323 * MMC Transmit 1024 to Maximum Octet Good Bad Frame Counter Interrupt Status 2324 * This bit is set when the tx1024tomaxoctets_gb counter reaches half of the maximum value or the maximum value. 2325 */ 2326 #define ENET_MMC_INTR_TX_TX1024TMAXOCTGBFIS_MASK (0x200U) 2327 #define ENET_MMC_INTR_TX_TX1024TMAXOCTGBFIS_SHIFT (9U) 2328 #define ENET_MMC_INTR_TX_TX1024TMAXOCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TX1024TMAXOCTGBFIS_SHIFT) & ENET_MMC_INTR_TX_TX1024TMAXOCTGBFIS_MASK) 2329 #define ENET_MMC_INTR_TX_TX1024TMAXOCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TX1024TMAXOCTGBFIS_MASK) >> ENET_MMC_INTR_TX_TX1024TMAXOCTGBFIS_SHIFT) 2330 2331 /* 2332 * TX512T1023OCTGBFIS (RW) 2333 * 2334 * MMC Transmit 512 to 1023 Octet Good Bad Frame Counter Interrupt Status 2335 * This bit is set when the tx512to1023octets_gb counter reaches half of the maximum value or the maximum value. 2336 */ 2337 #define ENET_MMC_INTR_TX_TX512T1023OCTGBFIS_MASK (0x100U) 2338 #define ENET_MMC_INTR_TX_TX512T1023OCTGBFIS_SHIFT (8U) 2339 #define ENET_MMC_INTR_TX_TX512T1023OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TX512T1023OCTGBFIS_SHIFT) & ENET_MMC_INTR_TX_TX512T1023OCTGBFIS_MASK) 2340 #define ENET_MMC_INTR_TX_TX512T1023OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TX512T1023OCTGBFIS_MASK) >> ENET_MMC_INTR_TX_TX512T1023OCTGBFIS_SHIFT) 2341 2342 /* 2343 * TX256T511OCTGBFIS (RW) 2344 * 2345 * MMC Transmit 256 to 511 Octet Good Bad Frame Counter Interrupt Status 2346 * This bit is set when the tx256to511octets_gb counter reaches half of the maximum value or the maximum value. 2347 */ 2348 #define ENET_MMC_INTR_TX_TX256T511OCTGBFIS_MASK (0x80U) 2349 #define ENET_MMC_INTR_TX_TX256T511OCTGBFIS_SHIFT (7U) 2350 #define ENET_MMC_INTR_TX_TX256T511OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TX256T511OCTGBFIS_SHIFT) & ENET_MMC_INTR_TX_TX256T511OCTGBFIS_MASK) 2351 #define ENET_MMC_INTR_TX_TX256T511OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TX256T511OCTGBFIS_MASK) >> ENET_MMC_INTR_TX_TX256T511OCTGBFIS_SHIFT) 2352 2353 /* 2354 * TX128T255OCTGBFIS (RW) 2355 * 2356 * MMC Transmit 128 to 255 Octet Good Bad Frame Counter Interrupt Status 2357 * This bit is set when the tx128to255octets_gb counter reaches half of the maximum value or the maximum value. 2358 */ 2359 #define ENET_MMC_INTR_TX_TX128T255OCTGBFIS_MASK (0x40U) 2360 #define ENET_MMC_INTR_TX_TX128T255OCTGBFIS_SHIFT (6U) 2361 #define ENET_MMC_INTR_TX_TX128T255OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TX128T255OCTGBFIS_SHIFT) & ENET_MMC_INTR_TX_TX128T255OCTGBFIS_MASK) 2362 #define ENET_MMC_INTR_TX_TX128T255OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TX128T255OCTGBFIS_MASK) >> ENET_MMC_INTR_TX_TX128T255OCTGBFIS_SHIFT) 2363 2364 /* 2365 * TX65T127OCTGBFIS (RW) 2366 * 2367 * MMC Transmit 65 to 127 Octet Good Bad Frame Counter Interrupt Status 2368 * This bit is set when the tx65to127octets_gb counter reaches half the maximum value, and also when it reaches the maximum value. 2369 */ 2370 #define ENET_MMC_INTR_TX_TX65T127OCTGBFIS_MASK (0x20U) 2371 #define ENET_MMC_INTR_TX_TX65T127OCTGBFIS_SHIFT (5U) 2372 #define ENET_MMC_INTR_TX_TX65T127OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TX65T127OCTGBFIS_SHIFT) & ENET_MMC_INTR_TX_TX65T127OCTGBFIS_MASK) 2373 #define ENET_MMC_INTR_TX_TX65T127OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TX65T127OCTGBFIS_MASK) >> ENET_MMC_INTR_TX_TX65T127OCTGBFIS_SHIFT) 2374 2375 /* 2376 * TX64OCTGBFIS (RW) 2377 * 2378 * MMC Transmit 64 Octet Good Bad Frame Counter Interrupt Status 2379 * This bit is set when the tx64octets_gb counter reaches half of the maximum value or the maximum value. 2380 */ 2381 #define ENET_MMC_INTR_TX_TX64OCTGBFIS_MASK (0x10U) 2382 #define ENET_MMC_INTR_TX_TX64OCTGBFIS_SHIFT (4U) 2383 #define ENET_MMC_INTR_TX_TX64OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TX64OCTGBFIS_SHIFT) & ENET_MMC_INTR_TX_TX64OCTGBFIS_MASK) 2384 #define ENET_MMC_INTR_TX_TX64OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TX64OCTGBFIS_MASK) >> ENET_MMC_INTR_TX_TX64OCTGBFIS_SHIFT) 2385 2386 /* 2387 * TXMCGFIS (RW) 2388 * 2389 * MMC Transmit Multicast Good Frame Counter Interrupt Status 2390 * This bit is set when the txmulticastframes_g counter reaches half of the maximum value or the maximum value. 2391 */ 2392 #define ENET_MMC_INTR_TX_TXMCGFIS_MASK (0x8U) 2393 #define ENET_MMC_INTR_TX_TXMCGFIS_SHIFT (3U) 2394 #define ENET_MMC_INTR_TX_TXMCGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXMCGFIS_SHIFT) & ENET_MMC_INTR_TX_TXMCGFIS_MASK) 2395 #define ENET_MMC_INTR_TX_TXMCGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXMCGFIS_MASK) >> ENET_MMC_INTR_TX_TXMCGFIS_SHIFT) 2396 2397 /* 2398 * TXBCGFIS (RW) 2399 * 2400 * MMC Transmit Broadcast Good Frame Counter Interrupt Status 2401 * This bit is set when the txbroadcastframes_g counter reaches half of the maximum value or the maximum value. 2402 */ 2403 #define ENET_MMC_INTR_TX_TXBCGFIS_MASK (0x4U) 2404 #define ENET_MMC_INTR_TX_TXBCGFIS_SHIFT (2U) 2405 #define ENET_MMC_INTR_TX_TXBCGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXBCGFIS_SHIFT) & ENET_MMC_INTR_TX_TXBCGFIS_MASK) 2406 #define ENET_MMC_INTR_TX_TXBCGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXBCGFIS_MASK) >> ENET_MMC_INTR_TX_TXBCGFIS_SHIFT) 2407 2408 /* 2409 * TXGBFRMIS (RW) 2410 * 2411 * MMC Transmit Good Bad Frame Counter Interrupt Status 2412 * This bit is set when the txframecount_gb counter reaches half of the maximum value or the maximum value. 2413 */ 2414 #define ENET_MMC_INTR_TX_TXGBFRMIS_MASK (0x2U) 2415 #define ENET_MMC_INTR_TX_TXGBFRMIS_SHIFT (1U) 2416 #define ENET_MMC_INTR_TX_TXGBFRMIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXGBFRMIS_SHIFT) & ENET_MMC_INTR_TX_TXGBFRMIS_MASK) 2417 #define ENET_MMC_INTR_TX_TXGBFRMIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXGBFRMIS_MASK) >> ENET_MMC_INTR_TX_TXGBFRMIS_SHIFT) 2418 2419 /* 2420 * TXGBOCTIS (RW) 2421 * 2422 * MMC Transmit Good Bad Octet Counter Interrupt Status 2423 * This bit is set when the txoctetcount_gb counter reaches half of the maximum value or the maximum value. 2424 */ 2425 #define ENET_MMC_INTR_TX_TXGBOCTIS_MASK (0x1U) 2426 #define ENET_MMC_INTR_TX_TXGBOCTIS_SHIFT (0U) 2427 #define ENET_MMC_INTR_TX_TXGBOCTIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXGBOCTIS_SHIFT) & ENET_MMC_INTR_TX_TXGBOCTIS_MASK) 2428 #define ENET_MMC_INTR_TX_TXGBOCTIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXGBOCTIS_MASK) >> ENET_MMC_INTR_TX_TXGBOCTIS_SHIFT) 2429 2430 /* Bitfield definition for register: MMC_INTR_MASK_RX */ 2431 /* 2432 * RXCTRLFIM (RW) 2433 * 2434 * MMC Receive Control Frame Counter Interrupt Mask 2435 * Setting this bit masks the interrupt when the rxctrlframes_g counter reaches half of the maximum value or the maximum value. 2436 */ 2437 #define ENET_MMC_INTR_MASK_RX_RXCTRLFIM_MASK (0x2000000UL) 2438 #define ENET_MMC_INTR_MASK_RX_RXCTRLFIM_SHIFT (25U) 2439 #define ENET_MMC_INTR_MASK_RX_RXCTRLFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXCTRLFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXCTRLFIM_MASK) 2440 #define ENET_MMC_INTR_MASK_RX_RXCTRLFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXCTRLFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXCTRLFIM_SHIFT) 2441 2442 /* 2443 * RXRCVERRFIM (RW) 2444 * 2445 * MMC Receive Error Frame Counter Interrupt Mask 2446 * Setting this bit masks the interrupt when the rxrcverror counter reaches half of the maximum value or the maximum value. 2447 */ 2448 #define ENET_MMC_INTR_MASK_RX_RXRCVERRFIM_MASK (0x1000000UL) 2449 #define ENET_MMC_INTR_MASK_RX_RXRCVERRFIM_SHIFT (24U) 2450 #define ENET_MMC_INTR_MASK_RX_RXRCVERRFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXRCVERRFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXRCVERRFIM_MASK) 2451 #define ENET_MMC_INTR_MASK_RX_RXRCVERRFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXRCVERRFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXRCVERRFIM_SHIFT) 2452 2453 /* 2454 * RXWDOGFIM (RW) 2455 * 2456 * MMC Receive Watchdog Error Frame Counter Interrupt Mask 2457 * Setting this bit masks the interrupt when the rxwatchdog counter reaches half of the maximum value or the maximum value. 2458 */ 2459 #define ENET_MMC_INTR_MASK_RX_RXWDOGFIM_MASK (0x800000UL) 2460 #define ENET_MMC_INTR_MASK_RX_RXWDOGFIM_SHIFT (23U) 2461 #define ENET_MMC_INTR_MASK_RX_RXWDOGFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXWDOGFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXWDOGFIM_MASK) 2462 #define ENET_MMC_INTR_MASK_RX_RXWDOGFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXWDOGFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXWDOGFIM_SHIFT) 2463 2464 /* 2465 * RXVLANGBFIM (RW) 2466 * 2467 * MMC Receive VLAN Good Bad Frame Counter Interrupt Mask 2468 * Setting this bit masks the interrupt when the rxvlanframes_gb counter reaches half of the maximum value or the maximum value. 2469 */ 2470 #define ENET_MMC_INTR_MASK_RX_RXVLANGBFIM_MASK (0x400000UL) 2471 #define ENET_MMC_INTR_MASK_RX_RXVLANGBFIM_SHIFT (22U) 2472 #define ENET_MMC_INTR_MASK_RX_RXVLANGBFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXVLANGBFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXVLANGBFIM_MASK) 2473 #define ENET_MMC_INTR_MASK_RX_RXVLANGBFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXVLANGBFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXVLANGBFIM_SHIFT) 2474 2475 /* 2476 * RXFOVFIM (RW) 2477 * 2478 * MMC Receive FIFO Overflow Frame Counter Interrupt Mask 2479 * Setting this bit masks the interrupt when the rxfifooverflow counter reaches half of the maximum value or the maximum value. 2480 */ 2481 #define ENET_MMC_INTR_MASK_RX_RXFOVFIM_MASK (0x200000UL) 2482 #define ENET_MMC_INTR_MASK_RX_RXFOVFIM_SHIFT (21U) 2483 #define ENET_MMC_INTR_MASK_RX_RXFOVFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXFOVFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXFOVFIM_MASK) 2484 #define ENET_MMC_INTR_MASK_RX_RXFOVFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXFOVFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXFOVFIM_SHIFT) 2485 2486 /* 2487 * RXPAUSFIM (RW) 2488 * 2489 * MMC Receive Pause Frame Counter Interrupt Mask 2490 * Setting this bit masks the interrupt when the rxpauseframes counter reaches half of the maximum value or the maximum value. 2491 */ 2492 #define ENET_MMC_INTR_MASK_RX_RXPAUSFIM_MASK (0x100000UL) 2493 #define ENET_MMC_INTR_MASK_RX_RXPAUSFIM_SHIFT (20U) 2494 #define ENET_MMC_INTR_MASK_RX_RXPAUSFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXPAUSFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXPAUSFIM_MASK) 2495 #define ENET_MMC_INTR_MASK_RX_RXPAUSFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXPAUSFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXPAUSFIM_SHIFT) 2496 2497 /* 2498 * RXORANGEFIM (RW) 2499 * 2500 * MMC Receive Out Of Range Error Frame Counter Interrupt Mask 2501 * Setting this bit masks the interrupt when the rxoutofrangetype counter reaches half of the maximum value or the maximum value. 2502 */ 2503 #define ENET_MMC_INTR_MASK_RX_RXORANGEFIM_MASK (0x80000UL) 2504 #define ENET_MMC_INTR_MASK_RX_RXORANGEFIM_SHIFT (19U) 2505 #define ENET_MMC_INTR_MASK_RX_RXORANGEFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXORANGEFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXORANGEFIM_MASK) 2506 #define ENET_MMC_INTR_MASK_RX_RXORANGEFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXORANGEFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXORANGEFIM_SHIFT) 2507 2508 /* 2509 * RXLENERFIM (RW) 2510 * 2511 * MMC Receive Length Error Frame Counter Interrupt Mask 2512 * Setting this bit masks the interrupt when the rxlengtherror counter reaches half of the maximum value or the maximum value. 2513 */ 2514 #define ENET_MMC_INTR_MASK_RX_RXLENERFIM_MASK (0x40000UL) 2515 #define ENET_MMC_INTR_MASK_RX_RXLENERFIM_SHIFT (18U) 2516 #define ENET_MMC_INTR_MASK_RX_RXLENERFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXLENERFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXLENERFIM_MASK) 2517 #define ENET_MMC_INTR_MASK_RX_RXLENERFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXLENERFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXLENERFIM_SHIFT) 2518 2519 /* 2520 * RXUCGFIM (RW) 2521 * 2522 * MMC Receive Unicast Good Frame Counter Interrupt Mask 2523 * Setting this bit masks the interrupt when the rxunicastframes_g counter reaches half of the maximum value or the maximum value. 2524 */ 2525 #define ENET_MMC_INTR_MASK_RX_RXUCGFIM_MASK (0x20000UL) 2526 #define ENET_MMC_INTR_MASK_RX_RXUCGFIM_SHIFT (17U) 2527 #define ENET_MMC_INTR_MASK_RX_RXUCGFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXUCGFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXUCGFIM_MASK) 2528 #define ENET_MMC_INTR_MASK_RX_RXUCGFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXUCGFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXUCGFIM_SHIFT) 2529 2530 /* 2531 * RX1024TMAXOCTGBFIM (RW) 2532 * 2533 * MMC Receive 1024 to Maximum Octet Good Bad Frame Counter Interrupt Mask. 2534 * Setting this bit masks the interrupt when the rx1024tomaxoctets_gb counter reaches half of the maximum value or the maximum value. 2535 */ 2536 #define ENET_MMC_INTR_MASK_RX_RX1024TMAXOCTGBFIM_MASK (0x10000UL) 2537 #define ENET_MMC_INTR_MASK_RX_RX1024TMAXOCTGBFIM_SHIFT (16U) 2538 #define ENET_MMC_INTR_MASK_RX_RX1024TMAXOCTGBFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RX1024TMAXOCTGBFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RX1024TMAXOCTGBFIM_MASK) 2539 #define ENET_MMC_INTR_MASK_RX_RX1024TMAXOCTGBFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RX1024TMAXOCTGBFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RX1024TMAXOCTGBFIM_SHIFT) 2540 2541 /* 2542 * RX512T1023OCTGBFIM (RW) 2543 * 2544 * MMC Receive 512 to 1023 Octet Good Bad Frame Counter Interrupt Mask 2545 * Setting this bit masks the interrupt when the rx512to1023octets_gb counter reaches half of the maximum value or the maximum value. 2546 */ 2547 #define ENET_MMC_INTR_MASK_RX_RX512T1023OCTGBFIM_MASK (0x8000U) 2548 #define ENET_MMC_INTR_MASK_RX_RX512T1023OCTGBFIM_SHIFT (15U) 2549 #define ENET_MMC_INTR_MASK_RX_RX512T1023OCTGBFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RX512T1023OCTGBFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RX512T1023OCTGBFIM_MASK) 2550 #define ENET_MMC_INTR_MASK_RX_RX512T1023OCTGBFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RX512T1023OCTGBFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RX512T1023OCTGBFIM_SHIFT) 2551 2552 /* 2553 * RX256T511OCTGBFIM (RW) 2554 * 2555 * MMC Receive 256 to 511 Octet Good Bad Frame Counter Interrupt Mask 2556 * Setting this bit masks the interrupt when the rx256to511octets_gb counter reaches half of the maximum value or the maximum value. 2557 */ 2558 #define ENET_MMC_INTR_MASK_RX_RX256T511OCTGBFIM_MASK (0x4000U) 2559 #define ENET_MMC_INTR_MASK_RX_RX256T511OCTGBFIM_SHIFT (14U) 2560 #define ENET_MMC_INTR_MASK_RX_RX256T511OCTGBFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RX256T511OCTGBFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RX256T511OCTGBFIM_MASK) 2561 #define ENET_MMC_INTR_MASK_RX_RX256T511OCTGBFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RX256T511OCTGBFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RX256T511OCTGBFIM_SHIFT) 2562 2563 /* 2564 * RX128T255OCTGBFIM (RW) 2565 * 2566 * MMC Receive 128 to 255 Octet Good Bad Frame Counter Interrupt Mask 2567 * Setting this bit masks the interrupt when the rx128to255octets_gb counter reaches half of the maximum value or the maximum value. 2568 */ 2569 #define ENET_MMC_INTR_MASK_RX_RX128T255OCTGBFIM_MASK (0x2000U) 2570 #define ENET_MMC_INTR_MASK_RX_RX128T255OCTGBFIM_SHIFT (13U) 2571 #define ENET_MMC_INTR_MASK_RX_RX128T255OCTGBFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RX128T255OCTGBFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RX128T255OCTGBFIM_MASK) 2572 #define ENET_MMC_INTR_MASK_RX_RX128T255OCTGBFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RX128T255OCTGBFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RX128T255OCTGBFIM_SHIFT) 2573 2574 /* 2575 * RX65T127OCTGBFIM (RW) 2576 * 2577 * MMC Receive 65 to 127 Octet Good Bad Frame Counter Interrupt Mask 2578 * Setting this bit masks the interrupt when the rx65to127octets_gb counter reaches half of the maximum value or the maximum value. 2579 */ 2580 #define ENET_MMC_INTR_MASK_RX_RX65T127OCTGBFIM_MASK (0x1000U) 2581 #define ENET_MMC_INTR_MASK_RX_RX65T127OCTGBFIM_SHIFT (12U) 2582 #define ENET_MMC_INTR_MASK_RX_RX65T127OCTGBFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RX65T127OCTGBFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RX65T127OCTGBFIM_MASK) 2583 #define ENET_MMC_INTR_MASK_RX_RX65T127OCTGBFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RX65T127OCTGBFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RX65T127OCTGBFIM_SHIFT) 2584 2585 /* 2586 * RX64OCTGBFIM (RW) 2587 * 2588 * MMC Receive 64 Octet Good Bad Frame Counter Interrupt Mask 2589 * Setting this bit masks the interrupt when the rx64octets_gb counter reaches half of the maximum value or the maximum value. 2590 */ 2591 #define ENET_MMC_INTR_MASK_RX_RX64OCTGBFIM_MASK (0x800U) 2592 #define ENET_MMC_INTR_MASK_RX_RX64OCTGBFIM_SHIFT (11U) 2593 #define ENET_MMC_INTR_MASK_RX_RX64OCTGBFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RX64OCTGBFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RX64OCTGBFIM_MASK) 2594 #define ENET_MMC_INTR_MASK_RX_RX64OCTGBFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RX64OCTGBFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RX64OCTGBFIM_SHIFT) 2595 2596 /* 2597 * RXOSIZEGFIM (RW) 2598 * 2599 * MMC Receive Oversize Good Frame Counter Interrupt Mask 2600 * Setting this bit masks the interrupt when the rxoversize_g counter reaches half of the maximum value or the maximum value. 2601 */ 2602 #define ENET_MMC_INTR_MASK_RX_RXOSIZEGFIM_MASK (0x400U) 2603 #define ENET_MMC_INTR_MASK_RX_RXOSIZEGFIM_SHIFT (10U) 2604 #define ENET_MMC_INTR_MASK_RX_RXOSIZEGFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXOSIZEGFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXOSIZEGFIM_MASK) 2605 #define ENET_MMC_INTR_MASK_RX_RXOSIZEGFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXOSIZEGFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXOSIZEGFIM_SHIFT) 2606 2607 /* 2608 * RXUSIZEGFIM (RW) 2609 * 2610 * MMC Receive Undersize Good Frame Counter Interrupt Mask 2611 * Setting this bit masks the interrupt when the rxundersize_g counter reaches half of the maximum value or the maximum value. 2612 */ 2613 #define ENET_MMC_INTR_MASK_RX_RXUSIZEGFIM_MASK (0x200U) 2614 #define ENET_MMC_INTR_MASK_RX_RXUSIZEGFIM_SHIFT (9U) 2615 #define ENET_MMC_INTR_MASK_RX_RXUSIZEGFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXUSIZEGFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXUSIZEGFIM_MASK) 2616 #define ENET_MMC_INTR_MASK_RX_RXUSIZEGFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXUSIZEGFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXUSIZEGFIM_SHIFT) 2617 2618 /* 2619 * RXJABERFIM (RW) 2620 * 2621 * MMC Receive Jabber Error Frame Counter Interrupt Mask 2622 * Setting this bit masks the interrupt when the rxjabbererror counter reaches half of the maximum value or the maximum value. 2623 */ 2624 #define ENET_MMC_INTR_MASK_RX_RXJABERFIM_MASK (0x100U) 2625 #define ENET_MMC_INTR_MASK_RX_RXJABERFIM_SHIFT (8U) 2626 #define ENET_MMC_INTR_MASK_RX_RXJABERFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXJABERFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXJABERFIM_MASK) 2627 #define ENET_MMC_INTR_MASK_RX_RXJABERFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXJABERFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXJABERFIM_SHIFT) 2628 2629 /* 2630 * RXRUNTFIM (RW) 2631 * 2632 * MMC Receive Runt Frame Counter Interrupt Mask 2633 * Setting this bit masks the interrupt when the rxrunterror counter reaches half of the maximum value or the maximum value. 2634 */ 2635 #define ENET_MMC_INTR_MASK_RX_RXRUNTFIM_MASK (0x80U) 2636 #define ENET_MMC_INTR_MASK_RX_RXRUNTFIM_SHIFT (7U) 2637 #define ENET_MMC_INTR_MASK_RX_RXRUNTFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXRUNTFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXRUNTFIM_MASK) 2638 #define ENET_MMC_INTR_MASK_RX_RXRUNTFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXRUNTFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXRUNTFIM_SHIFT) 2639 2640 /* 2641 * RXALGNERFIM (RW) 2642 * 2643 * MMC Receive Alignment Error Frame Counter Interrupt Mask 2644 * Setting this bit masks the interrupt when the rxalignmenterror counter reaches half of the maximum value or the maximum value. 2645 */ 2646 #define ENET_MMC_INTR_MASK_RX_RXALGNERFIM_MASK (0x40U) 2647 #define ENET_MMC_INTR_MASK_RX_RXALGNERFIM_SHIFT (6U) 2648 #define ENET_MMC_INTR_MASK_RX_RXALGNERFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXALGNERFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXALGNERFIM_MASK) 2649 #define ENET_MMC_INTR_MASK_RX_RXALGNERFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXALGNERFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXALGNERFIM_SHIFT) 2650 2651 /* 2652 * RXCRCERFIM (RW) 2653 * 2654 * MMC Receive CRC Error Frame Counter Interrupt Mask 2655 * Setting this bit masks the interrupt when the rxcrcerror counter reaches half of the maximum value or the maximum value. 2656 */ 2657 #define ENET_MMC_INTR_MASK_RX_RXCRCERFIM_MASK (0x20U) 2658 #define ENET_MMC_INTR_MASK_RX_RXCRCERFIM_SHIFT (5U) 2659 #define ENET_MMC_INTR_MASK_RX_RXCRCERFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXCRCERFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXCRCERFIM_MASK) 2660 #define ENET_MMC_INTR_MASK_RX_RXCRCERFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXCRCERFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXCRCERFIM_SHIFT) 2661 2662 /* 2663 * RXMCGFIM (RW) 2664 * 2665 * MMC Receive Multicast Good Frame Counter Interrupt Mask 2666 * Setting this bit masks the interrupt when the rxmulticastframes_g counter reaches half of the maximum value or the maximum value. 2667 */ 2668 #define ENET_MMC_INTR_MASK_RX_RXMCGFIM_MASK (0x10U) 2669 #define ENET_MMC_INTR_MASK_RX_RXMCGFIM_SHIFT (4U) 2670 #define ENET_MMC_INTR_MASK_RX_RXMCGFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXMCGFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXMCGFIM_MASK) 2671 #define ENET_MMC_INTR_MASK_RX_RXMCGFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXMCGFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXMCGFIM_SHIFT) 2672 2673 /* 2674 * RXBCGFIM (RW) 2675 * 2676 * MMC Receive Broadcast Good Frame Counter Interrupt Mask 2677 * Setting this bit masks the interrupt when the rxbroadcastframes_g counter reaches half of the maximum value or the maximum value. 2678 */ 2679 #define ENET_MMC_INTR_MASK_RX_RXBCGFIM_MASK (0x8U) 2680 #define ENET_MMC_INTR_MASK_RX_RXBCGFIM_SHIFT (3U) 2681 #define ENET_MMC_INTR_MASK_RX_RXBCGFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXBCGFIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXBCGFIM_MASK) 2682 #define ENET_MMC_INTR_MASK_RX_RXBCGFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXBCGFIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXBCGFIM_SHIFT) 2683 2684 /* 2685 * RXGOCTIM (RW) 2686 * 2687 * MMC Receive Good Octet Counter Interrupt Mask 2688 * Setting this bit masks the interrupt when the rxoctetcount_g counter reaches half of the maximum value or the maximum value. 2689 */ 2690 #define ENET_MMC_INTR_MASK_RX_RXGOCTIM_MASK (0x4U) 2691 #define ENET_MMC_INTR_MASK_RX_RXGOCTIM_SHIFT (2U) 2692 #define ENET_MMC_INTR_MASK_RX_RXGOCTIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXGOCTIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXGOCTIM_MASK) 2693 #define ENET_MMC_INTR_MASK_RX_RXGOCTIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXGOCTIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXGOCTIM_SHIFT) 2694 2695 /* 2696 * RXGBOCTIM (RW) 2697 * 2698 * MMC Receive Good Bad Octet Counter Interrupt Mask. 2699 * Setting this bit masks the interrupt when the rxoctetcount_gb counter reaches half of the maximum value or the maximum value. 2700 */ 2701 #define ENET_MMC_INTR_MASK_RX_RXGBOCTIM_MASK (0x2U) 2702 #define ENET_MMC_INTR_MASK_RX_RXGBOCTIM_SHIFT (1U) 2703 #define ENET_MMC_INTR_MASK_RX_RXGBOCTIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_RX_RXGBOCTIM_SHIFT) & ENET_MMC_INTR_MASK_RX_RXGBOCTIM_MASK) 2704 #define ENET_MMC_INTR_MASK_RX_RXGBOCTIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_RX_RXGBOCTIM_MASK) >> ENET_MMC_INTR_MASK_RX_RXGBOCTIM_SHIFT) 2705 2706 /* Bitfield definition for register: MMC_INTR_MASK_TX */ 2707 /* 2708 * TXOSIZEGFIM (RW) 2709 * 2710 * MMC Transmit Oversize Good Frame Counter Interrupt Mask 2711 * Setting this bit masks the interrupt when the txoversize_g counter reaches half of the maximum value or the maximum value. 2712 */ 2713 #define ENET_MMC_INTR_MASK_TX_TXOSIZEGFIM_MASK (0x2000000UL) 2714 #define ENET_MMC_INTR_MASK_TX_TXOSIZEGFIM_SHIFT (25U) 2715 #define ENET_MMC_INTR_MASK_TX_TXOSIZEGFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXOSIZEGFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXOSIZEGFIM_MASK) 2716 #define ENET_MMC_INTR_MASK_TX_TXOSIZEGFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXOSIZEGFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXOSIZEGFIM_SHIFT) 2717 2718 /* 2719 * TXVLANGFIM (RW) 2720 * 2721 * MMC Transmit VLAN Good Frame Counter Interrupt Mask 2722 * Setting this bit masks the interrupt when the txvlanframes_g counter reaches half of the maximum value or the maximum value. 2723 */ 2724 #define ENET_MMC_INTR_MASK_TX_TXVLANGFIM_MASK (0x1000000UL) 2725 #define ENET_MMC_INTR_MASK_TX_TXVLANGFIM_SHIFT (24U) 2726 #define ENET_MMC_INTR_MASK_TX_TXVLANGFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXVLANGFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXVLANGFIM_MASK) 2727 #define ENET_MMC_INTR_MASK_TX_TXVLANGFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXVLANGFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXVLANGFIM_SHIFT) 2728 2729 /* 2730 * TXPAUSFIM (RW) 2731 * 2732 * MMC Transmit Pause Frame Counter Interrupt Mask 2733 * Setting this bit masks the interrupt when the txpauseframes counter reaches half of the maximum value or the maximum value. 2734 */ 2735 #define ENET_MMC_INTR_MASK_TX_TXPAUSFIM_MASK (0x800000UL) 2736 #define ENET_MMC_INTR_MASK_TX_TXPAUSFIM_SHIFT (23U) 2737 #define ENET_MMC_INTR_MASK_TX_TXPAUSFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXPAUSFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXPAUSFIM_MASK) 2738 #define ENET_MMC_INTR_MASK_TX_TXPAUSFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXPAUSFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXPAUSFIM_SHIFT) 2739 2740 /* 2741 * TXEXDEFFIM (RW) 2742 * 2743 * MMC Transmit Excessive Deferral Frame Counter Interrupt Mask 2744 * Setting this bit masks the interrupt when the txexcessdef counter reaches half of the maximum value or the maximum value. 2745 */ 2746 #define ENET_MMC_INTR_MASK_TX_TXEXDEFFIM_MASK (0x400000UL) 2747 #define ENET_MMC_INTR_MASK_TX_TXEXDEFFIM_SHIFT (22U) 2748 #define ENET_MMC_INTR_MASK_TX_TXEXDEFFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXEXDEFFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXEXDEFFIM_MASK) 2749 #define ENET_MMC_INTR_MASK_TX_TXEXDEFFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXEXDEFFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXEXDEFFIM_SHIFT) 2750 2751 /* 2752 * TXGFRMIM (RW) 2753 * 2754 * MMC Transmit Good Frame Counter Interrupt Mask 2755 * Setting this bit masks the interrupt when the txframecount_g counter reaches half of the maximum value or the maximum value. 2756 */ 2757 #define ENET_MMC_INTR_MASK_TX_TXGFRMIM_MASK (0x200000UL) 2758 #define ENET_MMC_INTR_MASK_TX_TXGFRMIM_SHIFT (21U) 2759 #define ENET_MMC_INTR_MASK_TX_TXGFRMIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXGFRMIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXGFRMIM_MASK) 2760 #define ENET_MMC_INTR_MASK_TX_TXGFRMIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXGFRMIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXGFRMIM_SHIFT) 2761 2762 /* 2763 * TXGOCTIM (RW) 2764 * 2765 * MMC Transmit Good Octet Counter Interrupt Mask 2766 * Setting this bit masks the interrupt when the txoctetcount_g counter reaches half of the maximum value or the maximum value. 2767 */ 2768 #define ENET_MMC_INTR_MASK_TX_TXGOCTIM_MASK (0x100000UL) 2769 #define ENET_MMC_INTR_MASK_TX_TXGOCTIM_SHIFT (20U) 2770 #define ENET_MMC_INTR_MASK_TX_TXGOCTIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXGOCTIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXGOCTIM_MASK) 2771 #define ENET_MMC_INTR_MASK_TX_TXGOCTIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXGOCTIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXGOCTIM_SHIFT) 2772 2773 /* 2774 * TXCARERFIM (RW) 2775 * 2776 * MMC Transmit Carrier Error Frame Counter Interrupt Mask 2777 * Setting this bit masks the interrupt when the txcarriererror counter reaches half of the maximum value or the maximum value. 2778 */ 2779 #define ENET_MMC_INTR_MASK_TX_TXCARERFIM_MASK (0x80000UL) 2780 #define ENET_MMC_INTR_MASK_TX_TXCARERFIM_SHIFT (19U) 2781 #define ENET_MMC_INTR_MASK_TX_TXCARERFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXCARERFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXCARERFIM_MASK) 2782 #define ENET_MMC_INTR_MASK_TX_TXCARERFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXCARERFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXCARERFIM_SHIFT) 2783 2784 /* 2785 * TXEXCOLFIM (RW) 2786 * 2787 * MMC Transmit Excessive Collision Frame Counter Interrupt Mask 2788 * Setting this bit masks the interrupt when the txexcesscol counter reaches half of the maximum value or the maximum value. 2789 */ 2790 #define ENET_MMC_INTR_MASK_TX_TXEXCOLFIM_MASK (0x40000UL) 2791 #define ENET_MMC_INTR_MASK_TX_TXEXCOLFIM_SHIFT (18U) 2792 #define ENET_MMC_INTR_MASK_TX_TXEXCOLFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXEXCOLFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXEXCOLFIM_MASK) 2793 #define ENET_MMC_INTR_MASK_TX_TXEXCOLFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXEXCOLFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXEXCOLFIM_SHIFT) 2794 2795 /* 2796 * TXLATCOLFIM (RW) 2797 * 2798 * MMC Transmit Late Collision Frame Counter Interrupt Mask 2799 * Setting this bit masks the interrupt when the txlatecol counter reaches half of the maximum value or the maximum value. 2800 */ 2801 #define ENET_MMC_INTR_MASK_TX_TXLATCOLFIM_MASK (0x20000UL) 2802 #define ENET_MMC_INTR_MASK_TX_TXLATCOLFIM_SHIFT (17U) 2803 #define ENET_MMC_INTR_MASK_TX_TXLATCOLFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXLATCOLFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXLATCOLFIM_MASK) 2804 #define ENET_MMC_INTR_MASK_TX_TXLATCOLFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXLATCOLFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXLATCOLFIM_SHIFT) 2805 2806 /* 2807 * TXDEFFIM (RW) 2808 * 2809 * MMC Transmit Deferred Frame Counter Interrupt Mask 2810 * Setting this bit masks the interrupt when the txdeferred counter reaches half of the maximum value or the maximum value. 2811 */ 2812 #define ENET_MMC_INTR_MASK_TX_TXDEFFIM_MASK (0x10000UL) 2813 #define ENET_MMC_INTR_MASK_TX_TXDEFFIM_SHIFT (16U) 2814 #define ENET_MMC_INTR_MASK_TX_TXDEFFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXDEFFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXDEFFIM_MASK) 2815 #define ENET_MMC_INTR_MASK_TX_TXDEFFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXDEFFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXDEFFIM_SHIFT) 2816 2817 /* 2818 * TXMCOLGFIM (RW) 2819 * 2820 * MMC Transmit Multiple Collision Good Frame Counter Interrupt Mask 2821 * Setting this bit masks the interrupt when the txmulticol_g counter reaches half of the maximum value or the maximum value. 2822 */ 2823 #define ENET_MMC_INTR_MASK_TX_TXMCOLGFIM_MASK (0x8000U) 2824 #define ENET_MMC_INTR_MASK_TX_TXMCOLGFIM_SHIFT (15U) 2825 #define ENET_MMC_INTR_MASK_TX_TXMCOLGFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXMCOLGFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXMCOLGFIM_MASK) 2826 #define ENET_MMC_INTR_MASK_TX_TXMCOLGFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXMCOLGFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXMCOLGFIM_SHIFT) 2827 2828 /* 2829 * TXSCOLGFIM (RW) 2830 * 2831 * MMC Transmit Single Collision Good Frame Counter Interrupt Mask 2832 * Setting this bit masks the interrupt when the txsinglecol_g counter reaches half of the maximum value or the maximum value. 2833 */ 2834 #define ENET_MMC_INTR_MASK_TX_TXSCOLGFIM_MASK (0x4000U) 2835 #define ENET_MMC_INTR_MASK_TX_TXSCOLGFIM_SHIFT (14U) 2836 #define ENET_MMC_INTR_MASK_TX_TXSCOLGFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXSCOLGFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXSCOLGFIM_MASK) 2837 #define ENET_MMC_INTR_MASK_TX_TXSCOLGFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXSCOLGFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXSCOLGFIM_SHIFT) 2838 2839 /* 2840 * TXUFLOWERFIM (RW) 2841 * 2842 * MMC Transmit Underflow Error Frame Counter Interrupt Mask 2843 * Setting this bit masks the interrupt when the txunderflowerror counter reaches half of the maximum value or the maximum value. 2844 */ 2845 #define ENET_MMC_INTR_MASK_TX_TXUFLOWERFIM_MASK (0x2000U) 2846 #define ENET_MMC_INTR_MASK_TX_TXUFLOWERFIM_SHIFT (13U) 2847 #define ENET_MMC_INTR_MASK_TX_TXUFLOWERFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXUFLOWERFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXUFLOWERFIM_MASK) 2848 #define ENET_MMC_INTR_MASK_TX_TXUFLOWERFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXUFLOWERFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXUFLOWERFIM_SHIFT) 2849 2850 /* 2851 * TXBCGBFIM (RW) 2852 * 2853 * MMC Transmit Broadcast Good Bad Frame Counter Interrupt Mask 2854 * Setting this bit masks the interrupt when the txbroadcastframes_gb counter reaches half of the maximum value or the maximum value. 2855 */ 2856 #define ENET_MMC_INTR_MASK_TX_TXBCGBFIM_MASK (0x1000U) 2857 #define ENET_MMC_INTR_MASK_TX_TXBCGBFIM_SHIFT (12U) 2858 #define ENET_MMC_INTR_MASK_TX_TXBCGBFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXBCGBFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXBCGBFIM_MASK) 2859 #define ENET_MMC_INTR_MASK_TX_TXBCGBFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXBCGBFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXBCGBFIM_SHIFT) 2860 2861 /* 2862 * TXMCGBFIM (RW) 2863 * 2864 * MMC Transmit Multicast Good Bad Frame Counter Interrupt Mask 2865 * Setting this bit masks the interrupt when the txmulticastframes_gb counter reaches half of the maximum value or the maximum value. 2866 */ 2867 #define ENET_MMC_INTR_MASK_TX_TXMCGBFIM_MASK (0x800U) 2868 #define ENET_MMC_INTR_MASK_TX_TXMCGBFIM_SHIFT (11U) 2869 #define ENET_MMC_INTR_MASK_TX_TXMCGBFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXMCGBFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXMCGBFIM_MASK) 2870 #define ENET_MMC_INTR_MASK_TX_TXMCGBFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXMCGBFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXMCGBFIM_SHIFT) 2871 2872 /* 2873 * TXUCGBFIM (RW) 2874 * 2875 * MMC Transmit Unicast Good Bad Frame Counter Interrupt Mask 2876 * Setting this bit masks the interrupt when the txunicastframes_gb counter reaches half of the maximum value or the maximum value. 2877 */ 2878 #define ENET_MMC_INTR_MASK_TX_TXUCGBFIM_MASK (0x400U) 2879 #define ENET_MMC_INTR_MASK_TX_TXUCGBFIM_SHIFT (10U) 2880 #define ENET_MMC_INTR_MASK_TX_TXUCGBFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXUCGBFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXUCGBFIM_MASK) 2881 #define ENET_MMC_INTR_MASK_TX_TXUCGBFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXUCGBFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXUCGBFIM_SHIFT) 2882 2883 /* 2884 * TX1024TMAXOCTGBFIM (RW) 2885 * 2886 * MMC Transmit 1024 to Maximum Octet Good Bad Frame Counter Interrupt Mask 2887 * Setting this bit masks the interrupt when the tx1024tomaxoctets_gb counter reaches half of the maximum value or the maximum value. 2888 */ 2889 #define ENET_MMC_INTR_MASK_TX_TX1024TMAXOCTGBFIM_MASK (0x200U) 2890 #define ENET_MMC_INTR_MASK_TX_TX1024TMAXOCTGBFIM_SHIFT (9U) 2891 #define ENET_MMC_INTR_MASK_TX_TX1024TMAXOCTGBFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TX1024TMAXOCTGBFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TX1024TMAXOCTGBFIM_MASK) 2892 #define ENET_MMC_INTR_MASK_TX_TX1024TMAXOCTGBFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TX1024TMAXOCTGBFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TX1024TMAXOCTGBFIM_SHIFT) 2893 2894 /* 2895 * TX512T1023OCTGBFIM (RW) 2896 * 2897 * MMC Transmit 512 to 1023 Octet Good Bad Frame Counter Interrupt Mask 2898 * Setting this bit masks the interrupt when the tx512to1023octets_gb counter reaches half of the maximum value or the maximum value. 2899 */ 2900 #define ENET_MMC_INTR_MASK_TX_TX512T1023OCTGBFIM_MASK (0x100U) 2901 #define ENET_MMC_INTR_MASK_TX_TX512T1023OCTGBFIM_SHIFT (8U) 2902 #define ENET_MMC_INTR_MASK_TX_TX512T1023OCTGBFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TX512T1023OCTGBFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TX512T1023OCTGBFIM_MASK) 2903 #define ENET_MMC_INTR_MASK_TX_TX512T1023OCTGBFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TX512T1023OCTGBFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TX512T1023OCTGBFIM_SHIFT) 2904 2905 /* 2906 * TX256T511OCTGBFIM (RW) 2907 * 2908 * MMC Transmit 256 to 511 Octet Good Bad Frame Counter Interrupt Mask 2909 * Setting this bit masks the interrupt when the tx256to511octets_gb counter reaches half of the maximum value or the maximum value. 2910 */ 2911 #define ENET_MMC_INTR_MASK_TX_TX256T511OCTGBFIM_MASK (0x80U) 2912 #define ENET_MMC_INTR_MASK_TX_TX256T511OCTGBFIM_SHIFT (7U) 2913 #define ENET_MMC_INTR_MASK_TX_TX256T511OCTGBFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TX256T511OCTGBFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TX256T511OCTGBFIM_MASK) 2914 #define ENET_MMC_INTR_MASK_TX_TX256T511OCTGBFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TX256T511OCTGBFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TX256T511OCTGBFIM_SHIFT) 2915 2916 /* 2917 * TX128T255OCTGBFIM (RW) 2918 * 2919 * MMC Transmit 128 to 255 Octet Good Bad Frame Counter Interrupt Mask 2920 * Setting this bit masks the interrupt when the tx128to255octets_gb counter reaches half of the maximum value or the maximum value. 2921 */ 2922 #define ENET_MMC_INTR_MASK_TX_TX128T255OCTGBFIM_MASK (0x40U) 2923 #define ENET_MMC_INTR_MASK_TX_TX128T255OCTGBFIM_SHIFT (6U) 2924 #define ENET_MMC_INTR_MASK_TX_TX128T255OCTGBFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TX128T255OCTGBFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TX128T255OCTGBFIM_MASK) 2925 #define ENET_MMC_INTR_MASK_TX_TX128T255OCTGBFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TX128T255OCTGBFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TX128T255OCTGBFIM_SHIFT) 2926 2927 /* 2928 * TX65T127OCTGBFIM (RW) 2929 * 2930 * MMC Transmit 65 to 127 Octet Good Bad Frame Counter Interrupt Mask 2931 * Setting this bit masks the interrupt when the tx65to127octets_gb counter reaches half of the maximum value or the maximum value. 2932 */ 2933 #define ENET_MMC_INTR_MASK_TX_TX65T127OCTGBFIM_MASK (0x20U) 2934 #define ENET_MMC_INTR_MASK_TX_TX65T127OCTGBFIM_SHIFT (5U) 2935 #define ENET_MMC_INTR_MASK_TX_TX65T127OCTGBFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TX65T127OCTGBFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TX65T127OCTGBFIM_MASK) 2936 #define ENET_MMC_INTR_MASK_TX_TX65T127OCTGBFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TX65T127OCTGBFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TX65T127OCTGBFIM_SHIFT) 2937 2938 /* 2939 * TX64OCTGBFIM (RW) 2940 * 2941 * MMC Transmit 64 Octet Good Bad Frame Counter Interrupt Mask 2942 * Setting this bit masks the interrupt when the tx64octets_gb counter reaches half of the maximum value or the maximum value. 2943 */ 2944 #define ENET_MMC_INTR_MASK_TX_TX64OCTGBFIM_MASK (0x10U) 2945 #define ENET_MMC_INTR_MASK_TX_TX64OCTGBFIM_SHIFT (4U) 2946 #define ENET_MMC_INTR_MASK_TX_TX64OCTGBFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TX64OCTGBFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TX64OCTGBFIM_MASK) 2947 #define ENET_MMC_INTR_MASK_TX_TX64OCTGBFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TX64OCTGBFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TX64OCTGBFIM_SHIFT) 2948 2949 /* 2950 * TXMCGFIM (RW) 2951 * 2952 * MMC Transmit Multicast Good Frame Counter Interrupt Mask 2953 * Setting this bit masks the interrupt when the txmulticastframes_g counter reaches half of the maximum value or the maximum value. 2954 */ 2955 #define ENET_MMC_INTR_MASK_TX_TXMCGFIM_MASK (0x8U) 2956 #define ENET_MMC_INTR_MASK_TX_TXMCGFIM_SHIFT (3U) 2957 #define ENET_MMC_INTR_MASK_TX_TXMCGFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXMCGFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXMCGFIM_MASK) 2958 #define ENET_MMC_INTR_MASK_TX_TXMCGFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXMCGFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXMCGFIM_SHIFT) 2959 2960 /* 2961 * TXBCGFIM (RW) 2962 * 2963 * MMC Transmit Broadcast Good Frame Counter Interrupt Mask 2964 * Setting this bit masks the interrupt when the txbroadcastframes_g counter reaches half of the maximum value or the maximum value. 2965 */ 2966 #define ENET_MMC_INTR_MASK_TX_TXBCGFIM_MASK (0x4U) 2967 #define ENET_MMC_INTR_MASK_TX_TXBCGFIM_SHIFT (2U) 2968 #define ENET_MMC_INTR_MASK_TX_TXBCGFIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXBCGFIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXBCGFIM_MASK) 2969 #define ENET_MMC_INTR_MASK_TX_TXBCGFIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXBCGFIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXBCGFIM_SHIFT) 2970 2971 /* 2972 * TXGBFRMIM (RW) 2973 * 2974 * MMC Transmit Good Bad Frame Counter Interrupt Mask 2975 * Setting this bit masks the interrupt when the txframecount_gb counter reaches half of the maximum value or the maximum value. 2976 */ 2977 #define ENET_MMC_INTR_MASK_TX_TXGBFRMIM_MASK (0x2U) 2978 #define ENET_MMC_INTR_MASK_TX_TXGBFRMIM_SHIFT (1U) 2979 #define ENET_MMC_INTR_MASK_TX_TXGBFRMIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXGBFRMIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXGBFRMIM_MASK) 2980 #define ENET_MMC_INTR_MASK_TX_TXGBFRMIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXGBFRMIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXGBFRMIM_SHIFT) 2981 2982 /* 2983 * TXGBOCTIM (RW) 2984 * 2985 * MMC Transmit Good Bad Octet Counter Interrupt Mask 2986 * Setting this bit masks the interrupt when the txoctetcount_gb counter reaches half of the maximum value or the maximum value. 2987 */ 2988 #define ENET_MMC_INTR_MASK_TX_TXGBOCTIM_MASK (0x1U) 2989 #define ENET_MMC_INTR_MASK_TX_TXGBOCTIM_SHIFT (0U) 2990 #define ENET_MMC_INTR_MASK_TX_TXGBOCTIM_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_MASK_TX_TXGBOCTIM_SHIFT) & ENET_MMC_INTR_MASK_TX_TXGBOCTIM_MASK) 2991 #define ENET_MMC_INTR_MASK_TX_TXGBOCTIM_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_MASK_TX_TXGBOCTIM_MASK) >> ENET_MMC_INTR_MASK_TX_TXGBOCTIM_SHIFT) 2992 2993 /* Bitfield definition for register: TXOCTETCOUNT_GB */ 2994 /* 2995 * BYTECNT (RW) 2996 * 2997 * Number of bytes transmitted, exclusive of preamble and retried bytes, in good and bad frames. 2998 */ 2999 #define ENET_TXOCTETCOUNT_GB_BYTECNT_MASK (0xFFFFFFFFUL) 3000 #define ENET_TXOCTETCOUNT_GB_BYTECNT_SHIFT (0U) 3001 #define ENET_TXOCTETCOUNT_GB_BYTECNT_SET(x) (((uint32_t)(x) << ENET_TXOCTETCOUNT_GB_BYTECNT_SHIFT) & ENET_TXOCTETCOUNT_GB_BYTECNT_MASK) 3002 #define ENET_TXOCTETCOUNT_GB_BYTECNT_GET(x) (((uint32_t)(x) & ENET_TXOCTETCOUNT_GB_BYTECNT_MASK) >> ENET_TXOCTETCOUNT_GB_BYTECNT_SHIFT) 3003 3004 /* Bitfield definition for register: TXFRAMECOUNT_GB */ 3005 /* 3006 * FRMCNT (RW) 3007 * 3008 * Number of good and bad frames transmitted, exclusive of retried frames. 3009 */ 3010 #define ENET_TXFRAMECOUNT_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3011 #define ENET_TXFRAMECOUNT_GB_FRMCNT_SHIFT (0U) 3012 #define ENET_TXFRAMECOUNT_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXFRAMECOUNT_GB_FRMCNT_SHIFT) & ENET_TXFRAMECOUNT_GB_FRMCNT_MASK) 3013 #define ENET_TXFRAMECOUNT_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXFRAMECOUNT_GB_FRMCNT_MASK) >> ENET_TXFRAMECOUNT_GB_FRMCNT_SHIFT) 3014 3015 /* Bitfield definition for register: TXBROADCASTFRAMES_G */ 3016 /* 3017 * FRMCNT (RW) 3018 * 3019 * Number of good broadcast frames transmitted. 3020 */ 3021 #define ENET_TXBROADCASTFRAMES_G_FRMCNT_MASK (0xFFFFFFFFUL) 3022 #define ENET_TXBROADCASTFRAMES_G_FRMCNT_SHIFT (0U) 3023 #define ENET_TXBROADCASTFRAMES_G_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXBROADCASTFRAMES_G_FRMCNT_SHIFT) & ENET_TXBROADCASTFRAMES_G_FRMCNT_MASK) 3024 #define ENET_TXBROADCASTFRAMES_G_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXBROADCASTFRAMES_G_FRMCNT_MASK) >> ENET_TXBROADCASTFRAMES_G_FRMCNT_SHIFT) 3025 3026 /* Bitfield definition for register: TXMLTICASTFRAMES_G */ 3027 /* 3028 * FRMCNT (RW) 3029 * 3030 * Number of good multicast frames transmitted. 3031 */ 3032 #define ENET_TXMLTICASTFRAMES_G_FRMCNT_MASK (0xFFFFFFFFUL) 3033 #define ENET_TXMLTICASTFRAMES_G_FRMCNT_SHIFT (0U) 3034 #define ENET_TXMLTICASTFRAMES_G_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXMLTICASTFRAMES_G_FRMCNT_SHIFT) & ENET_TXMLTICASTFRAMES_G_FRMCNT_MASK) 3035 #define ENET_TXMLTICASTFRAMES_G_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXMLTICASTFRAMES_G_FRMCNT_MASK) >> ENET_TXMLTICASTFRAMES_G_FRMCNT_SHIFT) 3036 3037 /* Bitfield definition for register: TX64OCTETS_GB */ 3038 /* 3039 * FRMCNT (RW) 3040 * 3041 * Number of good and bad frames transmitted with length 64 bytes, exclusive of preamble and retried frames. 3042 */ 3043 #define ENET_TX64OCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3044 #define ENET_TX64OCTETS_GB_FRMCNT_SHIFT (0U) 3045 #define ENET_TX64OCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TX64OCTETS_GB_FRMCNT_SHIFT) & ENET_TX64OCTETS_GB_FRMCNT_MASK) 3046 #define ENET_TX64OCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TX64OCTETS_GB_FRMCNT_MASK) >> ENET_TX64OCTETS_GB_FRMCNT_SHIFT) 3047 3048 /* Bitfield definition for register: TX65TO127OCTETS_GB */ 3049 /* 3050 * FRMCNT (RW) 3051 * 3052 * Number of good and bad frames transmitted with length between 65 and 127 (inclusive) bytes, exclusive of preamble and retried frames. 3053 */ 3054 #define ENET_TX65TO127OCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3055 #define ENET_TX65TO127OCTETS_GB_FRMCNT_SHIFT (0U) 3056 #define ENET_TX65TO127OCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TX65TO127OCTETS_GB_FRMCNT_SHIFT) & ENET_TX65TO127OCTETS_GB_FRMCNT_MASK) 3057 #define ENET_TX65TO127OCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TX65TO127OCTETS_GB_FRMCNT_MASK) >> ENET_TX65TO127OCTETS_GB_FRMCNT_SHIFT) 3058 3059 /* Bitfield definition for register: TX128TO255OCTETS_GB */ 3060 /* 3061 * FRMCNT (RW) 3062 * 3063 * Number of good and bad frames transmitted with length between 128 and 255 (inclusive) bytes, exclusive of preamble and retried frames. 3064 */ 3065 #define ENET_TX128TO255OCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3066 #define ENET_TX128TO255OCTETS_GB_FRMCNT_SHIFT (0U) 3067 #define ENET_TX128TO255OCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TX128TO255OCTETS_GB_FRMCNT_SHIFT) & ENET_TX128TO255OCTETS_GB_FRMCNT_MASK) 3068 #define ENET_TX128TO255OCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TX128TO255OCTETS_GB_FRMCNT_MASK) >> ENET_TX128TO255OCTETS_GB_FRMCNT_SHIFT) 3069 3070 /* Bitfield definition for register: TX256TO511OCTETS_GB */ 3071 /* 3072 * FRMCNT (RW) 3073 * 3074 * Number of good and bad frames transmitted with length between 256 and 511 (inclusive) bytes, exclusive of preamble and retried frames. 3075 */ 3076 #define ENET_TX256TO511OCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3077 #define ENET_TX256TO511OCTETS_GB_FRMCNT_SHIFT (0U) 3078 #define ENET_TX256TO511OCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TX256TO511OCTETS_GB_FRMCNT_SHIFT) & ENET_TX256TO511OCTETS_GB_FRMCNT_MASK) 3079 #define ENET_TX256TO511OCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TX256TO511OCTETS_GB_FRMCNT_MASK) >> ENET_TX256TO511OCTETS_GB_FRMCNT_SHIFT) 3080 3081 /* Bitfield definition for register: TX512TO1023OCTETS_GB */ 3082 /* 3083 * FRMCNT (RW) 3084 * 3085 * Number of good and bad frames transmitted with length between 512 and 1,023 (inclusive) bytes, exclusive of preamble and retried frames. 3086 */ 3087 #define ENET_TX512TO1023OCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3088 #define ENET_TX512TO1023OCTETS_GB_FRMCNT_SHIFT (0U) 3089 #define ENET_TX512TO1023OCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TX512TO1023OCTETS_GB_FRMCNT_SHIFT) & ENET_TX512TO1023OCTETS_GB_FRMCNT_MASK) 3090 #define ENET_TX512TO1023OCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TX512TO1023OCTETS_GB_FRMCNT_MASK) >> ENET_TX512TO1023OCTETS_GB_FRMCNT_SHIFT) 3091 3092 /* Bitfield definition for register: TX1024TOMAXOCTETS_GB */ 3093 /* 3094 * FRMCNT (RW) 3095 * 3096 * Number of good and bad frames transmitted with length between 1,024 and maxsize (inclusive) bytes, exclusive of preamble and retried frames. 3097 */ 3098 #define ENET_TX1024TOMAXOCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3099 #define ENET_TX1024TOMAXOCTETS_GB_FRMCNT_SHIFT (0U) 3100 #define ENET_TX1024TOMAXOCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TX1024TOMAXOCTETS_GB_FRMCNT_SHIFT) & ENET_TX1024TOMAXOCTETS_GB_FRMCNT_MASK) 3101 #define ENET_TX1024TOMAXOCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TX1024TOMAXOCTETS_GB_FRMCNT_MASK) >> ENET_TX1024TOMAXOCTETS_GB_FRMCNT_SHIFT) 3102 3103 /* Bitfield definition for register: TXUNICASTFRAMES_GB */ 3104 /* 3105 * FRMCNT (RW) 3106 * 3107 * Number of good and bad unicast frames transmitted. 3108 */ 3109 #define ENET_TXUNICASTFRAMES_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3110 #define ENET_TXUNICASTFRAMES_GB_FRMCNT_SHIFT (0U) 3111 #define ENET_TXUNICASTFRAMES_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXUNICASTFRAMES_GB_FRMCNT_SHIFT) & ENET_TXUNICASTFRAMES_GB_FRMCNT_MASK) 3112 #define ENET_TXUNICASTFRAMES_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXUNICASTFRAMES_GB_FRMCNT_MASK) >> ENET_TXUNICASTFRAMES_GB_FRMCNT_SHIFT) 3113 3114 /* Bitfield definition for register: TXMULTICASTFRAMES_GB */ 3115 /* 3116 * FRMCNT (RW) 3117 * 3118 * Number of good and bad multicast frames transmitted. 3119 */ 3120 #define ENET_TXMULTICASTFRAMES_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3121 #define ENET_TXMULTICASTFRAMES_GB_FRMCNT_SHIFT (0U) 3122 #define ENET_TXMULTICASTFRAMES_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXMULTICASTFRAMES_GB_FRMCNT_SHIFT) & ENET_TXMULTICASTFRAMES_GB_FRMCNT_MASK) 3123 #define ENET_TXMULTICASTFRAMES_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXMULTICASTFRAMES_GB_FRMCNT_MASK) >> ENET_TXMULTICASTFRAMES_GB_FRMCNT_SHIFT) 3124 3125 /* Bitfield definition for register: TXBROADCASTFRAMES_GB */ 3126 /* 3127 * FRMCNT (RW) 3128 * 3129 * Number of good and bad broadcast frames transmitted. 3130 */ 3131 #define ENET_TXBROADCASTFRAMES_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3132 #define ENET_TXBROADCASTFRAMES_GB_FRMCNT_SHIFT (0U) 3133 #define ENET_TXBROADCASTFRAMES_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXBROADCASTFRAMES_GB_FRMCNT_SHIFT) & ENET_TXBROADCASTFRAMES_GB_FRMCNT_MASK) 3134 #define ENET_TXBROADCASTFRAMES_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXBROADCASTFRAMES_GB_FRMCNT_MASK) >> ENET_TXBROADCASTFRAMES_GB_FRMCNT_SHIFT) 3135 3136 /* Bitfield definition for register: TXUNDERFLOWERROR */ 3137 /* 3138 * FRMCNT (RW) 3139 * 3140 * Number of frames aborted because of frame underflow error. 3141 */ 3142 #define ENET_TXUNDERFLOWERROR_FRMCNT_MASK (0xFFFFFFFFUL) 3143 #define ENET_TXUNDERFLOWERROR_FRMCNT_SHIFT (0U) 3144 #define ENET_TXUNDERFLOWERROR_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXUNDERFLOWERROR_FRMCNT_SHIFT) & ENET_TXUNDERFLOWERROR_FRMCNT_MASK) 3145 #define ENET_TXUNDERFLOWERROR_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXUNDERFLOWERROR_FRMCNT_MASK) >> ENET_TXUNDERFLOWERROR_FRMCNT_SHIFT) 3146 3147 /* Bitfield definition for register: TXSINGLECOL_G */ 3148 /* 3149 * FRMCNT (RW) 3150 * 3151 * Number of successfully transmitted frames after a single collision in the half-duplex mode. 3152 */ 3153 #define ENET_TXSINGLECOL_G_FRMCNT_MASK (0xFFFFFFFFUL) 3154 #define ENET_TXSINGLECOL_G_FRMCNT_SHIFT (0U) 3155 #define ENET_TXSINGLECOL_G_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXSINGLECOL_G_FRMCNT_SHIFT) & ENET_TXSINGLECOL_G_FRMCNT_MASK) 3156 #define ENET_TXSINGLECOL_G_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXSINGLECOL_G_FRMCNT_MASK) >> ENET_TXSINGLECOL_G_FRMCNT_SHIFT) 3157 3158 /* Bitfield definition for register: TXMULTICOL_G */ 3159 /* 3160 * FRMCNT (RW) 3161 * 3162 * Number of successfully transmitted frames after multiple collisions in the half-duplex mode. 3163 */ 3164 #define ENET_TXMULTICOL_G_FRMCNT_MASK (0xFFFFFFFFUL) 3165 #define ENET_TXMULTICOL_G_FRMCNT_SHIFT (0U) 3166 #define ENET_TXMULTICOL_G_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXMULTICOL_G_FRMCNT_SHIFT) & ENET_TXMULTICOL_G_FRMCNT_MASK) 3167 #define ENET_TXMULTICOL_G_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXMULTICOL_G_FRMCNT_MASK) >> ENET_TXMULTICOL_G_FRMCNT_SHIFT) 3168 3169 /* Bitfield definition for register: TXDEFERRED */ 3170 /* 3171 * FRMCNT (RW) 3172 * 3173 * Number of successfully transmitted frames after a deferral in the half-duplex mode. 3174 */ 3175 #define ENET_TXDEFERRED_FRMCNT_MASK (0xFFFFFFFFUL) 3176 #define ENET_TXDEFERRED_FRMCNT_SHIFT (0U) 3177 #define ENET_TXDEFERRED_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXDEFERRED_FRMCNT_SHIFT) & ENET_TXDEFERRED_FRMCNT_MASK) 3178 #define ENET_TXDEFERRED_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXDEFERRED_FRMCNT_MASK) >> ENET_TXDEFERRED_FRMCNT_SHIFT) 3179 3180 /* Bitfield definition for register: TXLATECOL */ 3181 /* 3182 * FRMCNT (RW) 3183 * 3184 * Number of frames aborted because of late collision error. 3185 */ 3186 #define ENET_TXLATECOL_FRMCNT_MASK (0xFFFFFFFFUL) 3187 #define ENET_TXLATECOL_FRMCNT_SHIFT (0U) 3188 #define ENET_TXLATECOL_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXLATECOL_FRMCNT_SHIFT) & ENET_TXLATECOL_FRMCNT_MASK) 3189 #define ENET_TXLATECOL_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXLATECOL_FRMCNT_MASK) >> ENET_TXLATECOL_FRMCNT_SHIFT) 3190 3191 /* Bitfield definition for register: TXEXESSCOL */ 3192 /* 3193 * FRMCNT (RW) 3194 * 3195 * Number of frames aborted because of excessive (16) collision errors. 3196 */ 3197 #define ENET_TXEXESSCOL_FRMCNT_MASK (0xFFFFFFFFUL) 3198 #define ENET_TXEXESSCOL_FRMCNT_SHIFT (0U) 3199 #define ENET_TXEXESSCOL_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXEXESSCOL_FRMCNT_SHIFT) & ENET_TXEXESSCOL_FRMCNT_MASK) 3200 #define ENET_TXEXESSCOL_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXEXESSCOL_FRMCNT_MASK) >> ENET_TXEXESSCOL_FRMCNT_SHIFT) 3201 3202 /* Bitfield definition for register: TXCARRIERERROR */ 3203 /* 3204 * FRMCNT (RW) 3205 * 3206 * Number of frames aborted because of carrier sense error (no carrier or loss of carrier). 3207 */ 3208 #define ENET_TXCARRIERERROR_FRMCNT_MASK (0xFFFFFFFFUL) 3209 #define ENET_TXCARRIERERROR_FRMCNT_SHIFT (0U) 3210 #define ENET_TXCARRIERERROR_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXCARRIERERROR_FRMCNT_SHIFT) & ENET_TXCARRIERERROR_FRMCNT_MASK) 3211 #define ENET_TXCARRIERERROR_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXCARRIERERROR_FRMCNT_MASK) >> ENET_TXCARRIERERROR_FRMCNT_SHIFT) 3212 3213 /* Bitfield definition for register: TXOCTETCOUNT_G */ 3214 /* 3215 * BYTECNT (RW) 3216 * 3217 * Number of bytes transmitted, exclusive of preamble, only in good frames. 3218 */ 3219 #define ENET_TXOCTETCOUNT_G_BYTECNT_MASK (0xFFFFFFFFUL) 3220 #define ENET_TXOCTETCOUNT_G_BYTECNT_SHIFT (0U) 3221 #define ENET_TXOCTETCOUNT_G_BYTECNT_SET(x) (((uint32_t)(x) << ENET_TXOCTETCOUNT_G_BYTECNT_SHIFT) & ENET_TXOCTETCOUNT_G_BYTECNT_MASK) 3222 #define ENET_TXOCTETCOUNT_G_BYTECNT_GET(x) (((uint32_t)(x) & ENET_TXOCTETCOUNT_G_BYTECNT_MASK) >> ENET_TXOCTETCOUNT_G_BYTECNT_SHIFT) 3223 3224 /* Bitfield definition for register: TXFRAMECOUNT_G */ 3225 /* 3226 * FRMCNT (RW) 3227 * 3228 * Number of good frames transmitted. 3229 */ 3230 #define ENET_TXFRAMECOUNT_G_FRMCNT_MASK (0xFFFFFFFFUL) 3231 #define ENET_TXFRAMECOUNT_G_FRMCNT_SHIFT (0U) 3232 #define ENET_TXFRAMECOUNT_G_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXFRAMECOUNT_G_FRMCNT_SHIFT) & ENET_TXFRAMECOUNT_G_FRMCNT_MASK) 3233 #define ENET_TXFRAMECOUNT_G_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXFRAMECOUNT_G_FRMCNT_MASK) >> ENET_TXFRAMECOUNT_G_FRMCNT_SHIFT) 3234 3235 /* Bitfield definition for register: TXEXCESSDEF */ 3236 /* 3237 * FRMCNT (RW) 3238 * 3239 * Number of frames aborted because of excessive deferral error (deferred for more than two max-sized frame times). 3240 */ 3241 #define ENET_TXEXCESSDEF_FRMCNT_MASK (0xFFFFFFFFUL) 3242 #define ENET_TXEXCESSDEF_FRMCNT_SHIFT (0U) 3243 #define ENET_TXEXCESSDEF_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXEXCESSDEF_FRMCNT_SHIFT) & ENET_TXEXCESSDEF_FRMCNT_MASK) 3244 #define ENET_TXEXCESSDEF_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXEXCESSDEF_FRMCNT_MASK) >> ENET_TXEXCESSDEF_FRMCNT_SHIFT) 3245 3246 /* Bitfield definition for register: TXPAUSEFRAMES */ 3247 /* 3248 * FRMCNT (RW) 3249 * 3250 * Number of good Pause frames transmitted. 3251 */ 3252 #define ENET_TXPAUSEFRAMES_FRMCNT_MASK (0xFFFFFFFFUL) 3253 #define ENET_TXPAUSEFRAMES_FRMCNT_SHIFT (0U) 3254 #define ENET_TXPAUSEFRAMES_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXPAUSEFRAMES_FRMCNT_SHIFT) & ENET_TXPAUSEFRAMES_FRMCNT_MASK) 3255 #define ENET_TXPAUSEFRAMES_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXPAUSEFRAMES_FRMCNT_MASK) >> ENET_TXPAUSEFRAMES_FRMCNT_SHIFT) 3256 3257 /* Bitfield definition for register: TXVLANFRAMES_G */ 3258 /* 3259 * FRMCNT (RW) 3260 * 3261 * Number of good VLAN frames transmitted, exclusive of retried frames. 3262 */ 3263 #define ENET_TXVLANFRAMES_G_FRMCNT_MASK (0xFFFFFFFFUL) 3264 #define ENET_TXVLANFRAMES_G_FRMCNT_SHIFT (0U) 3265 #define ENET_TXVLANFRAMES_G_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXVLANFRAMES_G_FRMCNT_SHIFT) & ENET_TXVLANFRAMES_G_FRMCNT_MASK) 3266 #define ENET_TXVLANFRAMES_G_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXVLANFRAMES_G_FRMCNT_MASK) >> ENET_TXVLANFRAMES_G_FRMCNT_SHIFT) 3267 3268 /* Bitfield definition for register: TXOVERSIZE_G */ 3269 /* 3270 * FRMCNT (RW) 3271 * 3272 * Number of frames transmitted without errors and with length greater than the maxsize (1,518 or 1,522 bytes for VLAN tagged frames; 2000 bytes if enabled in Bit 27 of Register 0 (MAC Configuration Register)). 3273 */ 3274 #define ENET_TXOVERSIZE_G_FRMCNT_MASK (0xFFFFFFFFUL) 3275 #define ENET_TXOVERSIZE_G_FRMCNT_SHIFT (0U) 3276 #define ENET_TXOVERSIZE_G_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TXOVERSIZE_G_FRMCNT_SHIFT) & ENET_TXOVERSIZE_G_FRMCNT_MASK) 3277 #define ENET_TXOVERSIZE_G_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TXOVERSIZE_G_FRMCNT_MASK) >> ENET_TXOVERSIZE_G_FRMCNT_SHIFT) 3278 3279 /* Bitfield definition for register: RXFRAMECOUNT_GB */ 3280 /* 3281 * FRMCNT (RW) 3282 * 3283 * Number of good and bad frames received. 3284 */ 3285 #define ENET_RXFRAMECOUNT_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3286 #define ENET_RXFRAMECOUNT_GB_FRMCNT_SHIFT (0U) 3287 #define ENET_RXFRAMECOUNT_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXFRAMECOUNT_GB_FRMCNT_SHIFT) & ENET_RXFRAMECOUNT_GB_FRMCNT_MASK) 3288 #define ENET_RXFRAMECOUNT_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXFRAMECOUNT_GB_FRMCNT_MASK) >> ENET_RXFRAMECOUNT_GB_FRMCNT_SHIFT) 3289 3290 /* Bitfield definition for register: RXOCTETCOUNT_G */ 3291 /* 3292 * BYTECNT (RW) 3293 * 3294 * Number of bytes received, exclusive of preamble, in good and bad frames. 3295 */ 3296 #define ENET_RXOCTETCOUNT_G_BYTECNT_MASK (0xFFFFFFFFUL) 3297 #define ENET_RXOCTETCOUNT_G_BYTECNT_SHIFT (0U) 3298 #define ENET_RXOCTETCOUNT_G_BYTECNT_SET(x) (((uint32_t)(x) << ENET_RXOCTETCOUNT_G_BYTECNT_SHIFT) & ENET_RXOCTETCOUNT_G_BYTECNT_MASK) 3299 #define ENET_RXOCTETCOUNT_G_BYTECNT_GET(x) (((uint32_t)(x) & ENET_RXOCTETCOUNT_G_BYTECNT_MASK) >> ENET_RXOCTETCOUNT_G_BYTECNT_SHIFT) 3300 3301 /* Bitfield definition for register: RXOCTETCOUNT_GB */ 3302 /* 3303 * BYTECNT (RW) 3304 * 3305 * Number of bytes received, exclusive of preamble, only in good frames. 3306 */ 3307 #define ENET_RXOCTETCOUNT_GB_BYTECNT_MASK (0xFFFFFFFFUL) 3308 #define ENET_RXOCTETCOUNT_GB_BYTECNT_SHIFT (0U) 3309 #define ENET_RXOCTETCOUNT_GB_BYTECNT_SET(x) (((uint32_t)(x) << ENET_RXOCTETCOUNT_GB_BYTECNT_SHIFT) & ENET_RXOCTETCOUNT_GB_BYTECNT_MASK) 3310 #define ENET_RXOCTETCOUNT_GB_BYTECNT_GET(x) (((uint32_t)(x) & ENET_RXOCTETCOUNT_GB_BYTECNT_MASK) >> ENET_RXOCTETCOUNT_GB_BYTECNT_SHIFT) 3311 3312 /* Bitfield definition for register: RXBROADCASTFRAMES_G */ 3313 /* 3314 * FRMCNT (RW) 3315 * 3316 * Number of good broadcast frames received. 3317 */ 3318 #define ENET_RXBROADCASTFRAMES_G_FRMCNT_MASK (0xFFFFFFFFUL) 3319 #define ENET_RXBROADCASTFRAMES_G_FRMCNT_SHIFT (0U) 3320 #define ENET_RXBROADCASTFRAMES_G_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXBROADCASTFRAMES_G_FRMCNT_SHIFT) & ENET_RXBROADCASTFRAMES_G_FRMCNT_MASK) 3321 #define ENET_RXBROADCASTFRAMES_G_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXBROADCASTFRAMES_G_FRMCNT_MASK) >> ENET_RXBROADCASTFRAMES_G_FRMCNT_SHIFT) 3322 3323 /* Bitfield definition for register: RXMULTICASTFRAMES_G */ 3324 /* 3325 * FRMCNT (RW) 3326 * 3327 * Number of good multicast frames received. 3328 */ 3329 #define ENET_RXMULTICASTFRAMES_G_FRMCNT_MASK (0xFFFFFFFFUL) 3330 #define ENET_RXMULTICASTFRAMES_G_FRMCNT_SHIFT (0U) 3331 #define ENET_RXMULTICASTFRAMES_G_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXMULTICASTFRAMES_G_FRMCNT_SHIFT) & ENET_RXMULTICASTFRAMES_G_FRMCNT_MASK) 3332 #define ENET_RXMULTICASTFRAMES_G_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXMULTICASTFRAMES_G_FRMCNT_MASK) >> ENET_RXMULTICASTFRAMES_G_FRMCNT_SHIFT) 3333 3334 /* Bitfield definition for register: RXCRCERROR */ 3335 /* 3336 * FRMCNT (RW) 3337 * 3338 * Number of frames received with CRC error. 3339 */ 3340 #define ENET_RXCRCERROR_FRMCNT_MASK (0xFFFFFFFFUL) 3341 #define ENET_RXCRCERROR_FRMCNT_SHIFT (0U) 3342 #define ENET_RXCRCERROR_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXCRCERROR_FRMCNT_SHIFT) & ENET_RXCRCERROR_FRMCNT_MASK) 3343 #define ENET_RXCRCERROR_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXCRCERROR_FRMCNT_MASK) >> ENET_RXCRCERROR_FRMCNT_SHIFT) 3344 3345 /* Bitfield definition for register: RXALIGNMENTERROR */ 3346 /* 3347 * FRMCNT (RW) 3348 * 3349 * Number of frames received with alignment (dribble) error. Valid only in 10/100 mode. 3350 */ 3351 #define ENET_RXALIGNMENTERROR_FRMCNT_MASK (0xFFFFFFFFUL) 3352 #define ENET_RXALIGNMENTERROR_FRMCNT_SHIFT (0U) 3353 #define ENET_RXALIGNMENTERROR_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXALIGNMENTERROR_FRMCNT_SHIFT) & ENET_RXALIGNMENTERROR_FRMCNT_MASK) 3354 #define ENET_RXALIGNMENTERROR_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXALIGNMENTERROR_FRMCNT_MASK) >> ENET_RXALIGNMENTERROR_FRMCNT_SHIFT) 3355 3356 /* Bitfield definition for register: RXRUNTERROR */ 3357 /* 3358 * FRMCNT (RW) 3359 * 3360 * Number of frames received with runt (<64 bytes and CRC error) error. 3361 */ 3362 #define ENET_RXRUNTERROR_FRMCNT_MASK (0xFFFFFFFFUL) 3363 #define ENET_RXRUNTERROR_FRMCNT_SHIFT (0U) 3364 #define ENET_RXRUNTERROR_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXRUNTERROR_FRMCNT_SHIFT) & ENET_RXRUNTERROR_FRMCNT_MASK) 3365 #define ENET_RXRUNTERROR_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXRUNTERROR_FRMCNT_MASK) >> ENET_RXRUNTERROR_FRMCNT_SHIFT) 3366 3367 /* Bitfield definition for register: RXJABBERERROR */ 3368 /* 3369 * FRMCNT (RW) 3370 * 3371 * Number of giant frames received with length (including CRC) greater than 1,518 bytes (1,522 bytes for VLAN tagged) and with CRC error. If Jumbo Frame mode is enabled, then frames of length greater than 9,018 bytes (9,022 for VLAN tagged) are considered as giant frames. 3372 */ 3373 #define ENET_RXJABBERERROR_FRMCNT_MASK (0xFFFFFFFFUL) 3374 #define ENET_RXJABBERERROR_FRMCNT_SHIFT (0U) 3375 #define ENET_RXJABBERERROR_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXJABBERERROR_FRMCNT_SHIFT) & ENET_RXJABBERERROR_FRMCNT_MASK) 3376 #define ENET_RXJABBERERROR_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXJABBERERROR_FRMCNT_MASK) >> ENET_RXJABBERERROR_FRMCNT_SHIFT) 3377 3378 /* Bitfield definition for register: RXUNDERSIZE_G */ 3379 /* 3380 * FRMCNT (RW) 3381 * 3382 * Number of frames received with length less than 64 bytes, without any errors. 3383 */ 3384 #define ENET_RXUNDERSIZE_G_FRMCNT_MASK (0xFFFFFFFFUL) 3385 #define ENET_RXUNDERSIZE_G_FRMCNT_SHIFT (0U) 3386 #define ENET_RXUNDERSIZE_G_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXUNDERSIZE_G_FRMCNT_SHIFT) & ENET_RXUNDERSIZE_G_FRMCNT_MASK) 3387 #define ENET_RXUNDERSIZE_G_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXUNDERSIZE_G_FRMCNT_MASK) >> ENET_RXUNDERSIZE_G_FRMCNT_SHIFT) 3388 3389 /* Bitfield definition for register: RXOVERSIZE_G */ 3390 /* 3391 * FRMCNT (RW) 3392 * 3393 * Number of frames received without errors, with length greater than the maxsize (1,518 or 1,522 for VLAN tagged frames; 2,000 bytes if enabled in Bit 27 of Register 0 (MAC Configuration Register)). 3394 */ 3395 #define ENET_RXOVERSIZE_G_FRMCNT_MASK (0xFFFFFFFFUL) 3396 #define ENET_RXOVERSIZE_G_FRMCNT_SHIFT (0U) 3397 #define ENET_RXOVERSIZE_G_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXOVERSIZE_G_FRMCNT_SHIFT) & ENET_RXOVERSIZE_G_FRMCNT_MASK) 3398 #define ENET_RXOVERSIZE_G_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXOVERSIZE_G_FRMCNT_MASK) >> ENET_RXOVERSIZE_G_FRMCNT_SHIFT) 3399 3400 /* Bitfield definition for register: RX64OCTETS_GB */ 3401 /* 3402 * FRMCNT (RW) 3403 * 3404 * Number of good and bad frames received with length 64 bytes, exclusive of preamble. 3405 */ 3406 #define ENET_RX64OCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3407 #define ENET_RX64OCTETS_GB_FRMCNT_SHIFT (0U) 3408 #define ENET_RX64OCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RX64OCTETS_GB_FRMCNT_SHIFT) & ENET_RX64OCTETS_GB_FRMCNT_MASK) 3409 #define ENET_RX64OCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RX64OCTETS_GB_FRMCNT_MASK) >> ENET_RX64OCTETS_GB_FRMCNT_SHIFT) 3410 3411 /* Bitfield definition for register: RX65TO127OCTETS_GB */ 3412 /* 3413 * FRMCNT (RW) 3414 * 3415 * Number of good and bad frames received with length between 65 and 127 (inclusive) bytes, exclusive of preamble. 3416 */ 3417 #define ENET_RX65TO127OCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3418 #define ENET_RX65TO127OCTETS_GB_FRMCNT_SHIFT (0U) 3419 #define ENET_RX65TO127OCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RX65TO127OCTETS_GB_FRMCNT_SHIFT) & ENET_RX65TO127OCTETS_GB_FRMCNT_MASK) 3420 #define ENET_RX65TO127OCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RX65TO127OCTETS_GB_FRMCNT_MASK) >> ENET_RX65TO127OCTETS_GB_FRMCNT_SHIFT) 3421 3422 /* Bitfield definition for register: RX128TO255OCTETS_GB */ 3423 /* 3424 * FRMCNT (RW) 3425 * 3426 * Number of good and bad frames received with length between 128 and 255 (inclusive) bytes, exclusive of preamble. 3427 */ 3428 #define ENET_RX128TO255OCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3429 #define ENET_RX128TO255OCTETS_GB_FRMCNT_SHIFT (0U) 3430 #define ENET_RX128TO255OCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RX128TO255OCTETS_GB_FRMCNT_SHIFT) & ENET_RX128TO255OCTETS_GB_FRMCNT_MASK) 3431 #define ENET_RX128TO255OCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RX128TO255OCTETS_GB_FRMCNT_MASK) >> ENET_RX128TO255OCTETS_GB_FRMCNT_SHIFT) 3432 3433 /* Bitfield definition for register: RX256TO511OCTETS_GB */ 3434 /* 3435 * FRMCNT (RW) 3436 * 3437 * Number of good and bad frames received with length between 256 and 511 (inclusive) bytes, exclusive of preamble. 3438 */ 3439 #define ENET_RX256TO511OCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3440 #define ENET_RX256TO511OCTETS_GB_FRMCNT_SHIFT (0U) 3441 #define ENET_RX256TO511OCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RX256TO511OCTETS_GB_FRMCNT_SHIFT) & ENET_RX256TO511OCTETS_GB_FRMCNT_MASK) 3442 #define ENET_RX256TO511OCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RX256TO511OCTETS_GB_FRMCNT_MASK) >> ENET_RX256TO511OCTETS_GB_FRMCNT_SHIFT) 3443 3444 /* Bitfield definition for register: RX512TO1023OCTETS_GB */ 3445 /* 3446 * FRMCNT (RW) 3447 * 3448 * Number of good and bad frames received with length between 512 and 1,023 (inclusive) bytes, exclusive of preamble. 3449 */ 3450 #define ENET_RX512TO1023OCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3451 #define ENET_RX512TO1023OCTETS_GB_FRMCNT_SHIFT (0U) 3452 #define ENET_RX512TO1023OCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RX512TO1023OCTETS_GB_FRMCNT_SHIFT) & ENET_RX512TO1023OCTETS_GB_FRMCNT_MASK) 3453 #define ENET_RX512TO1023OCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RX512TO1023OCTETS_GB_FRMCNT_MASK) >> ENET_RX512TO1023OCTETS_GB_FRMCNT_SHIFT) 3454 3455 /* Bitfield definition for register: RX1024TOMAXOCTETS_GB */ 3456 /* 3457 * FRMCNT (RW) 3458 * 3459 * Number of good and bad frames received with length between 1,024 and maxsize (inclusive) bytes, exclusive of preamble and retried frames. 3460 */ 3461 #define ENET_RX1024TOMAXOCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3462 #define ENET_RX1024TOMAXOCTETS_GB_FRMCNT_SHIFT (0U) 3463 #define ENET_RX1024TOMAXOCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RX1024TOMAXOCTETS_GB_FRMCNT_SHIFT) & ENET_RX1024TOMAXOCTETS_GB_FRMCNT_MASK) 3464 #define ENET_RX1024TOMAXOCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RX1024TOMAXOCTETS_GB_FRMCNT_MASK) >> ENET_RX1024TOMAXOCTETS_GB_FRMCNT_SHIFT) 3465 3466 /* Bitfield definition for register: RXUNICASTFRAMES_G */ 3467 /* 3468 * FRMCNT (RW) 3469 * 3470 * Number of received good unicast frames. 3471 */ 3472 #define ENET_RXUNICASTFRAMES_G_FRMCNT_MASK (0xFFFFFFFFUL) 3473 #define ENET_RXUNICASTFRAMES_G_FRMCNT_SHIFT (0U) 3474 #define ENET_RXUNICASTFRAMES_G_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXUNICASTFRAMES_G_FRMCNT_SHIFT) & ENET_RXUNICASTFRAMES_G_FRMCNT_MASK) 3475 #define ENET_RXUNICASTFRAMES_G_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXUNICASTFRAMES_G_FRMCNT_MASK) >> ENET_RXUNICASTFRAMES_G_FRMCNT_SHIFT) 3476 3477 /* Bitfield definition for register: RXLENGTHERROR */ 3478 /* 3479 * FRMCNT (RW) 3480 * 3481 * Number of frames received with length error (Length type field ≠ frame size), for all frames with valid length field. 3482 */ 3483 #define ENET_RXLENGTHERROR_FRMCNT_MASK (0xFFFFFFFFUL) 3484 #define ENET_RXLENGTHERROR_FRMCNT_SHIFT (0U) 3485 #define ENET_RXLENGTHERROR_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXLENGTHERROR_FRMCNT_SHIFT) & ENET_RXLENGTHERROR_FRMCNT_MASK) 3486 #define ENET_RXLENGTHERROR_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXLENGTHERROR_FRMCNT_MASK) >> ENET_RXLENGTHERROR_FRMCNT_SHIFT) 3487 3488 /* Bitfield definition for register: RXOUTOFRANGETYPE */ 3489 /* 3490 * FRMCNT (RW) 3491 * 3492 * Number of frames received with length field not equal to the valid frame size (greater than 1,500 but less than 1,536). 3493 */ 3494 #define ENET_RXOUTOFRANGETYPE_FRMCNT_MASK (0xFFFFFFFFUL) 3495 #define ENET_RXOUTOFRANGETYPE_FRMCNT_SHIFT (0U) 3496 #define ENET_RXOUTOFRANGETYPE_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXOUTOFRANGETYPE_FRMCNT_SHIFT) & ENET_RXOUTOFRANGETYPE_FRMCNT_MASK) 3497 #define ENET_RXOUTOFRANGETYPE_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXOUTOFRANGETYPE_FRMCNT_MASK) >> ENET_RXOUTOFRANGETYPE_FRMCNT_SHIFT) 3498 3499 /* Bitfield definition for register: RXPAUSEFRAMES */ 3500 /* 3501 * FRMCNT (RW) 3502 * 3503 * Number of good and valid Pause frames received. 3504 */ 3505 #define ENET_RXPAUSEFRAMES_FRMCNT_MASK (0xFFFFFFFFUL) 3506 #define ENET_RXPAUSEFRAMES_FRMCNT_SHIFT (0U) 3507 #define ENET_RXPAUSEFRAMES_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXPAUSEFRAMES_FRMCNT_SHIFT) & ENET_RXPAUSEFRAMES_FRMCNT_MASK) 3508 #define ENET_RXPAUSEFRAMES_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXPAUSEFRAMES_FRMCNT_MASK) >> ENET_RXPAUSEFRAMES_FRMCNT_SHIFT) 3509 3510 /* Bitfield definition for register: RXFIFOOVERFLOW */ 3511 /* 3512 * FRMCNT (RW) 3513 * 3514 * Number of missed received frames because of FIFO overflow. This counter is not present in the GMAC-CORE configuration. 3515 */ 3516 #define ENET_RXFIFOOVERFLOW_FRMCNT_MASK (0xFFFFFFFFUL) 3517 #define ENET_RXFIFOOVERFLOW_FRMCNT_SHIFT (0U) 3518 #define ENET_RXFIFOOVERFLOW_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXFIFOOVERFLOW_FRMCNT_SHIFT) & ENET_RXFIFOOVERFLOW_FRMCNT_MASK) 3519 #define ENET_RXFIFOOVERFLOW_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXFIFOOVERFLOW_FRMCNT_MASK) >> ENET_RXFIFOOVERFLOW_FRMCNT_SHIFT) 3520 3521 /* Bitfield definition for register: RXVLANFRAMES_GB */ 3522 /* 3523 * FRMCNT (RW) 3524 * 3525 * Number of good and bad VLAN frames received. 3526 */ 3527 #define ENET_RXVLANFRAMES_GB_FRMCNT_MASK (0xFFFFFFFFUL) 3528 #define ENET_RXVLANFRAMES_GB_FRMCNT_SHIFT (0U) 3529 #define ENET_RXVLANFRAMES_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXVLANFRAMES_GB_FRMCNT_SHIFT) & ENET_RXVLANFRAMES_GB_FRMCNT_MASK) 3530 #define ENET_RXVLANFRAMES_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXVLANFRAMES_GB_FRMCNT_MASK) >> ENET_RXVLANFRAMES_GB_FRMCNT_SHIFT) 3531 3532 /* Bitfield definition for register: RXWATCHDOGERROR */ 3533 /* 3534 * FRMCNT (RW) 3535 * 3536 * Number of frames received with error because of watchdog timeout error (frames with a data load larger than 2,048 bytes or the value programmed in Register 55 (Watchdog Timeout Register)). 3537 */ 3538 #define ENET_RXWATCHDOGERROR_FRMCNT_MASK (0xFFFFFFFFUL) 3539 #define ENET_RXWATCHDOGERROR_FRMCNT_SHIFT (0U) 3540 #define ENET_RXWATCHDOGERROR_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXWATCHDOGERROR_FRMCNT_SHIFT) & ENET_RXWATCHDOGERROR_FRMCNT_MASK) 3541 #define ENET_RXWATCHDOGERROR_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXWATCHDOGERROR_FRMCNT_MASK) >> ENET_RXWATCHDOGERROR_FRMCNT_SHIFT) 3542 3543 /* Bitfield definition for register: RXRCVERROR */ 3544 /* 3545 * FRMCNT (RW) 3546 * 3547 * Number of frames received with Receive error or Frame Extension error on the GMII or MII interface. 3548 */ 3549 #define ENET_RXRCVERROR_FRMCNT_MASK (0xFFFFFFFFUL) 3550 #define ENET_RXRCVERROR_FRMCNT_SHIFT (0U) 3551 #define ENET_RXRCVERROR_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXRCVERROR_FRMCNT_SHIFT) & ENET_RXRCVERROR_FRMCNT_MASK) 3552 #define ENET_RXRCVERROR_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXRCVERROR_FRMCNT_MASK) >> ENET_RXRCVERROR_FRMCNT_SHIFT) 3553 3554 /* Bitfield definition for register: RXCTRLFRAMES_G */ 3555 /* 3556 * FRMCNT (RW) 3557 * 3558 * Number of received good control frames. 3559 */ 3560 #define ENET_RXCTRLFRAMES_G_FRMCNT_MASK (0xFFFFFFFFUL) 3561 #define ENET_RXCTRLFRAMES_G_FRMCNT_SHIFT (0U) 3562 #define ENET_RXCTRLFRAMES_G_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXCTRLFRAMES_G_FRMCNT_SHIFT) & ENET_RXCTRLFRAMES_G_FRMCNT_MASK) 3563 #define ENET_RXCTRLFRAMES_G_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXCTRLFRAMES_G_FRMCNT_MASK) >> ENET_RXCTRLFRAMES_G_FRMCNT_SHIFT) 3564 3565 /* Bitfield definition for register: MMC_IPC_INTR_MASK_RX */ 3566 /* 3567 * RXICMPEROIM (RW) 3568 * 3569 * MMC Receive ICMP Error Octet Counter Interrupt Mask 3570 * Setting this bit masks the interrupt when the rxicmp_err_octets counter reaches half of the maximum value or the maximum value. 3571 */ 3572 #define ENET_MMC_IPC_INTR_MASK_RX_RXICMPEROIM_MASK (0x20000000UL) 3573 #define ENET_MMC_IPC_INTR_MASK_RX_RXICMPEROIM_SHIFT (29U) 3574 #define ENET_MMC_IPC_INTR_MASK_RX_RXICMPEROIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXICMPEROIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXICMPEROIM_MASK) 3575 #define ENET_MMC_IPC_INTR_MASK_RX_RXICMPEROIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXICMPEROIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXICMPEROIM_SHIFT) 3576 3577 /* 3578 * RXICMPGOIM (RW) 3579 * 3580 * MMC Receive ICMP Good Octet Counter Interrupt Mask 3581 * Setting this bit masks the interrupt when the rxicmp_gd_octets counter reaches half of the maximum value or the maximum value. 3582 */ 3583 #define ENET_MMC_IPC_INTR_MASK_RX_RXICMPGOIM_MASK (0x10000000UL) 3584 #define ENET_MMC_IPC_INTR_MASK_RX_RXICMPGOIM_SHIFT (28U) 3585 #define ENET_MMC_IPC_INTR_MASK_RX_RXICMPGOIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXICMPGOIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXICMPGOIM_MASK) 3586 #define ENET_MMC_IPC_INTR_MASK_RX_RXICMPGOIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXICMPGOIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXICMPGOIM_SHIFT) 3587 3588 /* 3589 * RXTCPEROIM (RW) 3590 * 3591 * MMC Receive TCP Error Octet Counter Interrupt Mask 3592 * Setting this bit masks the interrupt when the rxtcp_err_octets counter reaches half of the maximum value or the maximum value. 3593 */ 3594 #define ENET_MMC_IPC_INTR_MASK_RX_RXTCPEROIM_MASK (0x8000000UL) 3595 #define ENET_MMC_IPC_INTR_MASK_RX_RXTCPEROIM_SHIFT (27U) 3596 #define ENET_MMC_IPC_INTR_MASK_RX_RXTCPEROIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXTCPEROIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXTCPEROIM_MASK) 3597 #define ENET_MMC_IPC_INTR_MASK_RX_RXTCPEROIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXTCPEROIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXTCPEROIM_SHIFT) 3598 3599 /* 3600 * RXTCPGOIM (RW) 3601 * 3602 * MMC Receive TCP Good Octet Counter Interrupt Mask 3603 * Setting this bit masks the interrupt when the rxtcp_gd_octets counter reaches half of the maximum value or the maximum value. 3604 */ 3605 #define ENET_MMC_IPC_INTR_MASK_RX_RXTCPGOIM_MASK (0x4000000UL) 3606 #define ENET_MMC_IPC_INTR_MASK_RX_RXTCPGOIM_SHIFT (26U) 3607 #define ENET_MMC_IPC_INTR_MASK_RX_RXTCPGOIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXTCPGOIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXTCPGOIM_MASK) 3608 #define ENET_MMC_IPC_INTR_MASK_RX_RXTCPGOIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXTCPGOIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXTCPGOIM_SHIFT) 3609 3610 /* 3611 * RXUDPEROIM (RW) 3612 * 3613 * MMC Receive UDP Good Octet Counter Interrupt Mask 3614 * Setting this bit masks the interrupt when the rxudp_err_octets counter reaches half of the maximum value or the maximum value. 3615 */ 3616 #define ENET_MMC_IPC_INTR_MASK_RX_RXUDPEROIM_MASK (0x2000000UL) 3617 #define ENET_MMC_IPC_INTR_MASK_RX_RXUDPEROIM_SHIFT (25U) 3618 #define ENET_MMC_IPC_INTR_MASK_RX_RXUDPEROIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXUDPEROIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXUDPEROIM_MASK) 3619 #define ENET_MMC_IPC_INTR_MASK_RX_RXUDPEROIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXUDPEROIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXUDPEROIM_SHIFT) 3620 3621 /* 3622 * RXUDPGOIM (RW) 3623 * 3624 * MMC Receive IPV6 No Payload Octet Counter Interrupt Mask 3625 * Setting this bit masks the interrupt when the rxudp_gd_octets counter reaches half of the maximum value or the maximum value. 3626 */ 3627 #define ENET_MMC_IPC_INTR_MASK_RX_RXUDPGOIM_MASK (0x1000000UL) 3628 #define ENET_MMC_IPC_INTR_MASK_RX_RXUDPGOIM_SHIFT (24U) 3629 #define ENET_MMC_IPC_INTR_MASK_RX_RXUDPGOIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXUDPGOIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXUDPGOIM_MASK) 3630 #define ENET_MMC_IPC_INTR_MASK_RX_RXUDPGOIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXUDPGOIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXUDPGOIM_SHIFT) 3631 3632 /* 3633 * RXIPV6NOPAYOIM (RW) 3634 * 3635 * MMC Receive IPV6 Header Error Octet Counter Interrupt Mask 3636 * Setting this bit masks the interrupt when the rxipv6_nopay_octets counter reaches half of the maximum value or the maximum value. 3637 */ 3638 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6NOPAYOIM_MASK (0x800000UL) 3639 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6NOPAYOIM_SHIFT (23U) 3640 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6NOPAYOIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXIPV6NOPAYOIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV6NOPAYOIM_MASK) 3641 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6NOPAYOIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV6NOPAYOIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXIPV6NOPAYOIM_SHIFT) 3642 3643 /* 3644 * RXIPV6HEROIM (RW) 3645 * 3646 * MMC Receive IPV6 Good Octet Counter Interrupt Mask 3647 * Setting this bit masks the interrupt when the rxipv6_hdrerr_octets counter reaches half of the maximum value or the maximum value. 3648 */ 3649 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6HEROIM_MASK (0x400000UL) 3650 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6HEROIM_SHIFT (22U) 3651 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6HEROIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXIPV6HEROIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV6HEROIM_MASK) 3652 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6HEROIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV6HEROIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXIPV6HEROIM_SHIFT) 3653 3654 /* 3655 * RXIPV6GOIM (RW) 3656 * 3657 * MMC Receive IPV6 Good Octet Counter Interrupt Mask 3658 * Setting this bit masks the interrupt when the rxipv6_gd_octets counter reaches half of the maximum value or the maximum value. 3659 */ 3660 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6GOIM_MASK (0x200000UL) 3661 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6GOIM_SHIFT (21U) 3662 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6GOIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXIPV6GOIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV6GOIM_MASK) 3663 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6GOIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV6GOIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXIPV6GOIM_SHIFT) 3664 3665 /* 3666 * RXIPV4UDSBLOIM (RW) 3667 * 3668 * MMC Receive IPV4 UDP Checksum Disabled Octet Counter Interrupt Mask 3669 * Setting this bit masks the interrupt when the rxipv4_udsbl_octets counter reaches half of the maximum value or the maximum value. 3670 */ 3671 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4UDSBLOIM_MASK (0x100000UL) 3672 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4UDSBLOIM_SHIFT (20U) 3673 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4UDSBLOIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXIPV4UDSBLOIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4UDSBLOIM_MASK) 3674 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4UDSBLOIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4UDSBLOIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXIPV4UDSBLOIM_SHIFT) 3675 3676 /* 3677 * RXIPV4FRAGOIM (RW) 3678 * 3679 * MMC Receive IPV4 Fragmented Octet Counter Interrupt Mask 3680 * Setting this bit masks the interrupt when the rxipv4_frag_octets counter reaches half of the maximum value or the maximum value. 3681 */ 3682 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4FRAGOIM_MASK (0x80000UL) 3683 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4FRAGOIM_SHIFT (19U) 3684 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4FRAGOIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXIPV4FRAGOIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4FRAGOIM_MASK) 3685 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4FRAGOIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4FRAGOIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXIPV4FRAGOIM_SHIFT) 3686 3687 /* 3688 * RXIPV4NOPAYOIM (RW) 3689 * 3690 * MMC Receive IPV4 No Payload Octet Counter Interrupt Mask 3691 * Setting this bit masks the interrupt when the rxipv4_nopay_octets counter reaches half of the maximum value or the maximum value. 3692 */ 3693 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4NOPAYOIM_MASK (0x40000UL) 3694 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4NOPAYOIM_SHIFT (18U) 3695 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4NOPAYOIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXIPV4NOPAYOIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4NOPAYOIM_MASK) 3696 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4NOPAYOIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4NOPAYOIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXIPV4NOPAYOIM_SHIFT) 3697 3698 /* 3699 * RXIPV4HEROIM (RW) 3700 * 3701 * MMC Receive IPV4 Header Error Octet Counter Interrupt Mask 3702 * Setting this bit masks the interrupt when the rxipv4_hdrerr_octets counter reaches half of the maximum value or the maximum value. 3703 */ 3704 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4HEROIM_MASK (0x20000UL) 3705 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4HEROIM_SHIFT (17U) 3706 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4HEROIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXIPV4HEROIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4HEROIM_MASK) 3707 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4HEROIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4HEROIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXIPV4HEROIM_SHIFT) 3708 3709 /* 3710 * RXIPV4GOIM (RW) 3711 * 3712 * MMC Receive IPV4 Good Octet Counter Interrupt Mask 3713 * Setting this bit masks the interrupt when the rxipv4_gd_octets counter reaches half of the maximum value or the maximum value. 3714 */ 3715 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GOIM_MASK (0x10000UL) 3716 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GOIM_SHIFT (16U) 3717 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GOIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GOIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GOIM_MASK) 3718 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GOIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GOIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GOIM_SHIFT) 3719 3720 /* 3721 * RXICMPERFIM (RW) 3722 * 3723 * MMC Receive ICMP Error Frame Counter Interrupt Mask 3724 * Setting this bit masks the interrupt when the rxicmp_err_frms counter reaches half of the maximum value or the maximum value. 3725 */ 3726 #define ENET_MMC_IPC_INTR_MASK_RX_RXICMPERFIM_MASK (0x2000U) 3727 #define ENET_MMC_IPC_INTR_MASK_RX_RXICMPERFIM_SHIFT (13U) 3728 #define ENET_MMC_IPC_INTR_MASK_RX_RXICMPERFIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXICMPERFIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXICMPERFIM_MASK) 3729 #define ENET_MMC_IPC_INTR_MASK_RX_RXICMPERFIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXICMPERFIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXICMPERFIM_SHIFT) 3730 3731 /* 3732 * RXICMPGFIM (RW) 3733 * 3734 * MMC Receive ICMP Good Frame Counter Interrupt Mask 3735 * Setting this bit masks the interrupt when the rxicmp_gd_frms counter reaches half of the maximum value or the maximum value. 3736 */ 3737 #define ENET_MMC_IPC_INTR_MASK_RX_RXICMPGFIM_MASK (0x1000U) 3738 #define ENET_MMC_IPC_INTR_MASK_RX_RXICMPGFIM_SHIFT (12U) 3739 #define ENET_MMC_IPC_INTR_MASK_RX_RXICMPGFIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXICMPGFIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXICMPGFIM_MASK) 3740 #define ENET_MMC_IPC_INTR_MASK_RX_RXICMPGFIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXICMPGFIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXICMPGFIM_SHIFT) 3741 3742 /* 3743 * RXTCPERFIM (RW) 3744 * 3745 * MMC Receive TCP Error Frame Counter Interrupt Mask 3746 * Setting this bit masks the interrupt when the rxtcp_err_frms counter reaches half of the maximum value or the maximum value. 3747 */ 3748 #define ENET_MMC_IPC_INTR_MASK_RX_RXTCPERFIM_MASK (0x800U) 3749 #define ENET_MMC_IPC_INTR_MASK_RX_RXTCPERFIM_SHIFT (11U) 3750 #define ENET_MMC_IPC_INTR_MASK_RX_RXTCPERFIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXTCPERFIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXTCPERFIM_MASK) 3751 #define ENET_MMC_IPC_INTR_MASK_RX_RXTCPERFIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXTCPERFIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXTCPERFIM_SHIFT) 3752 3753 /* 3754 * RXTCPGFIM (RW) 3755 * 3756 * MMC Receive TCP Good Frame Counter Interrupt Mask 3757 * Setting this bit masks the interrupt when the rxtcp_gd_frms counter reaches half of the maximum value or the maximum value. 3758 */ 3759 #define ENET_MMC_IPC_INTR_MASK_RX_RXTCPGFIM_MASK (0x400U) 3760 #define ENET_MMC_IPC_INTR_MASK_RX_RXTCPGFIM_SHIFT (10U) 3761 #define ENET_MMC_IPC_INTR_MASK_RX_RXTCPGFIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXTCPGFIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXTCPGFIM_MASK) 3762 #define ENET_MMC_IPC_INTR_MASK_RX_RXTCPGFIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXTCPGFIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXTCPGFIM_SHIFT) 3763 3764 /* 3765 * RXUDPERFIM (RW) 3766 * 3767 * MMC Receive UDP Error Frame Counter Interrupt Mask 3768 * Setting this bit masks the interrupt when the rxudp_err_frms counter reaches half of the maximum value or the maximum value. 3769 */ 3770 #define ENET_MMC_IPC_INTR_MASK_RX_RXUDPERFIM_MASK (0x200U) 3771 #define ENET_MMC_IPC_INTR_MASK_RX_RXUDPERFIM_SHIFT (9U) 3772 #define ENET_MMC_IPC_INTR_MASK_RX_RXUDPERFIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXUDPERFIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXUDPERFIM_MASK) 3773 #define ENET_MMC_IPC_INTR_MASK_RX_RXUDPERFIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXUDPERFIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXUDPERFIM_SHIFT) 3774 3775 /* 3776 * RXUDPGFIM (RW) 3777 * 3778 * MMC Receive UDP Good Frame Counter Interrupt Mask 3779 * Setting this bit masks the interrupt when the rxudp_gd_frms counter reaches half of the maximum value or the maximum value. 3780 */ 3781 #define ENET_MMC_IPC_INTR_MASK_RX_RXUDPGFIM_MASK (0x100U) 3782 #define ENET_MMC_IPC_INTR_MASK_RX_RXUDPGFIM_SHIFT (8U) 3783 #define ENET_MMC_IPC_INTR_MASK_RX_RXUDPGFIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXUDPGFIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXUDPGFIM_MASK) 3784 #define ENET_MMC_IPC_INTR_MASK_RX_RXUDPGFIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXUDPGFIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXUDPGFIM_SHIFT) 3785 3786 /* 3787 * RXIPV6NOPAYFIM (RW) 3788 * 3789 * MMC Receive IPV6 No Payload Frame Counter Interrupt Mask 3790 * Setting this bit masks the interrupt when the rxipv6_nopay_frms counter reaches half of the maximum value or the maximum value. 3791 */ 3792 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6NOPAYFIM_MASK (0x80U) 3793 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6NOPAYFIM_SHIFT (7U) 3794 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6NOPAYFIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXIPV6NOPAYFIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV6NOPAYFIM_MASK) 3795 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6NOPAYFIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV6NOPAYFIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXIPV6NOPAYFIM_SHIFT) 3796 3797 /* 3798 * RXIPV6HERFIM (RW) 3799 * 3800 * MMC Receive IPV6 Header Error Frame Counter Interrupt Mask 3801 * Setting this bit masks the interrupt when the rxipv6_hdrerr_frms counter reaches half of the maximum value or the maximum value. 3802 */ 3803 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6HERFIM_MASK (0x40U) 3804 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6HERFIM_SHIFT (6U) 3805 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6HERFIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXIPV6HERFIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV6HERFIM_MASK) 3806 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6HERFIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV6HERFIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXIPV6HERFIM_SHIFT) 3807 3808 /* 3809 * RXIPV6GFIM (RW) 3810 * 3811 * MMC Receive IPV6 Good Frame Counter Interrupt Mask 3812 * Setting this bit masks the interrupt when the rxipv6_gd_frms counter reaches half of the maximum value or the maximum value. 3813 */ 3814 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6GFIM_MASK (0x20U) 3815 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6GFIM_SHIFT (5U) 3816 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6GFIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXIPV6GFIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV6GFIM_MASK) 3817 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV6GFIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV6GFIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXIPV6GFIM_SHIFT) 3818 3819 /* 3820 * RXIPV4UDSBLFIM (RW) 3821 * 3822 * MMC Receive IPV4 UDP Checksum Disabled Frame Counter Interrupt Mask 3823 * Setting this bit masks the interrupt when the rxipv4_udsbl_frms counter reaches half of the maximum value or the maximum value. 3824 */ 3825 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4UDSBLFIM_MASK (0x10U) 3826 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4UDSBLFIM_SHIFT (4U) 3827 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4UDSBLFIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXIPV4UDSBLFIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4UDSBLFIM_MASK) 3828 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4UDSBLFIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4UDSBLFIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXIPV4UDSBLFIM_SHIFT) 3829 3830 /* 3831 * RXIPV4FRAGFIM (RW) 3832 * 3833 * MMC Receive IPV4 Fragmented Frame Counter Interrupt Mask 3834 * Setting this bit masks the interrupt when the rxipv4_frag_frms counter reaches half of the maximum value or the maximum value. 3835 */ 3836 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4FRAGFIM_MASK (0x8U) 3837 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4FRAGFIM_SHIFT (3U) 3838 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4FRAGFIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXIPV4FRAGFIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4FRAGFIM_MASK) 3839 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4FRAGFIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4FRAGFIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXIPV4FRAGFIM_SHIFT) 3840 3841 /* 3842 * RXIPV4NOPAYFIM (RW) 3843 * 3844 * MMC Receive IPV4 No Payload Frame Counter Interrupt Mask 3845 * Setting this bit masks the interrupt when the rxipv4_nopay_frms counter reaches half of the maximum value or the maximum value. 3846 */ 3847 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4NOPAYFIM_MASK (0x4U) 3848 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4NOPAYFIM_SHIFT (2U) 3849 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4NOPAYFIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXIPV4NOPAYFIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4NOPAYFIM_MASK) 3850 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4NOPAYFIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4NOPAYFIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXIPV4NOPAYFIM_SHIFT) 3851 3852 /* 3853 * RXIPV4HERFIM (RW) 3854 * 3855 * MMC Receive IPV4 Header Error Frame Counter Interrupt Mask 3856 * Setting this bit masks the interrupt when the rxipv4_hdrerr_frms counter reaches half of the maximum value or the maximum value. 3857 */ 3858 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4HERFIM_MASK (0x2U) 3859 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4HERFIM_SHIFT (1U) 3860 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4HERFIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXIPV4HERFIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4HERFIM_MASK) 3861 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4HERFIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4HERFIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXIPV4HERFIM_SHIFT) 3862 3863 /* 3864 * RXIPV4GFIM (RW) 3865 * 3866 * MMC Receive IPV4 Good Frame Counter Interrupt Mask 3867 * Setting this bit masks the interrupt when the rxipv4_gd_frms counter reaches half of the maximum value or the maximum value. 3868 */ 3869 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GFIM_MASK (0x1U) 3870 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GFIM_SHIFT (0U) 3871 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GFIM_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GFIM_SHIFT) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GFIM_MASK) 3872 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GFIM_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GFIM_MASK) >> ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GFIM_SHIFT) 3873 3874 /* Bitfield definition for register: MMC_IPC_INTR_RX */ 3875 /* 3876 * RXICMPEROIS (RW) 3877 * 3878 * MMC Receive ICMP Error Octet Counter Interrupt Status 3879 * This bit is set when the rxicmp_err_octets counter reaches half of the maximum value or the maximum value. 3880 */ 3881 #define ENET_MMC_IPC_INTR_RX_RXICMPEROIS_MASK (0x20000000UL) 3882 #define ENET_MMC_IPC_INTR_RX_RXICMPEROIS_SHIFT (29U) 3883 #define ENET_MMC_IPC_INTR_RX_RXICMPEROIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXICMPEROIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXICMPEROIS_MASK) 3884 #define ENET_MMC_IPC_INTR_RX_RXICMPEROIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXICMPEROIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXICMPEROIS_SHIFT) 3885 3886 /* 3887 * RXICMPGOIS (RW) 3888 * 3889 * MMC Receive ICMP Good Octet Counter Interrupt Status 3890 * This bit is set when the rxicmp_gd_octets counter reaches half of the maximum value or the maximum value. 3891 */ 3892 #define ENET_MMC_IPC_INTR_RX_RXICMPGOIS_MASK (0x10000000UL) 3893 #define ENET_MMC_IPC_INTR_RX_RXICMPGOIS_SHIFT (28U) 3894 #define ENET_MMC_IPC_INTR_RX_RXICMPGOIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXICMPGOIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXICMPGOIS_MASK) 3895 #define ENET_MMC_IPC_INTR_RX_RXICMPGOIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXICMPGOIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXICMPGOIS_SHIFT) 3896 3897 /* 3898 * RXTCPEROIS (RW) 3899 * 3900 * MMC Receive TCP Error Octet Counter Interrupt Status 3901 * This bit is set when the rxtcp_err_octets counter reaches half of the maximum value or the maximum value. 3902 */ 3903 #define ENET_MMC_IPC_INTR_RX_RXTCPEROIS_MASK (0x8000000UL) 3904 #define ENET_MMC_IPC_INTR_RX_RXTCPEROIS_SHIFT (27U) 3905 #define ENET_MMC_IPC_INTR_RX_RXTCPEROIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXTCPEROIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXTCPEROIS_MASK) 3906 #define ENET_MMC_IPC_INTR_RX_RXTCPEROIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXTCPEROIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXTCPEROIS_SHIFT) 3907 3908 /* 3909 * RXTCPGOIS (RW) 3910 * 3911 * MMC Receive TCP Good Octet Counter Interrupt Status 3912 * This bit is set when the rxtcp_gd_octets counter reaches half of the maximum value or the maximum value 3913 */ 3914 #define ENET_MMC_IPC_INTR_RX_RXTCPGOIS_MASK (0x4000000UL) 3915 #define ENET_MMC_IPC_INTR_RX_RXTCPGOIS_SHIFT (26U) 3916 #define ENET_MMC_IPC_INTR_RX_RXTCPGOIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXTCPGOIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXTCPGOIS_MASK) 3917 #define ENET_MMC_IPC_INTR_RX_RXTCPGOIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXTCPGOIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXTCPGOIS_SHIFT) 3918 3919 /* 3920 * RXUDPEROIS (RW) 3921 * 3922 * MMC Receive UDP Error Octet Counter Interrupt Status 3923 * This bit is set when the rxudp_err_octets counter reaches half of the maximum value or the maximum value. 3924 */ 3925 #define ENET_MMC_IPC_INTR_RX_RXUDPEROIS_MASK (0x2000000UL) 3926 #define ENET_MMC_IPC_INTR_RX_RXUDPEROIS_SHIFT (25U) 3927 #define ENET_MMC_IPC_INTR_RX_RXUDPEROIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXUDPEROIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXUDPEROIS_MASK) 3928 #define ENET_MMC_IPC_INTR_RX_RXUDPEROIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXUDPEROIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXUDPEROIS_SHIFT) 3929 3930 /* 3931 * RXUDPGOIS (RW) 3932 * 3933 * MMC Receive UDP Good Octet Counter Interrupt Status 3934 * This bit is set when the rxudp_gd_octets counter reaches half of the maximum value or the maximum value. 3935 */ 3936 #define ENET_MMC_IPC_INTR_RX_RXUDPGOIS_MASK (0x1000000UL) 3937 #define ENET_MMC_IPC_INTR_RX_RXUDPGOIS_SHIFT (24U) 3938 #define ENET_MMC_IPC_INTR_RX_RXUDPGOIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXUDPGOIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXUDPGOIS_MASK) 3939 #define ENET_MMC_IPC_INTR_RX_RXUDPGOIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXUDPGOIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXUDPGOIS_SHIFT) 3940 3941 /* 3942 * RXIPV6NOPAYOIS (RW) 3943 * 3944 * MMC Receive IPV6 No Payload Octet Counter Interrupt Status 3945 * This bit is set when the rxipv6_nopay_octets counter reaches half of the maximum value or the maximum value. 3946 */ 3947 #define ENET_MMC_IPC_INTR_RX_RXIPV6NOPAYOIS_MASK (0x800000UL) 3948 #define ENET_MMC_IPC_INTR_RX_RXIPV6NOPAYOIS_SHIFT (23U) 3949 #define ENET_MMC_IPC_INTR_RX_RXIPV6NOPAYOIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXIPV6NOPAYOIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXIPV6NOPAYOIS_MASK) 3950 #define ENET_MMC_IPC_INTR_RX_RXIPV6NOPAYOIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXIPV6NOPAYOIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXIPV6NOPAYOIS_SHIFT) 3951 3952 /* 3953 * RXIPV6HEROIS (RW) 3954 * 3955 * MMC Receive IPV6 Header Error Octet Counter Interrupt Status 3956 * This bit is set when the rxipv6_hdrerr_octets counter reaches half of the maximum value or the maximum value. 3957 */ 3958 #define ENET_MMC_IPC_INTR_RX_RXIPV6HEROIS_MASK (0x400000UL) 3959 #define ENET_MMC_IPC_INTR_RX_RXIPV6HEROIS_SHIFT (22U) 3960 #define ENET_MMC_IPC_INTR_RX_RXIPV6HEROIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXIPV6HEROIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXIPV6HEROIS_MASK) 3961 #define ENET_MMC_IPC_INTR_RX_RXIPV6HEROIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXIPV6HEROIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXIPV6HEROIS_SHIFT) 3962 3963 /* 3964 * RXIPV6GOIS (RW) 3965 * 3966 * MMC Receive IPV6 Good Octet Counter Interrupt Status 3967 * This bit is set when the rxipv6_gd_octets counter reaches half of the maximum value or the maximum value. 3968 */ 3969 #define ENET_MMC_IPC_INTR_RX_RXIPV6GOIS_MASK (0x200000UL) 3970 #define ENET_MMC_IPC_INTR_RX_RXIPV6GOIS_SHIFT (21U) 3971 #define ENET_MMC_IPC_INTR_RX_RXIPV6GOIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXIPV6GOIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXIPV6GOIS_MASK) 3972 #define ENET_MMC_IPC_INTR_RX_RXIPV6GOIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXIPV6GOIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXIPV6GOIS_SHIFT) 3973 3974 /* 3975 * RXIPV4UDSBLOIS (RW) 3976 * 3977 * MMC Receive IPV4 UDP Checksum Disabled Octet Counter Interrupt Status 3978 * This bit is set when the rxipv4_udsbl_octets counter reaches half of the maximum value or the maximum value. 3979 */ 3980 #define ENET_MMC_IPC_INTR_RX_RXIPV4UDSBLOIS_MASK (0x100000UL) 3981 #define ENET_MMC_IPC_INTR_RX_RXIPV4UDSBLOIS_SHIFT (20U) 3982 #define ENET_MMC_IPC_INTR_RX_RXIPV4UDSBLOIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXIPV4UDSBLOIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXIPV4UDSBLOIS_MASK) 3983 #define ENET_MMC_IPC_INTR_RX_RXIPV4UDSBLOIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXIPV4UDSBLOIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXIPV4UDSBLOIS_SHIFT) 3984 3985 /* 3986 * RXIPV4FRAGOIS (RW) 3987 * 3988 * MMC Receive IPV4 Fragmented Octet Counter Interrupt Status 3989 * This bit is set when the rxipv4_frag_octets counter reaches half of the maximum value or the maximum value. 3990 */ 3991 #define ENET_MMC_IPC_INTR_RX_RXIPV4FRAGOIS_MASK (0x80000UL) 3992 #define ENET_MMC_IPC_INTR_RX_RXIPV4FRAGOIS_SHIFT (19U) 3993 #define ENET_MMC_IPC_INTR_RX_RXIPV4FRAGOIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXIPV4FRAGOIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXIPV4FRAGOIS_MASK) 3994 #define ENET_MMC_IPC_INTR_RX_RXIPV4FRAGOIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXIPV4FRAGOIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXIPV4FRAGOIS_SHIFT) 3995 3996 /* 3997 * RXIPV4NOPAYOIS (RW) 3998 * 3999 * MMC Receive IPV4 No Payload Octet Counter Interrupt Status 4000 * This bit is set when the rxipv4_nopay_octets counter reaches half of the maximum value or the maximum value. 4001 */ 4002 #define ENET_MMC_IPC_INTR_RX_RXIPV4NOPAYOIS_MASK (0x40000UL) 4003 #define ENET_MMC_IPC_INTR_RX_RXIPV4NOPAYOIS_SHIFT (18U) 4004 #define ENET_MMC_IPC_INTR_RX_RXIPV4NOPAYOIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXIPV4NOPAYOIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXIPV4NOPAYOIS_MASK) 4005 #define ENET_MMC_IPC_INTR_RX_RXIPV4NOPAYOIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXIPV4NOPAYOIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXIPV4NOPAYOIS_SHIFT) 4006 4007 /* 4008 * RXIPV4HEROIS (RW) 4009 * 4010 * MMC Receive IPV4 Header Error Octet Counter Interrupt Status 4011 * This bit is set when the rxipv4_hdrerr_octets counter reaches half of the maximum value or the maximum value. 4012 */ 4013 #define ENET_MMC_IPC_INTR_RX_RXIPV4HEROIS_MASK (0x20000UL) 4014 #define ENET_MMC_IPC_INTR_RX_RXIPV4HEROIS_SHIFT (17U) 4015 #define ENET_MMC_IPC_INTR_RX_RXIPV4HEROIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXIPV4HEROIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXIPV4HEROIS_MASK) 4016 #define ENET_MMC_IPC_INTR_RX_RXIPV4HEROIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXIPV4HEROIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXIPV4HEROIS_SHIFT) 4017 4018 /* 4019 * RXIPV4GOIS (RW) 4020 * 4021 * MMC Receive IPV4 Good Octet Counter Interrupt Status 4022 * This bit is set when the rxipv4_gd_octets counter reaches half of the maximum value or the maximum value. 4023 */ 4024 #define ENET_MMC_IPC_INTR_RX_RXIPV4GOIS_MASK (0x10000UL) 4025 #define ENET_MMC_IPC_INTR_RX_RXIPV4GOIS_SHIFT (16U) 4026 #define ENET_MMC_IPC_INTR_RX_RXIPV4GOIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXIPV4GOIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXIPV4GOIS_MASK) 4027 #define ENET_MMC_IPC_INTR_RX_RXIPV4GOIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXIPV4GOIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXIPV4GOIS_SHIFT) 4028 4029 /* 4030 * RXICMPERFIS (RW) 4031 * 4032 * MMC Receive ICMP Error Frame Counter Interrupt Status 4033 * This bit is set when the rxicmp_err_frms counter reaches half of the maximum value or the maximum value. 4034 */ 4035 #define ENET_MMC_IPC_INTR_RX_RXICMPERFIS_MASK (0x2000U) 4036 #define ENET_MMC_IPC_INTR_RX_RXICMPERFIS_SHIFT (13U) 4037 #define ENET_MMC_IPC_INTR_RX_RXICMPERFIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXICMPERFIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXICMPERFIS_MASK) 4038 #define ENET_MMC_IPC_INTR_RX_RXICMPERFIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXICMPERFIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXICMPERFIS_SHIFT) 4039 4040 /* 4041 * RXICMPGFIS (RW) 4042 * 4043 * MMC Receive ICMP Good Frame Counter Interrupt Status 4044 * This bit is set when the rxicmp_gd_frms counter reaches half of the maximum value or the maximum value. 4045 */ 4046 #define ENET_MMC_IPC_INTR_RX_RXICMPGFIS_MASK (0x1000U) 4047 #define ENET_MMC_IPC_INTR_RX_RXICMPGFIS_SHIFT (12U) 4048 #define ENET_MMC_IPC_INTR_RX_RXICMPGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXICMPGFIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXICMPGFIS_MASK) 4049 #define ENET_MMC_IPC_INTR_RX_RXICMPGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXICMPGFIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXICMPGFIS_SHIFT) 4050 4051 /* 4052 * RXTCPERFIS (RW) 4053 * 4054 * MMC Receive TCP Error Frame Counter Interrupt Status 4055 * This bit is set when the rxtcp_err_frms counter reaches half of the maximum value or the maximum value. 4056 */ 4057 #define ENET_MMC_IPC_INTR_RX_RXTCPERFIS_MASK (0x800U) 4058 #define ENET_MMC_IPC_INTR_RX_RXTCPERFIS_SHIFT (11U) 4059 #define ENET_MMC_IPC_INTR_RX_RXTCPERFIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXTCPERFIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXTCPERFIS_MASK) 4060 #define ENET_MMC_IPC_INTR_RX_RXTCPERFIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXTCPERFIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXTCPERFIS_SHIFT) 4061 4062 /* 4063 * RXTCPGFIS (RW) 4064 * 4065 * MMC Receive TCP Good Frame Counter Interrupt Status 4066 * This bit is set when the rxtcp_gd_frms counter reaches half of the maximum value or the maximum value. 4067 */ 4068 #define ENET_MMC_IPC_INTR_RX_RXTCPGFIS_MASK (0x400U) 4069 #define ENET_MMC_IPC_INTR_RX_RXTCPGFIS_SHIFT (10U) 4070 #define ENET_MMC_IPC_INTR_RX_RXTCPGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXTCPGFIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXTCPGFIS_MASK) 4071 #define ENET_MMC_IPC_INTR_RX_RXTCPGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXTCPGFIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXTCPGFIS_SHIFT) 4072 4073 /* 4074 * RXUDPERFIS (RW) 4075 * 4076 * MMC Receive UDP Error Frame Counter Interrupt Status 4077 * This bit is set when the rxudp_err_frms counter reaches half of the maximum value or the maximum value. 4078 */ 4079 #define ENET_MMC_IPC_INTR_RX_RXUDPERFIS_MASK (0x200U) 4080 #define ENET_MMC_IPC_INTR_RX_RXUDPERFIS_SHIFT (9U) 4081 #define ENET_MMC_IPC_INTR_RX_RXUDPERFIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXUDPERFIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXUDPERFIS_MASK) 4082 #define ENET_MMC_IPC_INTR_RX_RXUDPERFIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXUDPERFIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXUDPERFIS_SHIFT) 4083 4084 /* 4085 * RXUDPGFIS (RW) 4086 * 4087 * MMC Receive UDP Good Frame Counter Interrupt Status 4088 * This bit is set when the rxudp_gd_frms counter reaches half of the maximum value or the maximum value. 4089 */ 4090 #define ENET_MMC_IPC_INTR_RX_RXUDPGFIS_MASK (0x100U) 4091 #define ENET_MMC_IPC_INTR_RX_RXUDPGFIS_SHIFT (8U) 4092 #define ENET_MMC_IPC_INTR_RX_RXUDPGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXUDPGFIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXUDPGFIS_MASK) 4093 #define ENET_MMC_IPC_INTR_RX_RXUDPGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXUDPGFIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXUDPGFIS_SHIFT) 4094 4095 /* 4096 * RXIPV6NOPAYFIS (RW) 4097 * 4098 * MMC Receive IPV6 No Payload Frame Counter Interrupt Status 4099 * This bit is set when the rxipv6_nopay_frms counter reaches half of the maximum value or the maximum value. 4100 */ 4101 #define ENET_MMC_IPC_INTR_RX_RXIPV6NOPAYFIS_MASK (0x80U) 4102 #define ENET_MMC_IPC_INTR_RX_RXIPV6NOPAYFIS_SHIFT (7U) 4103 #define ENET_MMC_IPC_INTR_RX_RXIPV6NOPAYFIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXIPV6NOPAYFIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXIPV6NOPAYFIS_MASK) 4104 #define ENET_MMC_IPC_INTR_RX_RXIPV6NOPAYFIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXIPV6NOPAYFIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXIPV6NOPAYFIS_SHIFT) 4105 4106 /* 4107 * RXIPV6HERFIS (RW) 4108 * 4109 * MMC Receive IPV6 Header Error Frame Counter Interrupt Status 4110 * This bit is set when the rxipv6_hdrerr_frms counter reaches half of the maximum value or the maximum value. 4111 */ 4112 #define ENET_MMC_IPC_INTR_RX_RXIPV6HERFIS_MASK (0x40U) 4113 #define ENET_MMC_IPC_INTR_RX_RXIPV6HERFIS_SHIFT (6U) 4114 #define ENET_MMC_IPC_INTR_RX_RXIPV6HERFIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXIPV6HERFIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXIPV6HERFIS_MASK) 4115 #define ENET_MMC_IPC_INTR_RX_RXIPV6HERFIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXIPV6HERFIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXIPV6HERFIS_SHIFT) 4116 4117 /* 4118 * RXIPV6GFIS (RW) 4119 * 4120 * MMC Receive IPV6 Good Frame Counter Interrupt Status 4121 * This bit is set when the rxipv6_gd_frms counter reaches half of the maximum value or the maximum value. 4122 */ 4123 #define ENET_MMC_IPC_INTR_RX_RXIPV6GFIS_MASK (0x20U) 4124 #define ENET_MMC_IPC_INTR_RX_RXIPV6GFIS_SHIFT (5U) 4125 #define ENET_MMC_IPC_INTR_RX_RXIPV6GFIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXIPV6GFIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXIPV6GFIS_MASK) 4126 #define ENET_MMC_IPC_INTR_RX_RXIPV6GFIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXIPV6GFIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXIPV6GFIS_SHIFT) 4127 4128 /* 4129 * RXIPV4UDSBLFIS (RW) 4130 * 4131 * MMC Receive IPV4 UDP Checksum Disabled Frame Counter Interrupt Status 4132 * This bit is set when the rxipv4_udsbl_frms counter reaches half of the maximum value or the maximum value. 4133 */ 4134 #define ENET_MMC_IPC_INTR_RX_RXIPV4UDSBLFIS_MASK (0x10U) 4135 #define ENET_MMC_IPC_INTR_RX_RXIPV4UDSBLFIS_SHIFT (4U) 4136 #define ENET_MMC_IPC_INTR_RX_RXIPV4UDSBLFIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXIPV4UDSBLFIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXIPV4UDSBLFIS_MASK) 4137 #define ENET_MMC_IPC_INTR_RX_RXIPV4UDSBLFIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXIPV4UDSBLFIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXIPV4UDSBLFIS_SHIFT) 4138 4139 /* 4140 * RXIPV4FRAGFIS (RW) 4141 * 4142 * MMC Receive IPV4 Fragmented Frame Counter Interrupt Status 4143 * This bit is set when the rxipv4_frag_frms counter reaches half of the maximum value or the maximum value. 4144 */ 4145 #define ENET_MMC_IPC_INTR_RX_RXIPV4FRAGFIS_MASK (0x8U) 4146 #define ENET_MMC_IPC_INTR_RX_RXIPV4FRAGFIS_SHIFT (3U) 4147 #define ENET_MMC_IPC_INTR_RX_RXIPV4FRAGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXIPV4FRAGFIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXIPV4FRAGFIS_MASK) 4148 #define ENET_MMC_IPC_INTR_RX_RXIPV4FRAGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXIPV4FRAGFIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXIPV4FRAGFIS_SHIFT) 4149 4150 /* 4151 * RXIPV4NOPAYFIS (RW) 4152 * 4153 * MMC Receive IPV4 No Payload Frame Counter Interrupt Status 4154 * This bit is set when the rxipv4_nopay_frms counter reaches half of the maximum value or the maximum value. 4155 */ 4156 #define ENET_MMC_IPC_INTR_RX_RXIPV4NOPAYFIS_MASK (0x4U) 4157 #define ENET_MMC_IPC_INTR_RX_RXIPV4NOPAYFIS_SHIFT (2U) 4158 #define ENET_MMC_IPC_INTR_RX_RXIPV4NOPAYFIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXIPV4NOPAYFIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXIPV4NOPAYFIS_MASK) 4159 #define ENET_MMC_IPC_INTR_RX_RXIPV4NOPAYFIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXIPV4NOPAYFIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXIPV4NOPAYFIS_SHIFT) 4160 4161 /* 4162 * RXIPV4HERFIS (RW) 4163 * 4164 * MMC Receive IPV4 Header Error Frame Counter Interrupt Status 4165 * This bit is set when the rxipv4_hdrerr_frms counter reaches half of the maximum value or the maximum value. 4166 */ 4167 #define ENET_MMC_IPC_INTR_RX_RXIPV4HERFIS_MASK (0x2U) 4168 #define ENET_MMC_IPC_INTR_RX_RXIPV4HERFIS_SHIFT (1U) 4169 #define ENET_MMC_IPC_INTR_RX_RXIPV4HERFIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXIPV4HERFIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXIPV4HERFIS_MASK) 4170 #define ENET_MMC_IPC_INTR_RX_RXIPV4HERFIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXIPV4HERFIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXIPV4HERFIS_SHIFT) 4171 4172 /* 4173 * RXIPV4GFIS (RW) 4174 * 4175 * MMC Receive IPV4 Good Frame Counter Interrupt Status 4176 * This bit is set when the rxipv4_gd_frms counter reaches half of the maximum value or the maximum value. 4177 */ 4178 #define ENET_MMC_IPC_INTR_RX_RXIPV4GFIS_MASK (0x1U) 4179 #define ENET_MMC_IPC_INTR_RX_RXIPV4GFIS_SHIFT (0U) 4180 #define ENET_MMC_IPC_INTR_RX_RXIPV4GFIS_SET(x) (((uint32_t)(x) << ENET_MMC_IPC_INTR_RX_RXIPV4GFIS_SHIFT) & ENET_MMC_IPC_INTR_RX_RXIPV4GFIS_MASK) 4181 #define ENET_MMC_IPC_INTR_RX_RXIPV4GFIS_GET(x) (((uint32_t)(x) & ENET_MMC_IPC_INTR_RX_RXIPV4GFIS_MASK) >> ENET_MMC_IPC_INTR_RX_RXIPV4GFIS_SHIFT) 4182 4183 /* Bitfield definition for register: RXIPV4_GD_FMS */ 4184 /* 4185 * FRMCNT (RW) 4186 * 4187 * Number of good IPv4 datagrams received with the TCP, UDP, or ICMP payload 4188 */ 4189 #define ENET_RXIPV4_GD_FMS_FRMCNT_MASK (0xFFFFFFFFUL) 4190 #define ENET_RXIPV4_GD_FMS_FRMCNT_SHIFT (0U) 4191 #define ENET_RXIPV4_GD_FMS_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXIPV4_GD_FMS_FRMCNT_SHIFT) & ENET_RXIPV4_GD_FMS_FRMCNT_MASK) 4192 #define ENET_RXIPV4_GD_FMS_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXIPV4_GD_FMS_FRMCNT_MASK) >> ENET_RXIPV4_GD_FMS_FRMCNT_SHIFT) 4193 4194 /* Bitfield definition for register: RXIPV4_HDRERR_FRMS */ 4195 /* 4196 * FRMCNT (RW) 4197 * 4198 * Number of IPv4 datagrams received with header (checksum, length, or version mismatch) errors 4199 */ 4200 #define ENET_RXIPV4_HDRERR_FRMS_FRMCNT_MASK (0xFFFFFFFFUL) 4201 #define ENET_RXIPV4_HDRERR_FRMS_FRMCNT_SHIFT (0U) 4202 #define ENET_RXIPV4_HDRERR_FRMS_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXIPV4_HDRERR_FRMS_FRMCNT_SHIFT) & ENET_RXIPV4_HDRERR_FRMS_FRMCNT_MASK) 4203 #define ENET_RXIPV4_HDRERR_FRMS_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXIPV4_HDRERR_FRMS_FRMCNT_MASK) >> ENET_RXIPV4_HDRERR_FRMS_FRMCNT_SHIFT) 4204 4205 /* Bitfield definition for register: RXIPV4_NOPAY_FRMS */ 4206 /* 4207 * FRMCNT (RW) 4208 * 4209 * Number of IPv4 datagram frames received that did not have a TCP, UDP, or ICMP payload processed by the Checksum engine 4210 */ 4211 #define ENET_RXIPV4_NOPAY_FRMS_FRMCNT_MASK (0xFFFFFFFFUL) 4212 #define ENET_RXIPV4_NOPAY_FRMS_FRMCNT_SHIFT (0U) 4213 #define ENET_RXIPV4_NOPAY_FRMS_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXIPV4_NOPAY_FRMS_FRMCNT_SHIFT) & ENET_RXIPV4_NOPAY_FRMS_FRMCNT_MASK) 4214 #define ENET_RXIPV4_NOPAY_FRMS_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXIPV4_NOPAY_FRMS_FRMCNT_MASK) >> ENET_RXIPV4_NOPAY_FRMS_FRMCNT_SHIFT) 4215 4216 /* Bitfield definition for register: RXIPV4_FRAG_FRMS */ 4217 /* 4218 * FRMCNT (RW) 4219 * 4220 * Number of good IPv4 datagrams with fragmentation 4221 */ 4222 #define ENET_RXIPV4_FRAG_FRMS_FRMCNT_MASK (0xFFFFFFFFUL) 4223 #define ENET_RXIPV4_FRAG_FRMS_FRMCNT_SHIFT (0U) 4224 #define ENET_RXIPV4_FRAG_FRMS_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXIPV4_FRAG_FRMS_FRMCNT_SHIFT) & ENET_RXIPV4_FRAG_FRMS_FRMCNT_MASK) 4225 #define ENET_RXIPV4_FRAG_FRMS_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXIPV4_FRAG_FRMS_FRMCNT_MASK) >> ENET_RXIPV4_FRAG_FRMS_FRMCNT_SHIFT) 4226 4227 /* Bitfield definition for register: RXIPV4_UDSBL_FRMS */ 4228 /* 4229 * FRMCNT (RW) 4230 * 4231 * Number of good IPv4 datagrams received that had a UDP payload with checksum disabled 4232 */ 4233 #define ENET_RXIPV4_UDSBL_FRMS_FRMCNT_MASK (0xFFFFFFFFUL) 4234 #define ENET_RXIPV4_UDSBL_FRMS_FRMCNT_SHIFT (0U) 4235 #define ENET_RXIPV4_UDSBL_FRMS_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXIPV4_UDSBL_FRMS_FRMCNT_SHIFT) & ENET_RXIPV4_UDSBL_FRMS_FRMCNT_MASK) 4236 #define ENET_RXIPV4_UDSBL_FRMS_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXIPV4_UDSBL_FRMS_FRMCNT_MASK) >> ENET_RXIPV4_UDSBL_FRMS_FRMCNT_SHIFT) 4237 4238 /* Bitfield definition for register: RXIPV6_GD_FRMS */ 4239 /* 4240 * FRMCNT (RW) 4241 * 4242 * Number of good IPv6 datagrams received with TCP, UDP, or ICMP payloads 4243 */ 4244 #define ENET_RXIPV6_GD_FRMS_FRMCNT_MASK (0xFFFFFFFFUL) 4245 #define ENET_RXIPV6_GD_FRMS_FRMCNT_SHIFT (0U) 4246 #define ENET_RXIPV6_GD_FRMS_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXIPV6_GD_FRMS_FRMCNT_SHIFT) & ENET_RXIPV6_GD_FRMS_FRMCNT_MASK) 4247 #define ENET_RXIPV6_GD_FRMS_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXIPV6_GD_FRMS_FRMCNT_MASK) >> ENET_RXIPV6_GD_FRMS_FRMCNT_SHIFT) 4248 4249 /* Bitfield definition for register: RXIPV6_HDRERR_FRMS */ 4250 /* 4251 * FRMCNT (RW) 4252 * 4253 * Number of IPv6 datagrams received with header errors (length or version mismatch) 4254 */ 4255 #define ENET_RXIPV6_HDRERR_FRMS_FRMCNT_MASK (0xFFFFFFFFUL) 4256 #define ENET_RXIPV6_HDRERR_FRMS_FRMCNT_SHIFT (0U) 4257 #define ENET_RXIPV6_HDRERR_FRMS_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXIPV6_HDRERR_FRMS_FRMCNT_SHIFT) & ENET_RXIPV6_HDRERR_FRMS_FRMCNT_MASK) 4258 #define ENET_RXIPV6_HDRERR_FRMS_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXIPV6_HDRERR_FRMS_FRMCNT_MASK) >> ENET_RXIPV6_HDRERR_FRMS_FRMCNT_SHIFT) 4259 4260 /* Bitfield definition for register: RXIPV6_NOPAY_FRMS */ 4261 /* 4262 * FRMCNT (RW) 4263 * 4264 * Number of IPv6 datagram frames received that did not have a TCP, UDP, or ICMP payload. This includes all IPv6 datagrams with fragmentation or security extension headers 4265 */ 4266 #define ENET_RXIPV6_NOPAY_FRMS_FRMCNT_MASK (0xFFFFFFFFUL) 4267 #define ENET_RXIPV6_NOPAY_FRMS_FRMCNT_SHIFT (0U) 4268 #define ENET_RXIPV6_NOPAY_FRMS_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXIPV6_NOPAY_FRMS_FRMCNT_SHIFT) & ENET_RXIPV6_NOPAY_FRMS_FRMCNT_MASK) 4269 #define ENET_RXIPV6_NOPAY_FRMS_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXIPV6_NOPAY_FRMS_FRMCNT_MASK) >> ENET_RXIPV6_NOPAY_FRMS_FRMCNT_SHIFT) 4270 4271 /* Bitfield definition for register: RXUDP_GD_FRMS */ 4272 /* 4273 * FRMCNT (RW) 4274 * 4275 * Number of good IP datagrams with a good UDP payload. This counter is not updated when the rxipv4_udsbl_frms counter is incremented. 4276 */ 4277 #define ENET_RXUDP_GD_FRMS_FRMCNT_MASK (0xFFFFFFFFUL) 4278 #define ENET_RXUDP_GD_FRMS_FRMCNT_SHIFT (0U) 4279 #define ENET_RXUDP_GD_FRMS_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXUDP_GD_FRMS_FRMCNT_SHIFT) & ENET_RXUDP_GD_FRMS_FRMCNT_MASK) 4280 #define ENET_RXUDP_GD_FRMS_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXUDP_GD_FRMS_FRMCNT_MASK) >> ENET_RXUDP_GD_FRMS_FRMCNT_SHIFT) 4281 4282 /* Bitfield definition for register: RXUDP_ERR_FRMS */ 4283 /* 4284 * FRMCNT (RW) 4285 * 4286 * Number of good IP datagrams whose UDP payload has a checksum error 4287 */ 4288 #define ENET_RXUDP_ERR_FRMS_FRMCNT_MASK (0xFFFFFFFFUL) 4289 #define ENET_RXUDP_ERR_FRMS_FRMCNT_SHIFT (0U) 4290 #define ENET_RXUDP_ERR_FRMS_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXUDP_ERR_FRMS_FRMCNT_SHIFT) & ENET_RXUDP_ERR_FRMS_FRMCNT_MASK) 4291 #define ENET_RXUDP_ERR_FRMS_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXUDP_ERR_FRMS_FRMCNT_MASK) >> ENET_RXUDP_ERR_FRMS_FRMCNT_SHIFT) 4292 4293 /* Bitfield definition for register: RXTCP_GD_FRMS */ 4294 /* 4295 * FRMCNT (RW) 4296 * 4297 * Number of good IP datagrams with a good TCP payload 4298 */ 4299 #define ENET_RXTCP_GD_FRMS_FRMCNT_MASK (0xFFFFFFFFUL) 4300 #define ENET_RXTCP_GD_FRMS_FRMCNT_SHIFT (0U) 4301 #define ENET_RXTCP_GD_FRMS_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXTCP_GD_FRMS_FRMCNT_SHIFT) & ENET_RXTCP_GD_FRMS_FRMCNT_MASK) 4302 #define ENET_RXTCP_GD_FRMS_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXTCP_GD_FRMS_FRMCNT_MASK) >> ENET_RXTCP_GD_FRMS_FRMCNT_SHIFT) 4303 4304 /* Bitfield definition for register: RXTCP_ERR_FRMS */ 4305 /* 4306 * FRMCNT (RW) 4307 * 4308 * Number of good IP datagrams whose TCP payload has a checksum error 4309 */ 4310 #define ENET_RXTCP_ERR_FRMS_FRMCNT_MASK (0xFFFFFFFFUL) 4311 #define ENET_RXTCP_ERR_FRMS_FRMCNT_SHIFT (0U) 4312 #define ENET_RXTCP_ERR_FRMS_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXTCP_ERR_FRMS_FRMCNT_SHIFT) & ENET_RXTCP_ERR_FRMS_FRMCNT_MASK) 4313 #define ENET_RXTCP_ERR_FRMS_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXTCP_ERR_FRMS_FRMCNT_MASK) >> ENET_RXTCP_ERR_FRMS_FRMCNT_SHIFT) 4314 4315 /* Bitfield definition for register: RXICMP_GD_FRMS */ 4316 /* 4317 * FRMCNT (RW) 4318 * 4319 * Number of good IP datagrams with a good ICMP payload 4320 */ 4321 #define ENET_RXICMP_GD_FRMS_FRMCNT_MASK (0xFFFFFFFFUL) 4322 #define ENET_RXICMP_GD_FRMS_FRMCNT_SHIFT (0U) 4323 #define ENET_RXICMP_GD_FRMS_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXICMP_GD_FRMS_FRMCNT_SHIFT) & ENET_RXICMP_GD_FRMS_FRMCNT_MASK) 4324 #define ENET_RXICMP_GD_FRMS_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXICMP_GD_FRMS_FRMCNT_MASK) >> ENET_RXICMP_GD_FRMS_FRMCNT_SHIFT) 4325 4326 /* Bitfield definition for register: RXICMP_ERR_FRMS */ 4327 /* 4328 * FRMCNT (RW) 4329 * 4330 * Number of good IP datagrams whose ICMP payload has a checksum error 4331 */ 4332 #define ENET_RXICMP_ERR_FRMS_FRMCNT_MASK (0xFFFFFFFFUL) 4333 #define ENET_RXICMP_ERR_FRMS_FRMCNT_SHIFT (0U) 4334 #define ENET_RXICMP_ERR_FRMS_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXICMP_ERR_FRMS_FRMCNT_SHIFT) & ENET_RXICMP_ERR_FRMS_FRMCNT_MASK) 4335 #define ENET_RXICMP_ERR_FRMS_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXICMP_ERR_FRMS_FRMCNT_MASK) >> ENET_RXICMP_ERR_FRMS_FRMCNT_SHIFT) 4336 4337 /* Bitfield definition for register: RXIPV4_GD_OCTETS */ 4338 /* 4339 * BYTECNT (RW) 4340 * 4341 * Number of bytes received in good IPv4 datagrams encapsulating TCP, UDP, or ICMP data. (Ethernet header, FCS, pad, or IP pad bytes are not included in this counter or in the octet counters listed below). 4342 */ 4343 #define ENET_RXIPV4_GD_OCTETS_BYTECNT_MASK (0xFFFFFFFFUL) 4344 #define ENET_RXIPV4_GD_OCTETS_BYTECNT_SHIFT (0U) 4345 #define ENET_RXIPV4_GD_OCTETS_BYTECNT_SET(x) (((uint32_t)(x) << ENET_RXIPV4_GD_OCTETS_BYTECNT_SHIFT) & ENET_RXIPV4_GD_OCTETS_BYTECNT_MASK) 4346 #define ENET_RXIPV4_GD_OCTETS_BYTECNT_GET(x) (((uint32_t)(x) & ENET_RXIPV4_GD_OCTETS_BYTECNT_MASK) >> ENET_RXIPV4_GD_OCTETS_BYTECNT_SHIFT) 4347 4348 /* Bitfield definition for register: RXIPV4_HDRERR_OCTETS */ 4349 /* 4350 * BYTECNT (RW) 4351 * 4352 * Number of bytes received in IPv4 datagrams with header errors (checksum, length, version mismatch). The value in the Length field of IPv4 header is used to update this counter. 4353 */ 4354 #define ENET_RXIPV4_HDRERR_OCTETS_BYTECNT_MASK (0xFFFFFFFFUL) 4355 #define ENET_RXIPV4_HDRERR_OCTETS_BYTECNT_SHIFT (0U) 4356 #define ENET_RXIPV4_HDRERR_OCTETS_BYTECNT_SET(x) (((uint32_t)(x) << ENET_RXIPV4_HDRERR_OCTETS_BYTECNT_SHIFT) & ENET_RXIPV4_HDRERR_OCTETS_BYTECNT_MASK) 4357 #define ENET_RXIPV4_HDRERR_OCTETS_BYTECNT_GET(x) (((uint32_t)(x) & ENET_RXIPV4_HDRERR_OCTETS_BYTECNT_MASK) >> ENET_RXIPV4_HDRERR_OCTETS_BYTECNT_SHIFT) 4358 4359 /* Bitfield definition for register: RXIPV4_NOPAY_OCTETS */ 4360 /* 4361 * BYTECNT (RW) 4362 * 4363 * Number of bytes received in IPv4 datagrams that did not have a TCP, UDP, or ICMP payload. The value in the IPv4 header’s Length field is used to update this counter. 4364 */ 4365 #define ENET_RXIPV4_NOPAY_OCTETS_BYTECNT_MASK (0xFFFFFFFFUL) 4366 #define ENET_RXIPV4_NOPAY_OCTETS_BYTECNT_SHIFT (0U) 4367 #define ENET_RXIPV4_NOPAY_OCTETS_BYTECNT_SET(x) (((uint32_t)(x) << ENET_RXIPV4_NOPAY_OCTETS_BYTECNT_SHIFT) & ENET_RXIPV4_NOPAY_OCTETS_BYTECNT_MASK) 4368 #define ENET_RXIPV4_NOPAY_OCTETS_BYTECNT_GET(x) (((uint32_t)(x) & ENET_RXIPV4_NOPAY_OCTETS_BYTECNT_MASK) >> ENET_RXIPV4_NOPAY_OCTETS_BYTECNT_SHIFT) 4369 4370 /* Bitfield definition for register: RXIPV4_FRAG_OCTETS */ 4371 /* 4372 * BYTECNT (RW) 4373 * 4374 * Number of bytes received in fragmented IPv4 datagrams. The value in the IPv4 header’s Length field is used to update this counter. 4375 */ 4376 #define ENET_RXIPV4_FRAG_OCTETS_BYTECNT_MASK (0xFFFFFFFFUL) 4377 #define ENET_RXIPV4_FRAG_OCTETS_BYTECNT_SHIFT (0U) 4378 #define ENET_RXIPV4_FRAG_OCTETS_BYTECNT_SET(x) (((uint32_t)(x) << ENET_RXIPV4_FRAG_OCTETS_BYTECNT_SHIFT) & ENET_RXIPV4_FRAG_OCTETS_BYTECNT_MASK) 4379 #define ENET_RXIPV4_FRAG_OCTETS_BYTECNT_GET(x) (((uint32_t)(x) & ENET_RXIPV4_FRAG_OCTETS_BYTECNT_MASK) >> ENET_RXIPV4_FRAG_OCTETS_BYTECNT_SHIFT) 4380 4381 /* Bitfield definition for register: RXIPV4_UDSBL_OCTETS */ 4382 /* 4383 * BYTECNT (RW) 4384 * 4385 * Number of bytes received in a UDP segment that had the UDP checksum disabled. This counter does not count IP Header bytes. 4386 */ 4387 #define ENET_RXIPV4_UDSBL_OCTETS_BYTECNT_MASK (0xFFFFFFFFUL) 4388 #define ENET_RXIPV4_UDSBL_OCTETS_BYTECNT_SHIFT (0U) 4389 #define ENET_RXIPV4_UDSBL_OCTETS_BYTECNT_SET(x) (((uint32_t)(x) << ENET_RXIPV4_UDSBL_OCTETS_BYTECNT_SHIFT) & ENET_RXIPV4_UDSBL_OCTETS_BYTECNT_MASK) 4390 #define ENET_RXIPV4_UDSBL_OCTETS_BYTECNT_GET(x) (((uint32_t)(x) & ENET_RXIPV4_UDSBL_OCTETS_BYTECNT_MASK) >> ENET_RXIPV4_UDSBL_OCTETS_BYTECNT_SHIFT) 4391 4392 /* Bitfield definition for register: RXIPV6_GD_OCTETS */ 4393 /* 4394 * BYTECNT (RW) 4395 * 4396 * Number of bytes received in good IPv6 datagrams encapsulating TCP, UDP or ICMPv6 data 4397 */ 4398 #define ENET_RXIPV6_GD_OCTETS_BYTECNT_MASK (0xFFFFFFFFUL) 4399 #define ENET_RXIPV6_GD_OCTETS_BYTECNT_SHIFT (0U) 4400 #define ENET_RXIPV6_GD_OCTETS_BYTECNT_SET(x) (((uint32_t)(x) << ENET_RXIPV6_GD_OCTETS_BYTECNT_SHIFT) & ENET_RXIPV6_GD_OCTETS_BYTECNT_MASK) 4401 #define ENET_RXIPV6_GD_OCTETS_BYTECNT_GET(x) (((uint32_t)(x) & ENET_RXIPV6_GD_OCTETS_BYTECNT_MASK) >> ENET_RXIPV6_GD_OCTETS_BYTECNT_SHIFT) 4402 4403 /* Bitfield definition for register: RXIPV6_HDRERR_OCTETS */ 4404 /* 4405 * BYTECNT (RW) 4406 * 4407 * Number of bytes received in IPv6 datagrams with header errors (length, version mismatch). The value in the IPv6 header’s Length field is used to update this counter. 4408 */ 4409 #define ENET_RXIPV6_HDRERR_OCTETS_BYTECNT_MASK (0xFFFFFFFFUL) 4410 #define ENET_RXIPV6_HDRERR_OCTETS_BYTECNT_SHIFT (0U) 4411 #define ENET_RXIPV6_HDRERR_OCTETS_BYTECNT_SET(x) (((uint32_t)(x) << ENET_RXIPV6_HDRERR_OCTETS_BYTECNT_SHIFT) & ENET_RXIPV6_HDRERR_OCTETS_BYTECNT_MASK) 4412 #define ENET_RXIPV6_HDRERR_OCTETS_BYTECNT_GET(x) (((uint32_t)(x) & ENET_RXIPV6_HDRERR_OCTETS_BYTECNT_MASK) >> ENET_RXIPV6_HDRERR_OCTETS_BYTECNT_SHIFT) 4413 4414 /* Bitfield definition for register: RXIPV6_NOPAY_OCTETS */ 4415 /* 4416 * BYTECNT (RW) 4417 * 4418 * Number of bytes received in IPv6 datagrams that did not have a TCP, UDP, or ICMP payload. The value in the IPv6 header’s Length field is used to update this counter. 4419 */ 4420 #define ENET_RXIPV6_NOPAY_OCTETS_BYTECNT_MASK (0xFFFFFFFFUL) 4421 #define ENET_RXIPV6_NOPAY_OCTETS_BYTECNT_SHIFT (0U) 4422 #define ENET_RXIPV6_NOPAY_OCTETS_BYTECNT_SET(x) (((uint32_t)(x) << ENET_RXIPV6_NOPAY_OCTETS_BYTECNT_SHIFT) & ENET_RXIPV6_NOPAY_OCTETS_BYTECNT_MASK) 4423 #define ENET_RXIPV6_NOPAY_OCTETS_BYTECNT_GET(x) (((uint32_t)(x) & ENET_RXIPV6_NOPAY_OCTETS_BYTECNT_MASK) >> ENET_RXIPV6_NOPAY_OCTETS_BYTECNT_SHIFT) 4424 4425 /* Bitfield definition for register: RXUDP_GD_OCTETS */ 4426 /* 4427 * BYTECNT (RW) 4428 * 4429 * Number of bytes received in a good UDP segment. This counter (and the counters below) does not count IP header bytes. 4430 */ 4431 #define ENET_RXUDP_GD_OCTETS_BYTECNT_MASK (0xFFFFFFFFUL) 4432 #define ENET_RXUDP_GD_OCTETS_BYTECNT_SHIFT (0U) 4433 #define ENET_RXUDP_GD_OCTETS_BYTECNT_SET(x) (((uint32_t)(x) << ENET_RXUDP_GD_OCTETS_BYTECNT_SHIFT) & ENET_RXUDP_GD_OCTETS_BYTECNT_MASK) 4434 #define ENET_RXUDP_GD_OCTETS_BYTECNT_GET(x) (((uint32_t)(x) & ENET_RXUDP_GD_OCTETS_BYTECNT_MASK) >> ENET_RXUDP_GD_OCTETS_BYTECNT_SHIFT) 4435 4436 /* Bitfield definition for register: RXUDP_ERR_OCTETS */ 4437 /* 4438 * BYTECNT (RW) 4439 * 4440 * Number of bytes received in a UDP segment that had checksum errors 4441 */ 4442 #define ENET_RXUDP_ERR_OCTETS_BYTECNT_MASK (0xFFFFFFFFUL) 4443 #define ENET_RXUDP_ERR_OCTETS_BYTECNT_SHIFT (0U) 4444 #define ENET_RXUDP_ERR_OCTETS_BYTECNT_SET(x) (((uint32_t)(x) << ENET_RXUDP_ERR_OCTETS_BYTECNT_SHIFT) & ENET_RXUDP_ERR_OCTETS_BYTECNT_MASK) 4445 #define ENET_RXUDP_ERR_OCTETS_BYTECNT_GET(x) (((uint32_t)(x) & ENET_RXUDP_ERR_OCTETS_BYTECNT_MASK) >> ENET_RXUDP_ERR_OCTETS_BYTECNT_SHIFT) 4446 4447 /* Bitfield definition for register: RXTCP_GD_OCTETS */ 4448 /* 4449 * BYTECNT (RW) 4450 * 4451 * Number of bytes received in a good TCP segment 4452 */ 4453 #define ENET_RXTCP_GD_OCTETS_BYTECNT_MASK (0xFFFFFFFFUL) 4454 #define ENET_RXTCP_GD_OCTETS_BYTECNT_SHIFT (0U) 4455 #define ENET_RXTCP_GD_OCTETS_BYTECNT_SET(x) (((uint32_t)(x) << ENET_RXTCP_GD_OCTETS_BYTECNT_SHIFT) & ENET_RXTCP_GD_OCTETS_BYTECNT_MASK) 4456 #define ENET_RXTCP_GD_OCTETS_BYTECNT_GET(x) (((uint32_t)(x) & ENET_RXTCP_GD_OCTETS_BYTECNT_MASK) >> ENET_RXTCP_GD_OCTETS_BYTECNT_SHIFT) 4457 4458 /* Bitfield definition for register: RXTCP_ERR_OCTETS */ 4459 /* 4460 * BYTECNT (RW) 4461 * 4462 * Number of bytes received in a TCP segment with checksum errors 4463 */ 4464 #define ENET_RXTCP_ERR_OCTETS_BYTECNT_MASK (0xFFFFFFFFUL) 4465 #define ENET_RXTCP_ERR_OCTETS_BYTECNT_SHIFT (0U) 4466 #define ENET_RXTCP_ERR_OCTETS_BYTECNT_SET(x) (((uint32_t)(x) << ENET_RXTCP_ERR_OCTETS_BYTECNT_SHIFT) & ENET_RXTCP_ERR_OCTETS_BYTECNT_MASK) 4467 #define ENET_RXTCP_ERR_OCTETS_BYTECNT_GET(x) (((uint32_t)(x) & ENET_RXTCP_ERR_OCTETS_BYTECNT_MASK) >> ENET_RXTCP_ERR_OCTETS_BYTECNT_SHIFT) 4468 4469 /* Bitfield definition for register: RXICMP_GD_OCTETS */ 4470 /* 4471 * BYTECNT (RW) 4472 * 4473 * Number of bytes received in a good ICMP segment 4474 */ 4475 #define ENET_RXICMP_GD_OCTETS_BYTECNT_MASK (0xFFFFFFFFUL) 4476 #define ENET_RXICMP_GD_OCTETS_BYTECNT_SHIFT (0U) 4477 #define ENET_RXICMP_GD_OCTETS_BYTECNT_SET(x) (((uint32_t)(x) << ENET_RXICMP_GD_OCTETS_BYTECNT_SHIFT) & ENET_RXICMP_GD_OCTETS_BYTECNT_MASK) 4478 #define ENET_RXICMP_GD_OCTETS_BYTECNT_GET(x) (((uint32_t)(x) & ENET_RXICMP_GD_OCTETS_BYTECNT_MASK) >> ENET_RXICMP_GD_OCTETS_BYTECNT_SHIFT) 4479 4480 /* Bitfield definition for register of struct array L3_L4_CFG: L3_L4_CTRL */ 4481 /* 4482 * L4DPIM0 (RW) 4483 * 4484 * Layer 4 Destination Port Inverse Match Enable 4485 * When set, this bit indicates that the Layer 4 Destination Port number field is enabled for inverse matching. When reset, this bit indicates that the Layer 4 Destination Port number field is enabled for perfect matching. This bit is valid and applicable only when Bit 20 (L4DPM0) is set high. 4486 */ 4487 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4DPIM0_MASK (0x200000UL) 4488 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4DPIM0_SHIFT (21U) 4489 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4DPIM0_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L3_L4_CTRL_L4DPIM0_SHIFT) & ENET_L3_L4_CFG_L3_L4_CTRL_L4DPIM0_MASK) 4490 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4DPIM0_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L3_L4_CTRL_L4DPIM0_MASK) >> ENET_L3_L4_CFG_L3_L4_CTRL_L4DPIM0_SHIFT) 4491 4492 /* 4493 * L4DPM0 (RW) 4494 * 4495 * Layer 4 Destination Port Match Enable 4496 * When set, this bit indicates that the Layer 4 Destination Port number field is enabled for matching. When reset, the MAC ignores the Layer 4 Destination Port number field for matching. 4497 */ 4498 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4DPM0_MASK (0x100000UL) 4499 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4DPM0_SHIFT (20U) 4500 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4DPM0_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L3_L4_CTRL_L4DPM0_SHIFT) & ENET_L3_L4_CFG_L3_L4_CTRL_L4DPM0_MASK) 4501 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4DPM0_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L3_L4_CTRL_L4DPM0_MASK) >> ENET_L3_L4_CFG_L3_L4_CTRL_L4DPM0_SHIFT) 4502 4503 /* 4504 * L4SPIM0 (RW) 4505 * 4506 * Layer 4 Source Port Inverse Match Enable 4507 * When set, this bit indicates that the Layer 4 Source Port number field is enabled for inverse matching. When reset, this bit indicates that the Layer 4 Source Port number field is enabled for perfect matching. This bit is valid and applicable only when Bit 18 (L4SPM0) is set high. 4508 */ 4509 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4SPIM0_MASK (0x80000UL) 4510 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4SPIM0_SHIFT (19U) 4511 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4SPIM0_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L3_L4_CTRL_L4SPIM0_SHIFT) & ENET_L3_L4_CFG_L3_L4_CTRL_L4SPIM0_MASK) 4512 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4SPIM0_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L3_L4_CTRL_L4SPIM0_MASK) >> ENET_L3_L4_CFG_L3_L4_CTRL_L4SPIM0_SHIFT) 4513 4514 /* 4515 * L4SPM0 (RW) 4516 * 4517 * Layer 4 Source Port Match Enable 4518 * When set, this bit indicates that the Layer 4 Source Port number field is enabled for matching. When reset, the MAC ignores the Layer 4 Source Port number field for matching. 4519 */ 4520 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4SPM0_MASK (0x40000UL) 4521 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4SPM0_SHIFT (18U) 4522 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4SPM0_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L3_L4_CTRL_L4SPM0_SHIFT) & ENET_L3_L4_CFG_L3_L4_CTRL_L4SPM0_MASK) 4523 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4SPM0_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L3_L4_CTRL_L4SPM0_MASK) >> ENET_L3_L4_CFG_L3_L4_CTRL_L4SPM0_SHIFT) 4524 4525 /* 4526 * L4PEN0 (RW) 4527 * 4528 * Layer 4 Protocol Enable 4529 * When set, this bit indicates that the Source and Destination Port number fields for UDP frames are used for matching. When reset, this bit indicates that the Source and Destination Port number fields for TCP frames are used for matching. The Layer 4 matching is done only when either L4SPM0 or L4DPM0 bit is set high. 4530 */ 4531 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4PEN0_MASK (0x10000UL) 4532 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4PEN0_SHIFT (16U) 4533 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4PEN0_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L3_L4_CTRL_L4PEN0_SHIFT) & ENET_L3_L4_CFG_L3_L4_CTRL_L4PEN0_MASK) 4534 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4PEN0_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L3_L4_CTRL_L4PEN0_MASK) >> ENET_L3_L4_CFG_L3_L4_CTRL_L4PEN0_SHIFT) 4535 4536 /* 4537 * L3HDBM0 (RW) 4538 * 4539 * Layer 3 IP DA Higher Bits Match 4540 * IPv4 Frames: This field contains the number of higher bits of IP Destination Address that are matched in the IPv4 frames. The following list describes the values of this field: 4541 * - 0: No bits are masked. 4542 * - 1: LSb[0] is masked. 4543 * - 2: Two LSbs [1:0] are masked. - ... 4544 * - 31: All bits except MSb are masked. IPv6 Frames: Bits [12:11] of this field correspond to Bits [6:5] of L3HSBM0, which indicate the number of lower bits of IP Source or Destination Address that are masked in the IPv6 frames. The following list describes the concatenated values of the L3HDBM0[1:0] and L3HSBM0 bits: 4545 * - 0: No bits are masked. 4546 * - 1: LSb[0] is masked. 4547 * - 2: Two LSbs [1:0] are masked. - … 4548 * - 127: All bits except MSb are masked. This field is valid and applicable only if L3DAM0 or L3SAM0 is set high. 4549 */ 4550 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3HDBM0_MASK (0xF800U) 4551 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3HDBM0_SHIFT (11U) 4552 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3HDBM0_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L3_L4_CTRL_L3HDBM0_SHIFT) & ENET_L3_L4_CFG_L3_L4_CTRL_L3HDBM0_MASK) 4553 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3HDBM0_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L3_L4_CTRL_L3HDBM0_MASK) >> ENET_L3_L4_CFG_L3_L4_CTRL_L3HDBM0_SHIFT) 4554 4555 /* 4556 * L3HSBM0 (RW) 4557 * 4558 * Layer 3 IP SA Higher Bits Match 4559 * IPv4 Frames: This field contains the number of lower bits of IP Source Address that are masked for matching in the IPv4 frames. The following list describes the values of this field: 4560 * - 0: No bits are masked. 4561 * - 1: LSb[0] is masked. 4562 * - 2: Two LSbs [1:0] are masked. - ... 4563 * - 31: All bits except MSb are masked. IPv6 Frames: This field contains Bits [4:0] of the field that indicates the number of higher bits of IP Source or Destination Address matched in the IPv6 frames. This field is valid and applicable only if L3DAM0 or L3SAM0 is set high. 4564 */ 4565 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3HSBM0_MASK (0x7C0U) 4566 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3HSBM0_SHIFT (6U) 4567 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3HSBM0_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L3_L4_CTRL_L3HSBM0_SHIFT) & ENET_L3_L4_CFG_L3_L4_CTRL_L3HSBM0_MASK) 4568 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3HSBM0_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L3_L4_CTRL_L3HSBM0_MASK) >> ENET_L3_L4_CFG_L3_L4_CTRL_L3HSBM0_SHIFT) 4569 4570 /* 4571 * L3DAIM0 (RW) 4572 * 4573 * Layer 3 IP DA Inverse Match Enable 4574 * When set, this bit indicates that the Layer 3 IP Destination Address field is enabled for inverse matching. When reset, this bit indicates that the Layer 3 IP Destination Address field is enabled for perfect matching. This bit is valid and applicable only when Bit 4 (L3DAM0) is set high. 4575 */ 4576 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3DAIM0_MASK (0x20U) 4577 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3DAIM0_SHIFT (5U) 4578 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3DAIM0_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L3_L4_CTRL_L3DAIM0_SHIFT) & ENET_L3_L4_CFG_L3_L4_CTRL_L3DAIM0_MASK) 4579 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3DAIM0_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L3_L4_CTRL_L3DAIM0_MASK) >> ENET_L3_L4_CFG_L3_L4_CTRL_L3DAIM0_SHIFT) 4580 4581 /* 4582 * L3DAM0 (RW) 4583 * 4584 * Layer 3 IP DA Match Enable 4585 * When set, this bit indicates that Layer 3 IP Destination Address field is enabled for matching. When reset, the MAC ignores the Layer 3 IP Destination Address field for matching. Note: When Bit 0 (L3PEN0) is set, you should set either this bit or Bit 2 (L3SAM0) because either IPv6 DA or SA can be checked for filtering. 4586 */ 4587 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3DAM0_MASK (0x10U) 4588 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3DAM0_SHIFT (4U) 4589 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3DAM0_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L3_L4_CTRL_L3DAM0_SHIFT) & ENET_L3_L4_CFG_L3_L4_CTRL_L3DAM0_MASK) 4590 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3DAM0_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L3_L4_CTRL_L3DAM0_MASK) >> ENET_L3_L4_CFG_L3_L4_CTRL_L3DAM0_SHIFT) 4591 4592 /* 4593 * L3SAIM0 (RW) 4594 * 4595 * Layer 3 IP SA Inverse Match Enable 4596 * When set, this bit indicates that the Layer 3 IP Source Address field is enabled for inverse matching. When reset, this bit indicates that the Layer 3 IP Source Address field is enabled for perfect matching. This bit is valid and applicable only when Bit 2 (L3SAM0) is set high. 4597 */ 4598 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3SAIM0_MASK (0x8U) 4599 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3SAIM0_SHIFT (3U) 4600 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3SAIM0_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L3_L4_CTRL_L3SAIM0_SHIFT) & ENET_L3_L4_CFG_L3_L4_CTRL_L3SAIM0_MASK) 4601 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3SAIM0_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L3_L4_CTRL_L3SAIM0_MASK) >> ENET_L3_L4_CFG_L3_L4_CTRL_L3SAIM0_SHIFT) 4602 4603 /* 4604 * L3SAM0 (RW) 4605 * 4606 * Layer 3 IP SA Match Enable 4607 * When set, this bit indicates that the Layer 3 IP Source Address field is enabled for matching. When reset, the MAC ignores the Layer 3 IP Source Address field for matching. 4608 */ 4609 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3SAM0_MASK (0x4U) 4610 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3SAM0_SHIFT (2U) 4611 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3SAM0_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L3_L4_CTRL_L3SAM0_SHIFT) & ENET_L3_L4_CFG_L3_L4_CTRL_L3SAM0_MASK) 4612 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3SAM0_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L3_L4_CTRL_L3SAM0_MASK) >> ENET_L3_L4_CFG_L3_L4_CTRL_L3SAM0_SHIFT) 4613 4614 /* 4615 * L3PEN0 (RW) 4616 * 4617 * Layer 3 Protocol Enable 4618 * When set, this bit indicates that the Layer 3 IP Source or Destination Address matching is enabled for the IPv6 frames. When reset, this bit indicates that the Layer 3 IP Source or Destination Address matching is enabled for the IPv4 frames. The Layer 3 matching is done only when either L3SAM0 or L3DAM0 bit is set high. 4619 */ 4620 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3PEN0_MASK (0x1U) 4621 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3PEN0_SHIFT (0U) 4622 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3PEN0_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L3_L4_CTRL_L3PEN0_SHIFT) & ENET_L3_L4_CFG_L3_L4_CTRL_L3PEN0_MASK) 4623 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3PEN0_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L3_L4_CTRL_L3PEN0_MASK) >> ENET_L3_L4_CFG_L3_L4_CTRL_L3PEN0_SHIFT) 4624 4625 /* Bitfield definition for register of struct array L3_L4_CFG: L4_ADDR */ 4626 /* 4627 * L4DP0 (RW) 4628 * 4629 * Layer 4 Destination Port Number Field 4630 * When Bit 16 (L4PEN0) is reset and Bit 20 (L4DPM0) is set in Register 256 (Layer 3 and Layer 4 Control Register 0), this field contains the value to be matched with the TCP Destination Port Number field in the IPv4 or IPv6 frames. When Bit 16 (L4PEN0) and Bit 20 (L4DPM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0), this field contains the value to be matched with the UDP Destination Port Number field in the IPv4 or IPv6 frames. 4631 */ 4632 #define ENET_L3_L4_CFG_L4_ADDR_L4DP0_MASK (0xFFFF0000UL) 4633 #define ENET_L3_L4_CFG_L4_ADDR_L4DP0_SHIFT (16U) 4634 #define ENET_L3_L4_CFG_L4_ADDR_L4DP0_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L4_ADDR_L4DP0_SHIFT) & ENET_L3_L4_CFG_L4_ADDR_L4DP0_MASK) 4635 #define ENET_L3_L4_CFG_L4_ADDR_L4DP0_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L4_ADDR_L4DP0_MASK) >> ENET_L3_L4_CFG_L4_ADDR_L4DP0_SHIFT) 4636 4637 /* 4638 * L4SP0 (RW) 4639 * 4640 * Layer 4 Source Port Number Field 4641 * When Bit 16 (L4PEN0) is reset and Bit 20 (L4DPM0) is set in Register 256 (Layer 3 and Layer 4 Control Register 0), this field contains the value to be matched with the TCP Source Port Number field in the IPv4 or IPv6 frames. When Bit 16 (L4PEN0) and Bit 20 (L4DPM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0), this field contains the value to be matched with the UDP Source Port Number field in the IPv4 or IPv6 frames. 4642 */ 4643 #define ENET_L3_L4_CFG_L4_ADDR_L4SP0_MASK (0xFFFFU) 4644 #define ENET_L3_L4_CFG_L4_ADDR_L4SP0_SHIFT (0U) 4645 #define ENET_L3_L4_CFG_L4_ADDR_L4SP0_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L4_ADDR_L4SP0_SHIFT) & ENET_L3_L4_CFG_L4_ADDR_L4SP0_MASK) 4646 #define ENET_L3_L4_CFG_L4_ADDR_L4SP0_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L4_ADDR_L4SP0_MASK) >> ENET_L3_L4_CFG_L4_ADDR_L4SP0_SHIFT) 4647 4648 /* Bitfield definition for register of struct array L3_L4_CFG: L3_ADDR_0 */ 4649 /* 4650 * L3A00 (RW) 4651 * 4652 * Layer 3 Address 0 Field 4653 * When Bit 0 (L3PEN0) and Bit 2 (L3SAM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0), this field contains the value to be matched with Bits [31:0] of the IP Source Address field in the IPv6 frames. When Bit 0 (L3PEN0) and Bit 4 (L3DAM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0), this field contains the value to be matched with Bits [31:0] of the IP Destination Address field in the IPv6 frames. When Bit 0 (L3PEN0) is reset and Bit 2 (L3SAM0) is set in Register 256 (Layer 3 and Layer 4 Control Register 0), this field contains the value to be matched with the IP Source Address field in the IPv4 frames. 4654 */ 4655 #define ENET_L3_L4_CFG_L3_ADDR_0_L3A00_MASK (0xFFFFFFFFUL) 4656 #define ENET_L3_L4_CFG_L3_ADDR_0_L3A00_SHIFT (0U) 4657 #define ENET_L3_L4_CFG_L3_ADDR_0_L3A00_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L3_ADDR_0_L3A00_SHIFT) & ENET_L3_L4_CFG_L3_ADDR_0_L3A00_MASK) 4658 #define ENET_L3_L4_CFG_L3_ADDR_0_L3A00_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L3_ADDR_0_L3A00_MASK) >> ENET_L3_L4_CFG_L3_ADDR_0_L3A00_SHIFT) 4659 4660 /* Bitfield definition for register of struct array L3_L4_CFG: L3_ADDR_1 */ 4661 /* 4662 * L3A10 (RW) 4663 * 4664 * Layer 3 Address 1 Field 4665 * When Bit 0 (L3PEN0) and Bit 2 (L3SAM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0), this field contains the value to be matched with Bits [63:32] of the IP Source Address field in the IPv6 frames. When Bit 0 (L3PEN0) and Bit 4 (L3DAM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0), this field contains the value to be matched with Bits [63:32] of the IP Destination Address field in the IPv6 frames. When Bit 0 (L3PEN0) is reset and Bit 4 (L3DAM0) is set in Register 256 (Layer 3 and Layer 4 Control Register 0), this field contains the value to be matched with the IP Destination Address field in the IPv4 frames. 4666 */ 4667 #define ENET_L3_L4_CFG_L3_ADDR_1_L3A10_MASK (0xFFFFFFFFUL) 4668 #define ENET_L3_L4_CFG_L3_ADDR_1_L3A10_SHIFT (0U) 4669 #define ENET_L3_L4_CFG_L3_ADDR_1_L3A10_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L3_ADDR_1_L3A10_SHIFT) & ENET_L3_L4_CFG_L3_ADDR_1_L3A10_MASK) 4670 #define ENET_L3_L4_CFG_L3_ADDR_1_L3A10_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L3_ADDR_1_L3A10_MASK) >> ENET_L3_L4_CFG_L3_ADDR_1_L3A10_SHIFT) 4671 4672 /* Bitfield definition for register of struct array L3_L4_CFG: L3_ADDR_2 */ 4673 /* 4674 * L3A20 (RW) 4675 * 4676 * Layer 3 Address 2 Field 4677 * When Bit 0 (L3PEN0) and Bit 2 (L3SAM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0), this field contains the value to be matched with Bits [95:64] of the IP Source Address field in the IPv6 frames. When Bit 0 (L3PEN0) and Bit 4 (L3DAM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0), this field contains value to be matched with Bits [95:64] of the IP Destination Address field in the IPv6 frames. When Bit 0 (L3PEN0) is reset in Register 256 (Layer 3 and Layer 4 Control Register 0), this register is not used. 4678 */ 4679 #define ENET_L3_L4_CFG_L3_ADDR_2_L3A20_MASK (0xFFFFFFFFUL) 4680 #define ENET_L3_L4_CFG_L3_ADDR_2_L3A20_SHIFT (0U) 4681 #define ENET_L3_L4_CFG_L3_ADDR_2_L3A20_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L3_ADDR_2_L3A20_SHIFT) & ENET_L3_L4_CFG_L3_ADDR_2_L3A20_MASK) 4682 #define ENET_L3_L4_CFG_L3_ADDR_2_L3A20_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L3_ADDR_2_L3A20_MASK) >> ENET_L3_L4_CFG_L3_ADDR_2_L3A20_SHIFT) 4683 4684 /* Bitfield definition for register of struct array L3_L4_CFG: L3_ADDR_3 */ 4685 /* 4686 * L3A30 (RW) 4687 * 4688 * Layer 3 Address 3 Field When Bit 0 (L3PEN0) and Bit 2 (L3SAM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0), this field contains the value to be matched with Bits [127:96] of the IP Source Address field in the IPv6 frames. When Bit 0 (L3PEN0) and Bit 4 (L3DAM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0), this field contains the value to be matched with Bits [127:96] of the IP Destination Address field in the IPv6 frames. When Bit 0 (L3PEN0) is reset in Register 256 (Layer 3 and Layer 4 Control Register 0), this register is not used. 4689 */ 4690 #define ENET_L3_L4_CFG_L3_ADDR_3_L3A30_MASK (0xFFFFFFFFUL) 4691 #define ENET_L3_L4_CFG_L3_ADDR_3_L3A30_SHIFT (0U) 4692 #define ENET_L3_L4_CFG_L3_ADDR_3_L3A30_SET(x) (((uint32_t)(x) << ENET_L3_L4_CFG_L3_ADDR_3_L3A30_SHIFT) & ENET_L3_L4_CFG_L3_ADDR_3_L3A30_MASK) 4693 #define ENET_L3_L4_CFG_L3_ADDR_3_L3A30_GET(x) (((uint32_t)(x) & ENET_L3_L4_CFG_L3_ADDR_3_L3A30_MASK) >> ENET_L3_L4_CFG_L3_ADDR_3_L3A30_SHIFT) 4694 4695 /* Bitfield definition for register array: HASH_TABLE */ 4696 /* 4697 * HT31T0 (RW) 4698 * 4699 * First 32 bits of Hash Table 4700 * This field contains the first 32 Bits (31:0) of the Hash table. 4701 */ 4702 #define ENET_HASH_TABLE_HT31T0_MASK (0xFFFFFFFFUL) 4703 #define ENET_HASH_TABLE_HT31T0_SHIFT (0U) 4704 #define ENET_HASH_TABLE_HT31T0_SET(x) (((uint32_t)(x) << ENET_HASH_TABLE_HT31T0_SHIFT) & ENET_HASH_TABLE_HT31T0_MASK) 4705 #define ENET_HASH_TABLE_HT31T0_GET(x) (((uint32_t)(x) & ENET_HASH_TABLE_HT31T0_MASK) >> ENET_HASH_TABLE_HT31T0_SHIFT) 4706 4707 /* Bitfield definition for register: VLAN_TAG_INC_RPL */ 4708 /* 4709 * CSVL (RW) 4710 * 4711 * C-VLAN or S-VLAN 4712 * When this bit is set, S-VLAN type (0x88A8) is inserted or replaced in the 13th and 14th bytes of transmitted frames. When this bit is reset, C-VLAN type (0x8100) is inserted or replaced in the transmitted frames. 4713 */ 4714 #define ENET_VLAN_TAG_INC_RPL_CSVL_MASK (0x80000UL) 4715 #define ENET_VLAN_TAG_INC_RPL_CSVL_SHIFT (19U) 4716 #define ENET_VLAN_TAG_INC_RPL_CSVL_SET(x) (((uint32_t)(x) << ENET_VLAN_TAG_INC_RPL_CSVL_SHIFT) & ENET_VLAN_TAG_INC_RPL_CSVL_MASK) 4717 #define ENET_VLAN_TAG_INC_RPL_CSVL_GET(x) (((uint32_t)(x) & ENET_VLAN_TAG_INC_RPL_CSVL_MASK) >> ENET_VLAN_TAG_INC_RPL_CSVL_SHIFT) 4718 4719 /* 4720 * VLP (RW) 4721 * 4722 * VLAN Priority Control 4723 * When this bit is set, the control Bits [17:16] are used for VLAN deletion, insertion, or replacement. When this bit is reset, the mti_vlan_ctrl_i control input is used, and Bits [17:16] are ignored. 4724 */ 4725 #define ENET_VLAN_TAG_INC_RPL_VLP_MASK (0x40000UL) 4726 #define ENET_VLAN_TAG_INC_RPL_VLP_SHIFT (18U) 4727 #define ENET_VLAN_TAG_INC_RPL_VLP_SET(x) (((uint32_t)(x) << ENET_VLAN_TAG_INC_RPL_VLP_SHIFT) & ENET_VLAN_TAG_INC_RPL_VLP_MASK) 4728 #define ENET_VLAN_TAG_INC_RPL_VLP_GET(x) (((uint32_t)(x) & ENET_VLAN_TAG_INC_RPL_VLP_MASK) >> ENET_VLAN_TAG_INC_RPL_VLP_SHIFT) 4729 4730 /* 4731 * VLC (RW) 4732 * 4733 * VLAN Tag Control in Transmit Frames 4734 * - 2’b00: No VLAN tag deletion, insertion, or replacement 4735 * - 2’b01: VLAN tag deletion The MAC removes the VLAN type (bytes 13 and 14) and VLAN tag (bytes 15 and 16) of all transmitted frames with VLAN tags. 4736 * - 2’b10: VLAN tag insertion The MAC inserts VLT in bytes 15 and 16 of the frame after inserting the Type value (0x8100/0x88a8) in bytes 13 and 14. This operation is performed on all transmitted frames, irrespective of whether they already have a VLAN tag. 4737 * - 2’b11: VLAN tag replacement The MAC replaces VLT in bytes 15 and 16 of all VLAN-type transmitted frames (Bytes 13 and 14 are 0x8100/0x88a8). Note: Changes to this field take effect only on the start of a frame. If you write this register field when a frame is being transmitted, only the subsequent frame can use the updated value, that is, the current frame does not use the updated value. 4738 */ 4739 #define ENET_VLAN_TAG_INC_RPL_VLC_MASK (0x30000UL) 4740 #define ENET_VLAN_TAG_INC_RPL_VLC_SHIFT (16U) 4741 #define ENET_VLAN_TAG_INC_RPL_VLC_SET(x) (((uint32_t)(x) << ENET_VLAN_TAG_INC_RPL_VLC_SHIFT) & ENET_VLAN_TAG_INC_RPL_VLC_MASK) 4742 #define ENET_VLAN_TAG_INC_RPL_VLC_GET(x) (((uint32_t)(x) & ENET_VLAN_TAG_INC_RPL_VLC_MASK) >> ENET_VLAN_TAG_INC_RPL_VLC_SHIFT) 4743 4744 /* 4745 * VLT (RW) 4746 * 4747 * VLAN Tag for Transmit Frames 4748 * This field contains the value of the VLAN tag to be inserted or replaced. The value must only be changed when the transmit lines are inactive or during the initialization phase. Bits[15:13] are the User Priority, Bit 12 is the CFI/DEI, and Bits[11:0] are the VLAN tag’s VID field. 4749 */ 4750 #define ENET_VLAN_TAG_INC_RPL_VLT_MASK (0xFFFFU) 4751 #define ENET_VLAN_TAG_INC_RPL_VLT_SHIFT (0U) 4752 #define ENET_VLAN_TAG_INC_RPL_VLT_SET(x) (((uint32_t)(x) << ENET_VLAN_TAG_INC_RPL_VLT_SHIFT) & ENET_VLAN_TAG_INC_RPL_VLT_MASK) 4753 #define ENET_VLAN_TAG_INC_RPL_VLT_GET(x) (((uint32_t)(x) & ENET_VLAN_TAG_INC_RPL_VLT_MASK) >> ENET_VLAN_TAG_INC_RPL_VLT_SHIFT) 4754 4755 /* Bitfield definition for register: VLAN_HASH */ 4756 /* 4757 * VLHT (RW) 4758 * 4759 * VLAN Hash Table 4760 * This field contains the 16-bit VLAN Hash Table. 4761 */ 4762 #define ENET_VLAN_HASH_VLHT_MASK (0xFFFFU) 4763 #define ENET_VLAN_HASH_VLHT_SHIFT (0U) 4764 #define ENET_VLAN_HASH_VLHT_SET(x) (((uint32_t)(x) << ENET_VLAN_HASH_VLHT_SHIFT) & ENET_VLAN_HASH_VLHT_MASK) 4765 #define ENET_VLAN_HASH_VLHT_GET(x) (((uint32_t)(x) & ENET_VLAN_HASH_VLHT_MASK) >> ENET_VLAN_HASH_VLHT_SHIFT) 4766 4767 /* Bitfield definition for register: TS_CTRL */ 4768 /* 4769 * ATSEN3 (RW) 4770 * 4771 * Auxiliary Snapshot 3 Enable 4772 * This field controls capturing the Auxiliary Snapshot Trigger 3. When this bit is set, the Auxiliary snapshot of event on ptp_aux_trig_i[3] input is enabled. When this bit is reset, the events on this input are ignored. This bit is reserved when the Add IEEE 1588 Auxiliary Snapshot option is not selected during core configuration or the selected number in the Number of IEEE 1588 Auxiliary Snapshot Inputs option is less than four. 4773 */ 4774 #define ENET_TS_CTRL_ATSEN3_MASK (0x10000000UL) 4775 #define ENET_TS_CTRL_ATSEN3_SHIFT (28U) 4776 #define ENET_TS_CTRL_ATSEN3_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_ATSEN3_SHIFT) & ENET_TS_CTRL_ATSEN3_MASK) 4777 #define ENET_TS_CTRL_ATSEN3_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_ATSEN3_MASK) >> ENET_TS_CTRL_ATSEN3_SHIFT) 4778 4779 /* 4780 * ATSEN2 (RW) 4781 * 4782 * Auxiliary Snapshot 2 Enable 4783 * This field controls capturing the Auxiliary Snapshot Trigger 2. When this bit is set, the Auxiliary snapshot of event on ptp_aux_trig_i[2] input is enabled. When this bit is reset, the events on this input are ignored. This bit is reserved when the Add IEEE 1588 Auxiliary Snapshot option is not selected during core configuration or the selected number in the Number of IEEE 1588 Auxiliary Snapshot Inputs option is less than three. 4784 */ 4785 #define ENET_TS_CTRL_ATSEN2_MASK (0x8000000UL) 4786 #define ENET_TS_CTRL_ATSEN2_SHIFT (27U) 4787 #define ENET_TS_CTRL_ATSEN2_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_ATSEN2_SHIFT) & ENET_TS_CTRL_ATSEN2_MASK) 4788 #define ENET_TS_CTRL_ATSEN2_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_ATSEN2_MASK) >> ENET_TS_CTRL_ATSEN2_SHIFT) 4789 4790 /* 4791 * ATSEN1 (RW) 4792 * 4793 * Auxiliary Snapshot 1 Enable 4794 * This field controls capturing the Auxiliary Snapshot Trigger 1. When this bit is set, the Auxiliary snapshot of event on ptp_aux_trig_i[1] input is enabled. When this bit is reset, the events on this input are ignored. This bit is reserved when the Add IEEE 1588 Auxiliary Snapshot option is not selected during core configuration or the selected number in the Number of IEEE 1588 Auxiliary Snapshot Inputs option is less than two. 4795 */ 4796 #define ENET_TS_CTRL_ATSEN1_MASK (0x4000000UL) 4797 #define ENET_TS_CTRL_ATSEN1_SHIFT (26U) 4798 #define ENET_TS_CTRL_ATSEN1_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_ATSEN1_SHIFT) & ENET_TS_CTRL_ATSEN1_MASK) 4799 #define ENET_TS_CTRL_ATSEN1_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_ATSEN1_MASK) >> ENET_TS_CTRL_ATSEN1_SHIFT) 4800 4801 /* 4802 * ATSEN0 (RW) 4803 * 4804 * Auxiliary Snapshot 0 Enable 4805 * This field controls capturing the Auxiliary Snapshot Trigger 0. When this bit is set, the Auxiliary snapshot of event on ptp_aux_trig_i[0] input is enabled. When this bit is reset, the events on this input are ignored. 4806 */ 4807 #define ENET_TS_CTRL_ATSEN0_MASK (0x2000000UL) 4808 #define ENET_TS_CTRL_ATSEN0_SHIFT (25U) 4809 #define ENET_TS_CTRL_ATSEN0_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_ATSEN0_SHIFT) & ENET_TS_CTRL_ATSEN0_MASK) 4810 #define ENET_TS_CTRL_ATSEN0_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_ATSEN0_MASK) >> ENET_TS_CTRL_ATSEN0_SHIFT) 4811 4812 /* 4813 * ATSFC (RW) 4814 * 4815 * Auxiliary Snapshot FIFO Clear 4816 * When set, it resets the pointers of the Auxiliary Snapshot FIFO. This bit is cleared when the pointers are reset and the FIFO is empty. When this bit is high, auxiliary snapshots get stored in the FIFO. This bit is reserved when the Add IEEE 1588 Auxiliary Snapshot option is not selected during core configuration. 4817 */ 4818 #define ENET_TS_CTRL_ATSFC_MASK (0x1000000UL) 4819 #define ENET_TS_CTRL_ATSFC_SHIFT (24U) 4820 #define ENET_TS_CTRL_ATSFC_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_ATSFC_SHIFT) & ENET_TS_CTRL_ATSFC_MASK) 4821 #define ENET_TS_CTRL_ATSFC_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_ATSFC_MASK) >> ENET_TS_CTRL_ATSFC_SHIFT) 4822 4823 /* 4824 * TSENMACADDR (RW) 4825 * 4826 * Enable MAC address for PTP Frame Filtering 4827 * When set, the DA MAC address (that matches any MAC Address register) is used to filter the PTP frames when PTP is directly sent over Ethernet. 4828 */ 4829 #define ENET_TS_CTRL_TSENMACADDR_MASK (0x40000UL) 4830 #define ENET_TS_CTRL_TSENMACADDR_SHIFT (18U) 4831 #define ENET_TS_CTRL_TSENMACADDR_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSENMACADDR_SHIFT) & ENET_TS_CTRL_TSENMACADDR_MASK) 4832 #define ENET_TS_CTRL_TSENMACADDR_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSENMACADDR_MASK) >> ENET_TS_CTRL_TSENMACADDR_SHIFT) 4833 4834 /* 4835 * SNAPTYPSEL (RW) 4836 * 4837 * Select PTP packets for Taking Snapshots 4838 * These bits along with Bits 15 and 14 decide the set of PTP packet types for which snapshot needs to be taken. 4839 */ 4840 #define ENET_TS_CTRL_SNAPTYPSEL_MASK (0x30000UL) 4841 #define ENET_TS_CTRL_SNAPTYPSEL_SHIFT (16U) 4842 #define ENET_TS_CTRL_SNAPTYPSEL_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_SNAPTYPSEL_SHIFT) & ENET_TS_CTRL_SNAPTYPSEL_MASK) 4843 #define ENET_TS_CTRL_SNAPTYPSEL_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_SNAPTYPSEL_MASK) >> ENET_TS_CTRL_SNAPTYPSEL_SHIFT) 4844 4845 /* 4846 * TSMSTRENA (RW) 4847 * 4848 * Enable Snapshot for Messages Relevant to Master 4849 * When set, the snapshot is taken only for the messages relevant to the master node. Otherwise, the snapshot is taken for the messages relevant to the slave node. 4850 */ 4851 #define ENET_TS_CTRL_TSMSTRENA_MASK (0x8000U) 4852 #define ENET_TS_CTRL_TSMSTRENA_SHIFT (15U) 4853 #define ENET_TS_CTRL_TSMSTRENA_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSMSTRENA_SHIFT) & ENET_TS_CTRL_TSMSTRENA_MASK) 4854 #define ENET_TS_CTRL_TSMSTRENA_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSMSTRENA_MASK) >> ENET_TS_CTRL_TSMSTRENA_SHIFT) 4855 4856 /* 4857 * TSEVNTENA (RW) 4858 * 4859 * Enable Timestamp Snapshot for Event Messages 4860 * When set, the timestamp snapshot is taken only for event messages (SYNC, Delay_Req, Pdelay_Req, or Pdelay_Resp). When reset, the snapshot is taken for all messages except Announce, Management, and Signaling. 4861 */ 4862 #define ENET_TS_CTRL_TSEVNTENA_MASK (0x4000U) 4863 #define ENET_TS_CTRL_TSEVNTENA_SHIFT (14U) 4864 #define ENET_TS_CTRL_TSEVNTENA_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSEVNTENA_SHIFT) & ENET_TS_CTRL_TSEVNTENA_MASK) 4865 #define ENET_TS_CTRL_TSEVNTENA_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSEVNTENA_MASK) >> ENET_TS_CTRL_TSEVNTENA_SHIFT) 4866 4867 /* 4868 * TSIPV4ENA (RW) 4869 * 4870 * Enable Processing of PTP Frames Sent over IPv4-UDP 4871 * When set, the MAC receiver processes the PTP packets encapsulated in UDP over IPv4 packets. When this bit is clear, the MAC ignores the PTP transported over UDP-IPv4 packets. This bit is set by default. 4872 */ 4873 #define ENET_TS_CTRL_TSIPV4ENA_MASK (0x2000U) 4874 #define ENET_TS_CTRL_TSIPV4ENA_SHIFT (13U) 4875 #define ENET_TS_CTRL_TSIPV4ENA_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSIPV4ENA_SHIFT) & ENET_TS_CTRL_TSIPV4ENA_MASK) 4876 #define ENET_TS_CTRL_TSIPV4ENA_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSIPV4ENA_MASK) >> ENET_TS_CTRL_TSIPV4ENA_SHIFT) 4877 4878 /* 4879 * TSIPV6ENA (RW) 4880 * 4881 * Enable Processing of PTP Frames Sent over IPv6-UDP 4882 * When set, the MAC receiver processes PTP packets encapsulated in UDP over IPv6 packets. When this bit is clear, the MAC ignores the PTP transported over UDP-IPv6 packets. 4883 */ 4884 #define ENET_TS_CTRL_TSIPV6ENA_MASK (0x1000U) 4885 #define ENET_TS_CTRL_TSIPV6ENA_SHIFT (12U) 4886 #define ENET_TS_CTRL_TSIPV6ENA_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSIPV6ENA_SHIFT) & ENET_TS_CTRL_TSIPV6ENA_MASK) 4887 #define ENET_TS_CTRL_TSIPV6ENA_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSIPV6ENA_MASK) >> ENET_TS_CTRL_TSIPV6ENA_SHIFT) 4888 4889 /* 4890 * TSIPENA (RW) 4891 * 4892 * Enable Processing of PTP over Ethernet Frames 4893 * When set, the MAC receiver processes the PTP packets encapsulated directly in the Ethernet frames. When this bit is clear, the MAC ignores the PTP over Ethernet packets 4894 */ 4895 #define ENET_TS_CTRL_TSIPENA_MASK (0x800U) 4896 #define ENET_TS_CTRL_TSIPENA_SHIFT (11U) 4897 #define ENET_TS_CTRL_TSIPENA_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSIPENA_SHIFT) & ENET_TS_CTRL_TSIPENA_MASK) 4898 #define ENET_TS_CTRL_TSIPENA_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSIPENA_MASK) >> ENET_TS_CTRL_TSIPENA_SHIFT) 4899 4900 /* 4901 * TSVER2ENA (RW) 4902 * 4903 * Enable PTP packet Processing for Version 2 Format 4904 * When set, the PTP packets are processed using the 1588 version 2 format. Otherwise, the PTP packets are processed using the version 1 format. 4905 */ 4906 #define ENET_TS_CTRL_TSVER2ENA_MASK (0x400U) 4907 #define ENET_TS_CTRL_TSVER2ENA_SHIFT (10U) 4908 #define ENET_TS_CTRL_TSVER2ENA_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSVER2ENA_SHIFT) & ENET_TS_CTRL_TSVER2ENA_MASK) 4909 #define ENET_TS_CTRL_TSVER2ENA_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSVER2ENA_MASK) >> ENET_TS_CTRL_TSVER2ENA_SHIFT) 4910 4911 /* 4912 * TSCTRLSSR (RW) 4913 * 4914 * Timestamp Digital or Binary Rollover Control 4915 * When set, the Timestamp Low register rolls over after 0x3B9A_C9FF value (that is, 1 nanosecond accuracy) and increments the timestamp (High) seconds. When reset, the rollover value of sub-second register is 0x7FFF_FFFF. The sub-second increment has to be programmed correctly depending on the PTP reference clock frequency and the value of this bit. 4916 */ 4917 #define ENET_TS_CTRL_TSCTRLSSR_MASK (0x200U) 4918 #define ENET_TS_CTRL_TSCTRLSSR_SHIFT (9U) 4919 #define ENET_TS_CTRL_TSCTRLSSR_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSCTRLSSR_SHIFT) & ENET_TS_CTRL_TSCTRLSSR_MASK) 4920 #define ENET_TS_CTRL_TSCTRLSSR_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSCTRLSSR_MASK) >> ENET_TS_CTRL_TSCTRLSSR_SHIFT) 4921 4922 /* 4923 * TSENALL (RW) 4924 * 4925 * Enable Timestamp for All Frames 4926 * When set, the timestamp snapshot is enabled for all frames received by the MAC. 4927 */ 4928 #define ENET_TS_CTRL_TSENALL_MASK (0x100U) 4929 #define ENET_TS_CTRL_TSENALL_SHIFT (8U) 4930 #define ENET_TS_CTRL_TSENALL_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSENALL_SHIFT) & ENET_TS_CTRL_TSENALL_MASK) 4931 #define ENET_TS_CTRL_TSENALL_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSENALL_MASK) >> ENET_TS_CTRL_TSENALL_SHIFT) 4932 4933 /* 4934 * TSADDREG (RW) 4935 * 4936 * Addend Reg Update 4937 * When set, the content of the Timestamp Addend register is updated in the PTP block for fine correction. This is cleared when the update is completed. This register bit should be zero before setting it. 4938 */ 4939 #define ENET_TS_CTRL_TSADDREG_MASK (0x20U) 4940 #define ENET_TS_CTRL_TSADDREG_SHIFT (5U) 4941 #define ENET_TS_CTRL_TSADDREG_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSADDREG_SHIFT) & ENET_TS_CTRL_TSADDREG_MASK) 4942 #define ENET_TS_CTRL_TSADDREG_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSADDREG_MASK) >> ENET_TS_CTRL_TSADDREG_SHIFT) 4943 4944 /* 4945 * TSTRIG (RW) 4946 * 4947 * Timestamp Interrupt Trigger Enable 4948 * When set, the timestamp interrupt is generated when the System Time becomes greater than the value written in the Target Time register. This bit is reset after the generation of the Timestamp Trigger Interrupt. 4949 */ 4950 #define ENET_TS_CTRL_TSTRIG_MASK (0x10U) 4951 #define ENET_TS_CTRL_TSTRIG_SHIFT (4U) 4952 #define ENET_TS_CTRL_TSTRIG_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSTRIG_SHIFT) & ENET_TS_CTRL_TSTRIG_MASK) 4953 #define ENET_TS_CTRL_TSTRIG_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSTRIG_MASK) >> ENET_TS_CTRL_TSTRIG_SHIFT) 4954 4955 /* 4956 * TSUPDT (RW) 4957 * 4958 * Timestamp Update 4959 * When set, the system time is updated (added or subtracted) with the value specified in Register 452 (System Time – Seconds Update Register) and Register 453 (System Time – Nanoseconds Update Register). This bit should be read zero before updating it. This bit is reset when the update is completed in hardware. The “Timestamp Higher Word” register (if enabled during core configuration) is not updated. 4960 */ 4961 #define ENET_TS_CTRL_TSUPDT_MASK (0x8U) 4962 #define ENET_TS_CTRL_TSUPDT_SHIFT (3U) 4963 #define ENET_TS_CTRL_TSUPDT_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSUPDT_SHIFT) & ENET_TS_CTRL_TSUPDT_MASK) 4964 #define ENET_TS_CTRL_TSUPDT_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSUPDT_MASK) >> ENET_TS_CTRL_TSUPDT_SHIFT) 4965 4966 /* 4967 * TSINIT (RW) 4968 * 4969 * Timestamp Initialize 4970 * When set, the system time is initialized (overwritten) with the value specified in the Register 452 (System Time – Seconds Update Register) and Register 453 (System Time – Nanoseconds Update Register). This bit should be read zero before updating it. This bit is reset when the initialization is complete. The “Timestamp Higher Word” register (if enabled during core configuration) can only be initialized. 4971 */ 4972 #define ENET_TS_CTRL_TSINIT_MASK (0x4U) 4973 #define ENET_TS_CTRL_TSINIT_SHIFT (2U) 4974 #define ENET_TS_CTRL_TSINIT_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSINIT_SHIFT) & ENET_TS_CTRL_TSINIT_MASK) 4975 #define ENET_TS_CTRL_TSINIT_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSINIT_MASK) >> ENET_TS_CTRL_TSINIT_SHIFT) 4976 4977 /* 4978 * TSCFUPDT (RW) 4979 * 4980 * Timestamp Fine or Coarse Update 4981 * When set, this bit indicates that the system times update should be done using the fine update method. When reset, it indicates the system timestamp update should be done using the Coarse method. 4982 */ 4983 #define ENET_TS_CTRL_TSCFUPDT_MASK (0x2U) 4984 #define ENET_TS_CTRL_TSCFUPDT_SHIFT (1U) 4985 #define ENET_TS_CTRL_TSCFUPDT_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSCFUPDT_SHIFT) & ENET_TS_CTRL_TSCFUPDT_MASK) 4986 #define ENET_TS_CTRL_TSCFUPDT_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSCFUPDT_MASK) >> ENET_TS_CTRL_TSCFUPDT_SHIFT) 4987 4988 /* 4989 * TSENA (RW) 4990 * 4991 * Timestamp Enable 4992 * When set, the timestamp is added for the transmit and receive frames. When disabled, timestamp is not added for the transmit and receive frames and the Timestamp Generator is also suspended. You need to initialize the Timestamp (system time) after enabling this mode. On the receive side, the MAC processes the 1588 frames only if this bit is set. 4993 */ 4994 #define ENET_TS_CTRL_TSENA_MASK (0x1U) 4995 #define ENET_TS_CTRL_TSENA_SHIFT (0U) 4996 #define ENET_TS_CTRL_TSENA_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSENA_SHIFT) & ENET_TS_CTRL_TSENA_MASK) 4997 #define ENET_TS_CTRL_TSENA_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSENA_MASK) >> ENET_TS_CTRL_TSENA_SHIFT) 4998 4999 /* Bitfield definition for register: SUB_SEC_INCR */ 5000 /* 5001 * SSINC (RW) 5002 * 5003 * Sub-second Increment Value 5004 * The value programmed in this field is accumulated every clock cycle (of clk_ptp_i) with the contents of the sub-second register. For example, when PTP clock is 50 MHz (period is 20 ns), you should program 20 (0x14) when the System Time- Nanoseconds register has an accuracy of 1 ns [Bit 9 (TSCTRLSSR) is set in Register 448 (Timestamp Control Register)]. When TSCTRLSSR is clear, the Nanoseconds register has a resolution of ~0.465ns. In this case, you should program a value of 43 (0x2B) that is derived by 20ns/0.465. 5005 */ 5006 #define ENET_SUB_SEC_INCR_SSINC_MASK (0xFFU) 5007 #define ENET_SUB_SEC_INCR_SSINC_SHIFT (0U) 5008 #define ENET_SUB_SEC_INCR_SSINC_SET(x) (((uint32_t)(x) << ENET_SUB_SEC_INCR_SSINC_SHIFT) & ENET_SUB_SEC_INCR_SSINC_MASK) 5009 #define ENET_SUB_SEC_INCR_SSINC_GET(x) (((uint32_t)(x) & ENET_SUB_SEC_INCR_SSINC_MASK) >> ENET_SUB_SEC_INCR_SSINC_SHIFT) 5010 5011 /* Bitfield definition for register: SYST_SEC */ 5012 /* 5013 * TSS (RO) 5014 * 5015 * Timestamp Second 5016 * The value in this field indicates the current value in seconds of the System Time maintained by the MAC. 5017 */ 5018 #define ENET_SYST_SEC_TSS_MASK (0xFFFFFFFFUL) 5019 #define ENET_SYST_SEC_TSS_SHIFT (0U) 5020 #define ENET_SYST_SEC_TSS_GET(x) (((uint32_t)(x) & ENET_SYST_SEC_TSS_MASK) >> ENET_SYST_SEC_TSS_SHIFT) 5021 5022 /* Bitfield definition for register: SYST_NSEC */ 5023 /* 5024 * TSSS (RO) 5025 * 5026 * Timestamp Sub Seconds 5027 * The value in this field has the sub second representation of time, with an accuracy of 0.46 ns. When Bit 9 (TSCTRLSSR) is set in Register 448 (Timestamp Control Register), each bit represents 1 ns and the maximum value is 0x3B9A_C9FF, after which it rolls-over to zero. 5028 */ 5029 #define ENET_SYST_NSEC_TSSS_MASK (0x7FFFFFFFUL) 5030 #define ENET_SYST_NSEC_TSSS_SHIFT (0U) 5031 #define ENET_SYST_NSEC_TSSS_GET(x) (((uint32_t)(x) & ENET_SYST_NSEC_TSSS_MASK) >> ENET_SYST_NSEC_TSSS_SHIFT) 5032 5033 /* Bitfield definition for register: SYST_SEC_UPD */ 5034 /* 5035 * TSS (RW) 5036 * 5037 * Timestamp Second 5038 * The value in this field indicates the time in seconds to be initialized or added to the system time. 5039 */ 5040 #define ENET_SYST_SEC_UPD_TSS_MASK (0xFFFFFFFFUL) 5041 #define ENET_SYST_SEC_UPD_TSS_SHIFT (0U) 5042 #define ENET_SYST_SEC_UPD_TSS_SET(x) (((uint32_t)(x) << ENET_SYST_SEC_UPD_TSS_SHIFT) & ENET_SYST_SEC_UPD_TSS_MASK) 5043 #define ENET_SYST_SEC_UPD_TSS_GET(x) (((uint32_t)(x) & ENET_SYST_SEC_UPD_TSS_MASK) >> ENET_SYST_SEC_UPD_TSS_SHIFT) 5044 5045 /* Bitfield definition for register: SYST_NSEC_UPD */ 5046 /* 5047 * ADDSUB (RW) 5048 * 5049 * Add or Subtract Time 5050 * When this bit is set, the time value is subtracted with the contents of the update register. When this bit is reset, the time value is added with the contents of the update register. 5051 */ 5052 #define ENET_SYST_NSEC_UPD_ADDSUB_MASK (0x80000000UL) 5053 #define ENET_SYST_NSEC_UPD_ADDSUB_SHIFT (31U) 5054 #define ENET_SYST_NSEC_UPD_ADDSUB_SET(x) (((uint32_t)(x) << ENET_SYST_NSEC_UPD_ADDSUB_SHIFT) & ENET_SYST_NSEC_UPD_ADDSUB_MASK) 5055 #define ENET_SYST_NSEC_UPD_ADDSUB_GET(x) (((uint32_t)(x) & ENET_SYST_NSEC_UPD_ADDSUB_MASK) >> ENET_SYST_NSEC_UPD_ADDSUB_SHIFT) 5056 5057 /* 5058 * TSSS (RW) 5059 * 5060 * Timestamp Sub Seconds 5061 * The value in this field has the sub second representation of time, with an accuracy of 0.46 ns. When Bit 9 (TSCTRLSSR) is set in Register 448 (Timestamp Control Register), each bit represents 1 ns and the programmed value should not exceed 0x3B9A_C9FF. 5062 */ 5063 #define ENET_SYST_NSEC_UPD_TSSS_MASK (0x7FFFFFFFUL) 5064 #define ENET_SYST_NSEC_UPD_TSSS_SHIFT (0U) 5065 #define ENET_SYST_NSEC_UPD_TSSS_SET(x) (((uint32_t)(x) << ENET_SYST_NSEC_UPD_TSSS_SHIFT) & ENET_SYST_NSEC_UPD_TSSS_MASK) 5066 #define ENET_SYST_NSEC_UPD_TSSS_GET(x) (((uint32_t)(x) & ENET_SYST_NSEC_UPD_TSSS_MASK) >> ENET_SYST_NSEC_UPD_TSSS_SHIFT) 5067 5068 /* Bitfield definition for register: TS_ADDEND */ 5069 /* 5070 * TSAR (RW) 5071 * 5072 * Timestamp Addend Register 5073 * This field indicates the 32-bit time value to be added to the Accumulator register to achieve time synchronization. 5074 */ 5075 #define ENET_TS_ADDEND_TSAR_MASK (0xFFFFFFFFUL) 5076 #define ENET_TS_ADDEND_TSAR_SHIFT (0U) 5077 #define ENET_TS_ADDEND_TSAR_SET(x) (((uint32_t)(x) << ENET_TS_ADDEND_TSAR_SHIFT) & ENET_TS_ADDEND_TSAR_MASK) 5078 #define ENET_TS_ADDEND_TSAR_GET(x) (((uint32_t)(x) & ENET_TS_ADDEND_TSAR_MASK) >> ENET_TS_ADDEND_TSAR_SHIFT) 5079 5080 /* Bitfield definition for register: TGTTM_SEC */ 5081 /* 5082 * TSTR (RW) 5083 * 5084 * Target Time Seconds Register 5085 * This register stores the time in seconds. When the timestamp value matches or exceeds both Target Timestamp registers, then based on Bits [6:5] of Register 459 (PPS Control Register), the MAC starts or stops the PPS signal output and generates an interrupt (if enabled). 5086 */ 5087 #define ENET_TGTTM_SEC_TSTR_MASK (0xFFFFFFFFUL) 5088 #define ENET_TGTTM_SEC_TSTR_SHIFT (0U) 5089 #define ENET_TGTTM_SEC_TSTR_SET(x) (((uint32_t)(x) << ENET_TGTTM_SEC_TSTR_SHIFT) & ENET_TGTTM_SEC_TSTR_MASK) 5090 #define ENET_TGTTM_SEC_TSTR_GET(x) (((uint32_t)(x) & ENET_TGTTM_SEC_TSTR_MASK) >> ENET_TGTTM_SEC_TSTR_SHIFT) 5091 5092 /* Bitfield definition for register: TGTTM_NSEC */ 5093 /* 5094 * TRGTBUSY (RW) 5095 * 5096 * Target Time Register Busy 5097 * The MAC sets this bit when the PPSCMD field (Bit [3:0]) in Register 459 (PPS Control Register) is programmed to 010 or 011. Programming the PPSCMD field to 010 or 011, instructs the MAC to synchronize the Target Time Registers to the PTP clock domain. The MAC clears this bit after synchronizing the Target Time Registers to the PTP clock domain The application must not update the Target Time Registers when this bit is read as 1. Otherwise, the synchronization of the previous programmed time gets corrupted. This bit is reserved when the Enable Flexible Pulse-Per-Second Output feature is not selected. 5098 */ 5099 #define ENET_TGTTM_NSEC_TRGTBUSY_MASK (0x80000000UL) 5100 #define ENET_TGTTM_NSEC_TRGTBUSY_SHIFT (31U) 5101 #define ENET_TGTTM_NSEC_TRGTBUSY_SET(x) (((uint32_t)(x) << ENET_TGTTM_NSEC_TRGTBUSY_SHIFT) & ENET_TGTTM_NSEC_TRGTBUSY_MASK) 5102 #define ENET_TGTTM_NSEC_TRGTBUSY_GET(x) (((uint32_t)(x) & ENET_TGTTM_NSEC_TRGTBUSY_MASK) >> ENET_TGTTM_NSEC_TRGTBUSY_SHIFT) 5103 5104 /* 5105 * TTSLO (RW) 5106 * 5107 * Target Timestamp Low Register 5108 * This register stores the time in (signed) nanoseconds. When the value of the timestamp matches the both Target Timestamp registers, then based on the TRGTMODSEL0 field (Bits [6:5]) in Register 459 (PPS Control Register), the MAC starts or stops the PPS signal output and generates an interrupt (if enabled). This value should not exceed 0x3B9A_C9FF when Bit 9 (TSCTRLSSR) is set in Register 448 (Timestamp Control Register). The actual start or stop time of the PPS signal output may have an error margin up to one unit of sub-second increment value. 5109 */ 5110 #define ENET_TGTTM_NSEC_TTSLO_MASK (0x7FFFFFFFUL) 5111 #define ENET_TGTTM_NSEC_TTSLO_SHIFT (0U) 5112 #define ENET_TGTTM_NSEC_TTSLO_SET(x) (((uint32_t)(x) << ENET_TGTTM_NSEC_TTSLO_SHIFT) & ENET_TGTTM_NSEC_TTSLO_MASK) 5113 #define ENET_TGTTM_NSEC_TTSLO_GET(x) (((uint32_t)(x) & ENET_TGTTM_NSEC_TTSLO_MASK) >> ENET_TGTTM_NSEC_TTSLO_SHIFT) 5114 5115 /* Bitfield definition for register: SYSTM_H_SEC */ 5116 /* 5117 * TSHWR (RW) 5118 * 5119 * Timestamp Higher Word Register 5120 * This field contains the most significant 16-bits of the timestamp seconds value. This register is optional and can be selected using the Enable IEEE 1588 Higher Word Register option during core configuration. The register is directly written to initialize the value. This register is incremented when there is an overflow from the 32-bits of the System Time - Seconds register. 5121 */ 5122 #define ENET_SYSTM_H_SEC_TSHWR_MASK (0xFFFFU) 5123 #define ENET_SYSTM_H_SEC_TSHWR_SHIFT (0U) 5124 #define ENET_SYSTM_H_SEC_TSHWR_SET(x) (((uint32_t)(x) << ENET_SYSTM_H_SEC_TSHWR_SHIFT) & ENET_SYSTM_H_SEC_TSHWR_MASK) 5125 #define ENET_SYSTM_H_SEC_TSHWR_GET(x) (((uint32_t)(x) & ENET_SYSTM_H_SEC_TSHWR_MASK) >> ENET_SYSTM_H_SEC_TSHWR_SHIFT) 5126 5127 /* Bitfield definition for register: TS_STATUS */ 5128 /* 5129 * ATSNS (RO) 5130 * 5131 * Number of Auxiliary Timestamp Snapshots 5132 * This field indicates the number of Snapshots available in the FIFO. A value equal to the selected depth of FIFO (4, 8, or 16) indicates that the Auxiliary Snapshot FIFO is full. These bits are cleared (to 00000) when the Auxiliary snapshot FIFO clear bit is set. This bit is valid only if the Add IEEE 1588 Auxiliary Snapshot option is selected during core configuration. 5133 */ 5134 #define ENET_TS_STATUS_ATSNS_MASK (0x3E000000UL) 5135 #define ENET_TS_STATUS_ATSNS_SHIFT (25U) 5136 #define ENET_TS_STATUS_ATSNS_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_ATSNS_MASK) >> ENET_TS_STATUS_ATSNS_SHIFT) 5137 5138 /* 5139 * ATSSTM (RO) 5140 * 5141 * Auxiliary Timestamp Snapshot Trigger Missed 5142 * This bit is set when the Auxiliary timestamp snapshot FIFO is full and external trigger was set. This indicates that the latest snapshot is not stored in the FIFO. This bit is valid only if the Add IEEE 1588 Auxiliary Snapshot option is selected during core configuration. 5143 */ 5144 #define ENET_TS_STATUS_ATSSTM_MASK (0x1000000UL) 5145 #define ENET_TS_STATUS_ATSSTM_SHIFT (24U) 5146 #define ENET_TS_STATUS_ATSSTM_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_ATSSTM_MASK) >> ENET_TS_STATUS_ATSSTM_SHIFT) 5147 5148 /* 5149 * ATSSTN (RO) 5150 * 5151 * Auxiliary Timestamp Snapshot Trigger Identifier 5152 * These bits identify the Auxiliary trigger inputs for which the timestamp available in the Auxiliary Snapshot Register is applicable. When more than one bit is set at the same time, it means that corresponding auxiliary triggers were sampled at the same clock. These bits are applicable only if the number of Auxiliary snapshots is more than one. One bit is assigned for each trigger as shown in the following list: - Bit 16: Auxiliary trigger 0 - Bit 17: Auxiliary trigger 1 - Bit 18: Auxiliary trigger 2 - Bit 19: Auxiliary trigger 3 The software can read this register to find the triggers that are set when the timestamp is taken. 5153 */ 5154 #define ENET_TS_STATUS_ATSSTN_MASK (0xF0000UL) 5155 #define ENET_TS_STATUS_ATSSTN_SHIFT (16U) 5156 #define ENET_TS_STATUS_ATSSTN_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_ATSSTN_MASK) >> ENET_TS_STATUS_ATSSTN_SHIFT) 5157 5158 /* 5159 * TSTRGTERR3 (RO) 5160 * 5161 * Timestamp Target Time Error 5162 * This bit is set when the target time, being programmed in Register 496 and Register 497, is already elapsed. This bit is cleared when read by the application. 5163 */ 5164 #define ENET_TS_STATUS_TSTRGTERR3_MASK (0x200U) 5165 #define ENET_TS_STATUS_TSTRGTERR3_SHIFT (9U) 5166 #define ENET_TS_STATUS_TSTRGTERR3_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSTRGTERR3_MASK) >> ENET_TS_STATUS_TSTRGTERR3_SHIFT) 5167 5168 /* 5169 * TSTARGT3 (RO) 5170 * 5171 * Timestamp Target Time Reached for Target Time PPS3 5172 * When set, this bit indicates that the value of system time is greater than or equal to the value specified in Register 496 (PPS3 Target Time High Register) and Register 497 (PPS3 Target Time Low Register). 5173 */ 5174 #define ENET_TS_STATUS_TSTARGT3_MASK (0x100U) 5175 #define ENET_TS_STATUS_TSTARGT3_SHIFT (8U) 5176 #define ENET_TS_STATUS_TSTARGT3_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSTARGT3_MASK) >> ENET_TS_STATUS_TSTARGT3_SHIFT) 5177 5178 /* 5179 * TSTRGTERR2 (RO) 5180 * 5181 */ 5182 #define ENET_TS_STATUS_TSTRGTERR2_MASK (0x80U) 5183 #define ENET_TS_STATUS_TSTRGTERR2_SHIFT (7U) 5184 #define ENET_TS_STATUS_TSTRGTERR2_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSTRGTERR2_MASK) >> ENET_TS_STATUS_TSTRGTERR2_SHIFT) 5185 5186 /* 5187 * TSTARGT2 (RO) 5188 * 5189 */ 5190 #define ENET_TS_STATUS_TSTARGT2_MASK (0x40U) 5191 #define ENET_TS_STATUS_TSTARGT2_SHIFT (6U) 5192 #define ENET_TS_STATUS_TSTARGT2_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSTARGT2_MASK) >> ENET_TS_STATUS_TSTARGT2_SHIFT) 5193 5194 /* 5195 * TSTRGTERR1 (RO) 5196 * 5197 */ 5198 #define ENET_TS_STATUS_TSTRGTERR1_MASK (0x20U) 5199 #define ENET_TS_STATUS_TSTRGTERR1_SHIFT (5U) 5200 #define ENET_TS_STATUS_TSTRGTERR1_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSTRGTERR1_MASK) >> ENET_TS_STATUS_TSTRGTERR1_SHIFT) 5201 5202 /* 5203 * TSTARGT1 (RO) 5204 * 5205 */ 5206 #define ENET_TS_STATUS_TSTARGT1_MASK (0x10U) 5207 #define ENET_TS_STATUS_TSTARGT1_SHIFT (4U) 5208 #define ENET_TS_STATUS_TSTARGT1_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSTARGT1_MASK) >> ENET_TS_STATUS_TSTARGT1_SHIFT) 5209 5210 /* 5211 * TSTRGTERR (RO) 5212 * 5213 */ 5214 #define ENET_TS_STATUS_TSTRGTERR_MASK (0x8U) 5215 #define ENET_TS_STATUS_TSTRGTERR_SHIFT (3U) 5216 #define ENET_TS_STATUS_TSTRGTERR_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSTRGTERR_MASK) >> ENET_TS_STATUS_TSTRGTERR_SHIFT) 5217 5218 /* 5219 * AUXTSTRIG (RO) 5220 * 5221 */ 5222 #define ENET_TS_STATUS_AUXTSTRIG_MASK (0x4U) 5223 #define ENET_TS_STATUS_AUXTSTRIG_SHIFT (2U) 5224 #define ENET_TS_STATUS_AUXTSTRIG_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_AUXTSTRIG_MASK) >> ENET_TS_STATUS_AUXTSTRIG_SHIFT) 5225 5226 /* 5227 * TSTARGT (RO) 5228 * 5229 */ 5230 #define ENET_TS_STATUS_TSTARGT_MASK (0x2U) 5231 #define ENET_TS_STATUS_TSTARGT_SHIFT (1U) 5232 #define ENET_TS_STATUS_TSTARGT_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSTARGT_MASK) >> ENET_TS_STATUS_TSTARGT_SHIFT) 5233 5234 /* 5235 * TSSOVF (RO) 5236 * 5237 */ 5238 #define ENET_TS_STATUS_TSSOVF_MASK (0x1U) 5239 #define ENET_TS_STATUS_TSSOVF_SHIFT (0U) 5240 #define ENET_TS_STATUS_TSSOVF_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSSOVF_MASK) >> ENET_TS_STATUS_TSSOVF_SHIFT) 5241 5242 /* Bitfield definition for register: PPS_CTRL */ 5243 /* 5244 * TRGTMODSEL3 (RW) 5245 * 5246 * Target Time Register Mode for PPS3 Output 5247 * This field indicates the Target Time registers (register 496 and 497) mode for PPS3 output signal. This field is similar to the TRGTMODSEL0 field. 5248 */ 5249 #define ENET_PPS_CTRL_TRGTMODSEL3_MASK (0x60000000UL) 5250 #define ENET_PPS_CTRL_TRGTMODSEL3_SHIFT (29U) 5251 #define ENET_PPS_CTRL_TRGTMODSEL3_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_TRGTMODSEL3_SHIFT) & ENET_PPS_CTRL_TRGTMODSEL3_MASK) 5252 #define ENET_PPS_CTRL_TRGTMODSEL3_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_TRGTMODSEL3_MASK) >> ENET_PPS_CTRL_TRGTMODSEL3_SHIFT) 5253 5254 /* 5255 * PPSCMD3 (RW) 5256 * 5257 * Flexible PPS3 Output Control 5258 * This field controls the flexible PPS3 output (ptp_pps_o[3]) signal. This field is similar to PPSCMD0[2:0] in functionality. 5259 */ 5260 #define ENET_PPS_CTRL_PPSCMD3_MASK (0x7000000UL) 5261 #define ENET_PPS_CTRL_PPSCMD3_SHIFT (24U) 5262 #define ENET_PPS_CTRL_PPSCMD3_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_PPSCMD3_SHIFT) & ENET_PPS_CTRL_PPSCMD3_MASK) 5263 #define ENET_PPS_CTRL_PPSCMD3_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_PPSCMD3_MASK) >> ENET_PPS_CTRL_PPSCMD3_SHIFT) 5264 5265 /* 5266 * TRGTMODSEL2 (RW) 5267 * 5268 * Target Time Register Mode for PPS2 Output 5269 * This field indicates the Target Time registers (register 488 and 489) mode for PPS2 output signal. This field is similar to the TRGTMODSEL0 field. 5270 */ 5271 #define ENET_PPS_CTRL_TRGTMODSEL2_MASK (0x600000UL) 5272 #define ENET_PPS_CTRL_TRGTMODSEL2_SHIFT (21U) 5273 #define ENET_PPS_CTRL_TRGTMODSEL2_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_TRGTMODSEL2_SHIFT) & ENET_PPS_CTRL_TRGTMODSEL2_MASK) 5274 #define ENET_PPS_CTRL_TRGTMODSEL2_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_TRGTMODSEL2_MASK) >> ENET_PPS_CTRL_TRGTMODSEL2_SHIFT) 5275 5276 /* 5277 * PPSCMD2 (RW) 5278 * 5279 * Flexible PPS2 Output Control 5280 * This field controls the flexible PPS2 output (ptp_pps_o[2]) signal. This field is similar to PPSCMD0[2:0] in functionality. 5281 */ 5282 #define ENET_PPS_CTRL_PPSCMD2_MASK (0x70000UL) 5283 #define ENET_PPS_CTRL_PPSCMD2_SHIFT (16U) 5284 #define ENET_PPS_CTRL_PPSCMD2_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_PPSCMD2_SHIFT) & ENET_PPS_CTRL_PPSCMD2_MASK) 5285 #define ENET_PPS_CTRL_PPSCMD2_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_PPSCMD2_MASK) >> ENET_PPS_CTRL_PPSCMD2_SHIFT) 5286 5287 /* 5288 * TRGTMODSEL1 (RW) 5289 * 5290 * Target Time Register Mode for PPS1 Output 5291 * This field indicates the Target Time registers (register 480 and 481) mode for PPS1 output signal. This field is similar to the TRGTMODSEL0 field. 5292 */ 5293 #define ENET_PPS_CTRL_TRGTMODSEL1_MASK (0x6000U) 5294 #define ENET_PPS_CTRL_TRGTMODSEL1_SHIFT (13U) 5295 #define ENET_PPS_CTRL_TRGTMODSEL1_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_TRGTMODSEL1_SHIFT) & ENET_PPS_CTRL_TRGTMODSEL1_MASK) 5296 #define ENET_PPS_CTRL_TRGTMODSEL1_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_TRGTMODSEL1_MASK) >> ENET_PPS_CTRL_TRGTMODSEL1_SHIFT) 5297 5298 /* 5299 * PPSCMD1 (RW) 5300 * 5301 * Flexible PPS1 Output Control 5302 * This field controls the flexible PPS1 output (ptp_pps_o[1]) signal. This field is similar to PPSCMD0[2:0] in functionality. 5303 */ 5304 #define ENET_PPS_CTRL_PPSCMD1_MASK (0x700U) 5305 #define ENET_PPS_CTRL_PPSCMD1_SHIFT (8U) 5306 #define ENET_PPS_CTRL_PPSCMD1_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_PPSCMD1_SHIFT) & ENET_PPS_CTRL_PPSCMD1_MASK) 5307 #define ENET_PPS_CTRL_PPSCMD1_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_PPSCMD1_MASK) >> ENET_PPS_CTRL_PPSCMD1_SHIFT) 5308 5309 /* 5310 * TRGTMODSEL0 (RW) 5311 * 5312 * Target Time Register Mode for PPS0 Output 5313 * This field indicates the Target Time registers (register 455 and 456) mode for PPS0 output signal: 5314 * - 00: Indicates that the Target Time registers are programmed only for generating the interrupt event. 5315 * - 01: Reserved 5316 * - 10: Indicates that the Target Time registers are programmed for generating the interrupt event and starting or stopping the generation of the PPS0 output signal. 5317 * - 11: Indicates that the Target Time registers are programmed only for starting or stopping the generation of the PPS0 output signal. No interrupt is asserted. 5318 */ 5319 #define ENET_PPS_CTRL_TRGTMODSEL0_MASK (0x60U) 5320 #define ENET_PPS_CTRL_TRGTMODSEL0_SHIFT (5U) 5321 #define ENET_PPS_CTRL_TRGTMODSEL0_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_TRGTMODSEL0_SHIFT) & ENET_PPS_CTRL_TRGTMODSEL0_MASK) 5322 #define ENET_PPS_CTRL_TRGTMODSEL0_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_TRGTMODSEL0_MASK) >> ENET_PPS_CTRL_TRGTMODSEL0_SHIFT) 5323 5324 /* 5325 * PPSEN0 (RW) 5326 * 5327 * Flexible PPS Output Mode Enable 5328 * When set low, Bits [3:0] function as PPSCTRL (backward compatible). When set high, Bits[3:0] function as PPSCMD. 5329 */ 5330 #define ENET_PPS_CTRL_PPSEN0_MASK (0x10U) 5331 #define ENET_PPS_CTRL_PPSEN0_SHIFT (4U) 5332 #define ENET_PPS_CTRL_PPSEN0_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_PPSEN0_SHIFT) & ENET_PPS_CTRL_PPSEN0_MASK) 5333 #define ENET_PPS_CTRL_PPSEN0_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_PPSEN0_MASK) >> ENET_PPS_CTRL_PPSEN0_SHIFT) 5334 5335 /* 5336 * PPSCTRL0 (RW) 5337 * 5338 * PPSCTRL0: PPS0 Output Frequency Control 5339 * This field controls the frequency of the PPS0 output (ptp_pps_o[0]) signal. The default value of PPSCTRL is 0000, and the PPS output is 1 pulse (of width clk_ptp_i) every second. For other values of PPSCTRL, the PPS output becomes a generated clock of following frequencies: 5340 * - 0001: The binary rollover is 2 Hz, and the digital rollover is 1 Hz. 5341 * - 0010: The binary rollover is 4 Hz, and the digital rollover is 2 Hz. 5342 * - 0011: The binary rollover is 8 Hz, and the digital rollover is 4 Hz. 5343 * - 0100: The binary rollover is 16 Hz, and the digital rollover is 8 Hz. - ... 5344 * - 1111: The binary rollover is 32.768 KHz, and the digital rollover is 16.384 KHz. Note: In the binary rollover mode, the PPS output (ptp_pps_o) has a duty cycle of 50 percent with these frequencies. In the digital rollover mode, the PPS output frequency is an average number. The actual clock is of different frequency that gets synchronized every second. For example: - When PPSCTRL = 0001, the PPS (1 Hz) has a low period of 537 ms and a high period of 463 ms - When PPSCTRL = 0010, the PPS (2 Hz) is a sequence of: - One clock of 50 percent duty cycle and 537 ms period - Second clock of 463 ms period (268 ms low and 195 ms high) - When PPSCTRL = 0011, the PPS (4 Hz) is a sequence of: - Three clocks of 50 percent duty cycle and 268 ms period - Fourth clock of 195 ms period (134 ms low and 61 ms high) 5345 */ 5346 #define ENET_PPS_CTRL_PPSCTRL0_MASK (0xFU) 5347 #define ENET_PPS_CTRL_PPSCTRL0_SHIFT (0U) 5348 #define ENET_PPS_CTRL_PPSCTRL0_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_PPSCTRL0_SHIFT) & ENET_PPS_CTRL_PPSCTRL0_MASK) 5349 #define ENET_PPS_CTRL_PPSCTRL0_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_PPSCTRL0_MASK) >> ENET_PPS_CTRL_PPSCTRL0_SHIFT) 5350 5351 /* Bitfield definition for register: AUX_TS_NSEC */ 5352 /* 5353 * AUXTSLO (RO) 5354 * 5355 * Contains the lower 31 bits (nano-seconds field) of the auxiliary timestamp. 5356 */ 5357 #define ENET_AUX_TS_NSEC_AUXTSLO_MASK (0x7FFFFFFFUL) 5358 #define ENET_AUX_TS_NSEC_AUXTSLO_SHIFT (0U) 5359 #define ENET_AUX_TS_NSEC_AUXTSLO_GET(x) (((uint32_t)(x) & ENET_AUX_TS_NSEC_AUXTSLO_MASK) >> ENET_AUX_TS_NSEC_AUXTSLO_SHIFT) 5360 5361 /* Bitfield definition for register: AUX_TS_SEC */ 5362 /* 5363 * AUXTSHI (RO) 5364 * 5365 * Contains the lower 32 bits of the Seconds field of the auxiliary timestamp. 5366 */ 5367 #define ENET_AUX_TS_SEC_AUXTSHI_MASK (0xFFFFFFFFUL) 5368 #define ENET_AUX_TS_SEC_AUXTSHI_SHIFT (0U) 5369 #define ENET_AUX_TS_SEC_AUXTSHI_GET(x) (((uint32_t)(x) & ENET_AUX_TS_SEC_AUXTSHI_MASK) >> ENET_AUX_TS_SEC_AUXTSHI_SHIFT) 5370 5371 /* Bitfield definition for register: PPS0_INTERVAL */ 5372 /* 5373 * PPSINT (RW) 5374 * 5375 * PPS0 Output Signal Interval 5376 * These bits store the interval between the rising edges of PPS0 signal output in terms of units of sub-second increment value. You need to program one value less than the required interval. For example, if the PTP reference clock is 50 MHz (period of 20ns), and desired interval between rising edges of PPS0 signal output is 100ns (that is, five units of sub-second increment value), then you should program value 4 (5 – 1) in this register. 5377 */ 5378 #define ENET_PPS0_INTERVAL_PPSINT_MASK (0xFFFFFFFFUL) 5379 #define ENET_PPS0_INTERVAL_PPSINT_SHIFT (0U) 5380 #define ENET_PPS0_INTERVAL_PPSINT_SET(x) (((uint32_t)(x) << ENET_PPS0_INTERVAL_PPSINT_SHIFT) & ENET_PPS0_INTERVAL_PPSINT_MASK) 5381 #define ENET_PPS0_INTERVAL_PPSINT_GET(x) (((uint32_t)(x) & ENET_PPS0_INTERVAL_PPSINT_MASK) >> ENET_PPS0_INTERVAL_PPSINT_SHIFT) 5382 5383 /* Bitfield definition for register: PPS0_WIDTH */ 5384 /* 5385 * PPSWIDTH (RW) 5386 * 5387 * PPS0 Output Signal Width 5388 * These bits store the width between the rising edge and corresponding falling edge of the PPS0 signal output in terms of units of sub-second increment value. You need to program one value less than the required interval. For example, if PTP reference clock is 50 MHz (period of 20ns), and desired width between the rising and corresponding falling edges of PPS0 signal output is 80ns (that is, four units of sub-second increment value), then you should program value 3 (4 – 1) in this register. 5389 */ 5390 #define ENET_PPS0_WIDTH_PPSWIDTH_MASK (0xFFFFFFFFUL) 5391 #define ENET_PPS0_WIDTH_PPSWIDTH_SHIFT (0U) 5392 #define ENET_PPS0_WIDTH_PPSWIDTH_SET(x) (((uint32_t)(x) << ENET_PPS0_WIDTH_PPSWIDTH_SHIFT) & ENET_PPS0_WIDTH_PPSWIDTH_MASK) 5393 #define ENET_PPS0_WIDTH_PPSWIDTH_GET(x) (((uint32_t)(x) & ENET_PPS0_WIDTH_PPSWIDTH_MASK) >> ENET_PPS0_WIDTH_PPSWIDTH_SHIFT) 5394 5395 /* Bitfield definition for register of struct array PPS: TGTTM_SEC */ 5396 /* 5397 * TSTRH1 (RW) 5398 * 5399 * PPS1 Target Time Seconds Register 5400 * This register stores the time in seconds. When the timestamp value matches or exceeds both Target Timestamp registers, then based on Bits [14:13], TRGTMODSEL1, of Register 459 (PPS Control Register), the MAC starts or stops the PPS signal output and generates an interrupt (if enabled). 5401 */ 5402 #define ENET_PPS_TGTTM_SEC_TSTRH1_MASK (0xFFFFFFFFUL) 5403 #define ENET_PPS_TGTTM_SEC_TSTRH1_SHIFT (0U) 5404 #define ENET_PPS_TGTTM_SEC_TSTRH1_SET(x) (((uint32_t)(x) << ENET_PPS_TGTTM_SEC_TSTRH1_SHIFT) & ENET_PPS_TGTTM_SEC_TSTRH1_MASK) 5405 #define ENET_PPS_TGTTM_SEC_TSTRH1_GET(x) (((uint32_t)(x) & ENET_PPS_TGTTM_SEC_TSTRH1_MASK) >> ENET_PPS_TGTTM_SEC_TSTRH1_SHIFT) 5406 5407 /* Bitfield definition for register of struct array PPS: TGTTM_NSEC */ 5408 /* 5409 * TRGTBUSY1 (RW) 5410 * 5411 * PPS1 Target Time Register Busy 5412 * The MAC sets this bit when the PPSCMD1 field (Bits [10:8]) in Register 459 (PPS Control Register) is programmed to 010 or 011. Programming the PPSCMD1 field to 010 or 011 instructs the MAC to synchronize the Target Time Registers to the PTP clock domain. The MAC clears this bit after synchronizing the Target Time Registers to the PTP clock domain The application must not update the Target Time Registers when this bit is read as 1. Otherwise, the synchronization of the previous programmed time gets corrupted. 5413 */ 5414 #define ENET_PPS_TGTTM_NSEC_TRGTBUSY1_MASK (0x80000000UL) 5415 #define ENET_PPS_TGTTM_NSEC_TRGTBUSY1_SHIFT (31U) 5416 #define ENET_PPS_TGTTM_NSEC_TRGTBUSY1_SET(x) (((uint32_t)(x) << ENET_PPS_TGTTM_NSEC_TRGTBUSY1_SHIFT) & ENET_PPS_TGTTM_NSEC_TRGTBUSY1_MASK) 5417 #define ENET_PPS_TGTTM_NSEC_TRGTBUSY1_GET(x) (((uint32_t)(x) & ENET_PPS_TGTTM_NSEC_TRGTBUSY1_MASK) >> ENET_PPS_TGTTM_NSEC_TRGTBUSY1_SHIFT) 5418 5419 /* 5420 * TTSL1 (RW) 5421 * 5422 * Target Time Low for PPS1 Register 5423 * This register stores the time in (signed) nanoseconds. When the value of the timestamp matches the both Target Timestamp registers, then based on the TRGTMODSEL1 field (Bits [14:13]) in Register 459 (PPS Control Register), the MAC starts or stops the PPS signal output and generates an interrupt (if enabled). This value should not exceed 0x3B9A_C9FF when Bit 9 (TSCTRLSSR) is set in Register 448 (Timestamp Control Register). The actual start or stop time of the PPS signal output may have an error margin up to one unit of sub-second increment value. 5424 */ 5425 #define ENET_PPS_TGTTM_NSEC_TTSL1_MASK (0x7FFFFFFFUL) 5426 #define ENET_PPS_TGTTM_NSEC_TTSL1_SHIFT (0U) 5427 #define ENET_PPS_TGTTM_NSEC_TTSL1_SET(x) (((uint32_t)(x) << ENET_PPS_TGTTM_NSEC_TTSL1_SHIFT) & ENET_PPS_TGTTM_NSEC_TTSL1_MASK) 5428 #define ENET_PPS_TGTTM_NSEC_TTSL1_GET(x) (((uint32_t)(x) & ENET_PPS_TGTTM_NSEC_TTSL1_MASK) >> ENET_PPS_TGTTM_NSEC_TTSL1_SHIFT) 5429 5430 /* Bitfield definition for register of struct array PPS: INTERVAL */ 5431 /* 5432 * PPSINT (RW) 5433 * 5434 * PPS1 Output Signal Interval 5435 * These bits store the interval between the rising edges of PPS1 signal output in terms of units of sub-second increment value. You need to program one value less than the required interval. For example, if the PTP reference clock is 50 MHz (period of 20ns), and desired interval between rising edges of PPS1 signal output is 100ns (that is, five units of sub-second increment value), then you should program value 4 (5 – 1) in this register. 5436 */ 5437 #define ENET_PPS_INTERVAL_PPSINT_MASK (0xFFFFFFFFUL) 5438 #define ENET_PPS_INTERVAL_PPSINT_SHIFT (0U) 5439 #define ENET_PPS_INTERVAL_PPSINT_SET(x) (((uint32_t)(x) << ENET_PPS_INTERVAL_PPSINT_SHIFT) & ENET_PPS_INTERVAL_PPSINT_MASK) 5440 #define ENET_PPS_INTERVAL_PPSINT_GET(x) (((uint32_t)(x) & ENET_PPS_INTERVAL_PPSINT_MASK) >> ENET_PPS_INTERVAL_PPSINT_SHIFT) 5441 5442 /* Bitfield definition for register of struct array PPS: WIDTH */ 5443 /* 5444 * PPSWIDTH (RW) 5445 * 5446 * PPS1 Output Signal Width 5447 * These bits store the width between the rising edge and corresponding falling edge of the PPS1 signal output in terms of units of sub-second increment value. You need to program one value less than the required interval. For example, if PTP reference clock is 50 MHz (period of 20ns), and desired width between the rising and corresponding falling edges of PPS1 signal output is 80ns (that is, four units of sub-second increment value), then you should program value 3 (4 – 1) in this register. 5448 */ 5449 #define ENET_PPS_WIDTH_PPSWIDTH_MASK (0xFFFFFFFFUL) 5450 #define ENET_PPS_WIDTH_PPSWIDTH_SHIFT (0U) 5451 #define ENET_PPS_WIDTH_PPSWIDTH_SET(x) (((uint32_t)(x) << ENET_PPS_WIDTH_PPSWIDTH_SHIFT) & ENET_PPS_WIDTH_PPSWIDTH_MASK) 5452 #define ENET_PPS_WIDTH_PPSWIDTH_GET(x) (((uint32_t)(x) & ENET_PPS_WIDTH_PPSWIDTH_MASK) >> ENET_PPS_WIDTH_PPSWIDTH_SHIFT) 5453 5454 /* Bitfield definition for register: DMA_BUS_MODE */ 5455 /* 5456 * RIB (RW) 5457 * 5458 * Rebuild INCRx Burst 5459 * When this bit is set high and the AHB master gets an EBT (Retry, Split, or Losing bus grant), the AHB master interface rebuilds the pending beats of any burst transfer initiated with INCRx. The AHB master interface rebuilds the beats with a combination of specified bursts with INCRx and SINGLE. By default, the AHB master interface rebuilds pending beats of an EBT with an unspecified (INCR) burst. 5460 */ 5461 #define ENET_DMA_BUS_MODE_RIB_MASK (0x80000000UL) 5462 #define ENET_DMA_BUS_MODE_RIB_SHIFT (31U) 5463 #define ENET_DMA_BUS_MODE_RIB_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_RIB_SHIFT) & ENET_DMA_BUS_MODE_RIB_MASK) 5464 #define ENET_DMA_BUS_MODE_RIB_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_RIB_MASK) >> ENET_DMA_BUS_MODE_RIB_SHIFT) 5465 5466 /* 5467 * PRWG (RW) 5468 * 5469 * Channel Priority 5470 * Weights This field sets the priority weights for Channel 0 during the round-robin arbitration between the DMA channels for the system bus. 5471 * - 00: The priority weight is 1. 5472 * - 01: The priority weight is 2. 5473 * - 10: The priority weight is 3. 5474 * - 11: The priority weight is 4. This field is present in all DWC_gmac configurations except GMAC-AXI when you select the AV feature. Otherwise, this field is reserved and read-only (RO). 5475 */ 5476 #define ENET_DMA_BUS_MODE_PRWG_MASK (0x30000000UL) 5477 #define ENET_DMA_BUS_MODE_PRWG_SHIFT (28U) 5478 #define ENET_DMA_BUS_MODE_PRWG_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_PRWG_SHIFT) & ENET_DMA_BUS_MODE_PRWG_MASK) 5479 #define ENET_DMA_BUS_MODE_PRWG_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_PRWG_MASK) >> ENET_DMA_BUS_MODE_PRWG_SHIFT) 5480 5481 /* 5482 * TXPR (RW) 5483 * 5484 * Transmit Priority 5485 * When set, this bit indicates that the transmit DMA has higher priority than the receive DMA during arbitration for the system-side bus. In the GMAC-AXI configuration, this bit is reserved and read-only (RO). 5486 */ 5487 #define ENET_DMA_BUS_MODE_TXPR_MASK (0x8000000UL) 5488 #define ENET_DMA_BUS_MODE_TXPR_SHIFT (27U) 5489 #define ENET_DMA_BUS_MODE_TXPR_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_TXPR_SHIFT) & ENET_DMA_BUS_MODE_TXPR_MASK) 5490 #define ENET_DMA_BUS_MODE_TXPR_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_TXPR_MASK) >> ENET_DMA_BUS_MODE_TXPR_SHIFT) 5491 5492 /* 5493 * MB (RW) 5494 * 5495 * Mixed Burst 5496 * When this bit is set high and the FB bit is low, the AHB master interface starts all bursts of length more than 16 with INCR (undefined burst), whereas it reverts to fixed burst transfers (INCRx and SINGLE) for burst length of 16 and less. 5497 */ 5498 #define ENET_DMA_BUS_MODE_MB_MASK (0x4000000UL) 5499 #define ENET_DMA_BUS_MODE_MB_SHIFT (26U) 5500 #define ENET_DMA_BUS_MODE_MB_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_MB_SHIFT) & ENET_DMA_BUS_MODE_MB_MASK) 5501 #define ENET_DMA_BUS_MODE_MB_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_MB_MASK) >> ENET_DMA_BUS_MODE_MB_SHIFT) 5502 5503 /* 5504 * AAL (RW) 5505 * 5506 * Address-Aligned Beats 5507 * When this bit is set high and the FB bit is equal to 1, the AHB or AXI interface generates all bursts aligned to the start address LS bits. If the FB bit is equal to 0, the first burst (accessing the start address of data buffer) is not aligned, but subsequent bursts are aligned to the address. 5508 */ 5509 #define ENET_DMA_BUS_MODE_AAL_MASK (0x2000000UL) 5510 #define ENET_DMA_BUS_MODE_AAL_SHIFT (25U) 5511 #define ENET_DMA_BUS_MODE_AAL_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_AAL_SHIFT) & ENET_DMA_BUS_MODE_AAL_MASK) 5512 #define ENET_DMA_BUS_MODE_AAL_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_AAL_MASK) >> ENET_DMA_BUS_MODE_AAL_SHIFT) 5513 5514 /* 5515 * PBLX8 (RW) 5516 * 5517 * PBLx8 Mode 5518 * When set high, this bit multiplies the programmed PBL value (Bits [22:17] and Bits[13:8]) eight times. Therefore, the DMA transfers the data in 8, 16, 32, 64, 128, and 256 beats depending on the PBL value. 5519 */ 5520 #define ENET_DMA_BUS_MODE_PBLX8_MASK (0x1000000UL) 5521 #define ENET_DMA_BUS_MODE_PBLX8_SHIFT (24U) 5522 #define ENET_DMA_BUS_MODE_PBLX8_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_PBLX8_SHIFT) & ENET_DMA_BUS_MODE_PBLX8_MASK) 5523 #define ENET_DMA_BUS_MODE_PBLX8_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_PBLX8_MASK) >> ENET_DMA_BUS_MODE_PBLX8_SHIFT) 5524 5525 /* 5526 * USP (RW) 5527 * 5528 * Use Separate PBL 5529 * When set high, this bit configures the Rx DMA to use the value configured in Bits [22:17] as PBL. The PBL value in Bits [13:8] is applicable only to the Tx DMA operations. When reset to low, the PBL value in Bits [13:8] is applicable for both DMA engines. 5530 */ 5531 #define ENET_DMA_BUS_MODE_USP_MASK (0x800000UL) 5532 #define ENET_DMA_BUS_MODE_USP_SHIFT (23U) 5533 #define ENET_DMA_BUS_MODE_USP_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_USP_SHIFT) & ENET_DMA_BUS_MODE_USP_MASK) 5534 #define ENET_DMA_BUS_MODE_USP_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_USP_MASK) >> ENET_DMA_BUS_MODE_USP_SHIFT) 5535 5536 /* 5537 * RPBL (RW) 5538 * 5539 * Rx DMA PBL 5540 * This field indicates the maximum number of beats to be transferred in one Rx DMA transaction. This is the maximum value that is used in a single block Read or Write. The Rx DMA always attempts to burst as specified in the RPBL bit each time it starts a Burst transfer on the host bus. You can program RPBL with values of 1, 2, 4, 8, 16, and 32. Any other value results in undefined behavior. This field is valid and applicable only when USP is set high. 5541 */ 5542 #define ENET_DMA_BUS_MODE_RPBL_MASK (0x7E0000UL) 5543 #define ENET_DMA_BUS_MODE_RPBL_SHIFT (17U) 5544 #define ENET_DMA_BUS_MODE_RPBL_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_RPBL_SHIFT) & ENET_DMA_BUS_MODE_RPBL_MASK) 5545 #define ENET_DMA_BUS_MODE_RPBL_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_RPBL_MASK) >> ENET_DMA_BUS_MODE_RPBL_SHIFT) 5546 5547 /* 5548 * FB (RW) 5549 * 5550 * Fixed Burst 5551 * This bit controls whether the AHB or AXI master interface performs fixed burst transfers or not. When set, the AHB interface uses only SINGLE, INCR4, INCR8, or INCR16 during start of the normal burst transfers. When reset, the AHB or AXI interface uses SINGLE and INCR burst transfer operations. 5552 */ 5553 #define ENET_DMA_BUS_MODE_FB_MASK (0x10000UL) 5554 #define ENET_DMA_BUS_MODE_FB_SHIFT (16U) 5555 #define ENET_DMA_BUS_MODE_FB_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_FB_SHIFT) & ENET_DMA_BUS_MODE_FB_MASK) 5556 #define ENET_DMA_BUS_MODE_FB_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_FB_MASK) >> ENET_DMA_BUS_MODE_FB_SHIFT) 5557 5558 /* 5559 * PR (RW) 5560 * 5561 * Priority Ratio 5562 * These bits control the priority ratio in the weighted round-robin arbitration between the Rx DMA and Tx DMA. These bits are valid only when Bit 1 (DA) is reset. The priority ratio is Rx:Tx or Tx:Rx depending on whether Bit 27 (TXPR) is reset or set. 5563 * - 00: The Priority Ratio is 1:1. 5564 * - 01: The Priority Ratio is 2:1. 5565 * - 10: The Priority Ratio is 3:1. 5566 * - 11: The Priority Ratio is 4:1. 5567 */ 5568 #define ENET_DMA_BUS_MODE_PR_MASK (0xC000U) 5569 #define ENET_DMA_BUS_MODE_PR_SHIFT (14U) 5570 #define ENET_DMA_BUS_MODE_PR_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_PR_SHIFT) & ENET_DMA_BUS_MODE_PR_MASK) 5571 #define ENET_DMA_BUS_MODE_PR_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_PR_MASK) >> ENET_DMA_BUS_MODE_PR_SHIFT) 5572 5573 /* 5574 * PBL (RW) 5575 * 5576 * Programmable Burst Length 5577 * These bits indicate the maximum number of beats to be transferred in one DMA transaction. This is the maximum value that is used in a single block Read or Write. The DMA always attempts to burst as specified in PBL each time it starts a Burst transfer on the host bus. PBL can be programmed with permissible values of 1, 2, 4, 8, 16, and 32. Any other value results in undefined behavior. When USP is set high, this PBL value is applicable only for Tx DMA transactions. If the number of beats to be transferred is more than 32, then perform the following steps: 1. Set the PBLx8 mode. 2. Set the PBL. 5578 */ 5579 #define ENET_DMA_BUS_MODE_PBL_MASK (0x3F00U) 5580 #define ENET_DMA_BUS_MODE_PBL_SHIFT (8U) 5581 #define ENET_DMA_BUS_MODE_PBL_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_PBL_SHIFT) & ENET_DMA_BUS_MODE_PBL_MASK) 5582 #define ENET_DMA_BUS_MODE_PBL_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_PBL_MASK) >> ENET_DMA_BUS_MODE_PBL_SHIFT) 5583 5584 /* 5585 * ATDS (RW) 5586 * 5587 * Alternate Descriptor Size 5588 * When set, the size of the alternate descriptor (described in “Alternate or Enhanced Descriptors” on page 545) increases to 32 bytes (8 DWORDS). This is required when the Advanced Timestamp feature or the IPC Full Checksum Offload Engine (Type 2) is enabled in the receiver. The enhanced descriptor is not required if the Advanced Timestamp and IPC Full Checksum Offload Engine (Type 2) features are not enabled. In such case, you can use the 16 bytes descriptor to save 4 bytes of memory. This bit is present only when you select the Alternate Descriptor feature and any one of the following features during core configuration: - Advanced Timestamp feature - IPC Full Checksum Offload Engine (Type 2) feature Otherwise, this bit is reserved and is read-only. When reset, the descriptor size reverts back to 4 DWORDs (16 bytes). 5589 */ 5590 #define ENET_DMA_BUS_MODE_ATDS_MASK (0x80U) 5591 #define ENET_DMA_BUS_MODE_ATDS_SHIFT (7U) 5592 #define ENET_DMA_BUS_MODE_ATDS_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_ATDS_SHIFT) & ENET_DMA_BUS_MODE_ATDS_MASK) 5593 #define ENET_DMA_BUS_MODE_ATDS_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_ATDS_MASK) >> ENET_DMA_BUS_MODE_ATDS_SHIFT) 5594 5595 /* 5596 * DSL (RW) 5597 * 5598 * Descriptor Skip Length 5599 * This bit specifies the number of Word, Dword, or Lword (depending on the 32-bit, 64-bit, or 128-bit bus) to skip between two unchained descriptors. The address skipping starts from the end of current descriptor to the start of next descriptor. When the DSL value is equal to zero, the descriptor table is taken as contiguous by the DMA in Ring mode. 5600 */ 5601 #define ENET_DMA_BUS_MODE_DSL_MASK (0x7CU) 5602 #define ENET_DMA_BUS_MODE_DSL_SHIFT (2U) 5603 #define ENET_DMA_BUS_MODE_DSL_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_DSL_SHIFT) & ENET_DMA_BUS_MODE_DSL_MASK) 5604 #define ENET_DMA_BUS_MODE_DSL_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_DSL_MASK) >> ENET_DMA_BUS_MODE_DSL_SHIFT) 5605 5606 /* 5607 * DA (RW) 5608 * 5609 * DMA Arbitration Scheme 5610 * This bit specifies the arbitration scheme between the transmit and receive paths of Channel 0. 5611 * - 0: Weighted round-robin with Rx:Tx or Tx:Rx The priority between the paths is according to the priority specified in Bits [15:14] (PR) and priority weights specified in Bit 27 (TXPR). 5612 * - 1: Fixed priority The transmit path has priority over receive path when Bit 27 (TXPR) is set. Otherwise, receive path has priority over the transmit path. 5613 */ 5614 #define ENET_DMA_BUS_MODE_DA_MASK (0x2U) 5615 #define ENET_DMA_BUS_MODE_DA_SHIFT (1U) 5616 #define ENET_DMA_BUS_MODE_DA_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_DA_SHIFT) & ENET_DMA_BUS_MODE_DA_MASK) 5617 #define ENET_DMA_BUS_MODE_DA_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_DA_MASK) >> ENET_DMA_BUS_MODE_DA_SHIFT) 5618 5619 /* 5620 * SWR (RW) 5621 * 5622 * Software Reset 5623 * When this bit is set, the MAC DMA Controller resets the logic and all internal registers of the MAC. It is cleared automatically after the reset operation is complete in all of the DWC_gmac clock domains. Before reprogramming any register of the DWC_gmac, you should read a zero (0) value in this bit. Note: - The Software reset function is driven only by this bit. Bit 0 of Register 64 (Channel 1 Bus Mode Register) or Register 128 (Channel 2 Bus Mode Register) has no impact on the Software reset function. - The reset operation is completed only when all resets in all active clock domains are de-asserted. Therefore, it is essential that all PHY inputs clocks (applicable for the selected PHY interface) are present for the software reset completion. The time to complete the software reset operation depends on the frequency of the slowest active clock. 5624 */ 5625 #define ENET_DMA_BUS_MODE_SWR_MASK (0x1U) 5626 #define ENET_DMA_BUS_MODE_SWR_SHIFT (0U) 5627 #define ENET_DMA_BUS_MODE_SWR_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_SWR_SHIFT) & ENET_DMA_BUS_MODE_SWR_MASK) 5628 #define ENET_DMA_BUS_MODE_SWR_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_SWR_MASK) >> ENET_DMA_BUS_MODE_SWR_SHIFT) 5629 5630 /* Bitfield definition for register: DMA_TX_POLL_DEMAND */ 5631 /* 5632 * TPD (RW) 5633 * 5634 * Transmit Poll Demand 5635 * When these bits are written with any value, the DMA reads the current descriptor to which the Register 18 (Current Host Transmit Descriptor Register) is pointing. If that descriptor is not available (owned by the Host), the transmission returns to the Suspend state and Bit 2 (TU) of Register 5 (Status Register) is asserted. If the descriptor is available, the transmission resumes. 5636 */ 5637 #define ENET_DMA_TX_POLL_DEMAND_TPD_MASK (0xFFFFFFFFUL) 5638 #define ENET_DMA_TX_POLL_DEMAND_TPD_SHIFT (0U) 5639 #define ENET_DMA_TX_POLL_DEMAND_TPD_SET(x) (((uint32_t)(x) << ENET_DMA_TX_POLL_DEMAND_TPD_SHIFT) & ENET_DMA_TX_POLL_DEMAND_TPD_MASK) 5640 #define ENET_DMA_TX_POLL_DEMAND_TPD_GET(x) (((uint32_t)(x) & ENET_DMA_TX_POLL_DEMAND_TPD_MASK) >> ENET_DMA_TX_POLL_DEMAND_TPD_SHIFT) 5641 5642 /* Bitfield definition for register: DMA_RX_POLL_DEMAND */ 5643 /* 5644 * RPD (RW) 5645 * 5646 * Receive Poll Demand 5647 * When these bits are written with any value, the DMA reads the current descriptor to which the Register 19 (Current Host Receive Descriptor Register) is pointing. If that descriptor is not available (owned by the Host), the reception returns to the Suspended state and Bit 7 (RU) of Register 5 (Status Register) is asserted. If the descriptor is available, the Rx DMA returns to the active state. 5648 */ 5649 #define ENET_DMA_RX_POLL_DEMAND_RPD_MASK (0xFFFFFFFFUL) 5650 #define ENET_DMA_RX_POLL_DEMAND_RPD_SHIFT (0U) 5651 #define ENET_DMA_RX_POLL_DEMAND_RPD_SET(x) (((uint32_t)(x) << ENET_DMA_RX_POLL_DEMAND_RPD_SHIFT) & ENET_DMA_RX_POLL_DEMAND_RPD_MASK) 5652 #define ENET_DMA_RX_POLL_DEMAND_RPD_GET(x) (((uint32_t)(x) & ENET_DMA_RX_POLL_DEMAND_RPD_MASK) >> ENET_DMA_RX_POLL_DEMAND_RPD_SHIFT) 5653 5654 /* Bitfield definition for register: DMA_RX_DESC_LIST_ADDR */ 5655 /* 5656 * RDESLA (RW) 5657 * 5658 * Start of Receive List 5659 * This field contains the base address of the first descriptor in the Receive Descriptor list. The LSB bits (1:0, 2:0, or 3:0) for 32-bit, 64-bit, or 128-bit bus width are ignored and internally taken as all-zero by the DMA. Therefore, these LSB bits are read-only (RO). 5660 */ 5661 #define ENET_DMA_RX_DESC_LIST_ADDR_RDESLA_MASK (0xFFFFFFFFUL) 5662 #define ENET_DMA_RX_DESC_LIST_ADDR_RDESLA_SHIFT (0U) 5663 #define ENET_DMA_RX_DESC_LIST_ADDR_RDESLA_SET(x) (((uint32_t)(x) << ENET_DMA_RX_DESC_LIST_ADDR_RDESLA_SHIFT) & ENET_DMA_RX_DESC_LIST_ADDR_RDESLA_MASK) 5664 #define ENET_DMA_RX_DESC_LIST_ADDR_RDESLA_GET(x) (((uint32_t)(x) & ENET_DMA_RX_DESC_LIST_ADDR_RDESLA_MASK) >> ENET_DMA_RX_DESC_LIST_ADDR_RDESLA_SHIFT) 5665 5666 /* Bitfield definition for register: DMA_TX_DESC_LIST_ADDR */ 5667 /* 5668 * TDESLA (RW) 5669 * 5670 * Start of Transmit List 5671 * This field contains the base address of the first descriptor in the Transmit Descriptor list. The LSB bits (1:0, 2:0, 3:0) for 32-bit, 64-bit, or 128-bit bus width are ignored and are internally taken as all-zero by the DMA. Therefore, these LSB bits are read-only (RO). 5672 */ 5673 #define ENET_DMA_TX_DESC_LIST_ADDR_TDESLA_MASK (0xFFFFFFFFUL) 5674 #define ENET_DMA_TX_DESC_LIST_ADDR_TDESLA_SHIFT (0U) 5675 #define ENET_DMA_TX_DESC_LIST_ADDR_TDESLA_SET(x) (((uint32_t)(x) << ENET_DMA_TX_DESC_LIST_ADDR_TDESLA_SHIFT) & ENET_DMA_TX_DESC_LIST_ADDR_TDESLA_MASK) 5676 #define ENET_DMA_TX_DESC_LIST_ADDR_TDESLA_GET(x) (((uint32_t)(x) & ENET_DMA_TX_DESC_LIST_ADDR_TDESLA_MASK) >> ENET_DMA_TX_DESC_LIST_ADDR_TDESLA_SHIFT) 5677 5678 /* Bitfield definition for register: DMA_STATUS */ 5679 /* 5680 * GLPII (RW) 5681 * 5682 * GLPII: GMAC LPI Interrupt (for Channel 0) 5683 * This bit indicates an interrupt event in the LPI logic of the MAC. To reset this bit to 1'b0, the software must read the corresponding registers in the DWC_gmac to get the exact cause of the interrupt and clear its source. Note: GLPII status is given only in Channel 0 DMA register and is applicable only when the Energy Efficient Ethernet feature is enabled. Otherwise, this bit is reserved. When this bit is high, the interrupt signal from the MAC (sbd_intr_o) is high. -or- GTMSI: GMAC TMS Interrupt (for Channel 1 and Channel 2) This bit indicates an interrupt event in the traffic manager and scheduler logic of DWC_gmac. To reset this bit, the software must read the corresponding registers (Channel Status Register) to get the exact cause of the interrupt and clear its source. Note: GTMSI status is given only in Channel 1 and Channel 2 DMA register when the AV feature is enabled and corresponding additional transmit channels are present. Otherwise, this bit is reserved. When this bit is high, the interrupt signal from the MAC (sbd_intr_o) is high. 5684 */ 5685 #define ENET_DMA_STATUS_GLPII_MASK (0x40000000UL) 5686 #define ENET_DMA_STATUS_GLPII_SHIFT (30U) 5687 #define ENET_DMA_STATUS_GLPII_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_GLPII_SHIFT) & ENET_DMA_STATUS_GLPII_MASK) 5688 #define ENET_DMA_STATUS_GLPII_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_GLPII_MASK) >> ENET_DMA_STATUS_GLPII_SHIFT) 5689 5690 /* 5691 * TTI (RW) 5692 * 5693 * Timestamp Trigger Interrupt 5694 * This bit indicates an interrupt event in the Timestamp Generator block of the DWC_gmac. The software must read the corresponding registers in the DWC_gmac to get the exact cause of the interrupt and clear its source to reset this bit to 1'b0. When this bit is high, the interrupt signal from the DWC_gmac subsystem (sbd_intr_o) is high. This bit is applicable only when the IEEE 1588 Timestamp feature is enabled. Otherwise, this bit is reserved. 5695 */ 5696 #define ENET_DMA_STATUS_TTI_MASK (0x20000000UL) 5697 #define ENET_DMA_STATUS_TTI_SHIFT (29U) 5698 #define ENET_DMA_STATUS_TTI_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_TTI_SHIFT) & ENET_DMA_STATUS_TTI_MASK) 5699 #define ENET_DMA_STATUS_TTI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_TTI_MASK) >> ENET_DMA_STATUS_TTI_SHIFT) 5700 5701 /* 5702 * GPI (RW) 5703 * 5704 * GMAC PMT Interrupt 5705 * This bit indicates an interrupt event in the PMT module of the DWC_gmac. The software must read the PMT Control and Status Register in the MAC to get the exact cause of interrupt and clear its source to reset this bit to 1’b0. The interrupt signal from the DWC_gmac subsystem (sbd_intr_o) is high when this bit is high. This bit is applicable only when the Power Management feature is enabled. Otherwise, this bit is reserved. Note: The GPI and pmt_intr_o interrupts are generated in different clock domains. 5706 */ 5707 #define ENET_DMA_STATUS_GPI_MASK (0x10000000UL) 5708 #define ENET_DMA_STATUS_GPI_SHIFT (28U) 5709 #define ENET_DMA_STATUS_GPI_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_GPI_SHIFT) & ENET_DMA_STATUS_GPI_MASK) 5710 #define ENET_DMA_STATUS_GPI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_GPI_MASK) >> ENET_DMA_STATUS_GPI_SHIFT) 5711 5712 /* 5713 * GMI (RW) 5714 * 5715 * GMAC MMC Interrupt 5716 * This bit reflects an interrupt event in the MMC module of the DWC_gmac. The software must read the corresponding registers in the DWC_gmac to get the exact cause of the interrupt and clear the source of interrupt to make this bit as 1’b0. The interrupt signal from the DWC_gmac subsystem (sbd_intr_o) is high when this bit is high. This bit is applicable only when the MAC Management Counters (MMC) are enabled. Otherwise, this bit is reserved. 5717 */ 5718 #define ENET_DMA_STATUS_GMI_MASK (0x8000000UL) 5719 #define ENET_DMA_STATUS_GMI_SHIFT (27U) 5720 #define ENET_DMA_STATUS_GMI_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_GMI_SHIFT) & ENET_DMA_STATUS_GMI_MASK) 5721 #define ENET_DMA_STATUS_GMI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_GMI_MASK) >> ENET_DMA_STATUS_GMI_SHIFT) 5722 5723 /* 5724 * GLI (RW) 5725 * 5726 * GMAC Line Interface Interrupt 5727 * When set, this bit reflects any of the following interrupt events in the DWC_gmac interfaces (if present and enabled in your configuration): - PCS (TBI, RTBI, or SGMII): Link change or auto-negotiation complete event - SMII or RGMII: Link change event - General Purpose Input Status (GPIS): Any LL or LH event on the gpi_i input ports To identify the exact cause of the interrupt, the software must first read Bit 11 and Bits[2:0] of Register 14 (Interrupt Status Register) and then to clear the source of interrupt (which also clears the GLI interrupt), read any of the following corresponding registers: - PCS (TBI, RTBI, or SGMII): Register 49 (AN Status Register) - SMII or RGMII: Register 54 (SGMII/RGMII/SMII Control and Status Register) - General Purpose Input (GPI): Register 56 (General Purpose IO Register) The interrupt signal from the DWC_gmac subsystem (sbd_intr_o) is high when this bit is high. 5728 */ 5729 #define ENET_DMA_STATUS_GLI_MASK (0x4000000UL) 5730 #define ENET_DMA_STATUS_GLI_SHIFT (26U) 5731 #define ENET_DMA_STATUS_GLI_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_GLI_SHIFT) & ENET_DMA_STATUS_GLI_MASK) 5732 #define ENET_DMA_STATUS_GLI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_GLI_MASK) >> ENET_DMA_STATUS_GLI_SHIFT) 5733 5734 /* 5735 * EB (RW) 5736 * 5737 * Error Bits 5738 * This field indicates the type of error that caused a Bus Error, for example, error response on the AHB or AXI interface. This field is valid only when Bit 13 (FBI) is set. This field does not generate an interrupt. 5739 * - 0 0 0: Error during Rx DMA Write Data Transfer 5740 * - 0 1 1: Error during Tx DMA Read Data Transfer 5741 * - 1 0 0: Error during Rx DMA Descriptor Write Access 5742 * - 1 0 1: Error during Tx DMA Descriptor Write Access 5743 * - 1 1 0: Error during Rx DMA Descriptor Read Access 5744 * - 1 1 1: Error during Tx DMA Descriptor Read Access Note: 001 and 010 are reserved. 5745 */ 5746 #define ENET_DMA_STATUS_EB_MASK (0x3800000UL) 5747 #define ENET_DMA_STATUS_EB_SHIFT (23U) 5748 #define ENET_DMA_STATUS_EB_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_EB_SHIFT) & ENET_DMA_STATUS_EB_MASK) 5749 #define ENET_DMA_STATUS_EB_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_EB_MASK) >> ENET_DMA_STATUS_EB_SHIFT) 5750 5751 /* 5752 * TS (RW) 5753 * 5754 * Transmit Process State 5755 * This field indicates the Transmit DMA FSM state. This field does not generate an interrupt. 5756 * - 3’b000: Stopped; Reset or Stop Transmit Command issued 5757 * - 3’b001: Running; Fetching Transmit Transfer Descriptor 5758 * - 3’b010: Running; Waiting for status 5759 * - 3’b011: Running; Reading Data from host memory buffer and queuing it to transmit buffer (Tx FIFO) 5760 * - 3’b100: TIME_STAMP write state 5761 * - 3’b101: Reserved for future use 5762 * - 3’b110: Suspended; Transmit Descriptor Unavailable or Transmit Buffer Underflow 5763 * - 3’b111: Running; Closing Transmit Descriptor 5764 */ 5765 #define ENET_DMA_STATUS_TS_MASK (0x700000UL) 5766 #define ENET_DMA_STATUS_TS_SHIFT (20U) 5767 #define ENET_DMA_STATUS_TS_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_TS_SHIFT) & ENET_DMA_STATUS_TS_MASK) 5768 #define ENET_DMA_STATUS_TS_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_TS_MASK) >> ENET_DMA_STATUS_TS_SHIFT) 5769 5770 /* 5771 * RS (RW) 5772 * 5773 * Receive Process State 5774 * This field indicates the Receive DMA FSM state. This field does not generate an interrupt. 5775 * - 3’b000: Stopped: Reset or Stop Receive Command issued 5776 * - 3’b001: Running: Fetching Receive Transfer Descriptor 5777 * - 3’b010: Reserved for future use 5778 * - 3’b011: Running: Waiting for receive packet 5779 * - 3’b100: Suspended: Receive Descriptor Unavailable 5780 * - 3’b101: Running: Closing Receive Descriptor 5781 * - 3’b110: TIME_STAMP write state 5782 * - 3’b111: Running: Transferring the receive packet data from receive buffer to host memory 5783 */ 5784 #define ENET_DMA_STATUS_RS_MASK (0xE0000UL) 5785 #define ENET_DMA_STATUS_RS_SHIFT (17U) 5786 #define ENET_DMA_STATUS_RS_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_RS_SHIFT) & ENET_DMA_STATUS_RS_MASK) 5787 #define ENET_DMA_STATUS_RS_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_RS_MASK) >> ENET_DMA_STATUS_RS_SHIFT) 5788 5789 /* 5790 * NIS (RW) 5791 * 5792 * Normal Interrupt Summary 5793 * Normal Interrupt Summary bit value is the logical OR of the following bits when the corresponding interrupt bits are enabled in Register 7 (Interrupt Enable Register): - Register 5[0]: Transmit Interrupt - Register 5[2]: Transmit Buffer Unavailable - Register 5[6]: Receive Interrupt - Register 5[14]: Early Receive Interrupt Only unmasked bits (interrupts for which interrupt enable is set in Register 7) affect the Normal Interrupt Summary bit. This is a sticky bit and must be cleared (by writing 1 to this bit) each time a corresponding bit, which causes NIS to be set, is cleared. 5794 */ 5795 #define ENET_DMA_STATUS_NIS_MASK (0x10000UL) 5796 #define ENET_DMA_STATUS_NIS_SHIFT (16U) 5797 #define ENET_DMA_STATUS_NIS_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_NIS_SHIFT) & ENET_DMA_STATUS_NIS_MASK) 5798 #define ENET_DMA_STATUS_NIS_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_NIS_MASK) >> ENET_DMA_STATUS_NIS_SHIFT) 5799 5800 /* 5801 * AIS (RW) 5802 * 5803 * Abnormal Interrupt Summary 5804 * Abnormal Interrupt Summary bit value is the logical OR of the following when the corresponding interrupt bits are enabled in Register 7 (Interrupt Enable Register): - Register 5[1]: Transmit Process Stopped - Register 5[3]: Transmit Jabber Timeout - Register 5[4]: Receive FIFO Overflow - Register 5[5]: Transmit Underflow - Register 5[7]: Receive Buffer Unavailable - Register 5[8]: Receive Process Stopped - Register 5[9]: Receive Watchdog Timeout - Register 5[10]: Early Transmit Interrupt - Register 5[13]: Fatal Bus Error Only unmasked bits affect the Abnormal Interrupt Summary bit. This is a sticky bit and must be cleared (by writing 1 to this bit) each time a corresponding bit, which causes AIS to be set, is cleared. 5805 */ 5806 #define ENET_DMA_STATUS_AIS_MASK (0x8000U) 5807 #define ENET_DMA_STATUS_AIS_SHIFT (15U) 5808 #define ENET_DMA_STATUS_AIS_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_AIS_SHIFT) & ENET_DMA_STATUS_AIS_MASK) 5809 #define ENET_DMA_STATUS_AIS_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_AIS_MASK) >> ENET_DMA_STATUS_AIS_SHIFT) 5810 5811 /* 5812 * ERI (RW) 5813 * 5814 * Early Receive Interrupt 5815 * This bit indicates that the DMA filled the first data buffer of the packet. This bit is cleared when the software writes 1 to this bit or Bit 6 (RI) of this register is set (whichever occurs earlier). 5816 */ 5817 #define ENET_DMA_STATUS_ERI_MASK (0x4000U) 5818 #define ENET_DMA_STATUS_ERI_SHIFT (14U) 5819 #define ENET_DMA_STATUS_ERI_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_ERI_SHIFT) & ENET_DMA_STATUS_ERI_MASK) 5820 #define ENET_DMA_STATUS_ERI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_ERI_MASK) >> ENET_DMA_STATUS_ERI_SHIFT) 5821 5822 /* 5823 * FBI (RW) 5824 * 5825 * Fatal Bus Error Interrupt 5826 * This bit indicates that a bus error occurred, as described in Bits [25:23]. When this bit is set, the corresponding DMA engine disables all of its bus accesses. 5827 */ 5828 #define ENET_DMA_STATUS_FBI_MASK (0x2000U) 5829 #define ENET_DMA_STATUS_FBI_SHIFT (13U) 5830 #define ENET_DMA_STATUS_FBI_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_FBI_SHIFT) & ENET_DMA_STATUS_FBI_MASK) 5831 #define ENET_DMA_STATUS_FBI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_FBI_MASK) >> ENET_DMA_STATUS_FBI_SHIFT) 5832 5833 /* 5834 * ETI (RW) 5835 * 5836 * Early Transmit Interrupt 5837 * This bit indicates that the frame to be transmitted is fully transferred to the MTL Transmit FIFO. 5838 */ 5839 #define ENET_DMA_STATUS_ETI_MASK (0x400U) 5840 #define ENET_DMA_STATUS_ETI_SHIFT (10U) 5841 #define ENET_DMA_STATUS_ETI_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_ETI_SHIFT) & ENET_DMA_STATUS_ETI_MASK) 5842 #define ENET_DMA_STATUS_ETI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_ETI_MASK) >> ENET_DMA_STATUS_ETI_SHIFT) 5843 5844 /* 5845 * RWT (RW) 5846 * 5847 * Receive Watchdog Timeout 5848 * When set, this bit indicates that the Receive Watchdog Timer expired while receiving the current frame and the current frame is truncated after the watchdog timeout. 5849 */ 5850 #define ENET_DMA_STATUS_RWT_MASK (0x200U) 5851 #define ENET_DMA_STATUS_RWT_SHIFT (9U) 5852 #define ENET_DMA_STATUS_RWT_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_RWT_SHIFT) & ENET_DMA_STATUS_RWT_MASK) 5853 #define ENET_DMA_STATUS_RWT_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_RWT_MASK) >> ENET_DMA_STATUS_RWT_SHIFT) 5854 5855 /* 5856 * RPS (RW) 5857 * 5858 * Receive Process Stopped 5859 * This bit is asserted when the Receive Process enters the Stopped state. 5860 */ 5861 #define ENET_DMA_STATUS_RPS_MASK (0x100U) 5862 #define ENET_DMA_STATUS_RPS_SHIFT (8U) 5863 #define ENET_DMA_STATUS_RPS_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_RPS_SHIFT) & ENET_DMA_STATUS_RPS_MASK) 5864 #define ENET_DMA_STATUS_RPS_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_RPS_MASK) >> ENET_DMA_STATUS_RPS_SHIFT) 5865 5866 /* 5867 * RU (RW) 5868 * 5869 * Receive Buffer Unavailable 5870 * This bit indicates that the host owns the Next Descriptor in the Receive List and the DMA cannot acquire it. The Receive Process is suspended. To resume processing Receive descriptors, the host should change the ownership of the descriptor and issue a Receive Poll Demand command. If no Receive Poll Demand is issued, the Receive Process resumes when the next recognized incoming frame is received. This bit is set only when the previous Receive Descriptor is owned by the DMA. 5871 */ 5872 #define ENET_DMA_STATUS_RU_MASK (0x80U) 5873 #define ENET_DMA_STATUS_RU_SHIFT (7U) 5874 #define ENET_DMA_STATUS_RU_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_RU_SHIFT) & ENET_DMA_STATUS_RU_MASK) 5875 #define ENET_DMA_STATUS_RU_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_RU_MASK) >> ENET_DMA_STATUS_RU_SHIFT) 5876 5877 /* 5878 * RI (RW) 5879 * 5880 * Receive Interrupt 5881 * This bit indicates that the frame reception is complete. When reception is complete, the Bit 31 of RDES1 (Disable Interrupt on Completion) is reset in the last Descriptor, and the specific frame status information is updated in the descriptor. The reception remains in the Running state. 5882 */ 5883 #define ENET_DMA_STATUS_RI_MASK (0x40U) 5884 #define ENET_DMA_STATUS_RI_SHIFT (6U) 5885 #define ENET_DMA_STATUS_RI_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_RI_SHIFT) & ENET_DMA_STATUS_RI_MASK) 5886 #define ENET_DMA_STATUS_RI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_RI_MASK) >> ENET_DMA_STATUS_RI_SHIFT) 5887 5888 /* 5889 * UNF (RW) 5890 * 5891 * Transmit Underflow 5892 * This bit indicates that the Transmit Buffer had an Underflow during frame transmission. Transmission is suspended and an Underflow Error TDES0[1] is set. 5893 */ 5894 #define ENET_DMA_STATUS_UNF_MASK (0x20U) 5895 #define ENET_DMA_STATUS_UNF_SHIFT (5U) 5896 #define ENET_DMA_STATUS_UNF_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_UNF_SHIFT) & ENET_DMA_STATUS_UNF_MASK) 5897 #define ENET_DMA_STATUS_UNF_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_UNF_MASK) >> ENET_DMA_STATUS_UNF_SHIFT) 5898 5899 /* 5900 * OVF (RW) 5901 * 5902 * Receive Overflow 5903 * This bit indicates that the Receive Buffer had an Overflow during frame reception. If the partial frame is transferred to the application, the overflow status is set in RDES0[11]. 5904 */ 5905 #define ENET_DMA_STATUS_OVF_MASK (0x10U) 5906 #define ENET_DMA_STATUS_OVF_SHIFT (4U) 5907 #define ENET_DMA_STATUS_OVF_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_OVF_SHIFT) & ENET_DMA_STATUS_OVF_MASK) 5908 #define ENET_DMA_STATUS_OVF_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_OVF_MASK) >> ENET_DMA_STATUS_OVF_SHIFT) 5909 5910 /* 5911 * TJT (RW) 5912 * 5913 * Transmit Jabber Timeout 5914 * This bit indicates that the Transmit Jabber Timer expired, which happens when the frame size exceeds 2,048 (10,240 bytes when the Jumbo frame is enabled). When the Jabber Timeout occurs, the transmission process is aborted and placed in the Stopped state. This causes the Transmit Jabber Timeout TDES0[14] flag to assert. 5915 */ 5916 #define ENET_DMA_STATUS_TJT_MASK (0x8U) 5917 #define ENET_DMA_STATUS_TJT_SHIFT (3U) 5918 #define ENET_DMA_STATUS_TJT_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_TJT_SHIFT) & ENET_DMA_STATUS_TJT_MASK) 5919 #define ENET_DMA_STATUS_TJT_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_TJT_MASK) >> ENET_DMA_STATUS_TJT_SHIFT) 5920 5921 /* 5922 * TU (RW) 5923 * 5924 * Transmit Buffer Unavailable 5925 * This bit indicates that the host owns the Next Descriptor in the Transmit List and the DMA cannot acquire it. Transmission is suspended. Bits[22:20] explain the Transmit Process state transitions. To resume processing Transmit descriptors, the host should change the ownership of the descriptor by setting TDES0[31] and then issue a Transmit Poll Demand command. 5926 */ 5927 #define ENET_DMA_STATUS_TU_MASK (0x4U) 5928 #define ENET_DMA_STATUS_TU_SHIFT (2U) 5929 #define ENET_DMA_STATUS_TU_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_TU_SHIFT) & ENET_DMA_STATUS_TU_MASK) 5930 #define ENET_DMA_STATUS_TU_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_TU_MASK) >> ENET_DMA_STATUS_TU_SHIFT) 5931 5932 /* 5933 * TPS (RW) 5934 * 5935 * Transmit Process Stopped 5936 * This bit is set when the transmission is stopped. 5937 */ 5938 #define ENET_DMA_STATUS_TPS_MASK (0x2U) 5939 #define ENET_DMA_STATUS_TPS_SHIFT (1U) 5940 #define ENET_DMA_STATUS_TPS_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_TPS_SHIFT) & ENET_DMA_STATUS_TPS_MASK) 5941 #define ENET_DMA_STATUS_TPS_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_TPS_MASK) >> ENET_DMA_STATUS_TPS_SHIFT) 5942 5943 /* 5944 * TI (RW) 5945 * 5946 * Transmit Interrupt 5947 * This bit indicates that the frame transmission is complete. When transmission is complete, Bit 31 (OWN) of TDES0 is reset, and the specific frame status information is updated in the descriptor. 5948 */ 5949 #define ENET_DMA_STATUS_TI_MASK (0x1U) 5950 #define ENET_DMA_STATUS_TI_SHIFT (0U) 5951 #define ENET_DMA_STATUS_TI_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_TI_SHIFT) & ENET_DMA_STATUS_TI_MASK) 5952 #define ENET_DMA_STATUS_TI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_TI_MASK) >> ENET_DMA_STATUS_TI_SHIFT) 5953 5954 /* Bitfield definition for register: DMA_OP_MODE */ 5955 /* 5956 * DT (RW) 5957 * 5958 * Disable Dropping of TCP/IP Checksum Error Frames 5959 * When this bit is set, the MAC does not drop the frames which only have errors detected by the Receive Checksum Offload engine. Such frames do not have any errors (including FCS error) in the Ethernet frame received by the MAC but have errors only in the encapsulated payload. When this bit is reset, all error frames are dropped if the FEF bit is reset. If the IPC Full Checksum Offload Engine (Type 2) is disabled, this bit is reserved (RO with value 1'b0). 5960 */ 5961 #define ENET_DMA_OP_MODE_DT_MASK (0x10000000UL) 5962 #define ENET_DMA_OP_MODE_DT_SHIFT (28U) 5963 #define ENET_DMA_OP_MODE_DT_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_DT_SHIFT) & ENET_DMA_OP_MODE_DT_MASK) 5964 #define ENET_DMA_OP_MODE_DT_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_DT_MASK) >> ENET_DMA_OP_MODE_DT_SHIFT) 5965 5966 /* 5967 * RSF (RW) 5968 * 5969 * Receive Store and Forward 5970 * When this bit is set, the MTL reads a frame from the Rx FIFO only after the complete frame has been written to it, ignoring the RTC bits. When this bit is reset, the Rx FIFO operates in the cut-through mode, subject to the threshold specified by the RTC bits. 5971 */ 5972 #define ENET_DMA_OP_MODE_RSF_MASK (0x2000000UL) 5973 #define ENET_DMA_OP_MODE_RSF_SHIFT (25U) 5974 #define ENET_DMA_OP_MODE_RSF_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_RSF_SHIFT) & ENET_DMA_OP_MODE_RSF_MASK) 5975 #define ENET_DMA_OP_MODE_RSF_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_RSF_MASK) >> ENET_DMA_OP_MODE_RSF_SHIFT) 5976 5977 /* 5978 * DFF (RW) 5979 * 5980 * Disable Flushing of Received Frames 5981 * When this bit is set, the Rx DMA does not flush any frames because of the unavailability of receive descriptors or buffers as it does normally when this bit is reset. (See “Receive Process Suspended” on page 83.) 5982 */ 5983 #define ENET_DMA_OP_MODE_DFF_MASK (0x1000000UL) 5984 #define ENET_DMA_OP_MODE_DFF_SHIFT (24U) 5985 #define ENET_DMA_OP_MODE_DFF_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_DFF_SHIFT) & ENET_DMA_OP_MODE_DFF_MASK) 5986 #define ENET_DMA_OP_MODE_DFF_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_DFF_MASK) >> ENET_DMA_OP_MODE_DFF_SHIFT) 5987 5988 /* 5989 * RFA_2 (RW) 5990 * 5991 * MSB of Threshold for Activating Flow Control 5992 * If the DWC_gmac is configured for an Rx FIFO size of 8 KB or more, this bit (when set) provides additional threshold levels for activating the flow control in both half-duplex and full-duplex modes. This bit (as Most Significant Bit), along with the RFA (Bits [10:9]), gives the following thresholds for activating flow control: 5993 * - 100: Full minus 5 KB, that is, FULL — 5 KB 5994 * - 101: Full minus 6 KB, that is, FULL — 6 KB 5995 * - 110: Full minus 7 KB, that is, FULL — 7 KB 5996 * - 111: Reserved This bit is reserved (and RO) if the Rx FIFO is 4 KB or less deep. 5997 */ 5998 #define ENET_DMA_OP_MODE_RFA_2_MASK (0x800000UL) 5999 #define ENET_DMA_OP_MODE_RFA_2_SHIFT (23U) 6000 #define ENET_DMA_OP_MODE_RFA_2_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_RFA_2_SHIFT) & ENET_DMA_OP_MODE_RFA_2_MASK) 6001 #define ENET_DMA_OP_MODE_RFA_2_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_RFA_2_MASK) >> ENET_DMA_OP_MODE_RFA_2_SHIFT) 6002 6003 /* 6004 * RFD_2 (RW) 6005 * 6006 * MSB of Threshold for Deactivating Flow Control 6007 * If the DWC_gmac is configured for Rx FIFO size of 8 KB or more, this bit (when set) provides additional threshold levels for deactivating the flow control in both half-duplex and full-duplex modes. This bit (as Most Significant Bit) along with the RFD (Bits [12:11]) gives the following thresholds for deactivating flow control: 6008 * - 100: Full minus 5 KB, that is, FULL — 5 KB 6009 * - 101: Full minus 6 KB, that is, FULL — 6 KB 6010 * - 110: Full minus 7 KB, that is, FULL — 7 KB 6011 * - 111: Reserved This bit is reserved (and RO) if the Rx FIFO is 4 KB or less deep. 6012 */ 6013 #define ENET_DMA_OP_MODE_RFD_2_MASK (0x400000UL) 6014 #define ENET_DMA_OP_MODE_RFD_2_SHIFT (22U) 6015 #define ENET_DMA_OP_MODE_RFD_2_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_RFD_2_SHIFT) & ENET_DMA_OP_MODE_RFD_2_MASK) 6016 #define ENET_DMA_OP_MODE_RFD_2_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_RFD_2_MASK) >> ENET_DMA_OP_MODE_RFD_2_SHIFT) 6017 6018 /* 6019 * TSF (RW) 6020 * 6021 * Transmit Store and Forward 6022 * When this bit is set, transmission starts when a full frame resides in the MTL Transmit FIFO. When this bit is set, the TTC values specified in Bits [16:14] are ignored. This bit should be changed only when the transmission is stopped. 6023 */ 6024 #define ENET_DMA_OP_MODE_TSF_MASK (0x200000UL) 6025 #define ENET_DMA_OP_MODE_TSF_SHIFT (21U) 6026 #define ENET_DMA_OP_MODE_TSF_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_TSF_SHIFT) & ENET_DMA_OP_MODE_TSF_MASK) 6027 #define ENET_DMA_OP_MODE_TSF_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_TSF_MASK) >> ENET_DMA_OP_MODE_TSF_SHIFT) 6028 6029 /* 6030 * FTF (RW) 6031 * 6032 * Flush Transmit FIFO 6033 * When this bit is set, the transmit FIFO controller logic is reset to its default values and thus all data in the Tx FIFO is lost or flushed. This bit is cleared internally when the flushing operation is complete. The Operation Mode register should not be written to until this bit is cleared. The data which is already accepted by the MAC transmitter is not flushed. It is scheduled for transmission and results in underflow and runt frame transmission. 6034 */ 6035 #define ENET_DMA_OP_MODE_FTF_MASK (0x100000UL) 6036 #define ENET_DMA_OP_MODE_FTF_SHIFT (20U) 6037 #define ENET_DMA_OP_MODE_FTF_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_FTF_SHIFT) & ENET_DMA_OP_MODE_FTF_MASK) 6038 #define ENET_DMA_OP_MODE_FTF_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_FTF_MASK) >> ENET_DMA_OP_MODE_FTF_SHIFT) 6039 6040 /* 6041 * TTC (RW) 6042 * 6043 * Transmit Threshold Control 6044 * These bits control the threshold level of the MTL Transmit FIFO. Transmission starts when the frame size within the MTL Transmit FIFO is larger than the threshold. In addition, full frames with a length less than the threshold are also transmitted. These bits are used only when Bit 21 (TSF) is reset. 6045 * - 000: 64 6046 * - 001: 128 6047 * - 010: 192 6048 * - 011: 256 6049 * - 100: 40 6050 * - 101: 32 6051 * - 110: 24 6052 * - 111: 16 6053 */ 6054 #define ENET_DMA_OP_MODE_TTC_MASK (0x1C000UL) 6055 #define ENET_DMA_OP_MODE_TTC_SHIFT (14U) 6056 #define ENET_DMA_OP_MODE_TTC_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_TTC_SHIFT) & ENET_DMA_OP_MODE_TTC_MASK) 6057 #define ENET_DMA_OP_MODE_TTC_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_TTC_MASK) >> ENET_DMA_OP_MODE_TTC_SHIFT) 6058 6059 /* 6060 * ST (RW) 6061 * 6062 * Start or Stop Transmission Command 6063 * When this bit is set, transmission is placed in the Running state, and the DMA checks the Transmit List at the current position for a frame to be transmitted. Descriptor acquisition is attempted either from the current position in the list, which is the Transmit List Base Address set by Register 4 (Transmit Descriptor List Address Register), or from the position retained when transmission was stopped previously. If the DMA does not own the current descriptor, transmission enters the Suspended state and Bit 2 (Transmit Buffer Unavailable) of Register 5 (Status Register) is set. The Start Transmission command is effective only when transmission is stopped. If the command is issued before setting Register 4 (Transmit Descriptor List Address Register), then the DMA behavior is unpredictable. When this bit is reset, the transmission process is placed in the Stopped state after completing the transmission of the current frame. The Next Descriptor position in the Transmit List is saved, and it becomes the current position when transmission is restarted. To change the list address, you need to program Register 4 (Transmit Descriptor List Address Register) with a new value when this bit is reset. The new value is considered when this bit is set again. The stop transmission command is effective only when the transmission of the current frame is complete or the transmission is in the Suspended state. 6064 */ 6065 #define ENET_DMA_OP_MODE_ST_MASK (0x2000U) 6066 #define ENET_DMA_OP_MODE_ST_SHIFT (13U) 6067 #define ENET_DMA_OP_MODE_ST_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_ST_SHIFT) & ENET_DMA_OP_MODE_ST_MASK) 6068 #define ENET_DMA_OP_MODE_ST_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_ST_MASK) >> ENET_DMA_OP_MODE_ST_SHIFT) 6069 6070 /* 6071 * RFD (RW) 6072 * 6073 * Threshold for Deactivating Flow Control (in half-duplex and full-duplex modes) These bits control the threshold (Fill-level of Rx FIFO) at which the flow control is de-asserted after activation. 6074 * - 00: Full minus 1 KB, that is, FULL — 1 KB 6075 * - 01: Full minus 2 KB, that is, FULL — 2 KB 6076 * - 10: Full minus 3 KB, that is, FULL — 3 KB 6077 * - 11: Full minus 4 KB, that is, FULL — 4 KB The de-assertion is effective only after flow control is asserted. If the Rx FIFO is 8 KB or more, an additional Bit (RFD_2) is used for more threshold levels as described in Bit 22. These bits are reserved and read-only when the Rx FIFO depth is less than 4 KB. 6078 */ 6079 #define ENET_DMA_OP_MODE_RFD_MASK (0x1800U) 6080 #define ENET_DMA_OP_MODE_RFD_SHIFT (11U) 6081 #define ENET_DMA_OP_MODE_RFD_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_RFD_SHIFT) & ENET_DMA_OP_MODE_RFD_MASK) 6082 #define ENET_DMA_OP_MODE_RFD_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_RFD_MASK) >> ENET_DMA_OP_MODE_RFD_SHIFT) 6083 6084 /* 6085 * RFA (RW) 6086 * 6087 * Threshold for Activating Flow Control (in half-duplex and full-duplex modes) These bits control the threshold (Fill level of Rx FIFO) at which the flow control is activated. 6088 * - 00: Full minus 1 KB, that is, FULL—1KB. 6089 * - 01: Full minus 2 KB, that is, FULL—2KB. 6090 * - 10: Full minus 3 KB, that is, FULL—3KB. 6091 * - 11: Full minus 4 KB, that is, FULL—4KB. These values are applicable only to Rx FIFOs of 4 KB or more and when Bit 8 (EFC) is set high. If the Rx FIFO is 8 KB or more, an additional Bit (RFA_2) is used for more threshold levels as described in Bit 23. These bits are reserved and read-only when the depth of Rx FIFO is less than 4 KB. Note: When FIFO size is exactly 4 KB, although the DWC_gmac allows you to program the value of these bits to 11, the software should not program these bits to 2'b11. The value 2'b11 means flow control on FIFO empty condition 6092 */ 6093 #define ENET_DMA_OP_MODE_RFA_MASK (0x600U) 6094 #define ENET_DMA_OP_MODE_RFA_SHIFT (9U) 6095 #define ENET_DMA_OP_MODE_RFA_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_RFA_SHIFT) & ENET_DMA_OP_MODE_RFA_MASK) 6096 #define ENET_DMA_OP_MODE_RFA_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_RFA_MASK) >> ENET_DMA_OP_MODE_RFA_SHIFT) 6097 6098 /* 6099 * EFC (RW) 6100 * 6101 * Enable HW Flow Control 6102 * When this bit is set, the flow control signal operation based on the fill-level of Rx FIFO is enabled. When reset, the flow control operation is disabled. This bit is not used (reserved and always reset) when the Rx FIFO is less than 4 KB. 6103 */ 6104 #define ENET_DMA_OP_MODE_EFC_MASK (0x100U) 6105 #define ENET_DMA_OP_MODE_EFC_SHIFT (8U) 6106 #define ENET_DMA_OP_MODE_EFC_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_EFC_SHIFT) & ENET_DMA_OP_MODE_EFC_MASK) 6107 #define ENET_DMA_OP_MODE_EFC_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_EFC_MASK) >> ENET_DMA_OP_MODE_EFC_SHIFT) 6108 6109 /* 6110 * FEF (RW) 6111 * 6112 * Forward Error Frames 6113 * When this bit is reset, the Rx FIFO drops frames with error status (CRC error, collision error, GMII_ER, giant frame, watchdog timeout, or overflow). However, if the start byte (write) pointer of a frame is already transferred to the read controller side (in Threshold mode), then the frame is not dropped. In the GMAC-MTL configuration in which the Frame Length FIFO is also enabled during core configuration, the Rx FIFO drops the error frames if that frame's start byte is not transferred (output) on the ARI bus. When the FEF bit is set, all frames except runt error frames are forwarded to the DMA. If the Bit 25 (RSF) is set and the Rx FIFO overflows when a partial frame is written, then the frame is dropped irrespective of the FEF bit setting. However, if the Bit 25 (RSF) is reset and the Rx FIFO overflows when a partial frame is written, then a partial frame may be forwarded to the DMA. Note: When FEF bit is reset, the giant frames are dropped if the giant frame status is given in Rx Status (in Table 8-6 or Table 8-23) in the following configurations: - The IP checksum engine (Type 1) and full checksum offload engine (Type 2) are not selected. - The advanced timestamp feature is not selected but the extended status is selected. The extended status is available with the following features: - L3-L4 filter in GMAC-CORE or GMAC-MTL configurations - Full checksum offload engine (Type 2) with enhanced descriptor format in the GMAC-DMA, GMAC-AHB, or GMAC-AXI configurations. 6114 */ 6115 #define ENET_DMA_OP_MODE_FEF_MASK (0x80U) 6116 #define ENET_DMA_OP_MODE_FEF_SHIFT (7U) 6117 #define ENET_DMA_OP_MODE_FEF_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_FEF_SHIFT) & ENET_DMA_OP_MODE_FEF_MASK) 6118 #define ENET_DMA_OP_MODE_FEF_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_FEF_MASK) >> ENET_DMA_OP_MODE_FEF_SHIFT) 6119 6120 /* 6121 * FUF (RW) 6122 * 6123 * Forward Undersized Good Frames 6124 * When set, the Rx FIFO forwards Undersized frames (that is, frames with no Error and length less than 64 bytes) including pad-bytes and CRC. When reset, the Rx FIFO drops all frames of less than 64 bytes, unless a frame is already transferred because of the lower value of Receive Threshold, for example, RTC = 01. 6125 */ 6126 #define ENET_DMA_OP_MODE_FUF_MASK (0x40U) 6127 #define ENET_DMA_OP_MODE_FUF_SHIFT (6U) 6128 #define ENET_DMA_OP_MODE_FUF_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_FUF_SHIFT) & ENET_DMA_OP_MODE_FUF_MASK) 6129 #define ENET_DMA_OP_MODE_FUF_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_FUF_MASK) >> ENET_DMA_OP_MODE_FUF_SHIFT) 6130 6131 /* 6132 * DGF (RW) 6133 * 6134 * Drop Giant Frames 6135 * When set, the MAC drops the received giant frames in the Rx FIFO, that is, frames that are larger than the computed giant frame limit. When reset, the MAC does not drop the giant frames in the Rx FIFO. Note: This bit is available in the following configurations in which the giant frame status is not provided in Rx status and giant frames are not dropped by default: - Configurations in which IP Checksum Offload (Type 1) is selected in Rx - Configurations in which the IPC Full Checksum Offload Engine (Type 2) is selected in Rx with normal descriptor format - Configurations in which the Advanced Timestamp feature is selected In all other configurations, this bit is not used (reserved and always reset). 6136 */ 6137 #define ENET_DMA_OP_MODE_DGF_MASK (0x20U) 6138 #define ENET_DMA_OP_MODE_DGF_SHIFT (5U) 6139 #define ENET_DMA_OP_MODE_DGF_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_DGF_SHIFT) & ENET_DMA_OP_MODE_DGF_MASK) 6140 #define ENET_DMA_OP_MODE_DGF_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_DGF_MASK) >> ENET_DMA_OP_MODE_DGF_SHIFT) 6141 6142 /* 6143 * RTC (RW) 6144 * 6145 * Receive Threshold Control 6146 * These two bits control the threshold level of the MTL Receive FIFO. Transfer (request) to DMA starts when the frame size within the MTL Receive FIFO is larger than the threshold. In addition, full frames with length less than the threshold are automatically transferred. The value of 11 is not applicable if the configured Receive FIFO size is 128 bytes. These bits are valid only when the RSF bit is zero, and are ignored when the RSF bit is set to 1. 6147 * - 00: 64 6148 * - 01: 32 6149 * - 10: 96 6150 * - 11: 128 6151 */ 6152 #define ENET_DMA_OP_MODE_RTC_MASK (0x18U) 6153 #define ENET_DMA_OP_MODE_RTC_SHIFT (3U) 6154 #define ENET_DMA_OP_MODE_RTC_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_RTC_SHIFT) & ENET_DMA_OP_MODE_RTC_MASK) 6155 #define ENET_DMA_OP_MODE_RTC_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_RTC_MASK) >> ENET_DMA_OP_MODE_RTC_SHIFT) 6156 6157 /* 6158 * OSF (RW) 6159 * 6160 * Operate on Second Frame 6161 * When this bit is set, it instructs the DMA to process the second frame of the Transmit data even before the status for the first frame is obtained. 6162 */ 6163 #define ENET_DMA_OP_MODE_OSF_MASK (0x4U) 6164 #define ENET_DMA_OP_MODE_OSF_SHIFT (2U) 6165 #define ENET_DMA_OP_MODE_OSF_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_OSF_SHIFT) & ENET_DMA_OP_MODE_OSF_MASK) 6166 #define ENET_DMA_OP_MODE_OSF_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_OSF_MASK) >> ENET_DMA_OP_MODE_OSF_SHIFT) 6167 6168 /* 6169 * SR (RW) 6170 * 6171 * Start or Stop Receive 6172 * When this bit is set, the Receive process is placed in the Running state. The DMA attempts to acquire the descriptor from the Receive list and processes the incoming frames. The descriptor acquisition is attempted from the current position in the list, which is the address set by the Register 3 (Receive Descriptor List Address Register) or the position retained when the Receive process was previously stopped. If the DMA does not own the descriptor, reception is suspended and Bit 7 (Receive Buffer Unavailable) of Register 5 (Status Register) is set. The Start Receive command is effective only when the reception has stopped. If the command is issued before setting Register 3 (Receive Descriptor List Address Register), the DMA behavior is unpredictable. When this bit is cleared, the Rx DMA operation is stopped after the transfer of the current frame. The next descriptor position in the Receive list is saved and becomes the current position after the Receive process is restarted. The Stop Receive command is effective only when the Receive process is in either the Running (waiting for receive packet) or in the Suspended state. 6173 */ 6174 #define ENET_DMA_OP_MODE_SR_MASK (0x2U) 6175 #define ENET_DMA_OP_MODE_SR_SHIFT (1U) 6176 #define ENET_DMA_OP_MODE_SR_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_SR_SHIFT) & ENET_DMA_OP_MODE_SR_MASK) 6177 #define ENET_DMA_OP_MODE_SR_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_SR_MASK) >> ENET_DMA_OP_MODE_SR_SHIFT) 6178 6179 /* Bitfield definition for register: DMA_INTR_EN */ 6180 /* 6181 * NIE (RW) 6182 * 6183 * Normal Interrupt Summary Enable 6184 * When this bit is set, normal interrupt summary is enabled. When this bit is reset, normal interrupt summary is disabled. This bit enables the following interrupts in Register 5 (Status Register): - Register 5[0]: Transmit Interrupt - Register 5[2]: Transmit Buffer Unavailable - Register 5[6]: Receive Interrupt - Register 5[14]: Early Receive Interrupt 6185 */ 6186 #define ENET_DMA_INTR_EN_NIE_MASK (0x10000UL) 6187 #define ENET_DMA_INTR_EN_NIE_SHIFT (16U) 6188 #define ENET_DMA_INTR_EN_NIE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_NIE_SHIFT) & ENET_DMA_INTR_EN_NIE_MASK) 6189 #define ENET_DMA_INTR_EN_NIE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_NIE_MASK) >> ENET_DMA_INTR_EN_NIE_SHIFT) 6190 6191 /* 6192 * AIE (RW) 6193 * 6194 * Abnormal Interrupt Summary Enable 6195 * When this bit is set, abnormal interrupt summary is enabled. When this bit is reset, the abnormal interrupt summary is disabled. This bit enables the following interrupts in Register 5 (Status Register): - Register 5[1]: Transmit Process Stopped - Register 5[3]: Transmit Jabber Timeout - Register 5[4]: Receive Overflow - Register 5[5]: Transmit Underflow - Register 5[7]: Receive Buffer Unavailable - Register 5[8]: Receive Process Stopped - Register 5[9]: Receive Watchdog Timeout - Register 5[10]: Early Transmit Interrupt - Register 5[13]: Fatal Bus Error 6196 */ 6197 #define ENET_DMA_INTR_EN_AIE_MASK (0x8000U) 6198 #define ENET_DMA_INTR_EN_AIE_SHIFT (15U) 6199 #define ENET_DMA_INTR_EN_AIE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_AIE_SHIFT) & ENET_DMA_INTR_EN_AIE_MASK) 6200 #define ENET_DMA_INTR_EN_AIE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_AIE_MASK) >> ENET_DMA_INTR_EN_AIE_SHIFT) 6201 6202 /* 6203 * ERE (RW) 6204 * 6205 * Early Receive Interrupt Enable 6206 * When this bit is set with Normal Interrupt Summary Enable (Bit 16), the Early Receive Interrupt is enabled. When this bit is reset, the Early Receive Interrupt is disabled. 6207 */ 6208 #define ENET_DMA_INTR_EN_ERE_MASK (0x4000U) 6209 #define ENET_DMA_INTR_EN_ERE_SHIFT (14U) 6210 #define ENET_DMA_INTR_EN_ERE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_ERE_SHIFT) & ENET_DMA_INTR_EN_ERE_MASK) 6211 #define ENET_DMA_INTR_EN_ERE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_ERE_MASK) >> ENET_DMA_INTR_EN_ERE_SHIFT) 6212 6213 /* 6214 * FBE (RW) 6215 * 6216 * Fatal Bus Error Enable 6217 * When this bit is set with Abnormal Interrupt Summary Enable (Bit 15), the Fatal Bus Error Interrupt is enabled. When this bit is reset, the Fatal Bus Error Enable Interrupt is disabled. 6218 */ 6219 #define ENET_DMA_INTR_EN_FBE_MASK (0x2000U) 6220 #define ENET_DMA_INTR_EN_FBE_SHIFT (13U) 6221 #define ENET_DMA_INTR_EN_FBE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_FBE_SHIFT) & ENET_DMA_INTR_EN_FBE_MASK) 6222 #define ENET_DMA_INTR_EN_FBE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_FBE_MASK) >> ENET_DMA_INTR_EN_FBE_SHIFT) 6223 6224 /* 6225 * ETE (RW) 6226 * 6227 * Early Transmit Interrupt Enable 6228 * When this bit is set with an Abnormal Interrupt Summary Enable (Bit 15), the Early Transmit Interrupt is enabled. When this bit is reset, the Early Transmit Interrupt is disabled. 6229 */ 6230 #define ENET_DMA_INTR_EN_ETE_MASK (0x400U) 6231 #define ENET_DMA_INTR_EN_ETE_SHIFT (10U) 6232 #define ENET_DMA_INTR_EN_ETE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_ETE_SHIFT) & ENET_DMA_INTR_EN_ETE_MASK) 6233 #define ENET_DMA_INTR_EN_ETE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_ETE_MASK) >> ENET_DMA_INTR_EN_ETE_SHIFT) 6234 6235 /* 6236 * RWE (RW) 6237 * 6238 * Receive Watchdog Timeout Enable 6239 * When this bit is set with Abnormal Interrupt Summary Enable (Bit 15), the Receive Watchdog Timeout Interrupt is enabled. When this bit is reset, the Receive Watchdog Timeout Interrupt is disabled. 6240 */ 6241 #define ENET_DMA_INTR_EN_RWE_MASK (0x200U) 6242 #define ENET_DMA_INTR_EN_RWE_SHIFT (9U) 6243 #define ENET_DMA_INTR_EN_RWE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_RWE_SHIFT) & ENET_DMA_INTR_EN_RWE_MASK) 6244 #define ENET_DMA_INTR_EN_RWE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_RWE_MASK) >> ENET_DMA_INTR_EN_RWE_SHIFT) 6245 6246 /* 6247 * RSE (RW) 6248 * 6249 * Receive Stopped Enable 6250 * When this bit is set with Abnormal Interrupt Summary Enable (Bit 15), the Receive Stopped Interrupt is enabled. When this bit is reset, the Receive Stopped Interrupt is disabled. 6251 */ 6252 #define ENET_DMA_INTR_EN_RSE_MASK (0x100U) 6253 #define ENET_DMA_INTR_EN_RSE_SHIFT (8U) 6254 #define ENET_DMA_INTR_EN_RSE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_RSE_SHIFT) & ENET_DMA_INTR_EN_RSE_MASK) 6255 #define ENET_DMA_INTR_EN_RSE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_RSE_MASK) >> ENET_DMA_INTR_EN_RSE_SHIFT) 6256 6257 /* 6258 * RUE (RW) 6259 * 6260 * Receive Buffer Unavailable Enable 6261 * When this bit is set with Abnormal Interrupt Summary Enable (Bit 15), the Receive Buffer Unavailable Interrupt is enabled. When this bit is reset, the Receive Buffer Unavailable Interrupt is disabled. 6262 */ 6263 #define ENET_DMA_INTR_EN_RUE_MASK (0x80U) 6264 #define ENET_DMA_INTR_EN_RUE_SHIFT (7U) 6265 #define ENET_DMA_INTR_EN_RUE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_RUE_SHIFT) & ENET_DMA_INTR_EN_RUE_MASK) 6266 #define ENET_DMA_INTR_EN_RUE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_RUE_MASK) >> ENET_DMA_INTR_EN_RUE_SHIFT) 6267 6268 /* 6269 * RIE (RW) 6270 * 6271 * Receive Interrupt Enable 6272 * When this bit is set with Normal Interrupt Summary Enable (Bit 16), the Receive Interrupt is enabled. When this bit is reset, the Receive Interrupt is disabled. 6273 */ 6274 #define ENET_DMA_INTR_EN_RIE_MASK (0x40U) 6275 #define ENET_DMA_INTR_EN_RIE_SHIFT (6U) 6276 #define ENET_DMA_INTR_EN_RIE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_RIE_SHIFT) & ENET_DMA_INTR_EN_RIE_MASK) 6277 #define ENET_DMA_INTR_EN_RIE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_RIE_MASK) >> ENET_DMA_INTR_EN_RIE_SHIFT) 6278 6279 /* 6280 * UNE (RW) 6281 * 6282 * Underflow Interrupt Enable 6283 * When this bit is set with Abnormal Interrupt Summary Enable (Bit 15), the Transmit Underflow Interrupt is enabled. When this bit is reset, the Underflow Interrupt is disabled. 6284 */ 6285 #define ENET_DMA_INTR_EN_UNE_MASK (0x20U) 6286 #define ENET_DMA_INTR_EN_UNE_SHIFT (5U) 6287 #define ENET_DMA_INTR_EN_UNE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_UNE_SHIFT) & ENET_DMA_INTR_EN_UNE_MASK) 6288 #define ENET_DMA_INTR_EN_UNE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_UNE_MASK) >> ENET_DMA_INTR_EN_UNE_SHIFT) 6289 6290 /* 6291 * OVE (RW) 6292 * 6293 * Overflow Interrupt Enable 6294 * When this bit is set with Abnormal Interrupt Summary Enable (Bit 15), the Receive Overflow Interrupt is enabled. When this bit is reset, the Overflow Interrupt is disabled. 6295 */ 6296 #define ENET_DMA_INTR_EN_OVE_MASK (0x10U) 6297 #define ENET_DMA_INTR_EN_OVE_SHIFT (4U) 6298 #define ENET_DMA_INTR_EN_OVE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_OVE_SHIFT) & ENET_DMA_INTR_EN_OVE_MASK) 6299 #define ENET_DMA_INTR_EN_OVE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_OVE_MASK) >> ENET_DMA_INTR_EN_OVE_SHIFT) 6300 6301 /* 6302 * TJE (RW) 6303 * 6304 * Transmit Jabber Timeout Enable 6305 * When this bit is set with Abnormal Interrupt Summary Enable (Bit 15), the Transmit Jabber Timeout Interrupt is enabled. When this bit is reset, the Transmit Jabber Timeout Interrupt is disabled. 6306 */ 6307 #define ENET_DMA_INTR_EN_TJE_MASK (0x8U) 6308 #define ENET_DMA_INTR_EN_TJE_SHIFT (3U) 6309 #define ENET_DMA_INTR_EN_TJE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_TJE_SHIFT) & ENET_DMA_INTR_EN_TJE_MASK) 6310 #define ENET_DMA_INTR_EN_TJE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_TJE_MASK) >> ENET_DMA_INTR_EN_TJE_SHIFT) 6311 6312 /* 6313 * TUE (RW) 6314 * 6315 * Transmit Buffer Unavailable Enable 6316 * When this bit is set with Normal Interrupt Summary Enable (Bit 16), the Transmit Buffer Unavailable Interrupt is enabled. When this bit is reset, the Transmit Buffer Unavailable Interrupt is disabled. 6317 */ 6318 #define ENET_DMA_INTR_EN_TUE_MASK (0x4U) 6319 #define ENET_DMA_INTR_EN_TUE_SHIFT (2U) 6320 #define ENET_DMA_INTR_EN_TUE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_TUE_SHIFT) & ENET_DMA_INTR_EN_TUE_MASK) 6321 #define ENET_DMA_INTR_EN_TUE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_TUE_MASK) >> ENET_DMA_INTR_EN_TUE_SHIFT) 6322 6323 /* 6324 * TSE (RW) 6325 * 6326 * Transmit Stopped Enable 6327 * When this bit is set with Abnormal Interrupt Summary Enable (Bit 15), the Transmission Stopped Interrupt is enabled. When this bit is reset, the Transmission Stopped Interrupt is disabled. 6328 */ 6329 #define ENET_DMA_INTR_EN_TSE_MASK (0x2U) 6330 #define ENET_DMA_INTR_EN_TSE_SHIFT (1U) 6331 #define ENET_DMA_INTR_EN_TSE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_TSE_SHIFT) & ENET_DMA_INTR_EN_TSE_MASK) 6332 #define ENET_DMA_INTR_EN_TSE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_TSE_MASK) >> ENET_DMA_INTR_EN_TSE_SHIFT) 6333 6334 /* 6335 * TIE (RW) 6336 * 6337 * Transmit Interrupt Enable 6338 * When this bit is set with Normal Interrupt Summary Enable (Bit 16), the Transmit Interrupt is enabled. When this bit is reset, the Transmit Interrupt is disabled. 6339 */ 6340 #define ENET_DMA_INTR_EN_TIE_MASK (0x1U) 6341 #define ENET_DMA_INTR_EN_TIE_SHIFT (0U) 6342 #define ENET_DMA_INTR_EN_TIE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_TIE_SHIFT) & ENET_DMA_INTR_EN_TIE_MASK) 6343 #define ENET_DMA_INTR_EN_TIE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_TIE_MASK) >> ENET_DMA_INTR_EN_TIE_SHIFT) 6344 6345 /* Bitfield definition for register: DMA_MISS_OVF_CNT */ 6346 /* 6347 * ONFCNTOVF (RW) 6348 * 6349 * Overflow Bit for FIFO Overflow Counter 6350 * This bit is set every time the Overflow Frame Counter (Bits[27:17]) overflows, that is, the Rx FIFO overflows with the overflow frame counter at maximum value. In such a scenario, the overflow frame counter is reset to all-zeros and this bit indicates that the rollover happened. 6351 */ 6352 #define ENET_DMA_MISS_OVF_CNT_ONFCNTOVF_MASK (0x10000000UL) 6353 #define ENET_DMA_MISS_OVF_CNT_ONFCNTOVF_SHIFT (28U) 6354 #define ENET_DMA_MISS_OVF_CNT_ONFCNTOVF_SET(x) (((uint32_t)(x) << ENET_DMA_MISS_OVF_CNT_ONFCNTOVF_SHIFT) & ENET_DMA_MISS_OVF_CNT_ONFCNTOVF_MASK) 6355 #define ENET_DMA_MISS_OVF_CNT_ONFCNTOVF_GET(x) (((uint32_t)(x) & ENET_DMA_MISS_OVF_CNT_ONFCNTOVF_MASK) >> ENET_DMA_MISS_OVF_CNT_ONFCNTOVF_SHIFT) 6356 6357 /* 6358 * OVFFRMCNT (RW) 6359 * 6360 * Overflow Frame Counter 6361 * This field indicates the number of frames missed by the application. This counter is incremented each time the MTL FIFO overflows. The counter is cleared when this register is read with mci_be_i[2] at 1’b1. 6362 */ 6363 #define ENET_DMA_MISS_OVF_CNT_OVFFRMCNT_MASK (0xFFE0000UL) 6364 #define ENET_DMA_MISS_OVF_CNT_OVFFRMCNT_SHIFT (17U) 6365 #define ENET_DMA_MISS_OVF_CNT_OVFFRMCNT_SET(x) (((uint32_t)(x) << ENET_DMA_MISS_OVF_CNT_OVFFRMCNT_SHIFT) & ENET_DMA_MISS_OVF_CNT_OVFFRMCNT_MASK) 6366 #define ENET_DMA_MISS_OVF_CNT_OVFFRMCNT_GET(x) (((uint32_t)(x) & ENET_DMA_MISS_OVF_CNT_OVFFRMCNT_MASK) >> ENET_DMA_MISS_OVF_CNT_OVFFRMCNT_SHIFT) 6367 6368 /* 6369 * MISCNTOVF (RW) 6370 * 6371 * Overflow Bit for Missed Frame Counter 6372 * This bit is set every time Missed Frame Counter (Bits[15:0]) overflows, that is, the DMA discards an incoming frame because of the Host Receive Buffer being unavailable with the missed frame counter at maximum value. In such a scenario, the Missed frame counter is reset to all-zeros and this bit indicates that the rollover happened. 6373 */ 6374 #define ENET_DMA_MISS_OVF_CNT_MISCNTOVF_MASK (0x10000UL) 6375 #define ENET_DMA_MISS_OVF_CNT_MISCNTOVF_SHIFT (16U) 6376 #define ENET_DMA_MISS_OVF_CNT_MISCNTOVF_SET(x) (((uint32_t)(x) << ENET_DMA_MISS_OVF_CNT_MISCNTOVF_SHIFT) & ENET_DMA_MISS_OVF_CNT_MISCNTOVF_MASK) 6377 #define ENET_DMA_MISS_OVF_CNT_MISCNTOVF_GET(x) (((uint32_t)(x) & ENET_DMA_MISS_OVF_CNT_MISCNTOVF_MASK) >> ENET_DMA_MISS_OVF_CNT_MISCNTOVF_SHIFT) 6378 6379 /* 6380 * MISFRMCNT (RW) 6381 * 6382 * Missed Frame Counter 6383 * This field indicates the number of frames missed by the controller because of the Host Receive Buffer being unavailable. This counter is incremented each time the DMA discards an incoming frame. The counter is cleared when this register is read with mci_be_i[0] at 1’b1. 6384 */ 6385 #define ENET_DMA_MISS_OVF_CNT_MISFRMCNT_MASK (0xFFFFU) 6386 #define ENET_DMA_MISS_OVF_CNT_MISFRMCNT_SHIFT (0U) 6387 #define ENET_DMA_MISS_OVF_CNT_MISFRMCNT_SET(x) (((uint32_t)(x) << ENET_DMA_MISS_OVF_CNT_MISFRMCNT_SHIFT) & ENET_DMA_MISS_OVF_CNT_MISFRMCNT_MASK) 6388 #define ENET_DMA_MISS_OVF_CNT_MISFRMCNT_GET(x) (((uint32_t)(x) & ENET_DMA_MISS_OVF_CNT_MISFRMCNT_MASK) >> ENET_DMA_MISS_OVF_CNT_MISFRMCNT_SHIFT) 6389 6390 /* Bitfield definition for register: DMA_RX_INTR_WDOG */ 6391 /* 6392 * RIWT (RW) 6393 * 6394 * RI Watchdog Timer Count 6395 * This bit indicates the number of system clock cycles multiplied by 256 for which the watchdog timer is set. The watchdog timer gets triggered with the programmed value after the Rx DMA completes the transfer of a frame for which the RI status bit is not set because of the setting in the corresponding descriptor RDES1[31]. When the watchdog timer runs out, the RI bit is set and the timer is stopped. The watchdog timer is reset when the RI bit is set high because of automatic setting of RI as per RDES1[31] of any received frame. 6396 */ 6397 #define ENET_DMA_RX_INTR_WDOG_RIWT_MASK (0xFFU) 6398 #define ENET_DMA_RX_INTR_WDOG_RIWT_SHIFT (0U) 6399 #define ENET_DMA_RX_INTR_WDOG_RIWT_SET(x) (((uint32_t)(x) << ENET_DMA_RX_INTR_WDOG_RIWT_SHIFT) & ENET_DMA_RX_INTR_WDOG_RIWT_MASK) 6400 #define ENET_DMA_RX_INTR_WDOG_RIWT_GET(x) (((uint32_t)(x) & ENET_DMA_RX_INTR_WDOG_RIWT_MASK) >> ENET_DMA_RX_INTR_WDOG_RIWT_SHIFT) 6401 6402 /* Bitfield definition for register: DMA_AXI_MODE */ 6403 /* 6404 * EN_LPI (RW) 6405 * 6406 * Enable Low Power Interface (LPI) 6407 * When set to 1, this bit enables the LPI mode supported by the GMAC-AXI configuration and accepts the LPI request from the AXI System Clock controller. When set to 0, this bit disables the LPI mode and always denies the LPI request from the AXI System Clock controller. 6408 */ 6409 #define ENET_DMA_AXI_MODE_EN_LPI_MASK (0x80000000UL) 6410 #define ENET_DMA_AXI_MODE_EN_LPI_SHIFT (31U) 6411 #define ENET_DMA_AXI_MODE_EN_LPI_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_EN_LPI_SHIFT) & ENET_DMA_AXI_MODE_EN_LPI_MASK) 6412 #define ENET_DMA_AXI_MODE_EN_LPI_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_EN_LPI_MASK) >> ENET_DMA_AXI_MODE_EN_LPI_SHIFT) 6413 6414 /* 6415 * LPI_XIT_FRM (RW) 6416 * 6417 * Unlock on Magic Packet or Remote Wake-Up Frame 6418 * When set to 1, this bit enables the GMAC-AXI to come out of the LPI mode only when the magic packet or remote wake-up frame is received. When set to 0, this bit enables the GMAC-AXI to come out of LPI mode when any frame is received. 6419 */ 6420 #define ENET_DMA_AXI_MODE_LPI_XIT_FRM_MASK (0x40000000UL) 6421 #define ENET_DMA_AXI_MODE_LPI_XIT_FRM_SHIFT (30U) 6422 #define ENET_DMA_AXI_MODE_LPI_XIT_FRM_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_LPI_XIT_FRM_SHIFT) & ENET_DMA_AXI_MODE_LPI_XIT_FRM_MASK) 6423 #define ENET_DMA_AXI_MODE_LPI_XIT_FRM_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_LPI_XIT_FRM_MASK) >> ENET_DMA_AXI_MODE_LPI_XIT_FRM_SHIFT) 6424 6425 /* 6426 * WR_OSR_LMT (RW) 6427 * 6428 * AXI Maximum Write Outstanding Request Limit 6429 * This value limits the maximum outstanding request on the AXI write interface. Maximum outstanding requests = WR_OSR_LMT+1 Note: - Bit 22 is reserved if AXI_GM_MAX_WR_REQUESTS = 4. - Bit 23 bit is reserved if AXI_GM_MAX_WR_REQUESTS != 16. 6430 */ 6431 #define ENET_DMA_AXI_MODE_WR_OSR_LMT_MASK (0xF00000UL) 6432 #define ENET_DMA_AXI_MODE_WR_OSR_LMT_SHIFT (20U) 6433 #define ENET_DMA_AXI_MODE_WR_OSR_LMT_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_WR_OSR_LMT_SHIFT) & ENET_DMA_AXI_MODE_WR_OSR_LMT_MASK) 6434 #define ENET_DMA_AXI_MODE_WR_OSR_LMT_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_WR_OSR_LMT_MASK) >> ENET_DMA_AXI_MODE_WR_OSR_LMT_SHIFT) 6435 6436 /* 6437 * RD_OSR_LMT (RW) 6438 * 6439 * AXI Maximum Read Outstanding Request Limit 6440 * This value limits the maximum outstanding request on the AXI read interface. Maximum outstanding requests = RD_OSR_LMT+1 Note: - Bit 18 is reserved if AXI_GM_MAX_RD_REQUESTS = 4. - Bit 19 is reserved if AXI_GM_MAX_RD_REQUESTS != 16. 6441 */ 6442 #define ENET_DMA_AXI_MODE_RD_OSR_LMT_MASK (0xF0000UL) 6443 #define ENET_DMA_AXI_MODE_RD_OSR_LMT_SHIFT (16U) 6444 #define ENET_DMA_AXI_MODE_RD_OSR_LMT_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_RD_OSR_LMT_SHIFT) & ENET_DMA_AXI_MODE_RD_OSR_LMT_MASK) 6445 #define ENET_DMA_AXI_MODE_RD_OSR_LMT_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_RD_OSR_LMT_MASK) >> ENET_DMA_AXI_MODE_RD_OSR_LMT_SHIFT) 6446 6447 /* 6448 * ONEKBBE (RW) 6449 * 6450 * 1 KB Boundary Crossing Enable for the GMAC-AXI Master 6451 * When set, the GMAC-AXI master performs burst transfers that do not cross 1 KB boundary. When reset, the GMAC-AXI master performs burst transfers that do not cross 4 KB boundary. 6452 */ 6453 #define ENET_DMA_AXI_MODE_ONEKBBE_MASK (0x2000U) 6454 #define ENET_DMA_AXI_MODE_ONEKBBE_SHIFT (13U) 6455 #define ENET_DMA_AXI_MODE_ONEKBBE_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_ONEKBBE_SHIFT) & ENET_DMA_AXI_MODE_ONEKBBE_MASK) 6456 #define ENET_DMA_AXI_MODE_ONEKBBE_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_ONEKBBE_MASK) >> ENET_DMA_AXI_MODE_ONEKBBE_SHIFT) 6457 6458 /* 6459 * AXI_AAL (RW) 6460 * 6461 * Address-Aligned Beats 6462 * This bit is read-only bit and reflects the Bit 25 (AAL) of Register 0 (Bus Mode Register). When this bit is set to 1, the GMAC-AXI performs address-aligned burst transfers on both read and write channels. 6463 */ 6464 #define ENET_DMA_AXI_MODE_AXI_AAL_MASK (0x1000U) 6465 #define ENET_DMA_AXI_MODE_AXI_AAL_SHIFT (12U) 6466 #define ENET_DMA_AXI_MODE_AXI_AAL_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_AXI_AAL_SHIFT) & ENET_DMA_AXI_MODE_AXI_AAL_MASK) 6467 #define ENET_DMA_AXI_MODE_AXI_AAL_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_AXI_AAL_MASK) >> ENET_DMA_AXI_MODE_AXI_AAL_SHIFT) 6468 6469 /* 6470 * BLEN256 (RW) 6471 * 6472 * AXI Burst Length 256 6473 * When this bit is set to 1, the GMAC-AXI is allowed to select a burst length of 256 on the AXI master interface. This bit is present only when the configuration parameter AXI_BL is set to 256. Otherwise, this bit is reserved and is read-only (RO). 6474 */ 6475 #define ENET_DMA_AXI_MODE_BLEN256_MASK (0x80U) 6476 #define ENET_DMA_AXI_MODE_BLEN256_SHIFT (7U) 6477 #define ENET_DMA_AXI_MODE_BLEN256_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_BLEN256_SHIFT) & ENET_DMA_AXI_MODE_BLEN256_MASK) 6478 #define ENET_DMA_AXI_MODE_BLEN256_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_BLEN256_MASK) >> ENET_DMA_AXI_MODE_BLEN256_SHIFT) 6479 6480 /* 6481 * BLEN128 (RW) 6482 * 6483 * AXI Burst Length 128 6484 * When this bit is set to 1, the GMAC-AXI is allowed to select a burst length of 128 on the AXI master interface. This bit is present only when the configuration parameter AXI_BL is set to 128 or more. Otherwise, this bit is reserved and is read-only (RO). 6485 */ 6486 #define ENET_DMA_AXI_MODE_BLEN128_MASK (0x40U) 6487 #define ENET_DMA_AXI_MODE_BLEN128_SHIFT (6U) 6488 #define ENET_DMA_AXI_MODE_BLEN128_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_BLEN128_SHIFT) & ENET_DMA_AXI_MODE_BLEN128_MASK) 6489 #define ENET_DMA_AXI_MODE_BLEN128_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_BLEN128_MASK) >> ENET_DMA_AXI_MODE_BLEN128_SHIFT) 6490 6491 /* 6492 * BLEN64 (RW) 6493 * 6494 * AXI Burst Length 64 6495 * When this bit is set to 1, the GMAC-AXI is allowed to select a burst length of 64 on the AXI master interface. This bit is present only when the configuration parameter AXI_BL is set to 64 or more. Otherwise, this bit is reserved and is read-only (RO). 6496 */ 6497 #define ENET_DMA_AXI_MODE_BLEN64_MASK (0x20U) 6498 #define ENET_DMA_AXI_MODE_BLEN64_SHIFT (5U) 6499 #define ENET_DMA_AXI_MODE_BLEN64_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_BLEN64_SHIFT) & ENET_DMA_AXI_MODE_BLEN64_MASK) 6500 #define ENET_DMA_AXI_MODE_BLEN64_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_BLEN64_MASK) >> ENET_DMA_AXI_MODE_BLEN64_SHIFT) 6501 6502 /* 6503 * BLEN32 (RW) 6504 * 6505 * AXI Burst Length 32 6506 * When this bit is set to 1, the GMAC-AXI is allowed to select a burst length of 32 on the AXI master interface. This bit is present only when the configuration parameter AXI_BL is set to 32 or more. Otherwise, this bit is reserved and is read-only (RO). 6507 */ 6508 #define ENET_DMA_AXI_MODE_BLEN32_MASK (0x10U) 6509 #define ENET_DMA_AXI_MODE_BLEN32_SHIFT (4U) 6510 #define ENET_DMA_AXI_MODE_BLEN32_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_BLEN32_SHIFT) & ENET_DMA_AXI_MODE_BLEN32_MASK) 6511 #define ENET_DMA_AXI_MODE_BLEN32_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_BLEN32_MASK) >> ENET_DMA_AXI_MODE_BLEN32_SHIFT) 6512 6513 /* 6514 * BLEN16 (RW) 6515 * 6516 * AXI Burst Length 16 6517 * When this bit is set to 1 or UNDEF is set to 1, the GMAC-AXI is allowed to select a burst length of 16 on the AXI master interface. 6518 */ 6519 #define ENET_DMA_AXI_MODE_BLEN16_MASK (0x8U) 6520 #define ENET_DMA_AXI_MODE_BLEN16_SHIFT (3U) 6521 #define ENET_DMA_AXI_MODE_BLEN16_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_BLEN16_SHIFT) & ENET_DMA_AXI_MODE_BLEN16_MASK) 6522 #define ENET_DMA_AXI_MODE_BLEN16_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_BLEN16_MASK) >> ENET_DMA_AXI_MODE_BLEN16_SHIFT) 6523 6524 /* 6525 * BLEN8 (RW) 6526 * 6527 * AXI Burst Length 8 6528 * When this bit is set to 1, the GMAC-AXI is allowed to select a burst length of 8 on the AXI master interface. Setting this bit has no effect when UNDEF is set to 1. 6529 */ 6530 #define ENET_DMA_AXI_MODE_BLEN8_MASK (0x4U) 6531 #define ENET_DMA_AXI_MODE_BLEN8_SHIFT (2U) 6532 #define ENET_DMA_AXI_MODE_BLEN8_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_BLEN8_SHIFT) & ENET_DMA_AXI_MODE_BLEN8_MASK) 6533 #define ENET_DMA_AXI_MODE_BLEN8_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_BLEN8_MASK) >> ENET_DMA_AXI_MODE_BLEN8_SHIFT) 6534 6535 /* 6536 * BLEN4 (RW) 6537 * 6538 * AXI Burst Length 4 6539 * When this bit is set to 1, the GMAC-AXI is allowed to select a burst length of 4 on the AXI master interface. Setting this bit has no effect when UNDEF is set to 1. 6540 */ 6541 #define ENET_DMA_AXI_MODE_BLEN4_MASK (0x2U) 6542 #define ENET_DMA_AXI_MODE_BLEN4_SHIFT (1U) 6543 #define ENET_DMA_AXI_MODE_BLEN4_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_BLEN4_SHIFT) & ENET_DMA_AXI_MODE_BLEN4_MASK) 6544 #define ENET_DMA_AXI_MODE_BLEN4_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_BLEN4_MASK) >> ENET_DMA_AXI_MODE_BLEN4_SHIFT) 6545 6546 /* 6547 * UNDEF (RW) 6548 * 6549 * AXI Undefined Burst Length 6550 * This bit is read-only bit and indicates the complement (invert) value of Bit 16 (FB) in Register 0 (Bus Mode Register). - When this bit is set to 1, the GMAC-AXI is allowed to perform any burst length equal to or below the maximum allowed burst length programmed in Bits[7:3]. - When this bit is set to 0, the GMAC-AXI is allowed to perform only fixed burst lengths as indicated by BLEN256, BLEN128, BLEN64, BLEN32, BLEN16, BLEN8, or BLEN4, or a burst length of 1. If UNDEF is set and none of the BLEN bits is set, then GMAC-AXI is allowed to perform a burst length of 16. 6551 */ 6552 #define ENET_DMA_AXI_MODE_UNDEF_MASK (0x1U) 6553 #define ENET_DMA_AXI_MODE_UNDEF_SHIFT (0U) 6554 #define ENET_DMA_AXI_MODE_UNDEF_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_UNDEF_SHIFT) & ENET_DMA_AXI_MODE_UNDEF_MASK) 6555 #define ENET_DMA_AXI_MODE_UNDEF_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_UNDEF_MASK) >> ENET_DMA_AXI_MODE_UNDEF_SHIFT) 6556 6557 /* Bitfield definition for register: DMA_BUS_STATUS */ 6558 /* 6559 * AXIRDSTS (RW) 6560 * 6561 * AXI Master Read Channel Status 6562 * When high, it indicates that AXI master's read channel is active and transferring data. 6563 */ 6564 #define ENET_DMA_BUS_STATUS_AXIRDSTS_MASK (0x2U) 6565 #define ENET_DMA_BUS_STATUS_AXIRDSTS_SHIFT (1U) 6566 #define ENET_DMA_BUS_STATUS_AXIRDSTS_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_STATUS_AXIRDSTS_SHIFT) & ENET_DMA_BUS_STATUS_AXIRDSTS_MASK) 6567 #define ENET_DMA_BUS_STATUS_AXIRDSTS_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_STATUS_AXIRDSTS_MASK) >> ENET_DMA_BUS_STATUS_AXIRDSTS_SHIFT) 6568 6569 /* 6570 * AXWHSTS (RW) 6571 * 6572 * AXI Master Write Channel or AHB Master Status 6573 * When high, it indicates that AXI master's write channel is active and transferring data in the GMAC-AXI configuration. In the GMAC-AHB configuration, it indicates that the AHB master interface FSMs are in the non-idle state. 6574 */ 6575 #define ENET_DMA_BUS_STATUS_AXWHSTS_MASK (0x1U) 6576 #define ENET_DMA_BUS_STATUS_AXWHSTS_SHIFT (0U) 6577 #define ENET_DMA_BUS_STATUS_AXWHSTS_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_STATUS_AXWHSTS_SHIFT) & ENET_DMA_BUS_STATUS_AXWHSTS_MASK) 6578 #define ENET_DMA_BUS_STATUS_AXWHSTS_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_STATUS_AXWHSTS_MASK) >> ENET_DMA_BUS_STATUS_AXWHSTS_SHIFT) 6579 6580 /* Bitfield definition for register: DMA_CURR_HOST_TX_DESC */ 6581 /* 6582 * CURTDESAPTR (RW) 6583 * 6584 * Host Transmit Descriptor Address Pointer 6585 * Cleared on Reset. Pointer updated by the DMA during operation. 6586 */ 6587 #define ENET_DMA_CURR_HOST_TX_DESC_CURTDESAPTR_MASK (0xFFFFFFFFUL) 6588 #define ENET_DMA_CURR_HOST_TX_DESC_CURTDESAPTR_SHIFT (0U) 6589 #define ENET_DMA_CURR_HOST_TX_DESC_CURTDESAPTR_SET(x) (((uint32_t)(x) << ENET_DMA_CURR_HOST_TX_DESC_CURTDESAPTR_SHIFT) & ENET_DMA_CURR_HOST_TX_DESC_CURTDESAPTR_MASK) 6590 #define ENET_DMA_CURR_HOST_TX_DESC_CURTDESAPTR_GET(x) (((uint32_t)(x) & ENET_DMA_CURR_HOST_TX_DESC_CURTDESAPTR_MASK) >> ENET_DMA_CURR_HOST_TX_DESC_CURTDESAPTR_SHIFT) 6591 6592 /* Bitfield definition for register: DMA_CURR_HOST_RX_DESC */ 6593 /* 6594 * CURRDESAPTR (RW) 6595 * 6596 * Host Receive Descriptor Address Pointer 6597 * Cleared on Reset. Pointer updated by the DMA during operation. 6598 */ 6599 #define ENET_DMA_CURR_HOST_RX_DESC_CURRDESAPTR_MASK (0xFFFFFFFFUL) 6600 #define ENET_DMA_CURR_HOST_RX_DESC_CURRDESAPTR_SHIFT (0U) 6601 #define ENET_DMA_CURR_HOST_RX_DESC_CURRDESAPTR_SET(x) (((uint32_t)(x) << ENET_DMA_CURR_HOST_RX_DESC_CURRDESAPTR_SHIFT) & ENET_DMA_CURR_HOST_RX_DESC_CURRDESAPTR_MASK) 6602 #define ENET_DMA_CURR_HOST_RX_DESC_CURRDESAPTR_GET(x) (((uint32_t)(x) & ENET_DMA_CURR_HOST_RX_DESC_CURRDESAPTR_MASK) >> ENET_DMA_CURR_HOST_RX_DESC_CURRDESAPTR_SHIFT) 6603 6604 /* Bitfield definition for register: DMA_CURR_HOST_TX_BUF */ 6605 /* 6606 * CURTBUFAPTR (RW) 6607 * 6608 * Host Transmit Buffer Address Pointer 6609 * Cleared on Reset. Pointer updated by the DMA during operation. 6610 */ 6611 #define ENET_DMA_CURR_HOST_TX_BUF_CURTBUFAPTR_MASK (0xFFFFFFFFUL) 6612 #define ENET_DMA_CURR_HOST_TX_BUF_CURTBUFAPTR_SHIFT (0U) 6613 #define ENET_DMA_CURR_HOST_TX_BUF_CURTBUFAPTR_SET(x) (((uint32_t)(x) << ENET_DMA_CURR_HOST_TX_BUF_CURTBUFAPTR_SHIFT) & ENET_DMA_CURR_HOST_TX_BUF_CURTBUFAPTR_MASK) 6614 #define ENET_DMA_CURR_HOST_TX_BUF_CURTBUFAPTR_GET(x) (((uint32_t)(x) & ENET_DMA_CURR_HOST_TX_BUF_CURTBUFAPTR_MASK) >> ENET_DMA_CURR_HOST_TX_BUF_CURTBUFAPTR_SHIFT) 6615 6616 /* Bitfield definition for register: DMA_CURR_HOST_RX_BUF */ 6617 /* 6618 * CURRBUFAPTR (RW) 6619 * 6620 * Host Receive Buffer Address Pointer 6621 * Cleared on Reset. Pointer updated by the DMA during operation. 6622 */ 6623 #define ENET_DMA_CURR_HOST_RX_BUF_CURRBUFAPTR_MASK (0xFFFFFFFFUL) 6624 #define ENET_DMA_CURR_HOST_RX_BUF_CURRBUFAPTR_SHIFT (0U) 6625 #define ENET_DMA_CURR_HOST_RX_BUF_CURRBUFAPTR_SET(x) (((uint32_t)(x) << ENET_DMA_CURR_HOST_RX_BUF_CURRBUFAPTR_SHIFT) & ENET_DMA_CURR_HOST_RX_BUF_CURRBUFAPTR_MASK) 6626 #define ENET_DMA_CURR_HOST_RX_BUF_CURRBUFAPTR_GET(x) (((uint32_t)(x) & ENET_DMA_CURR_HOST_RX_BUF_CURRBUFAPTR_MASK) >> ENET_DMA_CURR_HOST_RX_BUF_CURRBUFAPTR_SHIFT) 6627 6628 /* Bitfield definition for register: DMA_HW_FEATURE */ 6629 /* 6630 * ACTPHYIF (RW) 6631 * 6632 * Active or selected PHY interface 6633 * When you have multiple PHY interfaces in your configuration, this field indicates the sampled value of phy_intf_sel_i during reset de-assertion. 6634 * - 000: GMII or MII 6635 * - 001: RGMII 6636 * - 010: SGMII 6637 * - 011: TBI 6638 * - 100: RMII 6639 * - 101: RTBI 6640 * - 110: SMII 6641 * - 111: RevMII - All Others: Reserved 6642 */ 6643 #define ENET_DMA_HW_FEATURE_ACTPHYIF_MASK (0x70000000UL) 6644 #define ENET_DMA_HW_FEATURE_ACTPHYIF_SHIFT (28U) 6645 #define ENET_DMA_HW_FEATURE_ACTPHYIF_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_ACTPHYIF_SHIFT) & ENET_DMA_HW_FEATURE_ACTPHYIF_MASK) 6646 #define ENET_DMA_HW_FEATURE_ACTPHYIF_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_ACTPHYIF_MASK) >> ENET_DMA_HW_FEATURE_ACTPHYIF_SHIFT) 6647 6648 /* 6649 * SAVLANINS (RW) 6650 * 6651 * Source Address or VLAN Insertion 6652 */ 6653 #define ENET_DMA_HW_FEATURE_SAVLANINS_MASK (0x8000000UL) 6654 #define ENET_DMA_HW_FEATURE_SAVLANINS_SHIFT (27U) 6655 #define ENET_DMA_HW_FEATURE_SAVLANINS_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_SAVLANINS_SHIFT) & ENET_DMA_HW_FEATURE_SAVLANINS_MASK) 6656 #define ENET_DMA_HW_FEATURE_SAVLANINS_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_SAVLANINS_MASK) >> ENET_DMA_HW_FEATURE_SAVLANINS_SHIFT) 6657 6658 /* 6659 * FLEXIPPSEN (RW) 6660 * 6661 * Flexible Pulse-Per-Second Output 6662 */ 6663 #define ENET_DMA_HW_FEATURE_FLEXIPPSEN_MASK (0x4000000UL) 6664 #define ENET_DMA_HW_FEATURE_FLEXIPPSEN_SHIFT (26U) 6665 #define ENET_DMA_HW_FEATURE_FLEXIPPSEN_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_FLEXIPPSEN_SHIFT) & ENET_DMA_HW_FEATURE_FLEXIPPSEN_MASK) 6666 #define ENET_DMA_HW_FEATURE_FLEXIPPSEN_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_FLEXIPPSEN_MASK) >> ENET_DMA_HW_FEATURE_FLEXIPPSEN_SHIFT) 6667 6668 /* 6669 * INTTSEN (RW) 6670 * 6671 * Timestamping with Internal System Time 6672 */ 6673 #define ENET_DMA_HW_FEATURE_INTTSEN_MASK (0x2000000UL) 6674 #define ENET_DMA_HW_FEATURE_INTTSEN_SHIFT (25U) 6675 #define ENET_DMA_HW_FEATURE_INTTSEN_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_INTTSEN_SHIFT) & ENET_DMA_HW_FEATURE_INTTSEN_MASK) 6676 #define ENET_DMA_HW_FEATURE_INTTSEN_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_INTTSEN_MASK) >> ENET_DMA_HW_FEATURE_INTTSEN_SHIFT) 6677 6678 /* 6679 * ENHDESSEL (RW) 6680 * 6681 * Alternate (Enhanced Descriptor) 6682 */ 6683 #define ENET_DMA_HW_FEATURE_ENHDESSEL_MASK (0x1000000UL) 6684 #define ENET_DMA_HW_FEATURE_ENHDESSEL_SHIFT (24U) 6685 #define ENET_DMA_HW_FEATURE_ENHDESSEL_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_ENHDESSEL_SHIFT) & ENET_DMA_HW_FEATURE_ENHDESSEL_MASK) 6686 #define ENET_DMA_HW_FEATURE_ENHDESSEL_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_ENHDESSEL_MASK) >> ENET_DMA_HW_FEATURE_ENHDESSEL_SHIFT) 6687 6688 /* 6689 * TXCHCNT (RW) 6690 * 6691 * Number of additional Tx Channels 6692 */ 6693 #define ENET_DMA_HW_FEATURE_TXCHCNT_MASK (0xC00000UL) 6694 #define ENET_DMA_HW_FEATURE_TXCHCNT_SHIFT (22U) 6695 #define ENET_DMA_HW_FEATURE_TXCHCNT_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_TXCHCNT_SHIFT) & ENET_DMA_HW_FEATURE_TXCHCNT_MASK) 6696 #define ENET_DMA_HW_FEATURE_TXCHCNT_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_TXCHCNT_MASK) >> ENET_DMA_HW_FEATURE_TXCHCNT_SHIFT) 6697 6698 /* 6699 * RXCHCNT (RW) 6700 * 6701 * Number of additional Rx Channels 6702 */ 6703 #define ENET_DMA_HW_FEATURE_RXCHCNT_MASK (0x300000UL) 6704 #define ENET_DMA_HW_FEATURE_RXCHCNT_SHIFT (20U) 6705 #define ENET_DMA_HW_FEATURE_RXCHCNT_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_RXCHCNT_SHIFT) & ENET_DMA_HW_FEATURE_RXCHCNT_MASK) 6706 #define ENET_DMA_HW_FEATURE_RXCHCNT_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_RXCHCNT_MASK) >> ENET_DMA_HW_FEATURE_RXCHCNT_SHIFT) 6707 6708 /* 6709 * RXFIFOSIZE (RW) 6710 * 6711 * Rx FIFO > 2,048 Bytes 6712 */ 6713 #define ENET_DMA_HW_FEATURE_RXFIFOSIZE_MASK (0x80000UL) 6714 #define ENET_DMA_HW_FEATURE_RXFIFOSIZE_SHIFT (19U) 6715 #define ENET_DMA_HW_FEATURE_RXFIFOSIZE_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_RXFIFOSIZE_SHIFT) & ENET_DMA_HW_FEATURE_RXFIFOSIZE_MASK) 6716 #define ENET_DMA_HW_FEATURE_RXFIFOSIZE_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_RXFIFOSIZE_MASK) >> ENET_DMA_HW_FEATURE_RXFIFOSIZE_SHIFT) 6717 6718 /* 6719 * RXTYP2COE (RW) 6720 * 6721 * IP Checksum Offload (Type 2) in Rx 6722 */ 6723 #define ENET_DMA_HW_FEATURE_RXTYP2COE_MASK (0x40000UL) 6724 #define ENET_DMA_HW_FEATURE_RXTYP2COE_SHIFT (18U) 6725 #define ENET_DMA_HW_FEATURE_RXTYP2COE_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_RXTYP2COE_SHIFT) & ENET_DMA_HW_FEATURE_RXTYP2COE_MASK) 6726 #define ENET_DMA_HW_FEATURE_RXTYP2COE_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_RXTYP2COE_MASK) >> ENET_DMA_HW_FEATURE_RXTYP2COE_SHIFT) 6727 6728 /* 6729 * RXTYP1COE (RW) 6730 * 6731 * IP Checksum Offload (Type 1) in Rx Note: If IPCHKSUM_EN = Enabled and IPC_FULL_OFFLOAD = Enabled, then RXTYP1COE = 0 and RXTYP2COE = 1. 6732 */ 6733 #define ENET_DMA_HW_FEATURE_RXTYP1COE_MASK (0x20000UL) 6734 #define ENET_DMA_HW_FEATURE_RXTYP1COE_SHIFT (17U) 6735 #define ENET_DMA_HW_FEATURE_RXTYP1COE_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_RXTYP1COE_SHIFT) & ENET_DMA_HW_FEATURE_RXTYP1COE_MASK) 6736 #define ENET_DMA_HW_FEATURE_RXTYP1COE_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_RXTYP1COE_MASK) >> ENET_DMA_HW_FEATURE_RXTYP1COE_SHIFT) 6737 6738 /* 6739 * TXCOESEL (RW) 6740 * 6741 * Checksum Offload in Tx 6742 */ 6743 #define ENET_DMA_HW_FEATURE_TXCOESEL_MASK (0x10000UL) 6744 #define ENET_DMA_HW_FEATURE_TXCOESEL_SHIFT (16U) 6745 #define ENET_DMA_HW_FEATURE_TXCOESEL_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_TXCOESEL_SHIFT) & ENET_DMA_HW_FEATURE_TXCOESEL_MASK) 6746 #define ENET_DMA_HW_FEATURE_TXCOESEL_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_TXCOESEL_MASK) >> ENET_DMA_HW_FEATURE_TXCOESEL_SHIFT) 6747 6748 /* 6749 * AVSEL (RW) 6750 * 6751 * AV feature 6752 */ 6753 #define ENET_DMA_HW_FEATURE_AVSEL_MASK (0x8000U) 6754 #define ENET_DMA_HW_FEATURE_AVSEL_SHIFT (15U) 6755 #define ENET_DMA_HW_FEATURE_AVSEL_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_AVSEL_SHIFT) & ENET_DMA_HW_FEATURE_AVSEL_MASK) 6756 #define ENET_DMA_HW_FEATURE_AVSEL_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_AVSEL_MASK) >> ENET_DMA_HW_FEATURE_AVSEL_SHIFT) 6757 6758 /* 6759 * EEESEL (RW) 6760 * 6761 * Energy Efficient Ethernet 6762 */ 6763 #define ENET_DMA_HW_FEATURE_EEESEL_MASK (0x4000U) 6764 #define ENET_DMA_HW_FEATURE_EEESEL_SHIFT (14U) 6765 #define ENET_DMA_HW_FEATURE_EEESEL_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_EEESEL_SHIFT) & ENET_DMA_HW_FEATURE_EEESEL_MASK) 6766 #define ENET_DMA_HW_FEATURE_EEESEL_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_EEESEL_MASK) >> ENET_DMA_HW_FEATURE_EEESEL_SHIFT) 6767 6768 /* 6769 * TSVER2SEL (RW) 6770 * 6771 * IEEE 1588-2008 Advanced timestamp 6772 */ 6773 #define ENET_DMA_HW_FEATURE_TSVER2SEL_MASK (0x2000U) 6774 #define ENET_DMA_HW_FEATURE_TSVER2SEL_SHIFT (13U) 6775 #define ENET_DMA_HW_FEATURE_TSVER2SEL_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_TSVER2SEL_SHIFT) & ENET_DMA_HW_FEATURE_TSVER2SEL_MASK) 6776 #define ENET_DMA_HW_FEATURE_TSVER2SEL_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_TSVER2SEL_MASK) >> ENET_DMA_HW_FEATURE_TSVER2SEL_SHIFT) 6777 6778 /* 6779 * TSVER1SEL (RW) 6780 * 6781 * Only IEEE 1588-2002 timestamp 6782 */ 6783 #define ENET_DMA_HW_FEATURE_TSVER1SEL_MASK (0x1000U) 6784 #define ENET_DMA_HW_FEATURE_TSVER1SEL_SHIFT (12U) 6785 #define ENET_DMA_HW_FEATURE_TSVER1SEL_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_TSVER1SEL_SHIFT) & ENET_DMA_HW_FEATURE_TSVER1SEL_MASK) 6786 #define ENET_DMA_HW_FEATURE_TSVER1SEL_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_TSVER1SEL_MASK) >> ENET_DMA_HW_FEATURE_TSVER1SEL_SHIFT) 6787 6788 /* 6789 * MMCSEL (RW) 6790 * 6791 * RMON module 6792 */ 6793 #define ENET_DMA_HW_FEATURE_MMCSEL_MASK (0x800U) 6794 #define ENET_DMA_HW_FEATURE_MMCSEL_SHIFT (11U) 6795 #define ENET_DMA_HW_FEATURE_MMCSEL_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_MMCSEL_SHIFT) & ENET_DMA_HW_FEATURE_MMCSEL_MASK) 6796 #define ENET_DMA_HW_FEATURE_MMCSEL_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_MMCSEL_MASK) >> ENET_DMA_HW_FEATURE_MMCSEL_SHIFT) 6797 6798 /* 6799 * MGKSEL (RW) 6800 * 6801 * PMT magic packet 6802 */ 6803 #define ENET_DMA_HW_FEATURE_MGKSEL_MASK (0x400U) 6804 #define ENET_DMA_HW_FEATURE_MGKSEL_SHIFT (10U) 6805 #define ENET_DMA_HW_FEATURE_MGKSEL_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_MGKSEL_SHIFT) & ENET_DMA_HW_FEATURE_MGKSEL_MASK) 6806 #define ENET_DMA_HW_FEATURE_MGKSEL_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_MGKSEL_MASK) >> ENET_DMA_HW_FEATURE_MGKSEL_SHIFT) 6807 6808 /* 6809 * RWKSEL (RW) 6810 * 6811 * PMT remote wake-up frame 6812 */ 6813 #define ENET_DMA_HW_FEATURE_RWKSEL_MASK (0x200U) 6814 #define ENET_DMA_HW_FEATURE_RWKSEL_SHIFT (9U) 6815 #define ENET_DMA_HW_FEATURE_RWKSEL_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_RWKSEL_SHIFT) & ENET_DMA_HW_FEATURE_RWKSEL_MASK) 6816 #define ENET_DMA_HW_FEATURE_RWKSEL_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_RWKSEL_MASK) >> ENET_DMA_HW_FEATURE_RWKSEL_SHIFT) 6817 6818 /* 6819 * SMASEL (RW) 6820 * 6821 * SMA (MDIO) Interface 6822 */ 6823 #define ENET_DMA_HW_FEATURE_SMASEL_MASK (0x100U) 6824 #define ENET_DMA_HW_FEATURE_SMASEL_SHIFT (8U) 6825 #define ENET_DMA_HW_FEATURE_SMASEL_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_SMASEL_SHIFT) & ENET_DMA_HW_FEATURE_SMASEL_MASK) 6826 #define ENET_DMA_HW_FEATURE_SMASEL_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_SMASEL_MASK) >> ENET_DMA_HW_FEATURE_SMASEL_SHIFT) 6827 6828 /* 6829 * L3L4FLTREN (RW) 6830 * 6831 * Layer 3 and Layer 4 feature 6832 */ 6833 #define ENET_DMA_HW_FEATURE_L3L4FLTREN_MASK (0x80U) 6834 #define ENET_DMA_HW_FEATURE_L3L4FLTREN_SHIFT (7U) 6835 #define ENET_DMA_HW_FEATURE_L3L4FLTREN_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_L3L4FLTREN_SHIFT) & ENET_DMA_HW_FEATURE_L3L4FLTREN_MASK) 6836 #define ENET_DMA_HW_FEATURE_L3L4FLTREN_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_L3L4FLTREN_MASK) >> ENET_DMA_HW_FEATURE_L3L4FLTREN_SHIFT) 6837 6838 /* 6839 * PCSSEL (RW) 6840 * 6841 * PCS registers (TBI, SGMII, or RTBI PHY interface) 6842 */ 6843 #define ENET_DMA_HW_FEATURE_PCSSEL_MASK (0x40U) 6844 #define ENET_DMA_HW_FEATURE_PCSSEL_SHIFT (6U) 6845 #define ENET_DMA_HW_FEATURE_PCSSEL_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_PCSSEL_SHIFT) & ENET_DMA_HW_FEATURE_PCSSEL_MASK) 6846 #define ENET_DMA_HW_FEATURE_PCSSEL_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_PCSSEL_MASK) >> ENET_DMA_HW_FEATURE_PCSSEL_SHIFT) 6847 6848 /* 6849 * ADDMACADRSEL (RW) 6850 * 6851 * Multiple MAC Address registers 6852 */ 6853 #define ENET_DMA_HW_FEATURE_ADDMACADRSEL_MASK (0x20U) 6854 #define ENET_DMA_HW_FEATURE_ADDMACADRSEL_SHIFT (5U) 6855 #define ENET_DMA_HW_FEATURE_ADDMACADRSEL_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_ADDMACADRSEL_SHIFT) & ENET_DMA_HW_FEATURE_ADDMACADRSEL_MASK) 6856 #define ENET_DMA_HW_FEATURE_ADDMACADRSEL_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_ADDMACADRSEL_MASK) >> ENET_DMA_HW_FEATURE_ADDMACADRSEL_SHIFT) 6857 6858 /* 6859 * HASHSEL (RW) 6860 * 6861 * HASH filter 6862 */ 6863 #define ENET_DMA_HW_FEATURE_HASHSEL_MASK (0x10U) 6864 #define ENET_DMA_HW_FEATURE_HASHSEL_SHIFT (4U) 6865 #define ENET_DMA_HW_FEATURE_HASHSEL_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_HASHSEL_SHIFT) & ENET_DMA_HW_FEATURE_HASHSEL_MASK) 6866 #define ENET_DMA_HW_FEATURE_HASHSEL_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_HASHSEL_MASK) >> ENET_DMA_HW_FEATURE_HASHSEL_SHIFT) 6867 6868 /* 6869 * EXTHASHEN (RW) 6870 * 6871 * Expanded DA Hash filter 6872 */ 6873 #define ENET_DMA_HW_FEATURE_EXTHASHEN_MASK (0x8U) 6874 #define ENET_DMA_HW_FEATURE_EXTHASHEN_SHIFT (3U) 6875 #define ENET_DMA_HW_FEATURE_EXTHASHEN_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_EXTHASHEN_SHIFT) & ENET_DMA_HW_FEATURE_EXTHASHEN_MASK) 6876 #define ENET_DMA_HW_FEATURE_EXTHASHEN_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_EXTHASHEN_MASK) >> ENET_DMA_HW_FEATURE_EXTHASHEN_SHIFT) 6877 6878 /* 6879 * HDSEL (RW) 6880 * 6881 * Half-duplex support 6882 */ 6883 #define ENET_DMA_HW_FEATURE_HDSEL_MASK (0x4U) 6884 #define ENET_DMA_HW_FEATURE_HDSEL_SHIFT (2U) 6885 #define ENET_DMA_HW_FEATURE_HDSEL_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_HDSEL_SHIFT) & ENET_DMA_HW_FEATURE_HDSEL_MASK) 6886 #define ENET_DMA_HW_FEATURE_HDSEL_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_HDSEL_MASK) >> ENET_DMA_HW_FEATURE_HDSEL_SHIFT) 6887 6888 /* 6889 * GMIISEL (RW) 6890 * 6891 * 1000 Mbps support 6892 */ 6893 #define ENET_DMA_HW_FEATURE_GMIISEL_MASK (0x2U) 6894 #define ENET_DMA_HW_FEATURE_GMIISEL_SHIFT (1U) 6895 #define ENET_DMA_HW_FEATURE_GMIISEL_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_GMIISEL_SHIFT) & ENET_DMA_HW_FEATURE_GMIISEL_MASK) 6896 #define ENET_DMA_HW_FEATURE_GMIISEL_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_GMIISEL_MASK) >> ENET_DMA_HW_FEATURE_GMIISEL_SHIFT) 6897 6898 /* 6899 * MIISEL (RW) 6900 * 6901 * 10 or 100 Mbps support 6902 */ 6903 #define ENET_DMA_HW_FEATURE_MIISEL_MASK (0x1U) 6904 #define ENET_DMA_HW_FEATURE_MIISEL_SHIFT (0U) 6905 #define ENET_DMA_HW_FEATURE_MIISEL_SET(x) (((uint32_t)(x) << ENET_DMA_HW_FEATURE_MIISEL_SHIFT) & ENET_DMA_HW_FEATURE_MIISEL_MASK) 6906 #define ENET_DMA_HW_FEATURE_MIISEL_GET(x) (((uint32_t)(x) & ENET_DMA_HW_FEATURE_MIISEL_MASK) >> ENET_DMA_HW_FEATURE_MIISEL_SHIFT) 6907 6908 /* Bitfield definition for register: CTRL0 */ 6909 /* 6910 * ENET0_RXCLK_DLY_SEL (RW) 6911 * 6912 */ 6913 #define ENET_CTRL0_ENET0_RXCLK_DLY_SEL_MASK (0x3E0U) 6914 #define ENET_CTRL0_ENET0_RXCLK_DLY_SEL_SHIFT (5U) 6915 #define ENET_CTRL0_ENET0_RXCLK_DLY_SEL_SET(x) (((uint32_t)(x) << ENET_CTRL0_ENET0_RXCLK_DLY_SEL_SHIFT) & ENET_CTRL0_ENET0_RXCLK_DLY_SEL_MASK) 6916 #define ENET_CTRL0_ENET0_RXCLK_DLY_SEL_GET(x) (((uint32_t)(x) & ENET_CTRL0_ENET0_RXCLK_DLY_SEL_MASK) >> ENET_CTRL0_ENET0_RXCLK_DLY_SEL_SHIFT) 6917 6918 /* 6919 * ENET0_TXCLK_DLY_SEL (RW) 6920 * 6921 */ 6922 #define ENET_CTRL0_ENET0_TXCLK_DLY_SEL_MASK (0x1FU) 6923 #define ENET_CTRL0_ENET0_TXCLK_DLY_SEL_SHIFT (0U) 6924 #define ENET_CTRL0_ENET0_TXCLK_DLY_SEL_SET(x) (((uint32_t)(x) << ENET_CTRL0_ENET0_TXCLK_DLY_SEL_SHIFT) & ENET_CTRL0_ENET0_TXCLK_DLY_SEL_MASK) 6925 #define ENET_CTRL0_ENET0_TXCLK_DLY_SEL_GET(x) (((uint32_t)(x) & ENET_CTRL0_ENET0_TXCLK_DLY_SEL_MASK) >> ENET_CTRL0_ENET0_TXCLK_DLY_SEL_SHIFT) 6926 6927 /* Bitfield definition for register: CTRL2 */ 6928 /* 6929 * ENET0_LPI_INTR_EN (RW) 6930 * 6931 */ 6932 #define ENET_CTRL2_ENET0_LPI_INTR_EN_MASK (0x20000000UL) 6933 #define ENET_CTRL2_ENET0_LPI_INTR_EN_SHIFT (29U) 6934 #define ENET_CTRL2_ENET0_LPI_INTR_EN_SET(x) (((uint32_t)(x) << ENET_CTRL2_ENET0_LPI_INTR_EN_SHIFT) & ENET_CTRL2_ENET0_LPI_INTR_EN_MASK) 6935 #define ENET_CTRL2_ENET0_LPI_INTR_EN_GET(x) (((uint32_t)(x) & ENET_CTRL2_ENET0_LPI_INTR_EN_MASK) >> ENET_CTRL2_ENET0_LPI_INTR_EN_SHIFT) 6936 6937 /* 6938 * ENET0_REFCLK_OE (RW) 6939 * 6940 */ 6941 #define ENET_CTRL2_ENET0_REFCLK_OE_MASK (0x80000UL) 6942 #define ENET_CTRL2_ENET0_REFCLK_OE_SHIFT (19U) 6943 #define ENET_CTRL2_ENET0_REFCLK_OE_SET(x) (((uint32_t)(x) << ENET_CTRL2_ENET0_REFCLK_OE_SHIFT) & ENET_CTRL2_ENET0_REFCLK_OE_MASK) 6944 #define ENET_CTRL2_ENET0_REFCLK_OE_GET(x) (((uint32_t)(x) & ENET_CTRL2_ENET0_REFCLK_OE_MASK) >> ENET_CTRL2_ENET0_REFCLK_OE_SHIFT) 6945 6946 /* 6947 * ENET0_PHY_INF_SEL (RW) 6948 * 6949 */ 6950 #define ENET_CTRL2_ENET0_PHY_INF_SEL_MASK (0xE000U) 6951 #define ENET_CTRL2_ENET0_PHY_INF_SEL_SHIFT (13U) 6952 #define ENET_CTRL2_ENET0_PHY_INF_SEL_SET(x) (((uint32_t)(x) << ENET_CTRL2_ENET0_PHY_INF_SEL_SHIFT) & ENET_CTRL2_ENET0_PHY_INF_SEL_MASK) 6953 #define ENET_CTRL2_ENET0_PHY_INF_SEL_GET(x) (((uint32_t)(x) & ENET_CTRL2_ENET0_PHY_INF_SEL_MASK) >> ENET_CTRL2_ENET0_PHY_INF_SEL_SHIFT) 6954 6955 /* 6956 * ENET0_FLOWCTRL (RW) 6957 * 6958 */ 6959 #define ENET_CTRL2_ENET0_FLOWCTRL_MASK (0x1000U) 6960 #define ENET_CTRL2_ENET0_FLOWCTRL_SHIFT (12U) 6961 #define ENET_CTRL2_ENET0_FLOWCTRL_SET(x) (((uint32_t)(x) << ENET_CTRL2_ENET0_FLOWCTRL_SHIFT) & ENET_CTRL2_ENET0_FLOWCTRL_MASK) 6962 #define ENET_CTRL2_ENET0_FLOWCTRL_GET(x) (((uint32_t)(x) & ENET_CTRL2_ENET0_FLOWCTRL_MASK) >> ENET_CTRL2_ENET0_FLOWCTRL_SHIFT) 6963 6964 /* 6965 * ENET0_RMII_TXCLK_SEL (RW) 6966 * 6967 */ 6968 #define ENET_CTRL2_ENET0_RMII_TXCLK_SEL_MASK (0x400U) 6969 #define ENET_CTRL2_ENET0_RMII_TXCLK_SEL_SHIFT (10U) 6970 #define ENET_CTRL2_ENET0_RMII_TXCLK_SEL_SET(x) (((uint32_t)(x) << ENET_CTRL2_ENET0_RMII_TXCLK_SEL_SHIFT) & ENET_CTRL2_ENET0_RMII_TXCLK_SEL_MASK) 6971 #define ENET_CTRL2_ENET0_RMII_TXCLK_SEL_GET(x) (((uint32_t)(x) & ENET_CTRL2_ENET0_RMII_TXCLK_SEL_MASK) >> ENET_CTRL2_ENET0_RMII_TXCLK_SEL_SHIFT) 6972 6973 6974 6975 /* MAC_ADDR register group index macro definition */ 6976 #define ENET_MAC_ADDR_1 (0UL) 6977 #define ENET_MAC_ADDR_2 (1UL) 6978 #define ENET_MAC_ADDR_3 (2UL) 6979 #define ENET_MAC_ADDR_4 (3UL) 6980 6981 /* L3_L4_CFG register group index macro definition */ 6982 #define ENET_L3_L4_CFG_0 (0UL) 6983 #define ENET_L3_L4_CFG_1 (1UL) 6984 #define ENET_L3_L4_CFG_2 (2UL) 6985 #define ENET_L3_L4_CFG_3 (3UL) 6986 6987 /* HASH_TABLE register group index macro definition */ 6988 #define ENET_HASH_TABLE_REGISTER0 (0UL) 6989 #define ENET_HASH_TABLE_REGISTER1 (1UL) 6990 #define ENET_HASH_TABLE_REGISTER2 (2UL) 6991 #define ENET_HASH_TABLE_REGISTER3 (3UL) 6992 #define ENET_HASH_TABLE_REGISTER4 (4UL) 6993 #define ENET_HASH_TABLE_REGISTER5 (5UL) 6994 #define ENET_HASH_TABLE_REGISTER6 (6UL) 6995 #define ENET_HASH_TABLE_REGISTER7 (7UL) 6996 6997 /* PPS register group index macro definition */ 6998 #define ENET_PPS_1 (0UL) 6999 #define ENET_PPS_2 (1UL) 7000 #define ENET_PPS_3 (2UL) 7001 7002 7003 #endif /* HPM_ENET_H */