HPM SDK
HPMicro Software Development Kit
hpm_enet_regs.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021-2025 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 uint8_t RESERVED0[8]; /* 0x20 - 0x27: Reserved */
22  __RW uint32_t RWKFRMFILT; /* 0x28: Remote Wake-Up Frame Filter Register */
23  __RW uint32_t PMT_CSR; /* 0x2C: PMT Control and Status Register */
24  __RW uint32_t LPI_CSR; /* 0x30: LPI Control and Status Register */
25  __RW uint32_t LPI_TCR; /* 0x34: LPI Timers Control Register */
26  __R uint32_t INTR_STATUS; /* 0x38: Interrupt Status Register */
27  __RW uint32_t INTR_MASK; /* 0x3C: Interrupt Mask Register */
28  __RW uint32_t MAC_ADDR_0_HIGH; /* 0x40: MAC Address 0 High Register */
29  __RW uint32_t MAC_ADDR_0_LOW; /* 0x44: MAC Address 0 Low Register */
30  struct {
31  __RW uint32_t HIGH; /* 0x48: MAC Address High Register */
32  __RW uint32_t LOW; /* 0x4C: MAC Address Low Register */
33  } MAC_ADDR[4];
34  __R uint8_t RESERVED1[112]; /* 0x68 - 0xD7: Reserved */
35  __RW uint32_t XMII_CSR; /* 0xD8: SGMII/RGMII/SMII Control and Status Register */
36  __RW uint32_t WDOG_WTO; /* 0xDC: Watchdog Timeout Register */
37  __R uint8_t RESERVED2[32]; /* 0xE0 - 0xFF: Reserved */
38  __RW uint32_t MMC_CNTRL; /* 0x100: MMC Control establishes the operating mode of MMC. */
39  __RW uint32_t MMC_INTR_RX; /* 0x104: MMC Receive Interrupt */
40  __RW uint32_t MMC_INTR_TX; /* 0x108: MMC Transmit Interrupt */
41  __RW uint32_t MMC_INTR_MASK_RX; /* 0x10C: MMC Receive Interrupt mask */
42  __RW uint32_t MMC_INTR_MASK_TX; /* 0x110: MMC Transmit Interrupt Mask */
43  __R uint8_t RESERVED3[16]; /* 0x114 - 0x123: Reserved */
44  __RW uint32_t TX64OCTETS_GB; /* 0x124: Number of good and bad frames transmitted with length 64 bytes,
45 exclusive of preamble and retried frames. */
46  __RW uint32_t TX65TO127OCTETS_GB; /* 0x128: Number of good and bad frames transmitted with length between
47 65 and 127 (inclusive) bytes, exclusive of preamble and retried
48 frames. */
49  __RW uint32_t TX128TO255OCTETS_GB; /* 0x12C: Number of good and bad frames transmitted with length between
50 128 and 255 (inclusive) bytes, exclusive of preamble and retried
51 frames. */
52  __RW uint32_t TX256TO511OCTETS_GB; /* 0x130: Number of good and bad frames transmitted with length between
53 256 and 511 (inclusive) bytes, exclusive of preamble and retried
54 frames. */
55  __RW uint32_t TX512TO1023OCTETS_GB; /* 0x134: Number of good and bad frames transmitted with length between
56 512 and 1,023 (inclusive) bytes, exclusive of preamble and retried
57 frames. */
58  __RW uint32_t TX1024TOMAXOCTETS_GB; /* 0x138: Number of good and bad frames transmitted with length between
59 1,024 and maxsize (inclusive) bytes, exclusive of preamble and
60 retried frames. */
61  __R uint8_t RESERVED4[68]; /* 0x13C - 0x17F: Reserved */
62  __RW uint32_t RXFRAMECOUNT_GB; /* 0x180: Number of good and bad frames received */
63  __R uint8_t RESERVED5[124]; /* 0x184 - 0x1FF: Reserved */
64  __RW uint32_t MMC_IPC_INTR_MASK_RX; /* 0x200: MMC IPC Receive Checksum Offload Interrupt Mask maintains
65 the mask for the interrupt generated from the receive IPC statistic
66 counters. */
67  __R uint8_t RESERVED6[4]; /* 0x204 - 0x207: Reserved */
68  __RW uint32_t MMC_IPC_INTR_RX; /* 0x208: MMC Receive Checksum Offload Interrupt maintains the interrupt
69 that the receive IPC statistic counters generate. See Table 4-25
70 for further detail. */
71  __R uint8_t RESERVED7[4]; /* 0x20C - 0x20F: Reserved */
72  __RW uint32_t RXIPV4_GD_FMS; /* 0x210: Number of good IPv4 datagrams received with the TCP, UDP, or
73 ICMP payload */
74  __R uint8_t RESERVED8[492]; /* 0x214 - 0x3FF: Reserved */
75  struct {
76  __RW uint32_t L3_L4_CTRL; /* 0x400: Layer 3 and Layer 4 Control Register */
77  __RW uint32_t L4_ADDR; /* 0x404: Layer 4 Address Register */
78  __R uint8_t RESERVED0[8]; /* 0x408 - 0x40F: Reserved */
79  __RW uint32_t L3_ADDR_0; /* 0x410: Layer 3 Address 0 Register */
80  __RW uint32_t L3_ADDR_1; /* 0x414: Layer 3 Address 1 Register */
81  __RW uint32_t L3_ADDR_2; /* 0x418: Layer 3 Address 2 Register */
82  __RW uint32_t L3_ADDR_3; /* 0x41C: Layer 3 Address 3 Register */
83  } L3_L4_CFG[1];
84  __R uint8_t RESERVED9[356]; /* 0x420 - 0x583: Reserved */
85  __RW uint32_t VLAN_TAG_INC_RPL; /* 0x584: VLAN Tag Inclusion or Replacement Register */
86  __RW uint32_t VLAN_HASH; /* 0x588: VLAN Hash Table Register */
87  __R uint8_t RESERVED10[372]; /* 0x58C - 0x6FF: Reserved */
88  __RW uint32_t TS_CTRL; /* 0x700: Timestamp Control Register */
89  __RW uint32_t SUB_SEC_INCR; /* 0x704: Sub-Second Increment Register */
90  __R uint32_t SYST_SEC; /* 0x708: System Time - Seconds Register */
91  __R uint32_t SYST_NSEC; /* 0x70C: System Time - Nanoseconds Register */
92  __RW uint32_t SYST_SEC_UPD; /* 0x710: System Time - Seconds Update Register */
93  __RW uint32_t SYST_NSEC_UPD; /* 0x714: System Time - Nanoseconds Update Register */
94  __RW uint32_t TS_ADDEND; /* 0x718: Timestamp Addend Register */
95  __RW uint32_t TGTTM_SEC; /* 0x71C: Target Time Seconds Register */
96  __RW uint32_t TGTTM_NSEC; /* 0x720: Target Time Nanoseconds Register */
97  __RW uint32_t SYSTM_H_SEC; /* 0x724: System Time - Higher Word Seconds Register */
98  __R uint32_t TS_STATUS; /* 0x728: Timestamp Status Register */
99  __RW uint32_t PPS_CTRL; /* 0x72C: PPS Control Register */
100  __R uint32_t AUX_TS_NSEC; /* 0x730: Auxiliary Timestamp - Nanoseconds Register */
101  __R uint32_t AUX_TS_SEC; /* 0x734: Auxiliary Timestamp - Seconds Register */
102  __R uint8_t RESERVED11[40]; /* 0x738 - 0x75F: Reserved */
103  __RW uint32_t PPS0_INTERVAL; /* 0x760: PPS Interval Register */
104  __RW uint32_t PPS0_WIDTH; /* 0x764: PPS Width Register */
105  __R uint8_t RESERVED12[24]; /* 0x768 - 0x77F: Reserved */
106  struct {
107  __RW uint32_t TGTTM_SEC; /* 0x780: PPS Target Time Seconds Register */
108  __RW uint32_t TGTTM_NSEC; /* 0x784: PPS Target Time Nanoseconds Register */
109  __RW uint32_t INTERVAL; /* 0x788: PPS Interval Register */
110  __RW uint32_t WIDTH; /* 0x78C: PPS Width Register */
111  __R uint8_t RESERVED0[16]; /* 0x790 - 0x79F: Reserved */
112  } PPS[3];
113  __R uint8_t RESERVED13[2080]; /* 0x7E0 - 0xFFF: Reserved */
114  __RW uint32_t DMA_BUS_MODE; /* 0x1000: Bus Mode Register */
115  __RW uint32_t DMA_TX_POLL_DEMAND; /* 0x1004: Transmit Poll Demand Register */
116  __RW uint32_t DMA_RX_POLL_DEMAND; /* 0x1008: Receive Poll Demand Register */
117  __RW uint32_t DMA_RX_DESC_LIST_ADDR; /* 0x100C: Receive Descriptor List Address Register */
118  __RW uint32_t DMA_TX_DESC_LIST_ADDR; /* 0x1010: Transmit Descriptor List Address Register */
119  __RW uint32_t DMA_STATUS; /* 0x1014: Status Register */
120  __RW uint32_t DMA_OP_MODE; /* 0x1018: Operation Mode Register */
121  __RW uint32_t DMA_INTR_EN; /* 0x101C: Interrupt Enable Register */
122  __RW uint32_t DMA_MISS_OVF_CNT; /* 0x1020: Missed Frame And Buffer Overflow Counter Register */
123  __RW uint32_t DMA_RX_INTR_WDOG; /* 0x1024: Receive Interrupt Watchdog Timer Register */
124  __RW uint32_t DMA_AXI_MODE; /* 0x1028: AXI Bus Mode Register */
125  __RW uint32_t DMA_BUS_STATUS; /* 0x102C: AHB or AXI Status Register */
126  __R uint8_t RESERVED14[24]; /* 0x1030 - 0x1047: Reserved */
127  __RW uint32_t DMA_CURR_HOST_TX_DESC; /* 0x1048: Current Host Transmit Descriptor Register */
128  __RW uint32_t DMA_CURR_HOST_RX_DESC; /* 0x104C: Current Host Receive Descriptor Register */
129  __RW uint32_t DMA_CURR_HOST_TX_BUF; /* 0x1050: Current Host Transmit Buffer Address Register */
130  __RW uint32_t DMA_CURR_HOST_RX_BUF; /* 0x1054: Current Host Receive Buffer Address Register */
131  __R uint8_t RESERVED15[8104]; /* 0x1058 - 0x2FFF: Reserved */
132  __RW uint32_t CTRL0; /* 0x3000: Control Register 0 */
133  __R uint8_t RESERVED16[4]; /* 0x3004 - 0x3007: Reserved */
134  __RW uint32_t CTRL2; /* 0x3008: Control Register 1 */
135  __R uint8_t RESERVED17[28]; /* 0x300C - 0x3027: Reserved */
136 } ENET_Type;
137 
138 
139 /* Bitfield definition for register: MACCFG */
140 /*
141  * SARC (RW)
142  *
143  * Source Address Insertion or Replacement Control
144  * This field controls the source address insertion or replacement for all transmitted frames.
145  * 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]:
146  * - 2'b0x: The input signals mti_sa_ctrl_i and ati_sa_ctrl_i control the SA field generation.
147  * - 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.
148  * - If Bit 30 is set to 1 and the Enable MAC Address Register 1 option is selected during core configuration,
149  * the MAC inserts the content of the MAC Address 1 registers (registers 18 and 19) in the SA field of all transmitted frames.
150  * - 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.
151  * - If Bit 30 is set to 1 and the Enable MAC Address Register 1 option is selected during core configuration,
152  * the MAC replaces the content of the MAC Address 1 registers (registers 18 and 19) in the SA field of all transmitted frames.
153  * Note: - Changes to this field take effect only on the start of a frame.
154  * If you write this register field when a frame is being transmitted, only the subsequent frame can use the updated value,
155  * that is, the current frame does not use the updated value.
156  * - These bits are reserved and RO when the Enable SA, VLAN, and CRC Insertion on TX feature is not selected during core configuration.
157  */
158 #define ENET_MACCFG_SARC_MASK (0x70000000UL)
159 #define ENET_MACCFG_SARC_SHIFT (28U)
160 #define ENET_MACCFG_SARC_SET(x) (((uint32_t)(x) << ENET_MACCFG_SARC_SHIFT) & ENET_MACCFG_SARC_MASK)
161 #define ENET_MACCFG_SARC_GET(x) (((uint32_t)(x) & ENET_MACCFG_SARC_MASK) >> ENET_MACCFG_SARC_SHIFT)
162 
163 /*
164  * TWOKPE (RW)
165  *
166  * IEEE 802.3as Support for 2K Packets
167  * When set, the MAC considers all frames, with up to 2,000 bytes length, as normal packets.
168  * When Bit 20 (JE) is not set, the MAC considers all received frames of size more than 2K bytes as Giant frames.
169  * 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.
170  * When Bit 20 is set, setting this bit has no effect on Giant Frame status.
171  */
172 #define ENET_MACCFG_TWOKPE_MASK (0x8000000UL)
173 #define ENET_MACCFG_TWOKPE_SHIFT (27U)
174 #define ENET_MACCFG_TWOKPE_SET(x) (((uint32_t)(x) << ENET_MACCFG_TWOKPE_SHIFT) & ENET_MACCFG_TWOKPE_MASK)
175 #define ENET_MACCFG_TWOKPE_GET(x) (((uint32_t)(x) & ENET_MACCFG_TWOKPE_MASK) >> ENET_MACCFG_TWOKPE_SHIFT)
176 
177 /*
178  * SFTERR (RW)
179  *
180  * SMII Force Transmit Error
181  * 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.
182  */
183 #define ENET_MACCFG_SFTERR_MASK (0x4000000UL)
184 #define ENET_MACCFG_SFTERR_SHIFT (26U)
185 #define ENET_MACCFG_SFTERR_SET(x) (((uint32_t)(x) << ENET_MACCFG_SFTERR_SHIFT) & ENET_MACCFG_SFTERR_MASK)
186 #define ENET_MACCFG_SFTERR_GET(x) (((uint32_t)(x) & ENET_MACCFG_SFTERR_MASK) >> ENET_MACCFG_SFTERR_SHIFT)
187 
188 /*
189  * CST (RW)
190  *
191  * CRC Stripping for Type Frames
192  * 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.
193  * 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.
194  */
195 #define ENET_MACCFG_CST_MASK (0x2000000UL)
196 #define ENET_MACCFG_CST_SHIFT (25U)
197 #define ENET_MACCFG_CST_SET(x) (((uint32_t)(x) << ENET_MACCFG_CST_SHIFT) & ENET_MACCFG_CST_MASK)
198 #define ENET_MACCFG_CST_GET(x) (((uint32_t)(x) & ENET_MACCFG_CST_MASK) >> ENET_MACCFG_CST_SHIFT)
199 
200 /*
201  * TC (RW)
202  *
203  * Transmit Configuration in RGMII, SGMII, or SMII
204  * 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,
205  * or SGMII port. When this bit is reset, no such information is driven to the PHY.
206  * This bit is reserved (and RO) if the RGMII, SMII, or SGMII PHY port is not selected during core configuration.
207  */
208 #define ENET_MACCFG_TC_MASK (0x1000000UL)
209 #define ENET_MACCFG_TC_SHIFT (24U)
210 #define ENET_MACCFG_TC_SET(x) (((uint32_t)(x) << ENET_MACCFG_TC_SHIFT) & ENET_MACCFG_TC_MASK)
211 #define ENET_MACCFG_TC_GET(x) (((uint32_t)(x) & ENET_MACCFG_TC_MASK) >> ENET_MACCFG_TC_SHIFT)
212 
213 /*
214  * WD (RW)
215  *
216  * Watchdog Disable
217  * 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.
218  */
219 #define ENET_MACCFG_WD_MASK (0x800000UL)
220 #define ENET_MACCFG_WD_SHIFT (23U)
221 #define ENET_MACCFG_WD_SET(x) (((uint32_t)(x) << ENET_MACCFG_WD_SHIFT) & ENET_MACCFG_WD_MASK)
222 #define ENET_MACCFG_WD_GET(x) (((uint32_t)(x) & ENET_MACCFG_WD_MASK) >> ENET_MACCFG_WD_SHIFT)
223 
224 /*
225  * JD (RW)
226  *
227  * Jabber Disable
228  * 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.
229  * 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.
230  */
231 #define ENET_MACCFG_JD_MASK (0x400000UL)
232 #define ENET_MACCFG_JD_SHIFT (22U)
233 #define ENET_MACCFG_JD_SET(x) (((uint32_t)(x) << ENET_MACCFG_JD_SHIFT) & ENET_MACCFG_JD_MASK)
234 #define ENET_MACCFG_JD_GET(x) (((uint32_t)(x) & ENET_MACCFG_JD_MASK) >> ENET_MACCFG_JD_SHIFT)
235 
236 /*
237  * BE (RW)
238  *
239  * Frame Burst Enable
240  * 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.
241  */
242 #define ENET_MACCFG_BE_MASK (0x200000UL)
243 #define ENET_MACCFG_BE_SHIFT (21U)
244 #define ENET_MACCFG_BE_SET(x) (((uint32_t)(x) << ENET_MACCFG_BE_SHIFT) & ENET_MACCFG_BE_MASK)
245 #define ENET_MACCFG_BE_GET(x) (((uint32_t)(x) & ENET_MACCFG_BE_MASK) >> ENET_MACCFG_BE_SHIFT)
246 
247 /*
248  * JE (RW)
249  *
250  * Jumbo Frame Enable
251  * 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.
252  */
253 #define ENET_MACCFG_JE_MASK (0x100000UL)
254 #define ENET_MACCFG_JE_SHIFT (20U)
255 #define ENET_MACCFG_JE_SET(x) (((uint32_t)(x) << ENET_MACCFG_JE_SHIFT) & ENET_MACCFG_JE_MASK)
256 #define ENET_MACCFG_JE_GET(x) (((uint32_t)(x) & ENET_MACCFG_JE_MASK) >> ENET_MACCFG_JE_SHIFT)
257 
258 /*
259  * IFG (RW)
260  *
261  * Inter-Frame Gap
262  * These bits control the minimum IFG between frames during transmission.
263  * - 000: 96 bit times
264  * - 001: 88 bit times
265  * - 010: 80 bit times - ...
266  * - 111: 40 bit times In the half-duplex mode, the minimum IFG can be configured only for 64 bit times (IFG = 100).
267  * Lower values are not considered.
268  * 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.
269  * When a JAM pattern is being transmitted because of backpressure activation, the MAC does not consider the minimum IFG.
270  */
271 #define ENET_MACCFG_IFG_MASK (0xE0000UL)
272 #define ENET_MACCFG_IFG_SHIFT (17U)
273 #define ENET_MACCFG_IFG_SET(x) (((uint32_t)(x) << ENET_MACCFG_IFG_SHIFT) & ENET_MACCFG_IFG_MASK)
274 #define ENET_MACCFG_IFG_GET(x) (((uint32_t)(x) & ENET_MACCFG_IFG_MASK) >> ENET_MACCFG_IFG_SHIFT)
275 
276 /*
277  * DCRS (RW)
278  *
279  * Disable Carrier Sense During Transmission
280  * When set high, this bit makes the MAC transmitter ignore the (G)MII CRS signal during frame transmission in the half-duplex mode.
281  * This request results in no errors generated because of Loss of Carrier or No Carrier during such transmission.
282  * When this bit is low, the MAC transmitter generates such errors because of Carrier Sense and can even abort the transmissions.
283  */
284 #define ENET_MACCFG_DCRS_MASK (0x10000UL)
285 #define ENET_MACCFG_DCRS_SHIFT (16U)
286 #define ENET_MACCFG_DCRS_SET(x) (((uint32_t)(x) << ENET_MACCFG_DCRS_SHIFT) & ENET_MACCFG_DCRS_MASK)
287 #define ENET_MACCFG_DCRS_GET(x) (((uint32_t)(x) & ENET_MACCFG_DCRS_MASK) >> ENET_MACCFG_DCRS_SHIFT)
288 
289 /*
290  * PS (RW)
291  *
292  * Port Select
293  * This bit selects the Ethernet line speed.
294  * - 0: For 1000 Mbps operations
295  * - 1: For 10 or 100 Mbps operations In 10 or 100 Mbps operations, this bit, along with FES bit, selects the exact line speed.
296  * 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,
297  * this bit is R_W. The mac_portselect_o or mac_speed_o[1] signal reflects the value of this bit.
298  */
299 #define ENET_MACCFG_PS_MASK (0x8000U)
300 #define ENET_MACCFG_PS_SHIFT (15U)
301 #define ENET_MACCFG_PS_SET(x) (((uint32_t)(x) << ENET_MACCFG_PS_SHIFT) & ENET_MACCFG_PS_MASK)
302 #define ENET_MACCFG_PS_GET(x) (((uint32_t)(x) & ENET_MACCFG_PS_MASK) >> ENET_MACCFG_PS_SHIFT)
303 
304 /*
305  * FES (RW)
306  *
307  * Speed
308  * This bit selects the speed in the MII, RMII, SMII, RGMII, SGMII, or RevMII interface:
309  * - 0: 10 Mbps
310  * - 1: 100 Mbps This bit is reserved (RO) by default and is enabled only when the parameter SPEED_SELECT = Enabled.
311  * This bit generates link speed encoding when Bit 24 (TC) is set in the RGMII, SMII, or SGMII mode.
312  * This bit is always enabled for RGMII, SGMII, SMII, or RevMII interface.
313  * 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.
314  * 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.
315  */
316 #define ENET_MACCFG_FES_MASK (0x4000U)
317 #define ENET_MACCFG_FES_SHIFT (14U)
318 #define ENET_MACCFG_FES_SET(x) (((uint32_t)(x) << ENET_MACCFG_FES_SHIFT) & ENET_MACCFG_FES_MASK)
319 #define ENET_MACCFG_FES_GET(x) (((uint32_t)(x) & ENET_MACCFG_FES_MASK) >> ENET_MACCFG_FES_SHIFT)
320 
321 /*
322  * DO (RW)
323  *
324  * Disable Receive Own
325  * When this bit is set, the MAC disables the reception of frames when the phy_txen_o is asserted in the half-duplex mode.
326  * When this bit is reset, the MAC receives all packets that are given by the PHY while transmitting.
327  * 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.
328  */
329 #define ENET_MACCFG_DO_MASK (0x2000U)
330 #define ENET_MACCFG_DO_SHIFT (13U)
331 #define ENET_MACCFG_DO_SET(x) (((uint32_t)(x) << ENET_MACCFG_DO_SHIFT) & ENET_MACCFG_DO_MASK)
332 #define ENET_MACCFG_DO_GET(x) (((uint32_t)(x) & ENET_MACCFG_DO_MASK) >> ENET_MACCFG_DO_SHIFT)
333 
334 /*
335  * LM (RW)
336  *
337  * Loopback Mode
338  * When this bit is set, the MAC operates in the loopback mode at GMII or MII.
339  * 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.
340  */
341 #define ENET_MACCFG_LM_MASK (0x1000U)
342 #define ENET_MACCFG_LM_SHIFT (12U)
343 #define ENET_MACCFG_LM_SET(x) (((uint32_t)(x) << ENET_MACCFG_LM_SHIFT) & ENET_MACCFG_LM_MASK)
344 #define ENET_MACCFG_LM_GET(x) (((uint32_t)(x) & ENET_MACCFG_LM_MASK) >> ENET_MACCFG_LM_SHIFT)
345 
346 /*
347  * DM (RW)
348  *
349  * Duplex Mode
350  * When this bit is set, the MAC operates in the full-duplex mode where it can transmit and receive simultaneously.
351  */
352 #define ENET_MACCFG_DM_MASK (0x800U)
353 #define ENET_MACCFG_DM_SHIFT (11U)
354 #define ENET_MACCFG_DM_SET(x) (((uint32_t)(x) << ENET_MACCFG_DM_SHIFT) & ENET_MACCFG_DM_MASK)
355 #define ENET_MACCFG_DM_GET(x) (((uint32_t)(x) & ENET_MACCFG_DM_MASK) >> ENET_MACCFG_DM_SHIFT)
356 
357 /*
358  * IPC (RW)
359  *
360  * Checksum Offload
361  * 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.
362  * It also checks whether the IPv4 Header checksum (assumed to be bytes 25–26 or 29–30 (VLAN-tagged)
363  * of the received Ethernet frame) is correct for the received frame and gives the status in the receive status word.
364  * The MAC also appends the 16-bit checksum calculated for the IP header datagram payload (bytes after the IPv4 header)
365  * and appends it to the Ethernet frame transferred to the application (when Type 2 COE is deselected).
366  * When this bit is reset, this function is disabled.
367  * 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.
368  */
369 #define ENET_MACCFG_IPC_MASK (0x400U)
370 #define ENET_MACCFG_IPC_SHIFT (10U)
371 #define ENET_MACCFG_IPC_SET(x) (((uint32_t)(x) << ENET_MACCFG_IPC_SHIFT) & ENET_MACCFG_IPC_MASK)
372 #define ENET_MACCFG_IPC_GET(x) (((uint32_t)(x) & ENET_MACCFG_IPC_MASK) >> ENET_MACCFG_IPC_SHIFT)
373 
374 /*
375  * DR (RW)
376  *
377  * Disable Retry
378  * When this bit is set, the MAC attempts only one transmission.
379  * When a collision occurs on the GMII or MII interface,
380  * the MAC ignores the current frame transmission and reports a Frame Abort with excessive collision error in the transmit frame status.
381  * When this bit is reset, the MAC attempts retries based on the settings of the BL field (Bits [6:5]).
382  */
383 #define ENET_MACCFG_DR_MASK (0x200U)
384 #define ENET_MACCFG_DR_SHIFT (9U)
385 #define ENET_MACCFG_DR_SET(x) (((uint32_t)(x) << ENET_MACCFG_DR_SHIFT) & ENET_MACCFG_DR_MASK)
386 #define ENET_MACCFG_DR_GET(x) (((uint32_t)(x) & ENET_MACCFG_DR_MASK) >> ENET_MACCFG_DR_SHIFT)
387 
388 /*
389  * LUD (RW)
390  *
391  * Link Up or Down
392  * This bit indicates whether the link is up or down during the transmission of configuration in the RGMII, SGMII, or SMII interface:
393  * - 0: Link Down
394  * - 1: Link Up
395  */
396 #define ENET_MACCFG_LUD_MASK (0x100U)
397 #define ENET_MACCFG_LUD_SHIFT (8U)
398 #define ENET_MACCFG_LUD_SET(x) (((uint32_t)(x) << ENET_MACCFG_LUD_SHIFT) & ENET_MACCFG_LUD_MASK)
399 #define ENET_MACCFG_LUD_GET(x) (((uint32_t)(x) & ENET_MACCFG_LUD_MASK) >> ENET_MACCFG_LUD_SHIFT)
400 
401 /*
402  * ACS (RW)
403  *
404  * Automatic Pad or CRC Stripping
405  * 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.
406  * 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.
407  * When this bit is reset, the MAC passes all incoming frames, without modifying them, to the Host.
408  */
409 #define ENET_MACCFG_ACS_MASK (0x80U)
410 #define ENET_MACCFG_ACS_SHIFT (7U)
411 #define ENET_MACCFG_ACS_SET(x) (((uint32_t)(x) << ENET_MACCFG_ACS_SHIFT) & ENET_MACCFG_ACS_MASK)
412 #define ENET_MACCFG_ACS_GET(x) (((uint32_t)(x) & ENET_MACCFG_ACS_MASK) >> ENET_MACCFG_ACS_SHIFT)
413 
414 /*
415  * BL (RW)
416  *
417  * Back-Off Limit
418  * The Back-Off limit determines the random integer number (r) of slot time delays
419  * (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.
420  * This bit is applicable only in the half-duplex mode and is reserved (RO) in the full-duplex-only configuration.
421  * - 00: k= min (n, 10)
422  * - 01: k = min (n, 8)
423  * - 10: k = min (n, 4)
424  * - 11: k = min (n, 1) where n = retransmission attempt. The random integer r takes the value in the range 0 ≤ r < 2k
425  */
426 #define ENET_MACCFG_BL_MASK (0x60U)
427 #define ENET_MACCFG_BL_SHIFT (5U)
428 #define ENET_MACCFG_BL_SET(x) (((uint32_t)(x) << ENET_MACCFG_BL_SHIFT) & ENET_MACCFG_BL_MASK)
429 #define ENET_MACCFG_BL_GET(x) (((uint32_t)(x) & ENET_MACCFG_BL_MASK) >> ENET_MACCFG_BL_SHIFT)
430 
431 /*
432  * DC (RW)
433  *
434  * Deferral Check
435  * When this bit is set, the deferral check function is enabled in the MAC.
436  * The MAC issues a Frame Abort status, along with the excessive deferral error bit set in the transmit frame status,
437  * when the transmit state machine is deferred for more than 24,288 bit times in the 10 or 100 Mbps mode.
438  * If the MAC is configured for 1000 Mbps operation or if the Jumbo frame mode is enabled in the 10 or 100 Mbps mode,
439  * the threshold for deferral is 155,680 bits times. Deferral begins when the transmitter is ready to transmit,
440  * but it is prevented because of an active carrier sense signal (CRS) on GMII or MII. The defer time is not cumulative.
441  * For example, if the transmitter defers for 10,000 bit times because the CRS signal is active and then the CRS signal becomes inactive,
442  * the transmitter transmits and collision happens.
443  * Because of collision, the transmitter needs to back off and then defer again after back off completion.
444  * In such a scenario, the deferral timer is reset to 0 and it is restarted.
445  */
446 #define ENET_MACCFG_DC_MASK (0x10U)
447 #define ENET_MACCFG_DC_SHIFT (4U)
448 #define ENET_MACCFG_DC_SET(x) (((uint32_t)(x) << ENET_MACCFG_DC_SHIFT) & ENET_MACCFG_DC_MASK)
449 #define ENET_MACCFG_DC_GET(x) (((uint32_t)(x) & ENET_MACCFG_DC_MASK) >> ENET_MACCFG_DC_SHIFT)
450 
451 /*
452  * TE (RW)
453  *
454  * Transmitter Enable
455  * 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,
456  * the MAC transmit state machine is disabled after the completion of the transmission of the current frame, and does not transmit any further frames.
457  */
458 #define ENET_MACCFG_TE_MASK (0x8U)
459 #define ENET_MACCFG_TE_SHIFT (3U)
460 #define ENET_MACCFG_TE_SET(x) (((uint32_t)(x) << ENET_MACCFG_TE_SHIFT) & ENET_MACCFG_TE_MASK)
461 #define ENET_MACCFG_TE_GET(x) (((uint32_t)(x) & ENET_MACCFG_TE_MASK) >> ENET_MACCFG_TE_SHIFT)
462 
463 /*
464  * RE (RW)
465  *
466  * Receiver Enable
467  * 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,
468  * 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.
469  */
470 #define ENET_MACCFG_RE_MASK (0x4U)
471 #define ENET_MACCFG_RE_SHIFT (2U)
472 #define ENET_MACCFG_RE_SET(x) (((uint32_t)(x) << ENET_MACCFG_RE_SHIFT) & ENET_MACCFG_RE_MASK)
473 #define ENET_MACCFG_RE_GET(x) (((uint32_t)(x) & ENET_MACCFG_RE_MASK) >> ENET_MACCFG_RE_SHIFT)
474 
475 /*
476  * PRELEN (RW)
477  *
478  * Preamble Length for Transmit frames
479  * These bits control the number of preamble bytes that are added to the beginning of every Transmit frame.
480  * The preamble reduction occurs only when the MAC is operating in the full-duplex mode.
481  * - 2'b00: 7 bytes of preamble
482  * - 2'b01: 5 bytes of preamble
483  * - 2'b10: 3 bytes of preamble
484  * - 2'b11: Reserved
485  */
486 #define ENET_MACCFG_PRELEN_MASK (0x3U)
487 #define ENET_MACCFG_PRELEN_SHIFT (0U)
488 #define ENET_MACCFG_PRELEN_SET(x) (((uint32_t)(x) << ENET_MACCFG_PRELEN_SHIFT) & ENET_MACCFG_PRELEN_MASK)
489 #define ENET_MACCFG_PRELEN_GET(x) (((uint32_t)(x) & ENET_MACCFG_PRELEN_MASK) >> ENET_MACCFG_PRELEN_SHIFT)
490 
491 /* Bitfield definition for register: MACFF */
492 /*
493  * RA (RW)
494  *
495  * Receive All
496  * 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.
497  * 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,
498  * the Receiver module passes only those frames to the Application that pass the SA or DA address filter.
499  */
500 #define ENET_MACFF_RA_MASK (0x80000000UL)
501 #define ENET_MACFF_RA_SHIFT (31U)
502 #define ENET_MACFF_RA_SET(x) (((uint32_t)(x) << ENET_MACFF_RA_SHIFT) & ENET_MACFF_RA_MASK)
503 #define ENET_MACFF_RA_GET(x) (((uint32_t)(x) & ENET_MACFF_RA_MASK) >> ENET_MACFF_RA_SHIFT)
504 
505 /*
506  * DNTU (RW)
507  *
508  * Drop non-TCP/UDP over IP Frames
509  * 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.
510  * When reset, this bit enables the MAC to forward all non-TCP or UDP over IP frames.
511  */
512 #define ENET_MACFF_DNTU_MASK (0x200000UL)
513 #define ENET_MACFF_DNTU_SHIFT (21U)
514 #define ENET_MACFF_DNTU_SET(x) (((uint32_t)(x) << ENET_MACFF_DNTU_SHIFT) & ENET_MACFF_DNTU_MASK)
515 #define ENET_MACFF_DNTU_GET(x) (((uint32_t)(x) & ENET_MACFF_DNTU_MASK) >> ENET_MACFF_DNTU_SHIFT)
516 
517 /*
518  * IPFE (RW)
519  *
520  * Layer 3 and Layer 4 Filter Enable
521  * 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,
522  * 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.
523  */
524 #define ENET_MACFF_IPFE_MASK (0x100000UL)
525 #define ENET_MACFF_IPFE_SHIFT (20U)
526 #define ENET_MACFF_IPFE_SET(x) (((uint32_t)(x) << ENET_MACFF_IPFE_SHIFT) & ENET_MACFF_IPFE_MASK)
527 #define ENET_MACFF_IPFE_GET(x) (((uint32_t)(x) & ENET_MACFF_IPFE_MASK) >> ENET_MACFF_IPFE_SHIFT)
528 
529 /*
530  * VTFE (RW)
531  *
532  * VLAN Tag Filter Enable
533  * When set, this bit enables the MAC to drop VLAN tagged frames that do not match the VLAN Tag comparison.
534  * When reset, the MAC forwards all frames irrespective of the match status of the VLAN Tag.
535  */
536 #define ENET_MACFF_VTFE_MASK (0x8000U)
537 #define ENET_MACFF_VTFE_SHIFT (15U)
538 #define ENET_MACFF_VTFE_SET(x) (((uint32_t)(x) << ENET_MACFF_VTFE_SHIFT) & ENET_MACFF_VTFE_MASK)
539 #define ENET_MACFF_VTFE_GET(x) (((uint32_t)(x) & ENET_MACFF_VTFE_MASK) >> ENET_MACFF_VTFE_SHIFT)
540 
541 /*
542  * HPF (RW)
543  *
544  * Hash or Perfect Filter
545  * 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.
546  * When this bit is low and the HUC or HMC bit is set, the frame is passed only if it matches the Hash filter.
547  */
548 #define ENET_MACFF_HPF_MASK (0x400U)
549 #define ENET_MACFF_HPF_SHIFT (10U)
550 #define ENET_MACFF_HPF_SET(x) (((uint32_t)(x) << ENET_MACFF_HPF_SHIFT) & ENET_MACFF_HPF_MASK)
551 #define ENET_MACFF_HPF_GET(x) (((uint32_t)(x) & ENET_MACFF_HPF_MASK) >> ENET_MACFF_HPF_SHIFT)
552 
553 /*
554  * SAF (RW)
555  *
556  * Source Address Filter Enable
557  * 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,
558  * 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.
559  */
560 #define ENET_MACFF_SAF_MASK (0x200U)
561 #define ENET_MACFF_SAF_SHIFT (9U)
562 #define ENET_MACFF_SAF_SET(x) (((uint32_t)(x) << ENET_MACFF_SAF_SHIFT) & ENET_MACFF_SAF_MASK)
563 #define ENET_MACFF_SAF_GET(x) (((uint32_t)(x) & ENET_MACFF_SAF_MASK) >> ENET_MACFF_SAF_SHIFT)
564 
565 /*
566  * SAIF (RW)
567  *
568  * SA Inverse Filtering
569  * 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.
570  * When this bit is reset, frames whose SA does not match the SA registers are marked as failing the SA Address filter.
571  */
572 #define ENET_MACFF_SAIF_MASK (0x100U)
573 #define ENET_MACFF_SAIF_SHIFT (8U)
574 #define ENET_MACFF_SAIF_SET(x) (((uint32_t)(x) << ENET_MACFF_SAIF_SHIFT) & ENET_MACFF_SAIF_MASK)
575 #define ENET_MACFF_SAIF_GET(x) (((uint32_t)(x) & ENET_MACFF_SAIF_MASK) >> ENET_MACFF_SAIF_SHIFT)
576 
577 /*
578  * PCF (RW)
579  *
580  * Pass Control Frames
581  * These bits control the forwarding of all control frames (including unicast and multicast Pause frames).
582  * - 00: MAC filters all control frames from reaching the application.
583  * - 01: MAC forwards all control frames except Pause frames to application even if they fail the Address filter.
584  * - 10: MAC forwards all control frames to application even if they fail the Address Filter.
585  * - 11: MAC forwards control frames that pass the Address Filter.
586  * The following conditions should be true for the Pause frames processing:
587  * - 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.
588  * - 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.
589  * - Condition 3: The Type field of the received frame is 0x8808 and the OPCODE field is 0x0001.
590  * Note: This field should be set to 01 only when the Condition 1 is true,
591  * that is, the MAC is programmed to operate in the full-duplex mode and the RFE bit is enabled.
592  * Otherwise, the Pause frame filtering may be inconsistent.
593  * When Condition 1 is false, the Pause frames are considered as generic control frames.
594  * Therefore, to pass all control frames (including Pause frames) when the full-duplex mode and flow control is not enabled,
595  * you should set the PCF field to 10 or 11 (as required by the application).
596  */
597 #define ENET_MACFF_PCF_MASK (0xC0U)
598 #define ENET_MACFF_PCF_SHIFT (6U)
599 #define ENET_MACFF_PCF_SET(x) (((uint32_t)(x) << ENET_MACFF_PCF_SHIFT) & ENET_MACFF_PCF_MASK)
600 #define ENET_MACFF_PCF_GET(x) (((uint32_t)(x) & ENET_MACFF_PCF_MASK) >> ENET_MACFF_PCF_SHIFT)
601 
602 /*
603  * DBF (RW)
604  *
605  * Disable Broadcast Frames
606  * When this bit is set, the AFM module blocks all incoming broadcast frames. In addition, it overrides all other filter settings.
607  * When this bit is reset, the AFM module passes all received broadcast frames.
608  */
609 #define ENET_MACFF_DBF_MASK (0x20U)
610 #define ENET_MACFF_DBF_SHIFT (5U)
611 #define ENET_MACFF_DBF_SET(x) (((uint32_t)(x) << ENET_MACFF_DBF_SHIFT) & ENET_MACFF_DBF_MASK)
612 #define ENET_MACFF_DBF_GET(x) (((uint32_t)(x) & ENET_MACFF_DBF_MASK) >> ENET_MACFF_DBF_SHIFT)
613 
614 /*
615  * PM (RW)
616  *
617  * Pass All Multicast
618  * 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.
619  * When reset, filtering of multicast frame depends on HMC bit.
620  */
621 #define ENET_MACFF_PM_MASK (0x10U)
622 #define ENET_MACFF_PM_SHIFT (4U)
623 #define ENET_MACFF_PM_SET(x) (((uint32_t)(x) << ENET_MACFF_PM_SHIFT) & ENET_MACFF_PM_MASK)
624 #define ENET_MACFF_PM_GET(x) (((uint32_t)(x) & ENET_MACFF_PM_MASK) >> ENET_MACFF_PM_SHIFT)
625 
626 /*
627  * DAIF (RW)
628  *
629  * DA Inverse Filtering
630  * 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.
631  * When reset, normal filtering of frames is performed.
632  */
633 #define ENET_MACFF_DAIF_MASK (0x8U)
634 #define ENET_MACFF_DAIF_SHIFT (3U)
635 #define ENET_MACFF_DAIF_SET(x) (((uint32_t)(x) << ENET_MACFF_DAIF_SHIFT) & ENET_MACFF_DAIF_MASK)
636 #define ENET_MACFF_DAIF_GET(x) (((uint32_t)(x) & ENET_MACFF_DAIF_MASK) >> ENET_MACFF_DAIF_SHIFT)
637 
638 /*
639  * HMC (RW)
640  *
641  * Hash Multicast
642  * When set, the MAC performs destination address filtering of received multicast frames according to the hash table. When reset,
643  * 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.
644  */
645 #define ENET_MACFF_HMC_MASK (0x4U)
646 #define ENET_MACFF_HMC_SHIFT (2U)
647 #define ENET_MACFF_HMC_SET(x) (((uint32_t)(x) << ENET_MACFF_HMC_SHIFT) & ENET_MACFF_HMC_MASK)
648 #define ENET_MACFF_HMC_GET(x) (((uint32_t)(x) & ENET_MACFF_HMC_MASK) >> ENET_MACFF_HMC_SHIFT)
649 
650 /*
651  * HUC (RW)
652  *
653  * Hash Unicast
654  * When set, the MAC performs destination address filtering of unicast frames according to the hash table.
655  * 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.
656  */
657 #define ENET_MACFF_HUC_MASK (0x2U)
658 #define ENET_MACFF_HUC_SHIFT (1U)
659 #define ENET_MACFF_HUC_SET(x) (((uint32_t)(x) << ENET_MACFF_HUC_SHIFT) & ENET_MACFF_HUC_MASK)
660 #define ENET_MACFF_HUC_GET(x) (((uint32_t)(x) & ENET_MACFF_HUC_MASK) >> ENET_MACFF_HUC_SHIFT)
661 
662 /*
663  * PR (RW)
664  *
665  * Promiscuous Mode
666  * When this bit is set, the Address Filter module passes all incoming frames irrespective of the destination or source address.
667  * The SA or DA Filter Fails status bits of the Receive Status Word are always cleared when PR is set.
668  */
669 #define ENET_MACFF_PR_MASK (0x1U)
670 #define ENET_MACFF_PR_SHIFT (0U)
671 #define ENET_MACFF_PR_SET(x) (((uint32_t)(x) << ENET_MACFF_PR_SHIFT) & ENET_MACFF_PR_MASK)
672 #define ENET_MACFF_PR_GET(x) (((uint32_t)(x) & ENET_MACFF_PR_MASK) >> ENET_MACFF_PR_SHIFT)
673 
674 /* Bitfield definition for register: HASH_H */
675 /*
676  * HTH (RW)
677  *
678  * Hash Table High
679  * This field contains the upper 32 bits of the Hash table.
680  */
681 #define ENET_HASH_H_HTH_MASK (0xFFFFFFFFUL)
682 #define ENET_HASH_H_HTH_SHIFT (0U)
683 #define ENET_HASH_H_HTH_SET(x) (((uint32_t)(x) << ENET_HASH_H_HTH_SHIFT) & ENET_HASH_H_HTH_MASK)
684 #define ENET_HASH_H_HTH_GET(x) (((uint32_t)(x) & ENET_HASH_H_HTH_MASK) >> ENET_HASH_H_HTH_SHIFT)
685 
686 /* Bitfield definition for register: HASH_L */
687 /*
688  * HTL (RW)
689  *
690  * Hash Table Low
691  * This field contains the lower 32 bits of the Hash table.
692  */
693 #define ENET_HASH_L_HTL_MASK (0xFFFFFFFFUL)
694 #define ENET_HASH_L_HTL_SHIFT (0U)
695 #define ENET_HASH_L_HTL_SET(x) (((uint32_t)(x) << ENET_HASH_L_HTL_SHIFT) & ENET_HASH_L_HTL_MASK)
696 #define ENET_HASH_L_HTL_GET(x) (((uint32_t)(x) & ENET_HASH_L_HTL_MASK) >> ENET_HASH_L_HTL_SHIFT)
697 
698 /* Bitfield definition for register: GMII_ADDR */
699 /*
700  * PA (RW)
701  *
702  * Physical Layer Address
703  * 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.
704  */
705 #define ENET_GMII_ADDR_PA_MASK (0xF800U)
706 #define ENET_GMII_ADDR_PA_SHIFT (11U)
707 #define ENET_GMII_ADDR_PA_SET(x) (((uint32_t)(x) << ENET_GMII_ADDR_PA_SHIFT) & ENET_GMII_ADDR_PA_MASK)
708 #define ENET_GMII_ADDR_PA_GET(x) (((uint32_t)(x) & ENET_GMII_ADDR_PA_MASK) >> ENET_GMII_ADDR_PA_SHIFT)
709 
710 /*
711  * GR (RW)
712  *
713  * GMII Register
714  * 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.
715  */
716 #define ENET_GMII_ADDR_GR_MASK (0x7C0U)
717 #define ENET_GMII_ADDR_GR_SHIFT (6U)
718 #define ENET_GMII_ADDR_GR_SET(x) (((uint32_t)(x) << ENET_GMII_ADDR_GR_SHIFT) & ENET_GMII_ADDR_GR_MASK)
719 #define ENET_GMII_ADDR_GR_GET(x) (((uint32_t)(x) & ENET_GMII_ADDR_GR_MASK) >> ENET_GMII_ADDR_GR_SHIFT)
720 
721 /*
722  * CR (RW)
723  *
724  * CSR Clock Range
725  * The CSR Clock Range selection determines the frequency of the MDC clock according to the CSR clock frequency used in your design.
726  * The CSR clock corresponding to different GMAC configurations is given in Table 9-2 on page 564.
727  * The suggested range of CSR clock frequency applicable for each value (when Bit[5] = 0)
728  * ensures that the MDC clock is approximately between the frequency range 1.0 MHz–2.5 MHz.
729  * - 0000: The CSR clock frequency is 60–100 MHz and the MDC clock frequency is CSR clock/42.
730  * - 0001: The CSR clock frequency is 100–150 MHz and the MDC clock frequency is CSR clock/62.
731  * - 0010: The CSR clock frequency is 20–35 MHz and the MDC clock frequency is CSR clock/16.
732  * - 0011: The CSR clock frequency is 35–60 MHz and the MDC clock frequency is CSR clock/26.
733  * - 0100: The CSR clock frequency is 150–250 MHz and the MDC clock frequency is CSR clock/102.
734  * - 0101: The CSR clock frequency is 250–300 MHz and the MDC clock is CSR clock/124.
735  * - 0110, 0111: Reserved
736  * 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.
737  * For example,
738  * when CSR clock is of 100 MHz frequency and you program these bits as 1010,
739  * then the resultant MDC clock is of 12.5 MHz which is outside the limit of IEEE 802.3 specified range.
740  * Program the following values only if the interfacing chips support faster MDC clocks.
741  * - 1000: CSR clock/4
742  * - 1001: CSR clock/6
743  * - 1010: CSR clock/8
744  * - 1011: CSR clock/10
745  * - 1100: CSR clock/12
746  * - 1101: CSR clock/14
747  * - 1110: CSR clock/16
748  * - 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.
749  */
750 #define ENET_GMII_ADDR_CR_MASK (0x3CU)
751 #define ENET_GMII_ADDR_CR_SHIFT (2U)
752 #define ENET_GMII_ADDR_CR_SET(x) (((uint32_t)(x) << ENET_GMII_ADDR_CR_SHIFT) & ENET_GMII_ADDR_CR_MASK)
753 #define ENET_GMII_ADDR_CR_GET(x) (((uint32_t)(x) & ENET_GMII_ADDR_CR_MASK) >> ENET_GMII_ADDR_CR_SHIFT)
754 
755 /*
756  * GW (RW)
757  *
758  * GMII Write
759  * 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,
760  * it indicates that this is a Read operation, that is, placing the data in the GMII Data register.
761  */
762 #define ENET_GMII_ADDR_GW_MASK (0x2U)
763 #define ENET_GMII_ADDR_GW_SHIFT (1U)
764 #define ENET_GMII_ADDR_GW_SET(x) (((uint32_t)(x) << ENET_GMII_ADDR_GW_SHIFT) & ENET_GMII_ADDR_GW_MASK)
765 #define ENET_GMII_ADDR_GW_GET(x) (((uint32_t)(x) & ENET_GMII_ADDR_GW_MASK) >> ENET_GMII_ADDR_GW_SHIFT)
766 
767 /*
768  * GB (RW)
769  *
770  * GMII Busy
771  * This bit should read logic 0 before writing to Register 4 and Register 5.
772  * 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.
773  * Register 5 is invalid until this bit is cleared by the MAC.
774  * Therefore, Register 5 (GMII Data) should be kept valid until the MAC clears this bit during a PHY Write operation.
775  * Similarly for a read operation, the contents of Register 5 are not valid until this bit is cleared.
776  * The subsequent read or write operation should happen only after the previous operation is complete.
777  * Because there is no acknowledgment from the PHY to MAC after a read or write operation is completed,
778  * there is no change in the functionality of this bit even when the PHY is not present.
779  */
780 #define ENET_GMII_ADDR_GB_MASK (0x1U)
781 #define ENET_GMII_ADDR_GB_SHIFT (0U)
782 #define ENET_GMII_ADDR_GB_SET(x) (((uint32_t)(x) << ENET_GMII_ADDR_GB_SHIFT) & ENET_GMII_ADDR_GB_MASK)
783 #define ENET_GMII_ADDR_GB_GET(x) (((uint32_t)(x) & ENET_GMII_ADDR_GB_MASK) >> ENET_GMII_ADDR_GB_SHIFT)
784 
785 /* Bitfield definition for register: GMII_DATA */
786 /*
787  * GD (RW)
788  *
789  * GMII Data
790  * This field contains the 16-bit data value read from the PHY or RevMII after a Management Read operation
791  * or the 16-bit data value to be written to the PHY or RevMII before a Management Write operation.
792  */
793 #define ENET_GMII_DATA_GD_MASK (0xFFFFU)
794 #define ENET_GMII_DATA_GD_SHIFT (0U)
795 #define ENET_GMII_DATA_GD_SET(x) (((uint32_t)(x) << ENET_GMII_DATA_GD_SHIFT) & ENET_GMII_DATA_GD_MASK)
796 #define ENET_GMII_DATA_GD_GET(x) (((uint32_t)(x) & ENET_GMII_DATA_GD_MASK) >> ENET_GMII_DATA_GD_SHIFT)
797 
798 /* Bitfield definition for register: FLOWCTRL */
799 /*
800  * PT (RW)
801  *
802  * Pause Time
803  * This field holds the value to be used in the Pause Time field in the transmit control frame.
804  * If the Pause Time bits is configured to be double-synchronized to the (G)MII clock domain,
805  * then consecutive writes to this register should be performed only after at least four clock cycles in the destination clock domain.
806  */
807 #define ENET_FLOWCTRL_PT_MASK (0xFFFF0000UL)
808 #define ENET_FLOWCTRL_PT_SHIFT (16U)
809 #define ENET_FLOWCTRL_PT_SET(x) (((uint32_t)(x) << ENET_FLOWCTRL_PT_SHIFT) & ENET_FLOWCTRL_PT_MASK)
810 #define ENET_FLOWCTRL_PT_GET(x) (((uint32_t)(x) & ENET_FLOWCTRL_PT_MASK) >> ENET_FLOWCTRL_PT_SHIFT)
811 
812 /*
813  * DZPQ (RW)
814  *
815  * Disable Zero-Quanta Pause
816  * When this bit is set, it disables the automatic generation of the Zero-Quanta Pause frames on the de-assertion of
817  * the flow-control signal from the FIFO layer (MTL or external sideband flow control signal sbd_flowctrl_i/mti_flowctrl_i).
818  * When this bit is reset, normal operation with automatic Zero-Quanta Pause frame generation is enabled.
819  */
820 #define ENET_FLOWCTRL_DZPQ_MASK (0x80U)
821 #define ENET_FLOWCTRL_DZPQ_SHIFT (7U)
822 #define ENET_FLOWCTRL_DZPQ_SET(x) (((uint32_t)(x) << ENET_FLOWCTRL_DZPQ_SHIFT) & ENET_FLOWCTRL_DZPQ_MASK)
823 #define ENET_FLOWCTRL_DZPQ_GET(x) (((uint32_t)(x) & ENET_FLOWCTRL_DZPQ_MASK) >> ENET_FLOWCTRL_DZPQ_SHIFT)
824 
825 /*
826  * PLT (RW)
827  *
828  * Pause Low Threshold
829  * 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.
830  * The threshold values should be always less than the Pause Time configured in Bits[31:16].
831  * For example, if PT = 100H (256 slot-times), and PLT = 01,
832  * 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.
833  * The following list provides the threshold values for different values:
834  * - 00: The threshold is Pause time minus 4 slot times (PT – 4 slot times).
835  * - 01: The threshold is Pause time minus 28 slot times (PT – 28 slot times).
836  * - 10: The threshold is Pause time minus 144 slot times (PT – 144 slot times).
837  * - 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.
838  */
839 #define ENET_FLOWCTRL_PLT_MASK (0x30U)
840 #define ENET_FLOWCTRL_PLT_SHIFT (4U)
841 #define ENET_FLOWCTRL_PLT_SET(x) (((uint32_t)(x) << ENET_FLOWCTRL_PLT_SHIFT) & ENET_FLOWCTRL_PLT_MASK)
842 #define ENET_FLOWCTRL_PLT_GET(x) (((uint32_t)(x) & ENET_FLOWCTRL_PLT_MASK) >> ENET_FLOWCTRL_PLT_SHIFT)
843 
844 /*
845  * UP (RW)
846  *
847  * Unicast Pause Frame Detect A pause frame is processed when it has the unique multicast address specified in the IEEE Std 802.3.
848  * When this bit is set, the MAC can also detect Pause frames with unicast address of the station.
849  * This unicast address should be as specified in the MAC Address0 High Register and MAC Address0 Low Register.
850  * When this bit is reset, the MAC only detects Pause frames with unique multicast address.
851  */
852 #define ENET_FLOWCTRL_UP_MASK (0x8U)
853 #define ENET_FLOWCTRL_UP_SHIFT (3U)
854 #define ENET_FLOWCTRL_UP_SET(x) (((uint32_t)(x) << ENET_FLOWCTRL_UP_SHIFT) & ENET_FLOWCTRL_UP_MASK)
855 #define ENET_FLOWCTRL_UP_GET(x) (((uint32_t)(x) & ENET_FLOWCTRL_UP_MASK) >> ENET_FLOWCTRL_UP_SHIFT)
856 
857 /*
858  * RFE (RW)
859  *
860  * Receive Flow Control Enable
861  * 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.
862  */
863 #define ENET_FLOWCTRL_RFE_MASK (0x4U)
864 #define ENET_FLOWCTRL_RFE_SHIFT (2U)
865 #define ENET_FLOWCTRL_RFE_SET(x) (((uint32_t)(x) << ENET_FLOWCTRL_RFE_SHIFT) & ENET_FLOWCTRL_RFE_MASK)
866 #define ENET_FLOWCTRL_RFE_GET(x) (((uint32_t)(x) & ENET_FLOWCTRL_RFE_MASK) >> ENET_FLOWCTRL_RFE_SHIFT)
867 
868 /*
869  * TFE (RW)
870  *
871  * Transmit Flow Control Enable
872  * In the full-duplex mode, when this bit is set, the MAC enables the flow control operation to transmit Pause frames.
873  * When this bit is reset, the flow control operation in the MAC is disabled, and the MAC does not transmit any Pause frames.
874  * 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.
875  */
876 #define ENET_FLOWCTRL_TFE_MASK (0x2U)
877 #define ENET_FLOWCTRL_TFE_SHIFT (1U)
878 #define ENET_FLOWCTRL_TFE_SET(x) (((uint32_t)(x) << ENET_FLOWCTRL_TFE_SHIFT) & ENET_FLOWCTRL_TFE_MASK)
879 #define ENET_FLOWCTRL_TFE_GET(x) (((uint32_t)(x) & ENET_FLOWCTRL_TFE_MASK) >> ENET_FLOWCTRL_TFE_SHIFT)
880 
881 /*
882  * FCB_BPA (RW)
883  *
884  * Flow Control Busy or Backpressure Activate
885  * 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.
886  * In the full-duplex mode, this bit should be read as 1'b0 before writing to the Flow Control register.
887  * To initiate a Pause frame, the Application must set this bit to 1'b1.
888  * During a transfer of the Control Frame, this bit continues to be set to signify that a frame transmission is in progress.
889  * After the completion of Pause frame transmission, the MAC resets this bit to 1'b0.
890  * The Flow Control register should not be written to until this bit is cleared. In the half-duplex mode,
891  * when this bit is set (and TFE is set), then backpressure is asserted by the MAC.
892  * During backpressure, when the MAC receives a new frame, the transmitter starts sending a JAM pattern resulting in a collision.
893  * This control register bit is logically ORed with the mti_flowctrl_i input signal for the backpressure function.
894  * When the MAC is configured for the full-duplex mode, the BPA is automatically disabled.
895  */
896 #define ENET_FLOWCTRL_FCB_BPA_MASK (0x1U)
897 #define ENET_FLOWCTRL_FCB_BPA_SHIFT (0U)
898 #define ENET_FLOWCTRL_FCB_BPA_SET(x) (((uint32_t)(x) << ENET_FLOWCTRL_FCB_BPA_SHIFT) & ENET_FLOWCTRL_FCB_BPA_MASK)
899 #define ENET_FLOWCTRL_FCB_BPA_GET(x) (((uint32_t)(x) & ENET_FLOWCTRL_FCB_BPA_MASK) >> ENET_FLOWCTRL_FCB_BPA_SHIFT)
900 
901 /* Bitfield definition for register: VLAN_TAG */
902 /*
903  * VTHM (RW)
904  *
905  * VLAN Tag Hash Table Match Enable
906  * 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).
907  * A value of 1 in the VLAN Hash Table register, corresponding to the index, indicates that the frame matched the VLAN hash table.
908  * When Bit 16 (ETV) is set, the CRC of the 12-bit VLAN Identifier (VID) is used for comparison whereas when ETV is reset,
909  * the CRC of the 16-bit VLAN tag is used for comparison. When reset, the VLAN Hash Match operation is not performed.
910  */
911 #define ENET_VLAN_TAG_VTHM_MASK (0x80000UL)
912 #define ENET_VLAN_TAG_VTHM_SHIFT (19U)
913 #define ENET_VLAN_TAG_VTHM_SET(x) (((uint32_t)(x) << ENET_VLAN_TAG_VTHM_SHIFT) & ENET_VLAN_TAG_VTHM_MASK)
914 #define ENET_VLAN_TAG_VTHM_GET(x) (((uint32_t)(x) & ENET_VLAN_TAG_VTHM_MASK) >> ENET_VLAN_TAG_VTHM_SHIFT)
915 
916 /*
917  * ESVL (RW)
918  *
919  * Enable S-VLAN
920  * When this bit is set, the MAC transmitter and receiver also consider the S-VLAN (Type = 0x88A8) frames as valid VLAN tagged frames.
921  */
922 #define ENET_VLAN_TAG_ESVL_MASK (0x40000UL)
923 #define ENET_VLAN_TAG_ESVL_SHIFT (18U)
924 #define ENET_VLAN_TAG_ESVL_SET(x) (((uint32_t)(x) << ENET_VLAN_TAG_ESVL_SHIFT) & ENET_VLAN_TAG_ESVL_MASK)
925 #define ENET_VLAN_TAG_ESVL_GET(x) (((uint32_t)(x) & ENET_VLAN_TAG_ESVL_MASK) >> ENET_VLAN_TAG_ESVL_SHIFT)
926 
927 /*
928  * VTIM (RW)
929  *
930  * VLAN Tag Inverse Match Enable
931  * 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.
932  * The frames with matched VLAN Tag are marked as matched.
933  */
934 #define ENET_VLAN_TAG_VTIM_MASK (0x20000UL)
935 #define ENET_VLAN_TAG_VTIM_SHIFT (17U)
936 #define ENET_VLAN_TAG_VTIM_SET(x) (((uint32_t)(x) << ENET_VLAN_TAG_VTIM_SHIFT) & ENET_VLAN_TAG_VTIM_MASK)
937 #define ENET_VLAN_TAG_VTIM_GET(x) (((uint32_t)(x) & ENET_VLAN_TAG_VTIM_MASK) >> ENET_VLAN_TAG_VTIM_SHIFT)
938 
939 /*
940  * ETV (RW)
941  *
942  * Enable 12-Bit VLAN Tag Comparison
943  * When this bit is set, a 12-bit VLAN identifier is used for comparing and filtering instead of the complete 16-bit VLAN tag.
944  * Bits [11:0] of VLAN tag are compared with the corresponding field in the received VLAN-tagged frame. Similarly, when enabled,
945  * only 12 bits of the VLAN tag in the received frame are used for hash-based VLAN filtering.
946  * 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.
947  */
948 #define ENET_VLAN_TAG_ETV_MASK (0x10000UL)
949 #define ENET_VLAN_TAG_ETV_SHIFT (16U)
950 #define ENET_VLAN_TAG_ETV_SET(x) (((uint32_t)(x) << ENET_VLAN_TAG_ETV_SHIFT) & ENET_VLAN_TAG_ETV_MASK)
951 #define ENET_VLAN_TAG_ETV_GET(x) (((uint32_t)(x) & ENET_VLAN_TAG_ETV_MASK) >> ENET_VLAN_TAG_ETV_SHIFT)
952 
953 /*
954  * VL (RW)
955  *
956  * VLAN Tag Identifier for Receive Frames
957  * 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.
958  * The following list describes the bits of this field:
959  * - Bits [15:13]: User Priority
960  * - Bit 12: Canonical Format Indicator (CFI) or Drop Eligible Indicator (DEI)
961  * - 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.
962  * 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,
963  * and declares all frames with a Type field value of 0x8100 or 0x88a8 as VLAN frames.
964  */
965 #define ENET_VLAN_TAG_VL_MASK (0xFFFFU)
966 #define ENET_VLAN_TAG_VL_SHIFT (0U)
967 #define ENET_VLAN_TAG_VL_SET(x) (((uint32_t)(x) << ENET_VLAN_TAG_VL_SHIFT) & ENET_VLAN_TAG_VL_MASK)
968 #define ENET_VLAN_TAG_VL_GET(x) (((uint32_t)(x) & ENET_VLAN_TAG_VL_MASK) >> ENET_VLAN_TAG_VL_SHIFT)
969 
970 /* Bitfield definition for register: RWKFRMFILT */
971 /*
972  * WKUPFRMFILT (RW)
973  *
974  * This is the address through which the application writes or reads the remote wake-up frame filter registers (wkupfmfilter_reg).
975  * The wkupfmfilter_reg register is a pointer to eight wkupfmfilter_reg registers.
976  * The wkupfmfilter_reg register is loaded by sequentially loading the eight register values.
977  * Eight sequential writes to this address (0x0028) write all wkupfmfilter_reg registers.
978  * Similarly, eight sequential reads from this address (0x0028) read all wkupfmfilter_reg registers
979  */
980 #define ENET_RWKFRMFILT_WKUPFRMFILT_MASK (0xFFFFFFFFUL)
981 #define ENET_RWKFRMFILT_WKUPFRMFILT_SHIFT (0U)
982 #define ENET_RWKFRMFILT_WKUPFRMFILT_SET(x) (((uint32_t)(x) << ENET_RWKFRMFILT_WKUPFRMFILT_SHIFT) & ENET_RWKFRMFILT_WKUPFRMFILT_MASK)
983 #define ENET_RWKFRMFILT_WKUPFRMFILT_GET(x) (((uint32_t)(x) & ENET_RWKFRMFILT_WKUPFRMFILT_MASK) >> ENET_RWKFRMFILT_WKUPFRMFILT_SHIFT)
984 
985 /* Bitfield definition for register: PMT_CSR */
986 /*
987  * RWKFILTRST (RW)
988  *
989  * Remote Wake-Up Frame Filter Register Pointer Reset
990  * 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.
991  */
992 #define ENET_PMT_CSR_RWKFILTRST_MASK (0x80000000UL)
993 #define ENET_PMT_CSR_RWKFILTRST_SHIFT (31U)
994 #define ENET_PMT_CSR_RWKFILTRST_SET(x) (((uint32_t)(x) << ENET_PMT_CSR_RWKFILTRST_SHIFT) & ENET_PMT_CSR_RWKFILTRST_MASK)
995 #define ENET_PMT_CSR_RWKFILTRST_GET(x) (((uint32_t)(x) & ENET_PMT_CSR_RWKFILTRST_MASK) >> ENET_PMT_CSR_RWKFILTRST_SHIFT)
996 
997 /*
998  * RWKPTR (RW)
999  *
1000  * Remote Wake-up FIFO Pointer
1001  * 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,
1002  * 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.
1003  * The maximum value of the pointer is 7, 15, 23 and 31 respectively depending on the number of Remote Wakeup Filters selected during configuration.
1004  */
1005 #define ENET_PMT_CSR_RWKPTR_MASK (0x1F000000UL)
1006 #define ENET_PMT_CSR_RWKPTR_SHIFT (24U)
1007 #define ENET_PMT_CSR_RWKPTR_SET(x) (((uint32_t)(x) << ENET_PMT_CSR_RWKPTR_SHIFT) & ENET_PMT_CSR_RWKPTR_MASK)
1008 #define ENET_PMT_CSR_RWKPTR_GET(x) (((uint32_t)(x) & ENET_PMT_CSR_RWKPTR_MASK) >> ENET_PMT_CSR_RWKPTR_SHIFT)
1009 
1010 /*
1011  * GLBLUCAST (RW)
1012  *
1013  * Global Unicast
1014  * When set, enables any unicast packet filtered by the MAC (DAF) address recognition to be a remote wake-up frame.
1015  */
1016 #define ENET_PMT_CSR_GLBLUCAST_MASK (0x200U)
1017 #define ENET_PMT_CSR_GLBLUCAST_SHIFT (9U)
1018 #define ENET_PMT_CSR_GLBLUCAST_SET(x) (((uint32_t)(x) << ENET_PMT_CSR_GLBLUCAST_SHIFT) & ENET_PMT_CSR_GLBLUCAST_MASK)
1019 #define ENET_PMT_CSR_GLBLUCAST_GET(x) (((uint32_t)(x) & ENET_PMT_CSR_GLBLUCAST_MASK) >> ENET_PMT_CSR_GLBLUCAST_SHIFT)
1020 
1021 /*
1022  * RWKPRCVD (RW)
1023  *
1024  * Remote Wake-Up Frame Received
1025  * 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.
1026  */
1027 #define ENET_PMT_CSR_RWKPRCVD_MASK (0x40U)
1028 #define ENET_PMT_CSR_RWKPRCVD_SHIFT (6U)
1029 #define ENET_PMT_CSR_RWKPRCVD_SET(x) (((uint32_t)(x) << ENET_PMT_CSR_RWKPRCVD_SHIFT) & ENET_PMT_CSR_RWKPRCVD_MASK)
1030 #define ENET_PMT_CSR_RWKPRCVD_GET(x) (((uint32_t)(x) & ENET_PMT_CSR_RWKPRCVD_MASK) >> ENET_PMT_CSR_RWKPRCVD_SHIFT)
1031 
1032 /*
1033  * MGKPRCVD (RW)
1034  *
1035  * Magic Packet Received
1036  * 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.
1037  */
1038 #define ENET_PMT_CSR_MGKPRCVD_MASK (0x20U)
1039 #define ENET_PMT_CSR_MGKPRCVD_SHIFT (5U)
1040 #define ENET_PMT_CSR_MGKPRCVD_SET(x) (((uint32_t)(x) << ENET_PMT_CSR_MGKPRCVD_SHIFT) & ENET_PMT_CSR_MGKPRCVD_MASK)
1041 #define ENET_PMT_CSR_MGKPRCVD_GET(x) (((uint32_t)(x) & ENET_PMT_CSR_MGKPRCVD_MASK) >> ENET_PMT_CSR_MGKPRCVD_SHIFT)
1042 
1043 /*
1044  * RWKPKTEN (RW)
1045  *
1046  * Remote Wake-Up Frame Enable
1047  * When set, enables generation of a power management event because of remote wake-up frame reception.
1048  */
1049 #define ENET_PMT_CSR_RWKPKTEN_MASK (0x4U)
1050 #define ENET_PMT_CSR_RWKPKTEN_SHIFT (2U)
1051 #define ENET_PMT_CSR_RWKPKTEN_SET(x) (((uint32_t)(x) << ENET_PMT_CSR_RWKPKTEN_SHIFT) & ENET_PMT_CSR_RWKPKTEN_MASK)
1052 #define ENET_PMT_CSR_RWKPKTEN_GET(x) (((uint32_t)(x) & ENET_PMT_CSR_RWKPKTEN_MASK) >> ENET_PMT_CSR_RWKPKTEN_SHIFT)
1053 
1054 /*
1055  * MGKPKTEN (RW)
1056  *
1057  * Magic Packet Enable
1058  * When set, enables generation of a power management event because of magic packet reception.
1059  */
1060 #define ENET_PMT_CSR_MGKPKTEN_MASK (0x2U)
1061 #define ENET_PMT_CSR_MGKPKTEN_SHIFT (1U)
1062 #define ENET_PMT_CSR_MGKPKTEN_SET(x) (((uint32_t)(x) << ENET_PMT_CSR_MGKPKTEN_SHIFT) & ENET_PMT_CSR_MGKPKTEN_MASK)
1063 #define ENET_PMT_CSR_MGKPKTEN_GET(x) (((uint32_t)(x) & ENET_PMT_CSR_MGKPKTEN_MASK) >> ENET_PMT_CSR_MGKPKTEN_SHIFT)
1064 
1065 /*
1066  * PWRDWN (RW)
1067  *
1068  * Power Down
1069  * When set, the MAC receiver drops all received frames until it receives the expected magic packet or remote wake-up frame.
1070  * This bit is then self-cleared and the power-down mode is disabled.
1071  * The Software can also clear this bit before the expected magic packet or remote wake-up frame is received.
1072  * The frames, received by the MAC after this bit is cleared, are forwarded to the application.
1073  * This bit must only be set when the Magic Packet Enable, Global Unicast, or Remote Wake-Upr Fame Enable bit is set high.
1074  * Note: You can gate-off the CSR clock during the power-down mode.
1075  * 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.
1076  */
1077 #define ENET_PMT_CSR_PWRDWN_MASK (0x1U)
1078 #define ENET_PMT_CSR_PWRDWN_SHIFT (0U)
1079 #define ENET_PMT_CSR_PWRDWN_SET(x) (((uint32_t)(x) << ENET_PMT_CSR_PWRDWN_SHIFT) & ENET_PMT_CSR_PWRDWN_MASK)
1080 #define ENET_PMT_CSR_PWRDWN_GET(x) (((uint32_t)(x) & ENET_PMT_CSR_PWRDWN_MASK) >> ENET_PMT_CSR_PWRDWN_SHIFT)
1081 
1082 /* Bitfield definition for register: LPI_CSR */
1083 /*
1084  * LPITXA (RW)
1085  *
1086  * LPI TX Automate
1087  * This bit controls the behavior of the MAC when it is entering or coming out of the LPI mode on the transmit side.
1088  * 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,
1089  * the MAC enters the LPI mode only after all outstanding frames (in the core) and pending frames (in the application interface) have been transmitted.
1090  * 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.
1091  * In addition, the MAC automatically clears the LPIEN bit when it exits the LPI state.
1092  * If TX FIFO Flush is set in Bit 20 of Register 6 (Operation Mode Register),
1093  * when the MAC is in the LPI mode, the MAC exits the LPI mode.
1094  * 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.
1095  */
1096 #define ENET_LPI_CSR_LPITXA_MASK (0x80000UL)
1097 #define ENET_LPI_CSR_LPITXA_SHIFT (19U)
1098 #define ENET_LPI_CSR_LPITXA_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_LPITXA_SHIFT) & ENET_LPI_CSR_LPITXA_MASK)
1099 #define ENET_LPI_CSR_LPITXA_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_LPITXA_MASK) >> ENET_LPI_CSR_LPITXA_SHIFT)
1100 
1101 /*
1102  * PLSEN (RW)
1103  *
1104  * PHY Link Status Enable
1105  * This bit enables the link status received on the RGMII, SGMII, or SMII receive paths to be used for activating the LPI LS TIMER.
1106  * 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.
1107  * 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.
1108  */
1109 #define ENET_LPI_CSR_PLSEN_MASK (0x40000UL)
1110 #define ENET_LPI_CSR_PLSEN_SHIFT (18U)
1111 #define ENET_LPI_CSR_PLSEN_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_PLSEN_SHIFT) & ENET_LPI_CSR_PLSEN_MASK)
1112 #define ENET_LPI_CSR_PLSEN_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_PLSEN_MASK) >> ENET_LPI_CSR_PLSEN_SHIFT)
1113 
1114 /*
1115  * PLS (RW)
1116  *
1117  * PHY Link Status
1118  * 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.
1119  * When set, the link is considered to be okay (up) and when reset, the link is considered to be down.
1120  */
1121 #define ENET_LPI_CSR_PLS_MASK (0x20000UL)
1122 #define ENET_LPI_CSR_PLS_SHIFT (17U)
1123 #define ENET_LPI_CSR_PLS_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_PLS_SHIFT) & ENET_LPI_CSR_PLS_MASK)
1124 #define ENET_LPI_CSR_PLS_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_PLS_MASK) >> ENET_LPI_CSR_PLS_SHIFT)
1125 
1126 /*
1127  * LPIEN (RW)
1128  *
1129  * LPI Enable
1130  * 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.
1131  * 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.
1132  */
1133 #define ENET_LPI_CSR_LPIEN_MASK (0x10000UL)
1134 #define ENET_LPI_CSR_LPIEN_SHIFT (16U)
1135 #define ENET_LPI_CSR_LPIEN_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_LPIEN_SHIFT) & ENET_LPI_CSR_LPIEN_MASK)
1136 #define ENET_LPI_CSR_LPIEN_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_LPIEN_MASK) >> ENET_LPI_CSR_LPIEN_SHIFT)
1137 
1138 /*
1139  * RLPIST (RW)
1140  *
1141  * Receive LPI State
1142  * When set, this bit indicates that the MAC is receiving the LPI pattern on the GMII or MII interface.
1143  */
1144 #define ENET_LPI_CSR_RLPIST_MASK (0x200U)
1145 #define ENET_LPI_CSR_RLPIST_SHIFT (9U)
1146 #define ENET_LPI_CSR_RLPIST_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_RLPIST_SHIFT) & ENET_LPI_CSR_RLPIST_MASK)
1147 #define ENET_LPI_CSR_RLPIST_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_RLPIST_MASK) >> ENET_LPI_CSR_RLPIST_SHIFT)
1148 
1149 /*
1150  * TLPIST (RW)
1151  *
1152  * Transmit LPI State
1153  * When set, this bit indicates that the MAC is transmitting the LPI pattern on the GMII or MII interface.
1154  */
1155 #define ENET_LPI_CSR_TLPIST_MASK (0x100U)
1156 #define ENET_LPI_CSR_TLPIST_SHIFT (8U)
1157 #define ENET_LPI_CSR_TLPIST_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_TLPIST_SHIFT) & ENET_LPI_CSR_TLPIST_MASK)
1158 #define ENET_LPI_CSR_TLPIST_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_TLPIST_MASK) >> ENET_LPI_CSR_TLPIST_SHIFT)
1159 
1160 /*
1161  * RLPIEX (RW)
1162  *
1163  * Receive LPI Exit
1164  * 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.
1165  * This bit is cleared by a read into this register.
1166  * 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.
1167  */
1168 #define ENET_LPI_CSR_RLPIEX_MASK (0x8U)
1169 #define ENET_LPI_CSR_RLPIEX_SHIFT (3U)
1170 #define ENET_LPI_CSR_RLPIEX_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_RLPIEX_SHIFT) & ENET_LPI_CSR_RLPIEX_MASK)
1171 #define ENET_LPI_CSR_RLPIEX_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_RLPIEX_MASK) >> ENET_LPI_CSR_RLPIEX_SHIFT)
1172 
1173 /*
1174  * RLPIEN (RW)
1175  *
1176  * Receive LPI Entry
1177  * 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.
1178  * 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.
1179  */
1180 #define ENET_LPI_CSR_RLPIEN_MASK (0x4U)
1181 #define ENET_LPI_CSR_RLPIEN_SHIFT (2U)
1182 #define ENET_LPI_CSR_RLPIEN_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_RLPIEN_SHIFT) & ENET_LPI_CSR_RLPIEN_MASK)
1183 #define ENET_LPI_CSR_RLPIEN_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_RLPIEN_MASK) >> ENET_LPI_CSR_RLPIEN_SHIFT)
1184 
1185 /*
1186  * TLPIEX (RW)
1187  *
1188  * Transmit LPI Exit
1189  * 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.
1190  */
1191 #define ENET_LPI_CSR_TLPIEX_MASK (0x2U)
1192 #define ENET_LPI_CSR_TLPIEX_SHIFT (1U)
1193 #define ENET_LPI_CSR_TLPIEX_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_TLPIEX_SHIFT) & ENET_LPI_CSR_TLPIEX_MASK)
1194 #define ENET_LPI_CSR_TLPIEX_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_TLPIEX_MASK) >> ENET_LPI_CSR_TLPIEX_SHIFT)
1195 
1196 /*
1197  * TLPIEN (RW)
1198  *
1199  * Transmit LPI Entry
1200  * 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.
1201  */
1202 #define ENET_LPI_CSR_TLPIEN_MASK (0x1U)
1203 #define ENET_LPI_CSR_TLPIEN_SHIFT (0U)
1204 #define ENET_LPI_CSR_TLPIEN_SET(x) (((uint32_t)(x) << ENET_LPI_CSR_TLPIEN_SHIFT) & ENET_LPI_CSR_TLPIEN_MASK)
1205 #define ENET_LPI_CSR_TLPIEN_GET(x) (((uint32_t)(x) & ENET_LPI_CSR_TLPIEN_MASK) >> ENET_LPI_CSR_TLPIEN_SHIFT)
1206 
1207 /* Bitfield definition for register: LPI_TCR */
1208 /*
1209  * LST (RW)
1210  *
1211  * LPI LS TIMER
1212  * 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.
1213  * 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.
1214  * The default value of the LPI LS Timer is 1000 (1 sec) as defined in the IEEE standard.
1215  */
1216 #define ENET_LPI_TCR_LST_MASK (0x3FF0000UL)
1217 #define ENET_LPI_TCR_LST_SHIFT (16U)
1218 #define ENET_LPI_TCR_LST_SET(x) (((uint32_t)(x) << ENET_LPI_TCR_LST_SHIFT) & ENET_LPI_TCR_LST_MASK)
1219 #define ENET_LPI_TCR_LST_GET(x) (((uint32_t)(x) & ENET_LPI_TCR_LST_MASK) >> ENET_LPI_TCR_LST_SHIFT)
1220 
1221 /*
1222  * TWT (RW)
1223  *
1224  * LPI TW TIMER
1225  * This field specifies the minimum time (in microseconds) for which the MAC waits after it stops transmitting
1226  * the LPI pattern to the PHY and before it resumes the normal transmission.
1227  * The TLPIEX status bit is set after the expiry of this timer.
1228  */
1229 #define ENET_LPI_TCR_TWT_MASK (0xFFFFU)
1230 #define ENET_LPI_TCR_TWT_SHIFT (0U)
1231 #define ENET_LPI_TCR_TWT_SET(x) (((uint32_t)(x) << ENET_LPI_TCR_TWT_SHIFT) & ENET_LPI_TCR_TWT_MASK)
1232 #define ENET_LPI_TCR_TWT_GET(x) (((uint32_t)(x) & ENET_LPI_TCR_TWT_MASK) >> ENET_LPI_TCR_TWT_SHIFT)
1233 
1234 /* Bitfield definition for register: INTR_STATUS */
1235 /*
1236  * GPIIS (RO)
1237  *
1238  * GPI Interrupt Status
1239  * 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])
1240  * of Register 56 (General Purpose IO Register) and the corresponding GPIE bit is enabled.
1241  * This bit is cleared on reading lane 0 (GPIS) of Register 56 (General Purpose IO Register).
1242  * When the GPIO feature is not enabled, this bit is reserved.
1243  */
1244 #define ENET_INTR_STATUS_GPIIS_MASK (0x800U)
1245 #define ENET_INTR_STATUS_GPIIS_SHIFT (11U)
1246 #define ENET_INTR_STATUS_GPIIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_GPIIS_MASK) >> ENET_INTR_STATUS_GPIIS_SHIFT)
1247 
1248 /*
1249  * LPIIS (RO)
1250  *
1251  * LPI Interrupt Status
1252  * 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.
1253  * This bit is cleared on reading Bit 0 of Register 12 (LPI Control and Status Register). In all other modes, this bit is reserved.
1254  */
1255 #define ENET_INTR_STATUS_LPIIS_MASK (0x400U)
1256 #define ENET_INTR_STATUS_LPIIS_SHIFT (10U)
1257 #define ENET_INTR_STATUS_LPIIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_LPIIS_MASK) >> ENET_INTR_STATUS_LPIIS_SHIFT)
1258 
1259 /*
1260  * TSIS (RO)
1261  *
1262  * Timestamp Interrupt Status
1263  * When the Advanced Timestamp feature is enabled, this bit is set when any of the following conditions is true:
1264  * - The system time value equals or exceeds the value specified in the Target Time High and Low registers.
1265  * - There is an overflow in the seconds register.
1266  * - The Auxiliary snapshot trigger is asserted. This bit is cleared on reading Bit 0 of Register 458 (Timestamp Status Register).
1267  */
1268 #define ENET_INTR_STATUS_TSIS_MASK (0x200U)
1269 #define ENET_INTR_STATUS_TSIS_SHIFT (9U)
1270 #define ENET_INTR_STATUS_TSIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_TSIS_MASK) >> ENET_INTR_STATUS_TSIS_SHIFT)
1271 
1272 /*
1273  * MMCRXIPIS (RO)
1274  *
1275  * MMC Receive Checksum Offload Interrupt Status
1276  * 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.
1277  */
1278 #define ENET_INTR_STATUS_MMCRXIPIS_MASK (0x80U)
1279 #define ENET_INTR_STATUS_MMCRXIPIS_SHIFT (7U)
1280 #define ENET_INTR_STATUS_MMCRXIPIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_MMCRXIPIS_MASK) >> ENET_INTR_STATUS_MMCRXIPIS_SHIFT)
1281 
1282 /*
1283  * MMCTXIS (RO)
1284  *
1285  * MMC Transmit Interrupt Status
1286  * 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.
1287  */
1288 #define ENET_INTR_STATUS_MMCTXIS_MASK (0x40U)
1289 #define ENET_INTR_STATUS_MMCTXIS_SHIFT (6U)
1290 #define ENET_INTR_STATUS_MMCTXIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_MMCTXIS_MASK) >> ENET_INTR_STATUS_MMCTXIS_SHIFT)
1291 
1292 /*
1293  * MMCRXIS (RO)
1294  *
1295  * MMC Receive Interrupt Status
1296  * 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.
1297  */
1298 #define ENET_INTR_STATUS_MMCRXIS_MASK (0x20U)
1299 #define ENET_INTR_STATUS_MMCRXIS_SHIFT (5U)
1300 #define ENET_INTR_STATUS_MMCRXIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_MMCRXIS_MASK) >> ENET_INTR_STATUS_MMCRXIS_SHIFT)
1301 
1302 /*
1303  * MMCIS (RO)
1304  *
1305  * MMC Interrupt Status
1306  * 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.
1307  */
1308 #define ENET_INTR_STATUS_MMCIS_MASK (0x10U)
1309 #define ENET_INTR_STATUS_MMCIS_SHIFT (4U)
1310 #define ENET_INTR_STATUS_MMCIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_MMCIS_MASK) >> ENET_INTR_STATUS_MMCIS_SHIFT)
1311 
1312 /*
1313  * PMTIS (RO)
1314  *
1315  * PMT Interrupt Status
1316  * 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).
1317  * This bit is cleared when both Bits[6:5] are cleared because of a read operation to the PMT Control and Status register.
1318  */
1319 #define ENET_INTR_STATUS_PMTIS_MASK (0x8U)
1320 #define ENET_INTR_STATUS_PMTIS_SHIFT (3U)
1321 #define ENET_INTR_STATUS_PMTIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_PMTIS_MASK) >> ENET_INTR_STATUS_PMTIS_SHIFT)
1322 
1323 /*
1324  * PCSANCIS (RO)
1325  *
1326  * PCS Auto-Negotiation Complete
1327  * 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)).
1328  * This bit is cleared when you perform a read operation to the AN Status register.
1329  */
1330 #define ENET_INTR_STATUS_PCSANCIS_MASK (0x4U)
1331 #define ENET_INTR_STATUS_PCSANCIS_SHIFT (2U)
1332 #define ENET_INTR_STATUS_PCSANCIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_PCSANCIS_MASK) >> ENET_INTR_STATUS_PCSANCIS_SHIFT)
1333 
1334 /*
1335  * PCSLCHGIS (RO)
1336  *
1337  * PCS Link Status Changed
1338  * 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)).
1339  * This bit is cleared when you perform a read operation on the AN Status register.
1340  */
1341 #define ENET_INTR_STATUS_PCSLCHGIS_MASK (0x2U)
1342 #define ENET_INTR_STATUS_PCSLCHGIS_SHIFT (1U)
1343 #define ENET_INTR_STATUS_PCSLCHGIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_PCSLCHGIS_MASK) >> ENET_INTR_STATUS_PCSLCHGIS_SHIFT)
1344 
1345 /*
1346  * RGSMIIIS (RO)
1347  *
1348  * RGMII or SMII Interrupt Status
1349  * 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)).
1350  * This bit is cleared when you perform a read operation on the SGMII/RGMII/SMII Control and Status Register.
1351  */
1352 #define ENET_INTR_STATUS_RGSMIIIS_MASK (0x1U)
1353 #define ENET_INTR_STATUS_RGSMIIIS_SHIFT (0U)
1354 #define ENET_INTR_STATUS_RGSMIIIS_GET(x) (((uint32_t)(x) & ENET_INTR_STATUS_RGSMIIIS_MASK) >> ENET_INTR_STATUS_RGSMIIIS_SHIFT)
1355 
1356 /* Bitfield definition for register: INTR_MASK */
1357 /*
1358  * LPIIM (RW)
1359  *
1360  * LPI Interrupt Mask
1361  * 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).
1362  */
1363 #define ENET_INTR_MASK_LPIIM_MASK (0x400U)
1364 #define ENET_INTR_MASK_LPIIM_SHIFT (10U)
1365 #define ENET_INTR_MASK_LPIIM_SET(x) (((uint32_t)(x) << ENET_INTR_MASK_LPIIM_SHIFT) & ENET_INTR_MASK_LPIIM_MASK)
1366 #define ENET_INTR_MASK_LPIIM_GET(x) (((uint32_t)(x) & ENET_INTR_MASK_LPIIM_MASK) >> ENET_INTR_MASK_LPIIM_SHIFT)
1367 
1368 /*
1369  * TSIM (RW)
1370  *
1371  * Timestamp Interrupt Mask
1372  * 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).
1373  */
1374 #define ENET_INTR_MASK_TSIM_MASK (0x200U)
1375 #define ENET_INTR_MASK_TSIM_SHIFT (9U)
1376 #define ENET_INTR_MASK_TSIM_SET(x) (((uint32_t)(x) << ENET_INTR_MASK_TSIM_SHIFT) & ENET_INTR_MASK_TSIM_MASK)
1377 #define ENET_INTR_MASK_TSIM_GET(x) (((uint32_t)(x) & ENET_INTR_MASK_TSIM_MASK) >> ENET_INTR_MASK_TSIM_SHIFT)
1378 
1379 /*
1380  * PMTIM (RW)
1381  *
1382  * PMT Interrupt Mask
1383  * 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).
1384  */
1385 #define ENET_INTR_MASK_PMTIM_MASK (0x8U)
1386 #define ENET_INTR_MASK_PMTIM_SHIFT (3U)
1387 #define ENET_INTR_MASK_PMTIM_SET(x) (((uint32_t)(x) << ENET_INTR_MASK_PMTIM_SHIFT) & ENET_INTR_MASK_PMTIM_MASK)
1388 #define ENET_INTR_MASK_PMTIM_GET(x) (((uint32_t)(x) & ENET_INTR_MASK_PMTIM_MASK) >> ENET_INTR_MASK_PMTIM_SHIFT)
1389 
1390 /*
1391  * PCSANCIM (RW)
1392  *
1393  * PCS AN Completion Interrupt Mask
1394  * 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).
1395  */
1396 #define ENET_INTR_MASK_PCSANCIM_MASK (0x4U)
1397 #define ENET_INTR_MASK_PCSANCIM_SHIFT (2U)
1398 #define ENET_INTR_MASK_PCSANCIM_SET(x) (((uint32_t)(x) << ENET_INTR_MASK_PCSANCIM_SHIFT) & ENET_INTR_MASK_PCSANCIM_MASK)
1399 #define ENET_INTR_MASK_PCSANCIM_GET(x) (((uint32_t)(x) & ENET_INTR_MASK_PCSANCIM_MASK) >> ENET_INTR_MASK_PCSANCIM_SHIFT)
1400 
1401 /*
1402  * PCSLCHGIM (RW)
1403  *
1404  * PCS Link Status Interrupt Mask
1405  * 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).
1406  */
1407 #define ENET_INTR_MASK_PCSLCHGIM_MASK (0x2U)
1408 #define ENET_INTR_MASK_PCSLCHGIM_SHIFT (1U)
1409 #define ENET_INTR_MASK_PCSLCHGIM_SET(x) (((uint32_t)(x) << ENET_INTR_MASK_PCSLCHGIM_SHIFT) & ENET_INTR_MASK_PCSLCHGIM_MASK)
1410 #define ENET_INTR_MASK_PCSLCHGIM_GET(x) (((uint32_t)(x) & ENET_INTR_MASK_PCSLCHGIM_MASK) >> ENET_INTR_MASK_PCSLCHGIM_SHIFT)
1411 
1412 /*
1413  * RGSMIIIM (RW)
1414  *
1415  * RGMII or SMII Interrupt Mask
1416  * 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).
1417  */
1418 #define ENET_INTR_MASK_RGSMIIIM_MASK (0x1U)
1419 #define ENET_INTR_MASK_RGSMIIIM_SHIFT (0U)
1420 #define ENET_INTR_MASK_RGSMIIIM_SET(x) (((uint32_t)(x) << ENET_INTR_MASK_RGSMIIIM_SHIFT) & ENET_INTR_MASK_RGSMIIIM_MASK)
1421 #define ENET_INTR_MASK_RGSMIIIM_GET(x) (((uint32_t)(x) & ENET_INTR_MASK_RGSMIIIM_MASK) >> ENET_INTR_MASK_RGSMIIIM_SHIFT)
1422 
1423 /* Bitfield definition for register: MAC_ADDR_0_HIGH */
1424 /*
1425  * AE (RO)
1426  *
1427  * Address Enable
1428  * This bit is RO. The bit value is fixed at 1.
1429  */
1430 #define ENET_MAC_ADDR_0_HIGH_AE_MASK (0x80000000UL)
1431 #define ENET_MAC_ADDR_0_HIGH_AE_SHIFT (31U)
1432 #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)
1433 
1434 /*
1435  * ADDRHI (RW)
1436  *
1437  * MAC Address0 [47:32]
1438  * 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.
1439  */
1440 #define ENET_MAC_ADDR_0_HIGH_ADDRHI_MASK (0xFFFFU)
1441 #define ENET_MAC_ADDR_0_HIGH_ADDRHI_SHIFT (0U)
1442 #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)
1443 #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)
1444 
1445 /* Bitfield definition for register: MAC_ADDR_0_LOW */
1446 /*
1447  * ADDRLO (RW)
1448  *
1449  * MAC Address0 [31:0]
1450  * 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.
1451  */
1452 #define ENET_MAC_ADDR_0_LOW_ADDRLO_MASK (0xFFFFFFFFUL)
1453 #define ENET_MAC_ADDR_0_LOW_ADDRLO_SHIFT (0U)
1454 #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)
1455 #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)
1456 
1457 /* Bitfield definition for register of struct array MAC_ADDR: HIGH */
1458 /*
1459  * AE (RW)
1460  *
1461  * Address Enable
1462  * 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.
1463  */
1464 #define ENET_MAC_ADDR_HIGH_AE_MASK (0x80000000UL)
1465 #define ENET_MAC_ADDR_HIGH_AE_SHIFT (31U)
1466 #define ENET_MAC_ADDR_HIGH_AE_SET(x) (((uint32_t)(x) << ENET_MAC_ADDR_HIGH_AE_SHIFT) & ENET_MAC_ADDR_HIGH_AE_MASK)
1467 #define ENET_MAC_ADDR_HIGH_AE_GET(x) (((uint32_t)(x) & ENET_MAC_ADDR_HIGH_AE_MASK) >> ENET_MAC_ADDR_HIGH_AE_SHIFT)
1468 
1469 /*
1470  * SA (RW)
1471  *
1472  * Source Address
1473  * 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.
1474  */
1475 #define ENET_MAC_ADDR_HIGH_SA_MASK (0x40000000UL)
1476 #define ENET_MAC_ADDR_HIGH_SA_SHIFT (30U)
1477 #define ENET_MAC_ADDR_HIGH_SA_SET(x) (((uint32_t)(x) << ENET_MAC_ADDR_HIGH_SA_SHIFT) & ENET_MAC_ADDR_HIGH_SA_MASK)
1478 #define ENET_MAC_ADDR_HIGH_SA_GET(x) (((uint32_t)(x) & ENET_MAC_ADDR_HIGH_SA_MASK) >> ENET_MAC_ADDR_HIGH_SA_SHIFT)
1479 
1480 /*
1481  * MBC (RW)
1482  *
1483  * Mask Byte Control
1484  * These bits are mask control bits for comparison of each of the MAC Address bytes.
1485  * When set high, the MAC does not compare the corresponding byte of received DA or SA with the contents of MAC Address1 registers.
1486  * Each bit controls the masking of the bytes as follows:
1487  * - Bit 29: Register 18[15:8]
1488  * - Bit 28: Register 18[7:0]
1489  * - Bit 27: Register 19[31:24] -
1490  * ...
1491  * - Bit 24: Register 19[7:0]
1492  * You can filter a group of addresses (known as group address filtering) by masking one or more bytes of the address.
1493  */
1494 #define ENET_MAC_ADDR_HIGH_MBC_MASK (0x3F000000UL)
1495 #define ENET_MAC_ADDR_HIGH_MBC_SHIFT (24U)
1496 #define ENET_MAC_ADDR_HIGH_MBC_SET(x) (((uint32_t)(x) << ENET_MAC_ADDR_HIGH_MBC_SHIFT) & ENET_MAC_ADDR_HIGH_MBC_MASK)
1497 #define ENET_MAC_ADDR_HIGH_MBC_GET(x) (((uint32_t)(x) & ENET_MAC_ADDR_HIGH_MBC_MASK) >> ENET_MAC_ADDR_HIGH_MBC_SHIFT)
1498 
1499 /*
1500  * ADDRHI (RW)
1501  *
1502  * MAC Address1 [47:32]
1503  * This field contains the upper 16 bits (47:32) of the second 6-byte MAC address.
1504  */
1505 #define ENET_MAC_ADDR_HIGH_ADDRHI_MASK (0xFFFFU)
1506 #define ENET_MAC_ADDR_HIGH_ADDRHI_SHIFT (0U)
1507 #define ENET_MAC_ADDR_HIGH_ADDRHI_SET(x) (((uint32_t)(x) << ENET_MAC_ADDR_HIGH_ADDRHI_SHIFT) & ENET_MAC_ADDR_HIGH_ADDRHI_MASK)
1508 #define ENET_MAC_ADDR_HIGH_ADDRHI_GET(x) (((uint32_t)(x) & ENET_MAC_ADDR_HIGH_ADDRHI_MASK) >> ENET_MAC_ADDR_HIGH_ADDRHI_SHIFT)
1509 
1510 /* Bitfield definition for register of struct array MAC_ADDR: LOW */
1511 /*
1512  * ADDRLO (RW)
1513  *
1514  * MAC Address1 [31:0]
1515  * 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.
1516  */
1517 #define ENET_MAC_ADDR_LOW_ADDRLO_MASK (0xFFFFFFFFUL)
1518 #define ENET_MAC_ADDR_LOW_ADDRLO_SHIFT (0U)
1519 #define ENET_MAC_ADDR_LOW_ADDRLO_SET(x) (((uint32_t)(x) << ENET_MAC_ADDR_LOW_ADDRLO_SHIFT) & ENET_MAC_ADDR_LOW_ADDRLO_MASK)
1520 #define ENET_MAC_ADDR_LOW_ADDRLO_GET(x) (((uint32_t)(x) & ENET_MAC_ADDR_LOW_ADDRLO_MASK) >> ENET_MAC_ADDR_LOW_ADDRLO_SHIFT)
1521 
1522 /* Bitfield definition for register: XMII_CSR */
1523 /*
1524  * FALSCARDET (RW)
1525  *
1526  * False Carrier Detected
1527  * 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.
1528  */
1529 #define ENET_XMII_CSR_FALSCARDET_MASK (0x20U)
1530 #define ENET_XMII_CSR_FALSCARDET_SHIFT (5U)
1531 #define ENET_XMII_CSR_FALSCARDET_SET(x) (((uint32_t)(x) << ENET_XMII_CSR_FALSCARDET_SHIFT) & ENET_XMII_CSR_FALSCARDET_MASK)
1532 #define ENET_XMII_CSR_FALSCARDET_GET(x) (((uint32_t)(x) & ENET_XMII_CSR_FALSCARDET_MASK) >> ENET_XMII_CSR_FALSCARDET_SHIFT)
1533 
1534 /*
1535  * JABTO (RW)
1536  *
1537  * Jabber Timeout
1538  * 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.
1539  */
1540 #define ENET_XMII_CSR_JABTO_MASK (0x10U)
1541 #define ENET_XMII_CSR_JABTO_SHIFT (4U)
1542 #define ENET_XMII_CSR_JABTO_SET(x) (((uint32_t)(x) << ENET_XMII_CSR_JABTO_SHIFT) & ENET_XMII_CSR_JABTO_MASK)
1543 #define ENET_XMII_CSR_JABTO_GET(x) (((uint32_t)(x) & ENET_XMII_CSR_JABTO_MASK) >> ENET_XMII_CSR_JABTO_SHIFT)
1544 
1545 /*
1546  * LNKSTS (RW)
1547  *
1548  * Link Status
1549  * This bit indicates whether the link between the local PHY and the remote PHY is up or down.
1550  * It gives the status of the link between the SGMII of MAC and the SGMII of the local PHY.
1551  * The status bits are received from the local PHY during ANEG betweent he MAC and PHY on the SGMII link.
1552  */
1553 #define ENET_XMII_CSR_LNKSTS_MASK (0x8U)
1554 #define ENET_XMII_CSR_LNKSTS_SHIFT (3U)
1555 #define ENET_XMII_CSR_LNKSTS_SET(x) (((uint32_t)(x) << ENET_XMII_CSR_LNKSTS_SHIFT) & ENET_XMII_CSR_LNKSTS_MASK)
1556 #define ENET_XMII_CSR_LNKSTS_GET(x) (((uint32_t)(x) & ENET_XMII_CSR_LNKSTS_MASK) >> ENET_XMII_CSR_LNKSTS_SHIFT)
1557 
1558 /*
1559  * LNKSPEED (RW)
1560  *
1561  * Link Speed
1562  * This bit indicates the current speed of the link:
1563  * - 00: 2.5 MHz
1564  * - 01: 25 MHz
1565  * - 10: 125 MHz Bit 2 is reserved when the MAC is configured for the SMII PHY interface.
1566  */
1567 #define ENET_XMII_CSR_LNKSPEED_MASK (0x6U)
1568 #define ENET_XMII_CSR_LNKSPEED_SHIFT (1U)
1569 #define ENET_XMII_CSR_LNKSPEED_SET(x) (((uint32_t)(x) << ENET_XMII_CSR_LNKSPEED_SHIFT) & ENET_XMII_CSR_LNKSPEED_MASK)
1570 #define ENET_XMII_CSR_LNKSPEED_GET(x) (((uint32_t)(x) & ENET_XMII_CSR_LNKSPEED_MASK) >> ENET_XMII_CSR_LNKSPEED_SHIFT)
1571 
1572 /*
1573  * LNKMOD (RW)
1574  *
1575  * Link Mode
1576  * This bit indicates the current mode of operation of the link:
1577  * - 1’b0: Half-duplex mode
1578  * - 1’b1: Full-duplex mode
1579  */
1580 #define ENET_XMII_CSR_LNKMOD_MASK (0x1U)
1581 #define ENET_XMII_CSR_LNKMOD_SHIFT (0U)
1582 #define ENET_XMII_CSR_LNKMOD_SET(x) (((uint32_t)(x) << ENET_XMII_CSR_LNKMOD_SHIFT) & ENET_XMII_CSR_LNKMOD_MASK)
1583 #define ENET_XMII_CSR_LNKMOD_GET(x) (((uint32_t)(x) & ENET_XMII_CSR_LNKMOD_MASK) >> ENET_XMII_CSR_LNKMOD_SHIFT)
1584 
1585 /* Bitfield definition for register: WDOG_WTO */
1586 /*
1587  * PWE (RW)
1588  *
1589  * Programmable Watchdog Enable
1590  * When this bit is set and Bit 23 (WD) of Register 0 (MAC Configuration Register) is reset,
1591  * the WTO field (Bits[13:0]) is used as watchdog timeout for a received frame.
1592  * 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).
1593  */
1594 #define ENET_WDOG_WTO_PWE_MASK (0x10000UL)
1595 #define ENET_WDOG_WTO_PWE_SHIFT (16U)
1596 #define ENET_WDOG_WTO_PWE_SET(x) (((uint32_t)(x) << ENET_WDOG_WTO_PWE_SHIFT) & ENET_WDOG_WTO_PWE_MASK)
1597 #define ENET_WDOG_WTO_PWE_GET(x) (((uint32_t)(x) & ENET_WDOG_WTO_PWE_MASK) >> ENET_WDOG_WTO_PWE_SHIFT)
1598 
1599 /*
1600  * WTO (RW)
1601  *
1602  * Watchdog Timeout
1603  * When Bit 16 (PWE) is set and Bit 23 (WD) of Register 0 (MAC Configuration Register) is reset,
1604  * this field is used as watchdog timeout for a received frame.
1605  * If the length of a received frame exceeds the value of this field, such frame is terminated and declared as an error frame.
1606  * Note: When Bit 16 (PWE) is set, the value in this field should be more than 1,522 (0x05F2).
1607  * Otherwise, the IEEE Std 802.3-specified valid tagged frames are declared as error frames and are dropped.
1608  */
1609 #define ENET_WDOG_WTO_WTO_MASK (0x3FFFU)
1610 #define ENET_WDOG_WTO_WTO_SHIFT (0U)
1611 #define ENET_WDOG_WTO_WTO_SET(x) (((uint32_t)(x) << ENET_WDOG_WTO_WTO_SHIFT) & ENET_WDOG_WTO_WTO_MASK)
1612 #define ENET_WDOG_WTO_WTO_GET(x) (((uint32_t)(x) & ENET_WDOG_WTO_WTO_MASK) >> ENET_WDOG_WTO_WTO_SHIFT)
1613 
1614 /* Bitfield definition for register: MMC_CNTRL */
1615 /*
1616  * UCDBC (RW)
1617  *
1618  * Update MMC Counters for Dropped Broadcast Frames
1619  * 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).
1620  * When reset, the MMC Counters are not updated for dropped Broadcast frames.
1621  */
1622 #define ENET_MMC_CNTRL_UCDBC_MASK (0x100U)
1623 #define ENET_MMC_CNTRL_UCDBC_SHIFT (8U)
1624 #define ENET_MMC_CNTRL_UCDBC_SET(x) (((uint32_t)(x) << ENET_MMC_CNTRL_UCDBC_SHIFT) & ENET_MMC_CNTRL_UCDBC_MASK)
1625 #define ENET_MMC_CNTRL_UCDBC_GET(x) (((uint32_t)(x) & ENET_MMC_CNTRL_UCDBC_MASK) >> ENET_MMC_CNTRL_UCDBC_SHIFT)
1626 
1627 /*
1628  * CNTPRSTLVL (RW)
1629  *
1630  * Full-Half Preset
1631  * 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
1632  * - 2KBytes) and all frame-counters gets preset to 0x7FFF_FFF0 (half
1633  * - 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
1634  * - 2KBytes) and all frame-counters gets preset to 0xFFFF_FFF0 (full
1635  * - 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.
1636  */
1637 #define ENET_MMC_CNTRL_CNTPRSTLVL_MASK (0x20U)
1638 #define ENET_MMC_CNTRL_CNTPRSTLVL_SHIFT (5U)
1639 #define ENET_MMC_CNTRL_CNTPRSTLVL_SET(x) (((uint32_t)(x) << ENET_MMC_CNTRL_CNTPRSTLVL_SHIFT) & ENET_MMC_CNTRL_CNTPRSTLVL_MASK)
1640 #define ENET_MMC_CNTRL_CNTPRSTLVL_GET(x) (((uint32_t)(x) & ENET_MMC_CNTRL_CNTPRSTLVL_MASK) >> ENET_MMC_CNTRL_CNTPRSTLVL_SHIFT)
1641 
1642 /*
1643  * CNTPRST (RW)
1644  *
1645  * Counters Preset
1646  * 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.
1647  * 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.
1648  */
1649 #define ENET_MMC_CNTRL_CNTPRST_MASK (0x10U)
1650 #define ENET_MMC_CNTRL_CNTPRST_SHIFT (4U)
1651 #define ENET_MMC_CNTRL_CNTPRST_SET(x) (((uint32_t)(x) << ENET_MMC_CNTRL_CNTPRST_SHIFT) & ENET_MMC_CNTRL_CNTPRST_MASK)
1652 #define ENET_MMC_CNTRL_CNTPRST_GET(x) (((uint32_t)(x) & ENET_MMC_CNTRL_CNTPRST_MASK) >> ENET_MMC_CNTRL_CNTPRST_SHIFT)
1653 
1654 /*
1655  * CNTFREEZ (RW)
1656  *
1657  * MMC Counter Freeze
1658  * When this bit is set, it freezes all MMC counters to their current value.
1659  * Until this bit is reset to 0, no MMC counter is updated because of any transmitted or received frame.
1660  * If any MMC counter is read with the Reset on Read bit set, then that counter is also cleared in this mode.
1661  */
1662 #define ENET_MMC_CNTRL_CNTFREEZ_MASK (0x8U)
1663 #define ENET_MMC_CNTRL_CNTFREEZ_SHIFT (3U)
1664 #define ENET_MMC_CNTRL_CNTFREEZ_SET(x) (((uint32_t)(x) << ENET_MMC_CNTRL_CNTFREEZ_SHIFT) & ENET_MMC_CNTRL_CNTFREEZ_MASK)
1665 #define ENET_MMC_CNTRL_CNTFREEZ_GET(x) (((uint32_t)(x) & ENET_MMC_CNTRL_CNTFREEZ_MASK) >> ENET_MMC_CNTRL_CNTFREEZ_SHIFT)
1666 
1667 /*
1668  * RSTONRD (RW)
1669  *
1670  * Reset on Read
1671  * 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.
1672  */
1673 #define ENET_MMC_CNTRL_RSTONRD_MASK (0x4U)
1674 #define ENET_MMC_CNTRL_RSTONRD_SHIFT (2U)
1675 #define ENET_MMC_CNTRL_RSTONRD_SET(x) (((uint32_t)(x) << ENET_MMC_CNTRL_RSTONRD_SHIFT) & ENET_MMC_CNTRL_RSTONRD_MASK)
1676 #define ENET_MMC_CNTRL_RSTONRD_GET(x) (((uint32_t)(x) & ENET_MMC_CNTRL_RSTONRD_MASK) >> ENET_MMC_CNTRL_RSTONRD_SHIFT)
1677 
1678 /*
1679  * CNTSTOPRO (RW)
1680  *
1681  * Counter Stop Rollover
1682  * When this bit is set, the counter does not roll over to zero after reaching the maximum value.
1683  */
1684 #define ENET_MMC_CNTRL_CNTSTOPRO_MASK (0x2U)
1685 #define ENET_MMC_CNTRL_CNTSTOPRO_SHIFT (1U)
1686 #define ENET_MMC_CNTRL_CNTSTOPRO_SET(x) (((uint32_t)(x) << ENET_MMC_CNTRL_CNTSTOPRO_SHIFT) & ENET_MMC_CNTRL_CNTSTOPRO_MASK)
1687 #define ENET_MMC_CNTRL_CNTSTOPRO_GET(x) (((uint32_t)(x) & ENET_MMC_CNTRL_CNTSTOPRO_MASK) >> ENET_MMC_CNTRL_CNTSTOPRO_SHIFT)
1688 
1689 /*
1690  * CNTRST (RW)
1691  *
1692  * Counters Reset
1693  * When this bit is set, all counters are reset. This bit is cleared automatically after 1 clock cycle
1694  */
1695 #define ENET_MMC_CNTRL_CNTRST_MASK (0x1U)
1696 #define ENET_MMC_CNTRL_CNTRST_SHIFT (0U)
1697 #define ENET_MMC_CNTRL_CNTRST_SET(x) (((uint32_t)(x) << ENET_MMC_CNTRL_CNTRST_SHIFT) & ENET_MMC_CNTRL_CNTRST_MASK)
1698 #define ENET_MMC_CNTRL_CNTRST_GET(x) (((uint32_t)(x) & ENET_MMC_CNTRL_CNTRST_MASK) >> ENET_MMC_CNTRL_CNTRST_SHIFT)
1699 
1700 /* Bitfield definition for register: MMC_INTR_RX */
1701 /*
1702  * RXCTRLFIS (RW)
1703  *
1704  * MMC Receive Control Frame Counter Interrupt Status
1705  * This bit is set when the rxctrlframes_g counter reaches half of the maximum value or the maximum value.
1706  */
1707 #define ENET_MMC_INTR_RX_RXCTRLFIS_MASK (0x2000000UL)
1708 #define ENET_MMC_INTR_RX_RXCTRLFIS_SHIFT (25U)
1709 #define ENET_MMC_INTR_RX_RXCTRLFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXCTRLFIS_SHIFT) & ENET_MMC_INTR_RX_RXCTRLFIS_MASK)
1710 #define ENET_MMC_INTR_RX_RXCTRLFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXCTRLFIS_MASK) >> ENET_MMC_INTR_RX_RXCTRLFIS_SHIFT)
1711 
1712 /*
1713  * RXRCVERRFIS (RW)
1714  *
1715  * MMC Receive Error Frame Counter Interrupt Status
1716  * This bit is set when the rxrcverror counter reaches half of the maximum value or the maximum value.
1717  */
1718 #define ENET_MMC_INTR_RX_RXRCVERRFIS_MASK (0x1000000UL)
1719 #define ENET_MMC_INTR_RX_RXRCVERRFIS_SHIFT (24U)
1720 #define ENET_MMC_INTR_RX_RXRCVERRFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXRCVERRFIS_SHIFT) & ENET_MMC_INTR_RX_RXRCVERRFIS_MASK)
1721 #define ENET_MMC_INTR_RX_RXRCVERRFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXRCVERRFIS_MASK) >> ENET_MMC_INTR_RX_RXRCVERRFIS_SHIFT)
1722 
1723 /*
1724  * RXWDOGFIS (RW)
1725  *
1726  * MMC Receive Watchdog Error Frame Counter Interrupt Status
1727  * This bit is set when the rxwatchdog error counter reaches half of the maximum value or the maximum value.
1728  */
1729 #define ENET_MMC_INTR_RX_RXWDOGFIS_MASK (0x800000UL)
1730 #define ENET_MMC_INTR_RX_RXWDOGFIS_SHIFT (23U)
1731 #define ENET_MMC_INTR_RX_RXWDOGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXWDOGFIS_SHIFT) & ENET_MMC_INTR_RX_RXWDOGFIS_MASK)
1732 #define ENET_MMC_INTR_RX_RXWDOGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXWDOGFIS_MASK) >> ENET_MMC_INTR_RX_RXWDOGFIS_SHIFT)
1733 
1734 /*
1735  * RXVLANGBFIS (RW)
1736  *
1737  * MMC Receive VLAN Good Bad Frame Counter Interrupt Status
1738  * This bit is set when the rxvlanframes_gb counter reaches half of the maximum value or the maximum value.
1739  */
1740 #define ENET_MMC_INTR_RX_RXVLANGBFIS_MASK (0x400000UL)
1741 #define ENET_MMC_INTR_RX_RXVLANGBFIS_SHIFT (22U)
1742 #define ENET_MMC_INTR_RX_RXVLANGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXVLANGBFIS_SHIFT) & ENET_MMC_INTR_RX_RXVLANGBFIS_MASK)
1743 #define ENET_MMC_INTR_RX_RXVLANGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXVLANGBFIS_MASK) >> ENET_MMC_INTR_RX_RXVLANGBFIS_SHIFT)
1744 
1745 /*
1746  * RXFOVFIS (RW)
1747  *
1748  * MMC Receive FIFO Overflow Frame Counter Interrupt Status
1749  * This bit is set when the rxfifooverflow counter reaches half of the maximum value or the maximum value.
1750  */
1751 #define ENET_MMC_INTR_RX_RXFOVFIS_MASK (0x200000UL)
1752 #define ENET_MMC_INTR_RX_RXFOVFIS_SHIFT (21U)
1753 #define ENET_MMC_INTR_RX_RXFOVFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXFOVFIS_SHIFT) & ENET_MMC_INTR_RX_RXFOVFIS_MASK)
1754 #define ENET_MMC_INTR_RX_RXFOVFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXFOVFIS_MASK) >> ENET_MMC_INTR_RX_RXFOVFIS_SHIFT)
1755 
1756 /*
1757  * RXPAUSFIS (RW)
1758  *
1759  * MMC Receive Pause Frame Counter Interrupt Status
1760  * This bit is set when the rxpauseframes counter reaches half of the maximum value or the maximum value.
1761  */
1762 #define ENET_MMC_INTR_RX_RXPAUSFIS_MASK (0x100000UL)
1763 #define ENET_MMC_INTR_RX_RXPAUSFIS_SHIFT (20U)
1764 #define ENET_MMC_INTR_RX_RXPAUSFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXPAUSFIS_SHIFT) & ENET_MMC_INTR_RX_RXPAUSFIS_MASK)
1765 #define ENET_MMC_INTR_RX_RXPAUSFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXPAUSFIS_MASK) >> ENET_MMC_INTR_RX_RXPAUSFIS_SHIFT)
1766 
1767 /*
1768  * RXORANGEFIS (RW)
1769  *
1770  * MMC Receive Out Of Range Error Frame Counter Interrupt Status.
1771  * This bit is set when the rxoutofrangetype counter reaches half of the maximum value or the maximum value.
1772  */
1773 #define ENET_MMC_INTR_RX_RXORANGEFIS_MASK (0x80000UL)
1774 #define ENET_MMC_INTR_RX_RXORANGEFIS_SHIFT (19U)
1775 #define ENET_MMC_INTR_RX_RXORANGEFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXORANGEFIS_SHIFT) & ENET_MMC_INTR_RX_RXORANGEFIS_MASK)
1776 #define ENET_MMC_INTR_RX_RXORANGEFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXORANGEFIS_MASK) >> ENET_MMC_INTR_RX_RXORANGEFIS_SHIFT)
1777 
1778 /*
1779  * RXLENERFIS (RW)
1780  *
1781  * MMC Receive Length Error Frame Counter Interrupt Status
1782  * This bit is set when the rxlengtherror counter reaches half of the maximum value or the maximum value.
1783  */
1784 #define ENET_MMC_INTR_RX_RXLENERFIS_MASK (0x40000UL)
1785 #define ENET_MMC_INTR_RX_RXLENERFIS_SHIFT (18U)
1786 #define ENET_MMC_INTR_RX_RXLENERFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXLENERFIS_SHIFT) & ENET_MMC_INTR_RX_RXLENERFIS_MASK)
1787 #define ENET_MMC_INTR_RX_RXLENERFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXLENERFIS_MASK) >> ENET_MMC_INTR_RX_RXLENERFIS_SHIFT)
1788 
1789 /*
1790  * RXUCGFIS (RW)
1791  *
1792  * MMC Receive Unicast Good Frame Counter Interrupt Status
1793  * This bit is set when the rxunicastframes_g counter reaches half of the maximum value or the maximum value.
1794  */
1795 #define ENET_MMC_INTR_RX_RXUCGFIS_MASK (0x20000UL)
1796 #define ENET_MMC_INTR_RX_RXUCGFIS_SHIFT (17U)
1797 #define ENET_MMC_INTR_RX_RXUCGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXUCGFIS_SHIFT) & ENET_MMC_INTR_RX_RXUCGFIS_MASK)
1798 #define ENET_MMC_INTR_RX_RXUCGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXUCGFIS_MASK) >> ENET_MMC_INTR_RX_RXUCGFIS_SHIFT)
1799 
1800 /*
1801  * RX1024TMAXOCTGBFIS (RW)
1802  *
1803  * MMC Receive 1024 to Maximum Octet Good Bad Frame Counter Interrupt Status.
1804  * This bit is set when the rx1024tomaxoctets_gb counter reaches half of the maximum value or the maximum value.
1805  */
1806 #define ENET_MMC_INTR_RX_RX1024TMAXOCTGBFIS_MASK (0x10000UL)
1807 #define ENET_MMC_INTR_RX_RX1024TMAXOCTGBFIS_SHIFT (16U)
1808 #define ENET_MMC_INTR_RX_RX1024TMAXOCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RX1024TMAXOCTGBFIS_SHIFT) & ENET_MMC_INTR_RX_RX1024TMAXOCTGBFIS_MASK)
1809 #define ENET_MMC_INTR_RX_RX1024TMAXOCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RX1024TMAXOCTGBFIS_MASK) >> ENET_MMC_INTR_RX_RX1024TMAXOCTGBFIS_SHIFT)
1810 
1811 /*
1812  * RX512T1023OCTGBFIS (RW)
1813  *
1814  * MMC Receive 512 to 1023 Octet Good Bad Frame Counter Interrupt Status
1815  * This bit is set when the rx512to1023octets_gb counter reaches half of the maximum value or the maximum value.
1816  */
1817 #define ENET_MMC_INTR_RX_RX512T1023OCTGBFIS_MASK (0x8000U)
1818 #define ENET_MMC_INTR_RX_RX512T1023OCTGBFIS_SHIFT (15U)
1819 #define ENET_MMC_INTR_RX_RX512T1023OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RX512T1023OCTGBFIS_SHIFT) & ENET_MMC_INTR_RX_RX512T1023OCTGBFIS_MASK)
1820 #define ENET_MMC_INTR_RX_RX512T1023OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RX512T1023OCTGBFIS_MASK) >> ENET_MMC_INTR_RX_RX512T1023OCTGBFIS_SHIFT)
1821 
1822 /*
1823  * RX256T511OCTGBFIS (RW)
1824  *
1825  * MMC Receive 256 to 511 Octet Good Bad Frame Counter Interrupt Status
1826  * This bit is set when the rx256to511octets_gb counter reaches half of the maximum value or the maximum value.
1827  */
1828 #define ENET_MMC_INTR_RX_RX256T511OCTGBFIS_MASK (0x4000U)
1829 #define ENET_MMC_INTR_RX_RX256T511OCTGBFIS_SHIFT (14U)
1830 #define ENET_MMC_INTR_RX_RX256T511OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RX256T511OCTGBFIS_SHIFT) & ENET_MMC_INTR_RX_RX256T511OCTGBFIS_MASK)
1831 #define ENET_MMC_INTR_RX_RX256T511OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RX256T511OCTGBFIS_MASK) >> ENET_MMC_INTR_RX_RX256T511OCTGBFIS_SHIFT)
1832 
1833 /*
1834  * RX128T255OCTGBFIS (RW)
1835  *
1836  * MMC Receive 128 to 255 Octet Good Bad Frame Counter Interrupt Status
1837  * This bit is set when the rx128to255octets_gb counter reaches half of the maximum value or the maximum value.
1838  */
1839 #define ENET_MMC_INTR_RX_RX128T255OCTGBFIS_MASK (0x2000U)
1840 #define ENET_MMC_INTR_RX_RX128T255OCTGBFIS_SHIFT (13U)
1841 #define ENET_MMC_INTR_RX_RX128T255OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RX128T255OCTGBFIS_SHIFT) & ENET_MMC_INTR_RX_RX128T255OCTGBFIS_MASK)
1842 #define ENET_MMC_INTR_RX_RX128T255OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RX128T255OCTGBFIS_MASK) >> ENET_MMC_INTR_RX_RX128T255OCTGBFIS_SHIFT)
1843 
1844 /*
1845  * RX65T127OCTGBFIS (RW)
1846  *
1847  * MMC Receive 65 to 127 Octet Good Bad Frame Counter Interrupt Status
1848  * This bit is set when the rx65to127octets_gb counter reaches half of the maximum value or the maximum value.
1849  */
1850 #define ENET_MMC_INTR_RX_RX65T127OCTGBFIS_MASK (0x1000U)
1851 #define ENET_MMC_INTR_RX_RX65T127OCTGBFIS_SHIFT (12U)
1852 #define ENET_MMC_INTR_RX_RX65T127OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RX65T127OCTGBFIS_SHIFT) & ENET_MMC_INTR_RX_RX65T127OCTGBFIS_MASK)
1853 #define ENET_MMC_INTR_RX_RX65T127OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RX65T127OCTGBFIS_MASK) >> ENET_MMC_INTR_RX_RX65T127OCTGBFIS_SHIFT)
1854 
1855 /*
1856  * RX64OCTGBFIS (RW)
1857  *
1858  * MMC Receive 64 Octet Good Bad Frame Counter Interrupt Status
1859  * This bit is set when the rx64octets_gb counter reaches half of the maximum value or the maximum value.
1860  */
1861 #define ENET_MMC_INTR_RX_RX64OCTGBFIS_MASK (0x800U)
1862 #define ENET_MMC_INTR_RX_RX64OCTGBFIS_SHIFT (11U)
1863 #define ENET_MMC_INTR_RX_RX64OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RX64OCTGBFIS_SHIFT) & ENET_MMC_INTR_RX_RX64OCTGBFIS_MASK)
1864 #define ENET_MMC_INTR_RX_RX64OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RX64OCTGBFIS_MASK) >> ENET_MMC_INTR_RX_RX64OCTGBFIS_SHIFT)
1865 
1866 /*
1867  * RXOSIZEGFIS (RW)
1868  *
1869  * MMC Receive Oversize Good Frame Counter Interrupt Status
1870  * This bit is set when the rxoversize_g counter reaches half of the maximum value or the maximum value.
1871  */
1872 #define ENET_MMC_INTR_RX_RXOSIZEGFIS_MASK (0x400U)
1873 #define ENET_MMC_INTR_RX_RXOSIZEGFIS_SHIFT (10U)
1874 #define ENET_MMC_INTR_RX_RXOSIZEGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXOSIZEGFIS_SHIFT) & ENET_MMC_INTR_RX_RXOSIZEGFIS_MASK)
1875 #define ENET_MMC_INTR_RX_RXOSIZEGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXOSIZEGFIS_MASK) >> ENET_MMC_INTR_RX_RXOSIZEGFIS_SHIFT)
1876 
1877 /*
1878  * RXUSIZEGFIS (RW)
1879  *
1880  * MMC Receive Undersize Good Frame Counter Interrupt Status
1881  * This bit is set when the rxundersize_g counter reaches half of the maximum value or the maximum value.
1882  */
1883 #define ENET_MMC_INTR_RX_RXUSIZEGFIS_MASK (0x200U)
1884 #define ENET_MMC_INTR_RX_RXUSIZEGFIS_SHIFT (9U)
1885 #define ENET_MMC_INTR_RX_RXUSIZEGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXUSIZEGFIS_SHIFT) & ENET_MMC_INTR_RX_RXUSIZEGFIS_MASK)
1886 #define ENET_MMC_INTR_RX_RXUSIZEGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXUSIZEGFIS_MASK) >> ENET_MMC_INTR_RX_RXUSIZEGFIS_SHIFT)
1887 
1888 /*
1889  * RXJABERFIS (RW)
1890  *
1891  * MMC Receive Jabber Error Frame Counter Interrupt Status
1892  * This bit is set when the rxjabbererror counter reaches half of the maximum value or the maximum value.
1893  */
1894 #define ENET_MMC_INTR_RX_RXJABERFIS_MASK (0x100U)
1895 #define ENET_MMC_INTR_RX_RXJABERFIS_SHIFT (8U)
1896 #define ENET_MMC_INTR_RX_RXJABERFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXJABERFIS_SHIFT) & ENET_MMC_INTR_RX_RXJABERFIS_MASK)
1897 #define ENET_MMC_INTR_RX_RXJABERFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXJABERFIS_MASK) >> ENET_MMC_INTR_RX_RXJABERFIS_SHIFT)
1898 
1899 /*
1900  * RXRUNTFIS (RW)
1901  *
1902  * MMC Receive Runt Frame Counter Interrupt Status
1903  * This bit is set when the rxrunterror counter reaches half of the maximum value or the maximum value.
1904  */
1905 #define ENET_MMC_INTR_RX_RXRUNTFIS_MASK (0x80U)
1906 #define ENET_MMC_INTR_RX_RXRUNTFIS_SHIFT (7U)
1907 #define ENET_MMC_INTR_RX_RXRUNTFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXRUNTFIS_SHIFT) & ENET_MMC_INTR_RX_RXRUNTFIS_MASK)
1908 #define ENET_MMC_INTR_RX_RXRUNTFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXRUNTFIS_MASK) >> ENET_MMC_INTR_RX_RXRUNTFIS_SHIFT)
1909 
1910 /*
1911  * RXALGNERFIS (RW)
1912  *
1913  * MMC Receive Alignment Error Frame Counter Interrupt Status
1914  * This bit is set when the rxalignmenterror counter reaches half of the maximum value or the maximum value.
1915  */
1916 #define ENET_MMC_INTR_RX_RXALGNERFIS_MASK (0x40U)
1917 #define ENET_MMC_INTR_RX_RXALGNERFIS_SHIFT (6U)
1918 #define ENET_MMC_INTR_RX_RXALGNERFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXALGNERFIS_SHIFT) & ENET_MMC_INTR_RX_RXALGNERFIS_MASK)
1919 #define ENET_MMC_INTR_RX_RXALGNERFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXALGNERFIS_MASK) >> ENET_MMC_INTR_RX_RXALGNERFIS_SHIFT)
1920 
1921 /*
1922  * RXCRCERFIS (RW)
1923  *
1924  * MMC Receive CRC Error Frame Counter Interrupt Status
1925  * This bit is set when the rxcrcerror counter reaches half of the maximum value or the maximum value.
1926  */
1927 #define ENET_MMC_INTR_RX_RXCRCERFIS_MASK (0x20U)
1928 #define ENET_MMC_INTR_RX_RXCRCERFIS_SHIFT (5U)
1929 #define ENET_MMC_INTR_RX_RXCRCERFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXCRCERFIS_SHIFT) & ENET_MMC_INTR_RX_RXCRCERFIS_MASK)
1930 #define ENET_MMC_INTR_RX_RXCRCERFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXCRCERFIS_MASK) >> ENET_MMC_INTR_RX_RXCRCERFIS_SHIFT)
1931 
1932 /*
1933  * RXMCGFIS (RW)
1934  *
1935  * MMC Receive Multicast Good Frame Counter Interrupt Status
1936  * This bit is set when the rxmulticastframes_g counter reaches half of the maximum value or the maximum value.
1937  */
1938 #define ENET_MMC_INTR_RX_RXMCGFIS_MASK (0x10U)
1939 #define ENET_MMC_INTR_RX_RXMCGFIS_SHIFT (4U)
1940 #define ENET_MMC_INTR_RX_RXMCGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXMCGFIS_SHIFT) & ENET_MMC_INTR_RX_RXMCGFIS_MASK)
1941 #define ENET_MMC_INTR_RX_RXMCGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXMCGFIS_MASK) >> ENET_MMC_INTR_RX_RXMCGFIS_SHIFT)
1942 
1943 /*
1944  * RXBCGFIS (RW)
1945  *
1946  * MMC Receive Broadcast Good Frame Counter Interrupt Status
1947  * This bit is set when the rxbroadcastframes_g counter reaches half of the maximum value or the maximum value.
1948  */
1949 #define ENET_MMC_INTR_RX_RXBCGFIS_MASK (0x8U)
1950 #define ENET_MMC_INTR_RX_RXBCGFIS_SHIFT (3U)
1951 #define ENET_MMC_INTR_RX_RXBCGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXBCGFIS_SHIFT) & ENET_MMC_INTR_RX_RXBCGFIS_MASK)
1952 #define ENET_MMC_INTR_RX_RXBCGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXBCGFIS_MASK) >> ENET_MMC_INTR_RX_RXBCGFIS_SHIFT)
1953 
1954 /*
1955  * RXGOCTIS (RW)
1956  *
1957  * MMC Receive Good Octet Counter Interrupt Status
1958  * This bit is set when the rxoctetcount_g counter reaches half of the maximum value or the maximum value.
1959  */
1960 #define ENET_MMC_INTR_RX_RXGOCTIS_MASK (0x4U)
1961 #define ENET_MMC_INTR_RX_RXGOCTIS_SHIFT (2U)
1962 #define ENET_MMC_INTR_RX_RXGOCTIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXGOCTIS_SHIFT) & ENET_MMC_INTR_RX_RXGOCTIS_MASK)
1963 #define ENET_MMC_INTR_RX_RXGOCTIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXGOCTIS_MASK) >> ENET_MMC_INTR_RX_RXGOCTIS_SHIFT)
1964 
1965 /*
1966  * RXGBOCTIS (RW)
1967  *
1968  * MMC Receive Good Bad Octet Counter Interrupt Status
1969  * This bit is set when the rxoctetcount_gb counter reaches half of the maximum value or the maximum value.
1970  */
1971 #define ENET_MMC_INTR_RX_RXGBOCTIS_MASK (0x2U)
1972 #define ENET_MMC_INTR_RX_RXGBOCTIS_SHIFT (1U)
1973 #define ENET_MMC_INTR_RX_RXGBOCTIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXGBOCTIS_SHIFT) & ENET_MMC_INTR_RX_RXGBOCTIS_MASK)
1974 #define ENET_MMC_INTR_RX_RXGBOCTIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXGBOCTIS_MASK) >> ENET_MMC_INTR_RX_RXGBOCTIS_SHIFT)
1975 
1976 /*
1977  * RXGBFRMIS (RW)
1978  *
1979  * MMC Receive Good Bad Frame Counter Interrupt Status
1980  * This bit is set when the rxframecount_gb counter reaches half of the maximum value or the maximum value.
1981  */
1982 #define ENET_MMC_INTR_RX_RXGBFRMIS_MASK (0x1U)
1983 #define ENET_MMC_INTR_RX_RXGBFRMIS_SHIFT (0U)
1984 #define ENET_MMC_INTR_RX_RXGBFRMIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_RX_RXGBFRMIS_SHIFT) & ENET_MMC_INTR_RX_RXGBFRMIS_MASK)
1985 #define ENET_MMC_INTR_RX_RXGBFRMIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_RX_RXGBFRMIS_MASK) >> ENET_MMC_INTR_RX_RXGBFRMIS_SHIFT)
1986 
1987 /* Bitfield definition for register: MMC_INTR_TX */
1988 /*
1989  * TXOSIZEGFIS (RW)
1990  *
1991  * MMC Transmit Oversize Good Frame Counter Interrupt Status
1992  * This bit is set when the txoversize_g counter reaches half of the maximum value or the maximum value.
1993  */
1994 #define ENET_MMC_INTR_TX_TXOSIZEGFIS_MASK (0x2000000UL)
1995 #define ENET_MMC_INTR_TX_TXOSIZEGFIS_SHIFT (25U)
1996 #define ENET_MMC_INTR_TX_TXOSIZEGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXOSIZEGFIS_SHIFT) & ENET_MMC_INTR_TX_TXOSIZEGFIS_MASK)
1997 #define ENET_MMC_INTR_TX_TXOSIZEGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXOSIZEGFIS_MASK) >> ENET_MMC_INTR_TX_TXOSIZEGFIS_SHIFT)
1998 
1999 /*
2000  * TXVLANGFIS (RW)
2001  *
2002  * MMC Transmit VLAN Good Frame Counter Interrupt Status
2003  * This bit is set when the txvlanframes_g counter reaches half of the maximum value or the maximum value.
2004  */
2005 #define ENET_MMC_INTR_TX_TXVLANGFIS_MASK (0x1000000UL)
2006 #define ENET_MMC_INTR_TX_TXVLANGFIS_SHIFT (24U)
2007 #define ENET_MMC_INTR_TX_TXVLANGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXVLANGFIS_SHIFT) & ENET_MMC_INTR_TX_TXVLANGFIS_MASK)
2008 #define ENET_MMC_INTR_TX_TXVLANGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXVLANGFIS_MASK) >> ENET_MMC_INTR_TX_TXVLANGFIS_SHIFT)
2009 
2010 /*
2011  * TXPAUSFIS (RW)
2012  *
2013  * MMC Transmit Pause Frame Counter Interrupt Status
2014  * This bit is set when the txpauseframeserror counter reaches half of the maximum value or the maximum value.
2015  */
2016 #define ENET_MMC_INTR_TX_TXPAUSFIS_MASK (0x800000UL)
2017 #define ENET_MMC_INTR_TX_TXPAUSFIS_SHIFT (23U)
2018 #define ENET_MMC_INTR_TX_TXPAUSFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXPAUSFIS_SHIFT) & ENET_MMC_INTR_TX_TXPAUSFIS_MASK)
2019 #define ENET_MMC_INTR_TX_TXPAUSFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXPAUSFIS_MASK) >> ENET_MMC_INTR_TX_TXPAUSFIS_SHIFT)
2020 
2021 /*
2022  * TXEXDEFFIS (RW)
2023  *
2024  * MMC Transmit Excessive Deferral Frame Counter Interrupt Status
2025  * This bit is set when the txexcessdef counter reaches half of the maximum value or the maximum value.
2026  */
2027 #define ENET_MMC_INTR_TX_TXEXDEFFIS_MASK (0x400000UL)
2028 #define ENET_MMC_INTR_TX_TXEXDEFFIS_SHIFT (22U)
2029 #define ENET_MMC_INTR_TX_TXEXDEFFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXEXDEFFIS_SHIFT) & ENET_MMC_INTR_TX_TXEXDEFFIS_MASK)
2030 #define ENET_MMC_INTR_TX_TXEXDEFFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXEXDEFFIS_MASK) >> ENET_MMC_INTR_TX_TXEXDEFFIS_SHIFT)
2031 
2032 /*
2033  * TXGFRMIS (RW)
2034  *
2035  * MMC Transmit Good Frame Counter Interrupt Status
2036  * This bit is set when the txframecount_g counter reaches half of the maximum value or the maximum value.
2037  */
2038 #define ENET_MMC_INTR_TX_TXGFRMIS_MASK (0x200000UL)
2039 #define ENET_MMC_INTR_TX_TXGFRMIS_SHIFT (21U)
2040 #define ENET_MMC_INTR_TX_TXGFRMIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXGFRMIS_SHIFT) & ENET_MMC_INTR_TX_TXGFRMIS_MASK)
2041 #define ENET_MMC_INTR_TX_TXGFRMIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXGFRMIS_MASK) >> ENET_MMC_INTR_TX_TXGFRMIS_SHIFT)
2042 
2043 /*
2044  * TXGOCTIS (RW)
2045  *
2046  * MMC Transmit Good Octet Counter Interrupt Status
2047  * This bit is set when the txoctetcount_g counter reaches half of the maximum value or the maximum value.
2048  */
2049 #define ENET_MMC_INTR_TX_TXGOCTIS_MASK (0x100000UL)
2050 #define ENET_MMC_INTR_TX_TXGOCTIS_SHIFT (20U)
2051 #define ENET_MMC_INTR_TX_TXGOCTIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXGOCTIS_SHIFT) & ENET_MMC_INTR_TX_TXGOCTIS_MASK)
2052 #define ENET_MMC_INTR_TX_TXGOCTIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXGOCTIS_MASK) >> ENET_MMC_INTR_TX_TXGOCTIS_SHIFT)
2053 
2054 /*
2055  * TXCARERFIS (RW)
2056  *
2057  * MMC Transmit Carrier Error Frame Counter Interrupt Status
2058  * This bit is set when the txcarriererror counter reaches half of the maximum value or the maximum value.
2059  */
2060 #define ENET_MMC_INTR_TX_TXCARERFIS_MASK (0x80000UL)
2061 #define ENET_MMC_INTR_TX_TXCARERFIS_SHIFT (19U)
2062 #define ENET_MMC_INTR_TX_TXCARERFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXCARERFIS_SHIFT) & ENET_MMC_INTR_TX_TXCARERFIS_MASK)
2063 #define ENET_MMC_INTR_TX_TXCARERFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXCARERFIS_MASK) >> ENET_MMC_INTR_TX_TXCARERFIS_SHIFT)
2064 
2065 /*
2066  * TXEXCOLFIS (RW)
2067  *
2068  * MMC Transmit Excessive Collision Frame Counter Interrupt Status
2069  * This bit is set when the txexesscol counter reaches half of the maximum value or the maximum value.
2070  */
2071 #define ENET_MMC_INTR_TX_TXEXCOLFIS_MASK (0x40000UL)
2072 #define ENET_MMC_INTR_TX_TXEXCOLFIS_SHIFT (18U)
2073 #define ENET_MMC_INTR_TX_TXEXCOLFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXEXCOLFIS_SHIFT) & ENET_MMC_INTR_TX_TXEXCOLFIS_MASK)
2074 #define ENET_MMC_INTR_TX_TXEXCOLFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXEXCOLFIS_MASK) >> ENET_MMC_INTR_TX_TXEXCOLFIS_SHIFT)
2075 
2076 /*
2077  * TXLATCOLFIS (RW)
2078  *
2079  * MMC Transmit Late Collision Frame Counter Interrupt Status
2080  * This bit is set when the txlatecol counter reaches half of the maximum value or the maximum value.
2081  */
2082 #define ENET_MMC_INTR_TX_TXLATCOLFIS_MASK (0x20000UL)
2083 #define ENET_MMC_INTR_TX_TXLATCOLFIS_SHIFT (17U)
2084 #define ENET_MMC_INTR_TX_TXLATCOLFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXLATCOLFIS_SHIFT) & ENET_MMC_INTR_TX_TXLATCOLFIS_MASK)
2085 #define ENET_MMC_INTR_TX_TXLATCOLFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXLATCOLFIS_MASK) >> ENET_MMC_INTR_TX_TXLATCOLFIS_SHIFT)
2086 
2087 /*
2088  * TXDEFFIS (RW)
2089  *
2090  * MMC Transmit Deferred Frame Counter Interrupt Status
2091  * This bit is set when the txdeferred counter reaches half of the maximum value or the maximum value.
2092  */
2093 #define ENET_MMC_INTR_TX_TXDEFFIS_MASK (0x10000UL)
2094 #define ENET_MMC_INTR_TX_TXDEFFIS_SHIFT (16U)
2095 #define ENET_MMC_INTR_TX_TXDEFFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXDEFFIS_SHIFT) & ENET_MMC_INTR_TX_TXDEFFIS_MASK)
2096 #define ENET_MMC_INTR_TX_TXDEFFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXDEFFIS_MASK) >> ENET_MMC_INTR_TX_TXDEFFIS_SHIFT)
2097 
2098 /*
2099  * TXMCOLGFIS (RW)
2100  *
2101  * MMC Transmit Multiple Collision Good Frame Counter Interrupt Status
2102  * This bit is set when the txmulticol_g counter reaches half of the maximum value or the maximum value.
2103  */
2104 #define ENET_MMC_INTR_TX_TXMCOLGFIS_MASK (0x8000U)
2105 #define ENET_MMC_INTR_TX_TXMCOLGFIS_SHIFT (15U)
2106 #define ENET_MMC_INTR_TX_TXMCOLGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXMCOLGFIS_SHIFT) & ENET_MMC_INTR_TX_TXMCOLGFIS_MASK)
2107 #define ENET_MMC_INTR_TX_TXMCOLGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXMCOLGFIS_MASK) >> ENET_MMC_INTR_TX_TXMCOLGFIS_SHIFT)
2108 
2109 /*
2110  * TXSCOLGFIS (RW)
2111  *
2112  * MMC Transmit Single Collision Good Frame Counter Interrupt Status
2113  * This bit is set when the txsinglecol_g counter reaches half of the maximum value or the maximum value.
2114  */
2115 #define ENET_MMC_INTR_TX_TXSCOLGFIS_MASK (0x4000U)
2116 #define ENET_MMC_INTR_TX_TXSCOLGFIS_SHIFT (14U)
2117 #define ENET_MMC_INTR_TX_TXSCOLGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXSCOLGFIS_SHIFT) & ENET_MMC_INTR_TX_TXSCOLGFIS_MASK)
2118 #define ENET_MMC_INTR_TX_TXSCOLGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXSCOLGFIS_MASK) >> ENET_MMC_INTR_TX_TXSCOLGFIS_SHIFT)
2119 
2120 /*
2121  * TXUFLOWERFIS (RW)
2122  *
2123  * MMC Transmit Underflow Error Frame Counter Interrupt Status
2124  * This bit is set when the txunderflowerror counter reaches half of the maximum value or the maximum value.
2125  */
2126 #define ENET_MMC_INTR_TX_TXUFLOWERFIS_MASK (0x2000U)
2127 #define ENET_MMC_INTR_TX_TXUFLOWERFIS_SHIFT (13U)
2128 #define ENET_MMC_INTR_TX_TXUFLOWERFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXUFLOWERFIS_SHIFT) & ENET_MMC_INTR_TX_TXUFLOWERFIS_MASK)
2129 #define ENET_MMC_INTR_TX_TXUFLOWERFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXUFLOWERFIS_MASK) >> ENET_MMC_INTR_TX_TXUFLOWERFIS_SHIFT)
2130 
2131 /*
2132  * TXBCGBFIS (RW)
2133  *
2134  * MMC Transmit Broadcast Good Bad Frame Counter Interrupt Status
2135  * This bit is set when the txbroadcastframes_gb counter reaches half of the maximum value or the maximum value.
2136  */
2137 #define ENET_MMC_INTR_TX_TXBCGBFIS_MASK (0x1000U)
2138 #define ENET_MMC_INTR_TX_TXBCGBFIS_SHIFT (12U)
2139 #define ENET_MMC_INTR_TX_TXBCGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXBCGBFIS_SHIFT) & ENET_MMC_INTR_TX_TXBCGBFIS_MASK)
2140 #define ENET_MMC_INTR_TX_TXBCGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXBCGBFIS_MASK) >> ENET_MMC_INTR_TX_TXBCGBFIS_SHIFT)
2141 
2142 /*
2143  * TXMCGBFIS (RW)
2144  *
2145  * MMC Transmit Multicast Good Bad Frame Counter Interrupt Status
2146  * The bit is set when the txmulticastframes_gb counter reaches half of the maximum value or the maximum value.
2147  */
2148 #define ENET_MMC_INTR_TX_TXMCGBFIS_MASK (0x800U)
2149 #define ENET_MMC_INTR_TX_TXMCGBFIS_SHIFT (11U)
2150 #define ENET_MMC_INTR_TX_TXMCGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXMCGBFIS_SHIFT) & ENET_MMC_INTR_TX_TXMCGBFIS_MASK)
2151 #define ENET_MMC_INTR_TX_TXMCGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXMCGBFIS_MASK) >> ENET_MMC_INTR_TX_TXMCGBFIS_SHIFT)
2152 
2153 /*
2154  * TXUCGBFIS (RW)
2155  *
2156  * MMC Transmit Unicast Good Bad Frame Counter Interrupt Status
2157  * This bit is set when the txunicastframes_gb counter reaches half of the maximum value or the maximum value.
2158  */
2159 #define ENET_MMC_INTR_TX_TXUCGBFIS_MASK (0x400U)
2160 #define ENET_MMC_INTR_TX_TXUCGBFIS_SHIFT (10U)
2161 #define ENET_MMC_INTR_TX_TXUCGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXUCGBFIS_SHIFT) & ENET_MMC_INTR_TX_TXUCGBFIS_MASK)
2162 #define ENET_MMC_INTR_TX_TXUCGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXUCGBFIS_MASK) >> ENET_MMC_INTR_TX_TXUCGBFIS_SHIFT)
2163 
2164 /*
2165  * TX1024TMAXOCTGBFIS (RW)
2166  *
2167  * MMC Transmit 1024 to Maximum Octet Good Bad Frame Counter Interrupt Status
2168  * This bit is set when the tx1024tomaxoctets_gb counter reaches half of the maximum value or the maximum value.
2169  */
2170 #define ENET_MMC_INTR_TX_TX1024TMAXOCTGBFIS_MASK (0x200U)
2171 #define ENET_MMC_INTR_TX_TX1024TMAXOCTGBFIS_SHIFT (9U)
2172 #define ENET_MMC_INTR_TX_TX1024TMAXOCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TX1024TMAXOCTGBFIS_SHIFT) & ENET_MMC_INTR_TX_TX1024TMAXOCTGBFIS_MASK)
2173 #define ENET_MMC_INTR_TX_TX1024TMAXOCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TX1024TMAXOCTGBFIS_MASK) >> ENET_MMC_INTR_TX_TX1024TMAXOCTGBFIS_SHIFT)
2174 
2175 /*
2176  * TX512T1023OCTGBFIS (RW)
2177  *
2178  * MMC Transmit 512 to 1023 Octet Good Bad Frame Counter Interrupt Status
2179  * This bit is set when the tx512to1023octets_gb counter reaches half of the maximum value or the maximum value.
2180  */
2181 #define ENET_MMC_INTR_TX_TX512T1023OCTGBFIS_MASK (0x100U)
2182 #define ENET_MMC_INTR_TX_TX512T1023OCTGBFIS_SHIFT (8U)
2183 #define ENET_MMC_INTR_TX_TX512T1023OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TX512T1023OCTGBFIS_SHIFT) & ENET_MMC_INTR_TX_TX512T1023OCTGBFIS_MASK)
2184 #define ENET_MMC_INTR_TX_TX512T1023OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TX512T1023OCTGBFIS_MASK) >> ENET_MMC_INTR_TX_TX512T1023OCTGBFIS_SHIFT)
2185 
2186 /*
2187  * TX256T511OCTGBFIS (RW)
2188  *
2189  * MMC Transmit 256 to 511 Octet Good Bad Frame Counter Interrupt Status
2190  * This bit is set when the tx256to511octets_gb counter reaches half of the maximum value or the maximum value.
2191  */
2192 #define ENET_MMC_INTR_TX_TX256T511OCTGBFIS_MASK (0x80U)
2193 #define ENET_MMC_INTR_TX_TX256T511OCTGBFIS_SHIFT (7U)
2194 #define ENET_MMC_INTR_TX_TX256T511OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TX256T511OCTGBFIS_SHIFT) & ENET_MMC_INTR_TX_TX256T511OCTGBFIS_MASK)
2195 #define ENET_MMC_INTR_TX_TX256T511OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TX256T511OCTGBFIS_MASK) >> ENET_MMC_INTR_TX_TX256T511OCTGBFIS_SHIFT)
2196 
2197 /*
2198  * TX128T255OCTGBFIS (RW)
2199  *
2200  * MMC Transmit 128 to 255 Octet Good Bad Frame Counter Interrupt Status
2201  * This bit is set when the tx128to255octets_gb counter reaches half of the maximum value or the maximum value.
2202  */
2203 #define ENET_MMC_INTR_TX_TX128T255OCTGBFIS_MASK (0x40U)
2204 #define ENET_MMC_INTR_TX_TX128T255OCTGBFIS_SHIFT (6U)
2205 #define ENET_MMC_INTR_TX_TX128T255OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TX128T255OCTGBFIS_SHIFT) & ENET_MMC_INTR_TX_TX128T255OCTGBFIS_MASK)
2206 #define ENET_MMC_INTR_TX_TX128T255OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TX128T255OCTGBFIS_MASK) >> ENET_MMC_INTR_TX_TX128T255OCTGBFIS_SHIFT)
2207 
2208 /*
2209  * TX65T127OCTGBFIS (RW)
2210  *
2211  * MMC Transmit 65 to 127 Octet Good Bad Frame Counter Interrupt Status
2212  * This bit is set when the tx65to127octets_gb counter reaches half the maximum value, and also when it reaches the maximum value.
2213  */
2214 #define ENET_MMC_INTR_TX_TX65T127OCTGBFIS_MASK (0x20U)
2215 #define ENET_MMC_INTR_TX_TX65T127OCTGBFIS_SHIFT (5U)
2216 #define ENET_MMC_INTR_TX_TX65T127OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TX65T127OCTGBFIS_SHIFT) & ENET_MMC_INTR_TX_TX65T127OCTGBFIS_MASK)
2217 #define ENET_MMC_INTR_TX_TX65T127OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TX65T127OCTGBFIS_MASK) >> ENET_MMC_INTR_TX_TX65T127OCTGBFIS_SHIFT)
2218 
2219 /*
2220  * TX64OCTGBFIS (RW)
2221  *
2222  * MMC Transmit 64 Octet Good Bad Frame Counter Interrupt Status
2223  * This bit is set when the tx64octets_gb counter reaches half of the maximum value or the maximum value.
2224  */
2225 #define ENET_MMC_INTR_TX_TX64OCTGBFIS_MASK (0x10U)
2226 #define ENET_MMC_INTR_TX_TX64OCTGBFIS_SHIFT (4U)
2227 #define ENET_MMC_INTR_TX_TX64OCTGBFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TX64OCTGBFIS_SHIFT) & ENET_MMC_INTR_TX_TX64OCTGBFIS_MASK)
2228 #define ENET_MMC_INTR_TX_TX64OCTGBFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TX64OCTGBFIS_MASK) >> ENET_MMC_INTR_TX_TX64OCTGBFIS_SHIFT)
2229 
2230 /*
2231  * TXMCGFIS (RW)
2232  *
2233  * MMC Transmit Multicast Good Frame Counter Interrupt Status
2234  * This bit is set when the txmulticastframes_g counter reaches half of the maximum value or the maximum value.
2235  */
2236 #define ENET_MMC_INTR_TX_TXMCGFIS_MASK (0x8U)
2237 #define ENET_MMC_INTR_TX_TXMCGFIS_SHIFT (3U)
2238 #define ENET_MMC_INTR_TX_TXMCGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXMCGFIS_SHIFT) & ENET_MMC_INTR_TX_TXMCGFIS_MASK)
2239 #define ENET_MMC_INTR_TX_TXMCGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXMCGFIS_MASK) >> ENET_MMC_INTR_TX_TXMCGFIS_SHIFT)
2240 
2241 /*
2242  * TXBCGFIS (RW)
2243  *
2244  * MMC Transmit Broadcast Good Frame Counter Interrupt Status
2245  * This bit is set when the txbroadcastframes_g counter reaches half of the maximum value or the maximum value.
2246  */
2247 #define ENET_MMC_INTR_TX_TXBCGFIS_MASK (0x4U)
2248 #define ENET_MMC_INTR_TX_TXBCGFIS_SHIFT (2U)
2249 #define ENET_MMC_INTR_TX_TXBCGFIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXBCGFIS_SHIFT) & ENET_MMC_INTR_TX_TXBCGFIS_MASK)
2250 #define ENET_MMC_INTR_TX_TXBCGFIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXBCGFIS_MASK) >> ENET_MMC_INTR_TX_TXBCGFIS_SHIFT)
2251 
2252 /*
2253  * TXGBFRMIS (RW)
2254  *
2255  * MMC Transmit Good Bad Frame Counter Interrupt Status
2256  * This bit is set when the txframecount_gb counter reaches half of the maximum value or the maximum value.
2257  */
2258 #define ENET_MMC_INTR_TX_TXGBFRMIS_MASK (0x2U)
2259 #define ENET_MMC_INTR_TX_TXGBFRMIS_SHIFT (1U)
2260 #define ENET_MMC_INTR_TX_TXGBFRMIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXGBFRMIS_SHIFT) & ENET_MMC_INTR_TX_TXGBFRMIS_MASK)
2261 #define ENET_MMC_INTR_TX_TXGBFRMIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXGBFRMIS_MASK) >> ENET_MMC_INTR_TX_TXGBFRMIS_SHIFT)
2262 
2263 /*
2264  * TXGBOCTIS (RW)
2265  *
2266  * MMC Transmit Good Bad Octet Counter Interrupt Status
2267  * This bit is set when the txoctetcount_gb counter reaches half of the maximum value or the maximum value.
2268  */
2269 #define ENET_MMC_INTR_TX_TXGBOCTIS_MASK (0x1U)
2270 #define ENET_MMC_INTR_TX_TXGBOCTIS_SHIFT (0U)
2271 #define ENET_MMC_INTR_TX_TXGBOCTIS_SET(x) (((uint32_t)(x) << ENET_MMC_INTR_TX_TXGBOCTIS_SHIFT) & ENET_MMC_INTR_TX_TXGBOCTIS_MASK)
2272 #define ENET_MMC_INTR_TX_TXGBOCTIS_GET(x) (((uint32_t)(x) & ENET_MMC_INTR_TX_TXGBOCTIS_MASK) >> ENET_MMC_INTR_TX_TXGBOCTIS_SHIFT)
2273 
2274 /* Bitfield definition for register: MMC_INTR_MASK_RX */
2275 /*
2276  * RXCTRLFIM (RW)
2277  *
2278  * MMC Receive Control Frame Counter Interrupt Mask
2279  * Setting this bit masks the interrupt when the rxctrlframes_g counter reaches half of the maximum value or the maximum value.
2280  */
2281 #define ENET_MMC_INTR_MASK_RX_RXCTRLFIM_MASK (0x2000000UL)
2282 #define ENET_MMC_INTR_MASK_RX_RXCTRLFIM_SHIFT (25U)
2283 #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)
2284 #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)
2285 
2286 /*
2287  * RXRCVERRFIM (RW)
2288  *
2289  * MMC Receive Error Frame Counter Interrupt Mask
2290  * Setting this bit masks the interrupt when the rxrcverror counter reaches half of the maximum value or the maximum value.
2291  */
2292 #define ENET_MMC_INTR_MASK_RX_RXRCVERRFIM_MASK (0x1000000UL)
2293 #define ENET_MMC_INTR_MASK_RX_RXRCVERRFIM_SHIFT (24U)
2294 #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)
2295 #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)
2296 
2297 /*
2298  * RXWDOGFIM (RW)
2299  *
2300  * MMC Receive Watchdog Error Frame Counter Interrupt Mask
2301  * Setting this bit masks the interrupt when the rxwatchdog counter reaches half of the maximum value or the maximum value.
2302  */
2303 #define ENET_MMC_INTR_MASK_RX_RXWDOGFIM_MASK (0x800000UL)
2304 #define ENET_MMC_INTR_MASK_RX_RXWDOGFIM_SHIFT (23U)
2305 #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)
2306 #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)
2307 
2308 /*
2309  * RXVLANGBFIM (RW)
2310  *
2311  * MMC Receive VLAN Good Bad Frame Counter Interrupt Mask
2312  * Setting this bit masks the interrupt when the rxvlanframes_gb counter reaches half of the maximum value or the maximum value.
2313  */
2314 #define ENET_MMC_INTR_MASK_RX_RXVLANGBFIM_MASK (0x400000UL)
2315 #define ENET_MMC_INTR_MASK_RX_RXVLANGBFIM_SHIFT (22U)
2316 #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)
2317 #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)
2318 
2319 /*
2320  * RXFOVFIM (RW)
2321  *
2322  * MMC Receive FIFO Overflow Frame Counter Interrupt Mask
2323  * Setting this bit masks the interrupt when the rxfifooverflow counter reaches half of the maximum value or the maximum value.
2324  */
2325 #define ENET_MMC_INTR_MASK_RX_RXFOVFIM_MASK (0x200000UL)
2326 #define ENET_MMC_INTR_MASK_RX_RXFOVFIM_SHIFT (21U)
2327 #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)
2328 #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)
2329 
2330 /*
2331  * RXPAUSFIM (RW)
2332  *
2333  * MMC Receive Pause Frame Counter Interrupt Mask
2334  * Setting this bit masks the interrupt when the rxpauseframes counter reaches half of the maximum value or the maximum value.
2335  */
2336 #define ENET_MMC_INTR_MASK_RX_RXPAUSFIM_MASK (0x100000UL)
2337 #define ENET_MMC_INTR_MASK_RX_RXPAUSFIM_SHIFT (20U)
2338 #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)
2339 #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)
2340 
2341 /*
2342  * RXORANGEFIM (RW)
2343  *
2344  * MMC Receive Out Of Range Error Frame Counter Interrupt Mask
2345  * Setting this bit masks the interrupt when the rxoutofrangetype counter reaches half of the maximum value or the maximum value.
2346  */
2347 #define ENET_MMC_INTR_MASK_RX_RXORANGEFIM_MASK (0x80000UL)
2348 #define ENET_MMC_INTR_MASK_RX_RXORANGEFIM_SHIFT (19U)
2349 #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)
2350 #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)
2351 
2352 /*
2353  * RXLENERFIM (RW)
2354  *
2355  * MMC Receive Length Error Frame Counter Interrupt Mask
2356  * Setting this bit masks the interrupt when the rxlengtherror counter reaches half of the maximum value or the maximum value.
2357  */
2358 #define ENET_MMC_INTR_MASK_RX_RXLENERFIM_MASK (0x40000UL)
2359 #define ENET_MMC_INTR_MASK_RX_RXLENERFIM_SHIFT (18U)
2360 #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)
2361 #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)
2362 
2363 /*
2364  * RXUCGFIM (RW)
2365  *
2366  * MMC Receive Unicast Good Frame Counter Interrupt Mask
2367  * Setting this bit masks the interrupt when the rxunicastframes_g counter reaches half of the maximum value or the maximum value.
2368  */
2369 #define ENET_MMC_INTR_MASK_RX_RXUCGFIM_MASK (0x20000UL)
2370 #define ENET_MMC_INTR_MASK_RX_RXUCGFIM_SHIFT (17U)
2371 #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)
2372 #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)
2373 
2374 /*
2375  * RX1024TMAXOCTGBFIM (RW)
2376  *
2377  * MMC Receive 1024 to Maximum Octet Good Bad Frame Counter Interrupt Mask.
2378  * Setting this bit masks the interrupt when the rx1024tomaxoctets_gb counter reaches half of the maximum value or the maximum value.
2379  */
2380 #define ENET_MMC_INTR_MASK_RX_RX1024TMAXOCTGBFIM_MASK (0x10000UL)
2381 #define ENET_MMC_INTR_MASK_RX_RX1024TMAXOCTGBFIM_SHIFT (16U)
2382 #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)
2383 #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)
2384 
2385 /*
2386  * RX512T1023OCTGBFIM (RW)
2387  *
2388  * MMC Receive 512 to 1023 Octet Good Bad Frame Counter Interrupt Mask
2389  * Setting this bit masks the interrupt when the rx512to1023octets_gb counter reaches half of the maximum value or the maximum value.
2390  */
2391 #define ENET_MMC_INTR_MASK_RX_RX512T1023OCTGBFIM_MASK (0x8000U)
2392 #define ENET_MMC_INTR_MASK_RX_RX512T1023OCTGBFIM_SHIFT (15U)
2393 #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)
2394 #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)
2395 
2396 /*
2397  * RX256T511OCTGBFIM (RW)
2398  *
2399  * MMC Receive 256 to 511 Octet Good Bad Frame Counter Interrupt Mask
2400  * Setting this bit masks the interrupt when the rx256to511octets_gb counter reaches half of the maximum value or the maximum value.
2401  */
2402 #define ENET_MMC_INTR_MASK_RX_RX256T511OCTGBFIM_MASK (0x4000U)
2403 #define ENET_MMC_INTR_MASK_RX_RX256T511OCTGBFIM_SHIFT (14U)
2404 #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)
2405 #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)
2406 
2407 /*
2408  * RX128T255OCTGBFIM (RW)
2409  *
2410  * MMC Receive 128 to 255 Octet Good Bad Frame Counter Interrupt Mask
2411  * Setting this bit masks the interrupt when the rx128to255octets_gb counter reaches half of the maximum value or the maximum value.
2412  */
2413 #define ENET_MMC_INTR_MASK_RX_RX128T255OCTGBFIM_MASK (0x2000U)
2414 #define ENET_MMC_INTR_MASK_RX_RX128T255OCTGBFIM_SHIFT (13U)
2415 #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)
2416 #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)
2417 
2418 /*
2419  * RX65T127OCTGBFIM (RW)
2420  *
2421  * MMC Receive 65 to 127 Octet Good Bad Frame Counter Interrupt Mask
2422  * Setting this bit masks the interrupt when the rx65to127octets_gb counter reaches half of the maximum value or the maximum value.
2423  */
2424 #define ENET_MMC_INTR_MASK_RX_RX65T127OCTGBFIM_MASK (0x1000U)
2425 #define ENET_MMC_INTR_MASK_RX_RX65T127OCTGBFIM_SHIFT (12U)
2426 #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)
2427 #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)
2428 
2429 /*
2430  * RX64OCTGBFIM (RW)
2431  *
2432  * MMC Receive 64 Octet Good Bad Frame Counter Interrupt Mask
2433  * Setting this bit masks the interrupt when the rx64octets_gb counter reaches half of the maximum value or the maximum value.
2434  */
2435 #define ENET_MMC_INTR_MASK_RX_RX64OCTGBFIM_MASK (0x800U)
2436 #define ENET_MMC_INTR_MASK_RX_RX64OCTGBFIM_SHIFT (11U)
2437 #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)
2438 #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)
2439 
2440 /*
2441  * RXOSIZEGFIM (RW)
2442  *
2443  * MMC Receive Oversize Good Frame Counter Interrupt Mask
2444  * Setting this bit masks the interrupt when the rxoversize_g counter reaches half of the maximum value or the maximum value.
2445  */
2446 #define ENET_MMC_INTR_MASK_RX_RXOSIZEGFIM_MASK (0x400U)
2447 #define ENET_MMC_INTR_MASK_RX_RXOSIZEGFIM_SHIFT (10U)
2448 #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)
2449 #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)
2450 
2451 /*
2452  * RXUSIZEGFIM (RW)
2453  *
2454  * MMC Receive Undersize Good Frame Counter Interrupt Mask
2455  * Setting this bit masks the interrupt when the rxundersize_g counter reaches half of the maximum value or the maximum value.
2456  */
2457 #define ENET_MMC_INTR_MASK_RX_RXUSIZEGFIM_MASK (0x200U)
2458 #define ENET_MMC_INTR_MASK_RX_RXUSIZEGFIM_SHIFT (9U)
2459 #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)
2460 #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)
2461 
2462 /*
2463  * RXJABERFIM (RW)
2464  *
2465  * MMC Receive Jabber Error Frame Counter Interrupt Mask
2466  * Setting this bit masks the interrupt when the rxjabbererror counter reaches half of the maximum value or the maximum value.
2467  */
2468 #define ENET_MMC_INTR_MASK_RX_RXJABERFIM_MASK (0x100U)
2469 #define ENET_MMC_INTR_MASK_RX_RXJABERFIM_SHIFT (8U)
2470 #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)
2471 #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)
2472 
2473 /*
2474  * RXRUNTFIM (RW)
2475  *
2476  * MMC Receive Runt Frame Counter Interrupt Mask
2477  * Setting this bit masks the interrupt when the rxrunterror counter reaches half of the maximum value or the maximum value.
2478  */
2479 #define ENET_MMC_INTR_MASK_RX_RXRUNTFIM_MASK (0x80U)
2480 #define ENET_MMC_INTR_MASK_RX_RXRUNTFIM_SHIFT (7U)
2481 #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)
2482 #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)
2483 
2484 /*
2485  * RXALGNERFIM (RW)
2486  *
2487  * MMC Receive Alignment Error Frame Counter Interrupt Mask
2488  * Setting this bit masks the interrupt when the rxalignmenterror counter reaches half of the maximum value or the maximum value.
2489  */
2490 #define ENET_MMC_INTR_MASK_RX_RXALGNERFIM_MASK (0x40U)
2491 #define ENET_MMC_INTR_MASK_RX_RXALGNERFIM_SHIFT (6U)
2492 #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)
2493 #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)
2494 
2495 /*
2496  * RXCRCERFIM (RW)
2497  *
2498  * MMC Receive CRC Error Frame Counter Interrupt Mask
2499  * Setting this bit masks the interrupt when the rxcrcerror counter reaches half of the maximum value or the maximum value.
2500  */
2501 #define ENET_MMC_INTR_MASK_RX_RXCRCERFIM_MASK (0x20U)
2502 #define ENET_MMC_INTR_MASK_RX_RXCRCERFIM_SHIFT (5U)
2503 #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)
2504 #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)
2505 
2506 /*
2507  * RXMCGFIM (RW)
2508  *
2509  * MMC Receive Multicast Good Frame Counter Interrupt Mask
2510  * Setting this bit masks the interrupt when the rxmulticastframes_g counter reaches half of the maximum value or the maximum value.
2511  */
2512 #define ENET_MMC_INTR_MASK_RX_RXMCGFIM_MASK (0x10U)
2513 #define ENET_MMC_INTR_MASK_RX_RXMCGFIM_SHIFT (4U)
2514 #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)
2515 #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)
2516 
2517 /*
2518  * RXBCGFIM (RW)
2519  *
2520  * MMC Receive Broadcast Good Frame Counter Interrupt Mask
2521  * Setting this bit masks the interrupt when the rxbroadcastframes_g counter reaches half of the maximum value or the maximum value.
2522  */
2523 #define ENET_MMC_INTR_MASK_RX_RXBCGFIM_MASK (0x8U)
2524 #define ENET_MMC_INTR_MASK_RX_RXBCGFIM_SHIFT (3U)
2525 #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)
2526 #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)
2527 
2528 /*
2529  * RXGOCTIM (RW)
2530  *
2531  * MMC Receive Good Octet Counter Interrupt Mask
2532  * Setting this bit masks the interrupt when the rxoctetcount_g counter reaches half of the maximum value or the maximum value.
2533  */
2534 #define ENET_MMC_INTR_MASK_RX_RXGOCTIM_MASK (0x4U)
2535 #define ENET_MMC_INTR_MASK_RX_RXGOCTIM_SHIFT (2U)
2536 #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)
2537 #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)
2538 
2539 /*
2540  * RXGBOCTIM (RW)
2541  *
2542  * MMC Receive Good Bad Octet Counter Interrupt Mask.
2543  * Setting this bit masks the interrupt when the rxoctetcount_gb counter reaches half of the maximum value or the maximum value.
2544  */
2545 #define ENET_MMC_INTR_MASK_RX_RXGBOCTIM_MASK (0x2U)
2546 #define ENET_MMC_INTR_MASK_RX_RXGBOCTIM_SHIFT (1U)
2547 #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)
2548 #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)
2549 
2550 /* Bitfield definition for register: MMC_INTR_MASK_TX */
2551 /*
2552  * TXOSIZEGFIM (RW)
2553  *
2554  * MMC Transmit Oversize Good Frame Counter Interrupt Mask
2555  * Setting this bit masks the interrupt when the txoversize_g counter reaches half of the maximum value or the maximum value.
2556  */
2557 #define ENET_MMC_INTR_MASK_TX_TXOSIZEGFIM_MASK (0x2000000UL)
2558 #define ENET_MMC_INTR_MASK_TX_TXOSIZEGFIM_SHIFT (25U)
2559 #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)
2560 #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)
2561 
2562 /*
2563  * TXVLANGFIM (RW)
2564  *
2565  * MMC Transmit VLAN Good Frame Counter Interrupt Mask
2566  * Setting this bit masks the interrupt when the txvlanframes_g counter reaches half of the maximum value or the maximum value.
2567  */
2568 #define ENET_MMC_INTR_MASK_TX_TXVLANGFIM_MASK (0x1000000UL)
2569 #define ENET_MMC_INTR_MASK_TX_TXVLANGFIM_SHIFT (24U)
2570 #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)
2571 #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)
2572 
2573 /*
2574  * TXPAUSFIM (RW)
2575  *
2576  * MMC Transmit Pause Frame Counter Interrupt Mask
2577  * Setting this bit masks the interrupt when the txpauseframes counter reaches half of the maximum value or the maximum value.
2578  */
2579 #define ENET_MMC_INTR_MASK_TX_TXPAUSFIM_MASK (0x800000UL)
2580 #define ENET_MMC_INTR_MASK_TX_TXPAUSFIM_SHIFT (23U)
2581 #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)
2582 #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)
2583 
2584 /*
2585  * TXEXDEFFIM (RW)
2586  *
2587  * MMC Transmit Excessive Deferral Frame Counter Interrupt Mask
2588  * Setting this bit masks the interrupt when the txexcessdef counter reaches half of the maximum value or the maximum value.
2589  */
2590 #define ENET_MMC_INTR_MASK_TX_TXEXDEFFIM_MASK (0x400000UL)
2591 #define ENET_MMC_INTR_MASK_TX_TXEXDEFFIM_SHIFT (22U)
2592 #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)
2593 #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)
2594 
2595 /*
2596  * TXGFRMIM (RW)
2597  *
2598  * MMC Transmit Good Frame Counter Interrupt Mask
2599  * Setting this bit masks the interrupt when the txframecount_g counter reaches half of the maximum value or the maximum value.
2600  */
2601 #define ENET_MMC_INTR_MASK_TX_TXGFRMIM_MASK (0x200000UL)
2602 #define ENET_MMC_INTR_MASK_TX_TXGFRMIM_SHIFT (21U)
2603 #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)
2604 #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)
2605 
2606 /*
2607  * TXGOCTIM (RW)
2608  *
2609  * MMC Transmit Good Octet Counter Interrupt Mask
2610  * Setting this bit masks the interrupt when the txoctetcount_g counter reaches half of the maximum value or the maximum value.
2611  */
2612 #define ENET_MMC_INTR_MASK_TX_TXGOCTIM_MASK (0x100000UL)
2613 #define ENET_MMC_INTR_MASK_TX_TXGOCTIM_SHIFT (20U)
2614 #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)
2615 #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)
2616 
2617 /*
2618  * TXCARERFIM (RW)
2619  *
2620  * MMC Transmit Carrier Error Frame Counter Interrupt Mask
2621  * Setting this bit masks the interrupt when the txcarriererror counter reaches half of the maximum value or the maximum value.
2622  */
2623 #define ENET_MMC_INTR_MASK_TX_TXCARERFIM_MASK (0x80000UL)
2624 #define ENET_MMC_INTR_MASK_TX_TXCARERFIM_SHIFT (19U)
2625 #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)
2626 #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)
2627 
2628 /*
2629  * TXEXCOLFIM (RW)
2630  *
2631  * MMC Transmit Excessive Collision Frame Counter Interrupt Mask
2632  * Setting this bit masks the interrupt when the txexcesscol counter reaches half of the maximum value or the maximum value.
2633  */
2634 #define ENET_MMC_INTR_MASK_TX_TXEXCOLFIM_MASK (0x40000UL)
2635 #define ENET_MMC_INTR_MASK_TX_TXEXCOLFIM_SHIFT (18U)
2636 #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)
2637 #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)
2638 
2639 /*
2640  * TXLATCOLFIM (RW)
2641  *
2642  * MMC Transmit Late Collision Frame Counter Interrupt Mask
2643  * Setting this bit masks the interrupt when the txlatecol counter reaches half of the maximum value or the maximum value.
2644  */
2645 #define ENET_MMC_INTR_MASK_TX_TXLATCOLFIM_MASK (0x20000UL)
2646 #define ENET_MMC_INTR_MASK_TX_TXLATCOLFIM_SHIFT (17U)
2647 #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)
2648 #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)
2649 
2650 /*
2651  * TXDEFFIM (RW)
2652  *
2653  * MMC Transmit Deferred Frame Counter Interrupt Mask
2654  * Setting this bit masks the interrupt when the txdeferred counter reaches half of the maximum value or the maximum value.
2655  */
2656 #define ENET_MMC_INTR_MASK_TX_TXDEFFIM_MASK (0x10000UL)
2657 #define ENET_MMC_INTR_MASK_TX_TXDEFFIM_SHIFT (16U)
2658 #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)
2659 #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)
2660 
2661 /*
2662  * TXMCOLGFIM (RW)
2663  *
2664  * MMC Transmit Multiple Collision Good Frame Counter Interrupt Mask
2665  * Setting this bit masks the interrupt when the txmulticol_g counter reaches half of the maximum value or the maximum value.
2666  */
2667 #define ENET_MMC_INTR_MASK_TX_TXMCOLGFIM_MASK (0x8000U)
2668 #define ENET_MMC_INTR_MASK_TX_TXMCOLGFIM_SHIFT (15U)
2669 #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)
2670 #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)
2671 
2672 /*
2673  * TXSCOLGFIM (RW)
2674  *
2675  * MMC Transmit Single Collision Good Frame Counter Interrupt Mask
2676  * Setting this bit masks the interrupt when the txsinglecol_g counter reaches half of the maximum value or the maximum value.
2677  */
2678 #define ENET_MMC_INTR_MASK_TX_TXSCOLGFIM_MASK (0x4000U)
2679 #define ENET_MMC_INTR_MASK_TX_TXSCOLGFIM_SHIFT (14U)
2680 #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)
2681 #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)
2682 
2683 /*
2684  * TXUFLOWERFIM (RW)
2685  *
2686  * MMC Transmit Underflow Error Frame Counter Interrupt Mask
2687  * Setting this bit masks the interrupt when the txunderflowerror counter reaches half of the maximum value or the maximum value.
2688  */
2689 #define ENET_MMC_INTR_MASK_TX_TXUFLOWERFIM_MASK (0x2000U)
2690 #define ENET_MMC_INTR_MASK_TX_TXUFLOWERFIM_SHIFT (13U)
2691 #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)
2692 #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)
2693 
2694 /*
2695  * TXBCGBFIM (RW)
2696  *
2697  * MMC Transmit Broadcast Good Bad Frame Counter Interrupt Mask
2698  * Setting this bit masks the interrupt when the txbroadcastframes_gb counter reaches half of the maximum value or the maximum value.
2699  */
2700 #define ENET_MMC_INTR_MASK_TX_TXBCGBFIM_MASK (0x1000U)
2701 #define ENET_MMC_INTR_MASK_TX_TXBCGBFIM_SHIFT (12U)
2702 #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)
2703 #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)
2704 
2705 /*
2706  * TXMCGBFIM (RW)
2707  *
2708  * MMC Transmit Multicast Good Bad Frame Counter Interrupt Mask
2709  * Setting this bit masks the interrupt when the txmulticastframes_gb counter reaches half of the maximum value or the maximum value.
2710  */
2711 #define ENET_MMC_INTR_MASK_TX_TXMCGBFIM_MASK (0x800U)
2712 #define ENET_MMC_INTR_MASK_TX_TXMCGBFIM_SHIFT (11U)
2713 #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)
2714 #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)
2715 
2716 /*
2717  * TXUCGBFIM (RW)
2718  *
2719  * MMC Transmit Unicast Good Bad Frame Counter Interrupt Mask
2720  * Setting this bit masks the interrupt when the txunicastframes_gb counter reaches half of the maximum value or the maximum value.
2721  */
2722 #define ENET_MMC_INTR_MASK_TX_TXUCGBFIM_MASK (0x400U)
2723 #define ENET_MMC_INTR_MASK_TX_TXUCGBFIM_SHIFT (10U)
2724 #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)
2725 #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)
2726 
2727 /*
2728  * TX1024TMAXOCTGBFIM (RW)
2729  *
2730  * MMC Transmit 1024 to Maximum Octet Good Bad Frame Counter Interrupt Mask
2731  * Setting this bit masks the interrupt when the tx1024tomaxoctets_gb counter reaches half of the maximum value or the maximum value.
2732  */
2733 #define ENET_MMC_INTR_MASK_TX_TX1024TMAXOCTGBFIM_MASK (0x200U)
2734 #define ENET_MMC_INTR_MASK_TX_TX1024TMAXOCTGBFIM_SHIFT (9U)
2735 #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)
2736 #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)
2737 
2738 /*
2739  * TX512T1023OCTGBFIM (RW)
2740  *
2741  * MMC Transmit 512 to 1023 Octet Good Bad Frame Counter Interrupt Mask
2742  * Setting this bit masks the interrupt when the tx512to1023octets_gb counter reaches half of the maximum value or the maximum value.
2743  */
2744 #define ENET_MMC_INTR_MASK_TX_TX512T1023OCTGBFIM_MASK (0x100U)
2745 #define ENET_MMC_INTR_MASK_TX_TX512T1023OCTGBFIM_SHIFT (8U)
2746 #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)
2747 #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)
2748 
2749 /*
2750  * TX256T511OCTGBFIM (RW)
2751  *
2752  * MMC Transmit 256 to 511 Octet Good Bad Frame Counter Interrupt Mask
2753  * Setting this bit masks the interrupt when the tx256to511octets_gb counter reaches half of the maximum value or the maximum value.
2754  */
2755 #define ENET_MMC_INTR_MASK_TX_TX256T511OCTGBFIM_MASK (0x80U)
2756 #define ENET_MMC_INTR_MASK_TX_TX256T511OCTGBFIM_SHIFT (7U)
2757 #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)
2758 #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)
2759 
2760 /*
2761  * TX128T255OCTGBFIM (RW)
2762  *
2763  * MMC Transmit 128 to 255 Octet Good Bad Frame Counter Interrupt Mask
2764  * Setting this bit masks the interrupt when the tx128to255octets_gb counter reaches half of the maximum value or the maximum value.
2765  */
2766 #define ENET_MMC_INTR_MASK_TX_TX128T255OCTGBFIM_MASK (0x40U)
2767 #define ENET_MMC_INTR_MASK_TX_TX128T255OCTGBFIM_SHIFT (6U)
2768 #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)
2769 #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)
2770 
2771 /*
2772  * TX65T127OCTGBFIM (RW)
2773  *
2774  * MMC Transmit 65 to 127 Octet Good Bad Frame Counter Interrupt Mask
2775  * Setting this bit masks the interrupt when the tx65to127octets_gb counter reaches half of the maximum value or the maximum value.
2776  */
2777 #define ENET_MMC_INTR_MASK_TX_TX65T127OCTGBFIM_MASK (0x20U)
2778 #define ENET_MMC_INTR_MASK_TX_TX65T127OCTGBFIM_SHIFT (5U)
2779 #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)
2780 #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)
2781 
2782 /*
2783  * TX64OCTGBFIM (RW)
2784  *
2785  * MMC Transmit 64 Octet Good Bad Frame Counter Interrupt Mask
2786  * Setting this bit masks the interrupt when the tx64octets_gb counter reaches half of the maximum value or the maximum value.
2787  */
2788 #define ENET_MMC_INTR_MASK_TX_TX64OCTGBFIM_MASK (0x10U)
2789 #define ENET_MMC_INTR_MASK_TX_TX64OCTGBFIM_SHIFT (4U)
2790 #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)
2791 #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)
2792 
2793 /*
2794  * TXMCGFIM (RW)
2795  *
2796  * MMC Transmit Multicast Good Frame Counter Interrupt Mask
2797  * Setting this bit masks the interrupt when the txmulticastframes_g counter reaches half of the maximum value or the maximum value.
2798  */
2799 #define ENET_MMC_INTR_MASK_TX_TXMCGFIM_MASK (0x8U)
2800 #define ENET_MMC_INTR_MASK_TX_TXMCGFIM_SHIFT (3U)
2801 #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)
2802 #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)
2803 
2804 /*
2805  * TXBCGFIM (RW)
2806  *
2807  * MMC Transmit Broadcast Good Frame Counter Interrupt Mask
2808  * Setting this bit masks the interrupt when the txbroadcastframes_g counter reaches half of the maximum value or the maximum value.
2809  */
2810 #define ENET_MMC_INTR_MASK_TX_TXBCGFIM_MASK (0x4U)
2811 #define ENET_MMC_INTR_MASK_TX_TXBCGFIM_SHIFT (2U)
2812 #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)
2813 #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)
2814 
2815 /*
2816  * TXGBFRMIM (RW)
2817  *
2818  * MMC Transmit Good Bad Frame Counter Interrupt Mask
2819  * Setting this bit masks the interrupt when the txframecount_gb counter reaches half of the maximum value or the maximum value.
2820  */
2821 #define ENET_MMC_INTR_MASK_TX_TXGBFRMIM_MASK (0x2U)
2822 #define ENET_MMC_INTR_MASK_TX_TXGBFRMIM_SHIFT (1U)
2823 #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)
2824 #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)
2825 
2826 /*
2827  * TXGBOCTIM (RW)
2828  *
2829  * MMC Transmit Good Bad Octet Counter Interrupt Mask
2830  * Setting this bit masks the interrupt when the txoctetcount_gb counter reaches half of the maximum value or the maximum value.
2831  */
2832 #define ENET_MMC_INTR_MASK_TX_TXGBOCTIM_MASK (0x1U)
2833 #define ENET_MMC_INTR_MASK_TX_TXGBOCTIM_SHIFT (0U)
2834 #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)
2835 #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)
2836 
2837 /* Bitfield definition for register: TX64OCTETS_GB */
2838 /*
2839  * FRMCNT (RW)
2840  *
2841  * Number of good and bad frames transmitted with length 64 bytes, exclusive of preamble and retried frames.
2842  */
2843 #define ENET_TX64OCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL)
2844 #define ENET_TX64OCTETS_GB_FRMCNT_SHIFT (0U)
2845 #define ENET_TX64OCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TX64OCTETS_GB_FRMCNT_SHIFT) & ENET_TX64OCTETS_GB_FRMCNT_MASK)
2846 #define ENET_TX64OCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TX64OCTETS_GB_FRMCNT_MASK) >> ENET_TX64OCTETS_GB_FRMCNT_SHIFT)
2847 
2848 /* Bitfield definition for register: TX65TO127OCTETS_GB */
2849 /*
2850  * FRMCNT (RW)
2851  *
2852  * Number of good and bad frames transmitted with length between 65 and 127 (inclusive) bytes, exclusive of preamble and retried frames.
2853  */
2854 #define ENET_TX65TO127OCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL)
2855 #define ENET_TX65TO127OCTETS_GB_FRMCNT_SHIFT (0U)
2856 #define ENET_TX65TO127OCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TX65TO127OCTETS_GB_FRMCNT_SHIFT) & ENET_TX65TO127OCTETS_GB_FRMCNT_MASK)
2857 #define ENET_TX65TO127OCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TX65TO127OCTETS_GB_FRMCNT_MASK) >> ENET_TX65TO127OCTETS_GB_FRMCNT_SHIFT)
2858 
2859 /* Bitfield definition for register: TX128TO255OCTETS_GB */
2860 /*
2861  * FRMCNT (RW)
2862  *
2863  * Number of good and bad frames transmitted with length between 128 and 255 (inclusive) bytes, exclusive of preamble and retried frames.
2864  */
2865 #define ENET_TX128TO255OCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL)
2866 #define ENET_TX128TO255OCTETS_GB_FRMCNT_SHIFT (0U)
2867 #define ENET_TX128TO255OCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TX128TO255OCTETS_GB_FRMCNT_SHIFT) & ENET_TX128TO255OCTETS_GB_FRMCNT_MASK)
2868 #define ENET_TX128TO255OCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TX128TO255OCTETS_GB_FRMCNT_MASK) >> ENET_TX128TO255OCTETS_GB_FRMCNT_SHIFT)
2869 
2870 /* Bitfield definition for register: TX256TO511OCTETS_GB */
2871 /*
2872  * FRMCNT (RW)
2873  *
2874  * Number of good and bad frames transmitted with length between 256 and 511 (inclusive) bytes, exclusive of preamble and retried frames.
2875  */
2876 #define ENET_TX256TO511OCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL)
2877 #define ENET_TX256TO511OCTETS_GB_FRMCNT_SHIFT (0U)
2878 #define ENET_TX256TO511OCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TX256TO511OCTETS_GB_FRMCNT_SHIFT) & ENET_TX256TO511OCTETS_GB_FRMCNT_MASK)
2879 #define ENET_TX256TO511OCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TX256TO511OCTETS_GB_FRMCNT_MASK) >> ENET_TX256TO511OCTETS_GB_FRMCNT_SHIFT)
2880 
2881 /* Bitfield definition for register: TX512TO1023OCTETS_GB */
2882 /*
2883  * FRMCNT (RW)
2884  *
2885  * Number of good and bad frames transmitted with length between 512 and 1,023 (inclusive) bytes, exclusive of preamble and retried frames.
2886  */
2887 #define ENET_TX512TO1023OCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL)
2888 #define ENET_TX512TO1023OCTETS_GB_FRMCNT_SHIFT (0U)
2889 #define ENET_TX512TO1023OCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TX512TO1023OCTETS_GB_FRMCNT_SHIFT) & ENET_TX512TO1023OCTETS_GB_FRMCNT_MASK)
2890 #define ENET_TX512TO1023OCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TX512TO1023OCTETS_GB_FRMCNT_MASK) >> ENET_TX512TO1023OCTETS_GB_FRMCNT_SHIFT)
2891 
2892 /* Bitfield definition for register: TX1024TOMAXOCTETS_GB */
2893 /*
2894  * FRMCNT (RW)
2895  *
2896  * Number of good and bad frames transmitted with length between 1,024 and maxsize (inclusive) bytes, exclusive of preamble and retried frames.
2897  */
2898 #define ENET_TX1024TOMAXOCTETS_GB_FRMCNT_MASK (0xFFFFFFFFUL)
2899 #define ENET_TX1024TOMAXOCTETS_GB_FRMCNT_SHIFT (0U)
2900 #define ENET_TX1024TOMAXOCTETS_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_TX1024TOMAXOCTETS_GB_FRMCNT_SHIFT) & ENET_TX1024TOMAXOCTETS_GB_FRMCNT_MASK)
2901 #define ENET_TX1024TOMAXOCTETS_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_TX1024TOMAXOCTETS_GB_FRMCNT_MASK) >> ENET_TX1024TOMAXOCTETS_GB_FRMCNT_SHIFT)
2902 
2903 /* Bitfield definition for register: RXFRAMECOUNT_GB */
2904 /*
2905  * FRMCNT (RW)
2906  *
2907  * Number of good and bad frames received.
2908  */
2909 #define ENET_RXFRAMECOUNT_GB_FRMCNT_MASK (0xFFFFFFFFUL)
2910 #define ENET_RXFRAMECOUNT_GB_FRMCNT_SHIFT (0U)
2911 #define ENET_RXFRAMECOUNT_GB_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXFRAMECOUNT_GB_FRMCNT_SHIFT) & ENET_RXFRAMECOUNT_GB_FRMCNT_MASK)
2912 #define ENET_RXFRAMECOUNT_GB_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXFRAMECOUNT_GB_FRMCNT_MASK) >> ENET_RXFRAMECOUNT_GB_FRMCNT_SHIFT)
2913 
2914 /* Bitfield definition for register: MMC_IPC_INTR_MASK_RX */
2915 /*
2916  * RXIPV4GFIM (RW)
2917  *
2918  * MMC Receive IPV4 Good Frame Counter Interrupt Mask
2919  * Setting this bit masks the interrupt when the rxipv4_gd_frms counter reaches half of the maximum value or the maximum value.
2920  */
2921 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GFIM_MASK (0x1U)
2922 #define ENET_MMC_IPC_INTR_MASK_RX_RXIPV4GFIM_SHIFT (0U)
2923 #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)
2924 #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)
2925 
2926 /* Bitfield definition for register: MMC_IPC_INTR_RX */
2927 /*
2928  * RXIPV4GFIS (RW)
2929  *
2930  * MMC Receive IPV4 Good Frame Counter Interrupt Status
2931  * This bit is set when the rxipv4_gd_frms counter reaches half of the maximum value or the maximum value.
2932  */
2933 #define ENET_MMC_IPC_INTR_RX_RXIPV4GFIS_MASK (0x1U)
2934 #define ENET_MMC_IPC_INTR_RX_RXIPV4GFIS_SHIFT (0U)
2935 #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)
2936 #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)
2937 
2938 /* Bitfield definition for register: RXIPV4_GD_FMS */
2939 /*
2940  * FRMCNT (RW)
2941  *
2942  * Number of good IPv4 datagrams received with the TCP, UDP, or ICMP payload
2943  */
2944 #define ENET_RXIPV4_GD_FMS_FRMCNT_MASK (0xFFFFFFFFUL)
2945 #define ENET_RXIPV4_GD_FMS_FRMCNT_SHIFT (0U)
2946 #define ENET_RXIPV4_GD_FMS_FRMCNT_SET(x) (((uint32_t)(x) << ENET_RXIPV4_GD_FMS_FRMCNT_SHIFT) & ENET_RXIPV4_GD_FMS_FRMCNT_MASK)
2947 #define ENET_RXIPV4_GD_FMS_FRMCNT_GET(x) (((uint32_t)(x) & ENET_RXIPV4_GD_FMS_FRMCNT_MASK) >> ENET_RXIPV4_GD_FMS_FRMCNT_SHIFT)
2948 
2949 /* Bitfield definition for register of struct array L3_L4_CFG: L3_L4_CTRL */
2950 /*
2951  * L4DPIM0 (RW)
2952  *
2953  * Layer 4 Destination Port Inverse Match Enable
2954  * When set, this bit indicates that the Layer 4 Destination Port number field is enabled for inverse matching.
2955  * When reset, this bit indicates that the Layer 4 Destination Port number field is enabled for perfect matching.
2956  * This bit is valid and applicable only when Bit 20 (L4DPM0) is set high.
2957  */
2958 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4DPIM0_MASK (0x200000UL)
2959 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4DPIM0_SHIFT (21U)
2960 #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)
2961 #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)
2962 
2963 /*
2964  * L4DPM0 (RW)
2965  *
2966  * Layer 4 Destination Port Match Enable
2967  * When set, this bit indicates that the Layer 4 Destination Port number field is enabled for matching.
2968  * When reset, the MAC ignores the Layer 4 Destination Port number field for matching.
2969  */
2970 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4DPM0_MASK (0x100000UL)
2971 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4DPM0_SHIFT (20U)
2972 #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)
2973 #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)
2974 
2975 /*
2976  * L4SPIM0 (RW)
2977  *
2978  * Layer 4 Source Port Inverse Match Enable
2979  * When set, this bit indicates that the Layer 4 Source Port number field is enabled for inverse matching.
2980  * When reset, this bit indicates that the Layer 4 Source Port number field is enabled for perfect matching.
2981  * This bit is valid and applicable only when Bit 18 (L4SPM0) is set high.
2982  */
2983 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4SPIM0_MASK (0x80000UL)
2984 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4SPIM0_SHIFT (19U)
2985 #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)
2986 #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)
2987 
2988 /*
2989  * L4SPM0 (RW)
2990  *
2991  * Layer 4 Source Port Match Enable
2992  * 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.
2993  */
2994 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4SPM0_MASK (0x40000UL)
2995 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4SPM0_SHIFT (18U)
2996 #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)
2997 #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)
2998 
2999 /*
3000  * L4PEN0 (RW)
3001  *
3002  * Layer 4 Protocol Enable
3003  * When set, this bit indicates that the Source and Destination Port number fields for UDP frames are used for matching.
3004  * When reset, this bit indicates that the Source and Destination Port number fields for TCP frames are used for matching.
3005  * The Layer 4 matching is done only when either L4SPM0 or L4DPM0 bit is set high.
3006  */
3007 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4PEN0_MASK (0x10000UL)
3008 #define ENET_L3_L4_CFG_L3_L4_CTRL_L4PEN0_SHIFT (16U)
3009 #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)
3010 #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)
3011 
3012 /*
3013  * L3HDBM0 (RW)
3014  *
3015  * Layer 3 IP DA Higher Bits Match
3016  * 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:
3017  * - 0: No bits are masked.
3018  * - 1: LSb[0] is masked.
3019  * - 2: Two LSbs [1:0] are masked. - ...
3020  * - 31: All bits except MSb are masked. IPv6 Frames: Bits [12:11] of this field correspond to Bits [6:5] of L3HSBM0,
3021  * which indicate the number of lower bits of IP Source or Destination Address that are masked in the IPv6 frames.
3022  * The following list describes the concatenated values of the L3HDBM0[1:0] and L3HSBM0 bits:
3023  * - 0: No bits are masked.
3024  * - 1: LSb[0] is masked.
3025  * - 2: Two LSbs [1:0] are masked. - …
3026  * - 127: All bits except MSb are masked. This field is valid and applicable only if L3DAM0 or L3SAM0 is set high.
3027  */
3028 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3HDBM0_MASK (0xF800U)
3029 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3HDBM0_SHIFT (11U)
3030 #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)
3031 #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)
3032 
3033 /*
3034  * L3HSBM0 (RW)
3035  *
3036  * Layer 3 IP SA Higher Bits Match
3037  * 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:
3038  * - 0: No bits are masked.
3039  * - 1: LSb[0] is masked.
3040  * - 2: Two LSbs [1:0] are masked. - ...
3041  * - 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.
3042  * This field is valid and applicable only if L3DAM0 or L3SAM0 is set high.
3043  */
3044 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3HSBM0_MASK (0x7C0U)
3045 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3HSBM0_SHIFT (6U)
3046 #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)
3047 #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)
3048 
3049 /*
3050  * L3DAIM0 (RW)
3051  *
3052  * Layer 3 IP DA Inverse Match Enable
3053  * When set, this bit indicates that the Layer 3 IP Destination Address field is enabled for inverse matching.
3054  * 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.
3055  */
3056 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3DAIM0_MASK (0x20U)
3057 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3DAIM0_SHIFT (5U)
3058 #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)
3059 #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)
3060 
3061 /*
3062  * L3DAM0 (RW)
3063  *
3064  * Layer 3 IP DA Match Enable
3065  * 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.
3066  * 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.
3067  */
3068 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3DAM0_MASK (0x10U)
3069 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3DAM0_SHIFT (4U)
3070 #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)
3071 #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)
3072 
3073 /*
3074  * L3SAIM0 (RW)
3075  *
3076  * Layer 3 IP SA Inverse Match Enable
3077  * 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.
3078  * This bit is valid and applicable only when Bit 2 (L3SAM0) is set high.
3079  */
3080 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3SAIM0_MASK (0x8U)
3081 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3SAIM0_SHIFT (3U)
3082 #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)
3083 #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)
3084 
3085 /*
3086  * L3SAM0 (RW)
3087  *
3088  * Layer 3 IP SA Match Enable
3089  * 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.
3090  */
3091 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3SAM0_MASK (0x4U)
3092 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3SAM0_SHIFT (2U)
3093 #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)
3094 #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)
3095 
3096 /*
3097  * L3PEN0 (RW)
3098  *
3099  * Layer 3 Protocol Enable
3100  * When set, this bit indicates that the Layer 3 IP Source or Destination Address matching is enabled for the IPv6 frames.
3101  * When reset, this bit indicates that the Layer 3 IP Source or Destination Address matching is enabled for the IPv4 frames.
3102  * The Layer 3 matching is done only when either L3SAM0 or L3DAM0 bit is set high.
3103  */
3104 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3PEN0_MASK (0x1U)
3105 #define ENET_L3_L4_CFG_L3_L4_CTRL_L3PEN0_SHIFT (0U)
3106 #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)
3107 #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)
3108 
3109 /* Bitfield definition for register of struct array L3_L4_CFG: L4_ADDR */
3110 /*
3111  * L4DP0 (RW)
3112  *
3113  * Layer 4 Destination Port Number Field
3114  * When Bit 16 (L4PEN0) is reset and Bit 20 (L4DPM0) is set in Register 256 (Layer 3 and Layer 4 Control Register 0),
3115  * this field contains the value to be matched with the TCP Destination Port Number field in the IPv4 or IPv6 frames.
3116  * When Bit 16 (L4PEN0) and Bit 20 (L4DPM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0),
3117  * this field contains the value to be matched with the UDP Destination Port Number field in the IPv4 or IPv6 frames.
3118  */
3119 #define ENET_L3_L4_CFG_L4_ADDR_L4DP0_MASK (0xFFFF0000UL)
3120 #define ENET_L3_L4_CFG_L4_ADDR_L4DP0_SHIFT (16U)
3121 #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)
3122 #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)
3123 
3124 /*
3125  * L4SP0 (RW)
3126  *
3127  * Layer 4 Source Port Number Field
3128  * When Bit 16 (L4PEN0) is reset and Bit 20 (L4DPM0) is set in Register 256 (Layer 3 and Layer 4 Control Register 0),
3129  * this field contains the value to be matched with the TCP Source Port Number field in the IPv4 or IPv6 frames.
3130  * When Bit 16 (L4PEN0) and Bit 20 (L4DPM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0),
3131  * this field contains the value to be matched with the UDP Source Port Number field in the IPv4 or IPv6 frames.
3132  */
3133 #define ENET_L3_L4_CFG_L4_ADDR_L4SP0_MASK (0xFFFFU)
3134 #define ENET_L3_L4_CFG_L4_ADDR_L4SP0_SHIFT (0U)
3135 #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)
3136 #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)
3137 
3138 /* Bitfield definition for register of struct array L3_L4_CFG: L3_ADDR_0 */
3139 /*
3140  * L3A00 (RW)
3141  *
3142  * Layer 3 Address 0 Field
3143  * When Bit 0 (L3PEN0) and Bit 2 (L3SAM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0),
3144  * this field contains the value to be matched with Bits [31:0] of the IP Source Address field in the IPv6 frames.
3145  * When Bit 0 (L3PEN0) and Bit 4 (L3DAM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0),
3146  * this field contains the value to be matched with Bits [31:0] of the IP Destination Address field in the IPv6 frames.
3147  * When Bit 0 (L3PEN0) is reset and Bit 2 (L3SAM0) is set in Register 256 (Layer 3 and Layer 4 Control Register 0),
3148  * this field contains the value to be matched with the IP Source Address field in the IPv4 frames.
3149  */
3150 #define ENET_L3_L4_CFG_L3_ADDR_0_L3A00_MASK (0xFFFFFFFFUL)
3151 #define ENET_L3_L4_CFG_L3_ADDR_0_L3A00_SHIFT (0U)
3152 #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)
3153 #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)
3154 
3155 /* Bitfield definition for register of struct array L3_L4_CFG: L3_ADDR_1 */
3156 /*
3157  * L3A10 (RW)
3158  *
3159  * Layer 3 Address 1 Field
3160  * When Bit 0 (L3PEN0) and Bit 2 (L3SAM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0),
3161  * this field contains the value to be matched with Bits [63:32] of the IP Source Address field in the IPv6 frames.
3162  * When Bit 0 (L3PEN0) and Bit 4 (L3DAM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0),
3163  * this field contains the value to be matched with Bits [63:32] of the IP Destination Address field in the IPv6 frames.
3164  * When Bit 0 (L3PEN0) is reset and Bit 4 (L3DAM0) is set in Register 256 (Layer 3 and Layer 4 Control Register 0),
3165  * this field contains the value to be matched with the IP Destination Address field in the IPv4 frames.
3166  */
3167 #define ENET_L3_L4_CFG_L3_ADDR_1_L3A10_MASK (0xFFFFFFFFUL)
3168 #define ENET_L3_L4_CFG_L3_ADDR_1_L3A10_SHIFT (0U)
3169 #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)
3170 #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)
3171 
3172 /* Bitfield definition for register of struct array L3_L4_CFG: L3_ADDR_2 */
3173 /*
3174  * L3A20 (RW)
3175  *
3176  * Layer 3 Address 2 Field
3177  * When Bit 0 (L3PEN0) and Bit 2 (L3SAM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0),
3178  * this field contains the value to be matched with Bits [95:64] of the IP Source Address field in the IPv6 frames.
3179  * When Bit 0 (L3PEN0) and Bit 4 (L3DAM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0),
3180  * this field contains value to be matched with Bits [95:64] of the IP Destination Address field in the IPv6 frames.
3181  * When Bit 0 (L3PEN0) is reset in Register 256 (Layer 3 and Layer 4 Control Register 0), this register is not used.
3182  */
3183 #define ENET_L3_L4_CFG_L3_ADDR_2_L3A20_MASK (0xFFFFFFFFUL)
3184 #define ENET_L3_L4_CFG_L3_ADDR_2_L3A20_SHIFT (0U)
3185 #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)
3186 #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)
3187 
3188 /* Bitfield definition for register of struct array L3_L4_CFG: L3_ADDR_3 */
3189 /*
3190  * L3A30 (RW)
3191  *
3192  * 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),
3193  * this field contains the value to be matched with Bits [127:96] of the IP Source Address field in the IPv6 frames.
3194  * When Bit 0 (L3PEN0) and Bit 4 (L3DAM0) are set in Register 256 (Layer 3 and Layer 4 Control Register 0),
3195  * this field contains the value to be matched with Bits [127:96] of the IP Destination Address field in the IPv6 frames.
3196  * When Bit 0 (L3PEN0) is reset in Register 256 (Layer 3 and Layer 4 Control Register 0), this register is not used.
3197  */
3198 #define ENET_L3_L4_CFG_L3_ADDR_3_L3A30_MASK (0xFFFFFFFFUL)
3199 #define ENET_L3_L4_CFG_L3_ADDR_3_L3A30_SHIFT (0U)
3200 #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)
3201 #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)
3202 
3203 /* Bitfield definition for register: VLAN_TAG_INC_RPL */
3204 /*
3205  * CSVL (RW)
3206  *
3207  * C-VLAN or S-VLAN
3208  * 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.
3209  */
3210 #define ENET_VLAN_TAG_INC_RPL_CSVL_MASK (0x80000UL)
3211 #define ENET_VLAN_TAG_INC_RPL_CSVL_SHIFT (19U)
3212 #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)
3213 #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)
3214 
3215 /*
3216  * VLP (RW)
3217  *
3218  * VLAN Priority Control
3219  * 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.
3220  */
3221 #define ENET_VLAN_TAG_INC_RPL_VLP_MASK (0x40000UL)
3222 #define ENET_VLAN_TAG_INC_RPL_VLP_SHIFT (18U)
3223 #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)
3224 #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)
3225 
3226 /*
3227  * VLC (RW)
3228  *
3229  * VLAN Tag Control in Transmit Frames
3230  * - 2’b00: No VLAN tag deletion, insertion, or replacement
3231  * - 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.
3232  * - 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.
3233  * This operation is performed on all transmitted frames, irrespective of whether they already have a VLAN tag.
3234  * - 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).
3235  * Note: Changes to this field take effect only on the start of a frame.
3236  * 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.
3237  */
3238 #define ENET_VLAN_TAG_INC_RPL_VLC_MASK (0x30000UL)
3239 #define ENET_VLAN_TAG_INC_RPL_VLC_SHIFT (16U)
3240 #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)
3241 #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)
3242 
3243 /*
3244  * VLT (RW)
3245  *
3246  * VLAN Tag for Transmit Frames
3247  * 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.
3248  * Bits[15:13] are the User Priority, Bit 12 is the CFI/DEI, and Bits[11:0] are the VLAN tag’s VID field.
3249  */
3250 #define ENET_VLAN_TAG_INC_RPL_VLT_MASK (0xFFFFU)
3251 #define ENET_VLAN_TAG_INC_RPL_VLT_SHIFT (0U)
3252 #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)
3253 #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)
3254 
3255 /* Bitfield definition for register: VLAN_HASH */
3256 /*
3257  * VLHT (RW)
3258  *
3259  * VLAN Hash Table
3260  * This field contains the 16-bit VLAN Hash Table.
3261  */
3262 #define ENET_VLAN_HASH_VLHT_MASK (0xFFFFU)
3263 #define ENET_VLAN_HASH_VLHT_SHIFT (0U)
3264 #define ENET_VLAN_HASH_VLHT_SET(x) (((uint32_t)(x) << ENET_VLAN_HASH_VLHT_SHIFT) & ENET_VLAN_HASH_VLHT_MASK)
3265 #define ENET_VLAN_HASH_VLHT_GET(x) (((uint32_t)(x) & ENET_VLAN_HASH_VLHT_MASK) >> ENET_VLAN_HASH_VLHT_SHIFT)
3266 
3267 /* Bitfield definition for register: TS_CTRL */
3268 /*
3269  * ATSEN3 (RW)
3270  *
3271  * Auxiliary Snapshot 3 Enable
3272  * 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.
3273  * 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.
3274  */
3275 #define ENET_TS_CTRL_ATSEN3_MASK (0x10000000UL)
3276 #define ENET_TS_CTRL_ATSEN3_SHIFT (28U)
3277 #define ENET_TS_CTRL_ATSEN3_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_ATSEN3_SHIFT) & ENET_TS_CTRL_ATSEN3_MASK)
3278 #define ENET_TS_CTRL_ATSEN3_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_ATSEN3_MASK) >> ENET_TS_CTRL_ATSEN3_SHIFT)
3279 
3280 /*
3281  * ATSEN2 (RW)
3282  *
3283  * Auxiliary Snapshot 2 Enable
3284  * 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.
3285  * 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.
3286  */
3287 #define ENET_TS_CTRL_ATSEN2_MASK (0x8000000UL)
3288 #define ENET_TS_CTRL_ATSEN2_SHIFT (27U)
3289 #define ENET_TS_CTRL_ATSEN2_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_ATSEN2_SHIFT) & ENET_TS_CTRL_ATSEN2_MASK)
3290 #define ENET_TS_CTRL_ATSEN2_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_ATSEN2_MASK) >> ENET_TS_CTRL_ATSEN2_SHIFT)
3291 
3292 /*
3293  * ATSEN1 (RW)
3294  *
3295  * Auxiliary Snapshot 1 Enable
3296  * 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.
3297  * 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.
3298  */
3299 #define ENET_TS_CTRL_ATSEN1_MASK (0x4000000UL)
3300 #define ENET_TS_CTRL_ATSEN1_SHIFT (26U)
3301 #define ENET_TS_CTRL_ATSEN1_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_ATSEN1_SHIFT) & ENET_TS_CTRL_ATSEN1_MASK)
3302 #define ENET_TS_CTRL_ATSEN1_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_ATSEN1_MASK) >> ENET_TS_CTRL_ATSEN1_SHIFT)
3303 
3304 /*
3305  * ATSEN0 (RW)
3306  *
3307  * Auxiliary Snapshot 0 Enable
3308  * 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.
3309  */
3310 #define ENET_TS_CTRL_ATSEN0_MASK (0x2000000UL)
3311 #define ENET_TS_CTRL_ATSEN0_SHIFT (25U)
3312 #define ENET_TS_CTRL_ATSEN0_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_ATSEN0_SHIFT) & ENET_TS_CTRL_ATSEN0_MASK)
3313 #define ENET_TS_CTRL_ATSEN0_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_ATSEN0_MASK) >> ENET_TS_CTRL_ATSEN0_SHIFT)
3314 
3315 /*
3316  * ATSFC (RW)
3317  *
3318  * Auxiliary Snapshot FIFO Clear
3319  * 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.
3320  * This bit is reserved when the Add IEEE 1588 Auxiliary Snapshot option is not selected during core configuration.
3321  */
3322 #define ENET_TS_CTRL_ATSFC_MASK (0x1000000UL)
3323 #define ENET_TS_CTRL_ATSFC_SHIFT (24U)
3324 #define ENET_TS_CTRL_ATSFC_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_ATSFC_SHIFT) & ENET_TS_CTRL_ATSFC_MASK)
3325 #define ENET_TS_CTRL_ATSFC_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_ATSFC_MASK) >> ENET_TS_CTRL_ATSFC_SHIFT)
3326 
3327 /*
3328  * TSENMACADDR (RW)
3329  *
3330  * Enable MAC address for PTP Frame Filtering
3331  * 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.
3332  */
3333 #define ENET_TS_CTRL_TSENMACADDR_MASK (0x40000UL)
3334 #define ENET_TS_CTRL_TSENMACADDR_SHIFT (18U)
3335 #define ENET_TS_CTRL_TSENMACADDR_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSENMACADDR_SHIFT) & ENET_TS_CTRL_TSENMACADDR_MASK)
3336 #define ENET_TS_CTRL_TSENMACADDR_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSENMACADDR_MASK) >> ENET_TS_CTRL_TSENMACADDR_SHIFT)
3337 
3338 /*
3339  * SNAPTYPSEL (RW)
3340  *
3341  * Select PTP packets for Taking Snapshots
3342  * These bits along with Bits 15 and 14 decide the set of PTP packet types for which snapshot needs to be taken.
3343  */
3344 #define ENET_TS_CTRL_SNAPTYPSEL_MASK (0x30000UL)
3345 #define ENET_TS_CTRL_SNAPTYPSEL_SHIFT (16U)
3346 #define ENET_TS_CTRL_SNAPTYPSEL_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_SNAPTYPSEL_SHIFT) & ENET_TS_CTRL_SNAPTYPSEL_MASK)
3347 #define ENET_TS_CTRL_SNAPTYPSEL_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_SNAPTYPSEL_MASK) >> ENET_TS_CTRL_SNAPTYPSEL_SHIFT)
3348 
3349 /*
3350  * TSMSTRENA (RW)
3351  *
3352  * Enable Snapshot for Messages Relevant to Master
3353  * 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.
3354  */
3355 #define ENET_TS_CTRL_TSMSTRENA_MASK (0x8000U)
3356 #define ENET_TS_CTRL_TSMSTRENA_SHIFT (15U)
3357 #define ENET_TS_CTRL_TSMSTRENA_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSMSTRENA_SHIFT) & ENET_TS_CTRL_TSMSTRENA_MASK)
3358 #define ENET_TS_CTRL_TSMSTRENA_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSMSTRENA_MASK) >> ENET_TS_CTRL_TSMSTRENA_SHIFT)
3359 
3360 /*
3361  * TSEVNTENA (RW)
3362  *
3363  * Enable Timestamp Snapshot for Event Messages
3364  * 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.
3365  */
3366 #define ENET_TS_CTRL_TSEVNTENA_MASK (0x4000U)
3367 #define ENET_TS_CTRL_TSEVNTENA_SHIFT (14U)
3368 #define ENET_TS_CTRL_TSEVNTENA_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSEVNTENA_SHIFT) & ENET_TS_CTRL_TSEVNTENA_MASK)
3369 #define ENET_TS_CTRL_TSEVNTENA_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSEVNTENA_MASK) >> ENET_TS_CTRL_TSEVNTENA_SHIFT)
3370 
3371 /*
3372  * TSIPV4ENA (RW)
3373  *
3374  * Enable Processing of PTP Frames Sent over IPv4-UDP
3375  * 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.
3376  */
3377 #define ENET_TS_CTRL_TSIPV4ENA_MASK (0x2000U)
3378 #define ENET_TS_CTRL_TSIPV4ENA_SHIFT (13U)
3379 #define ENET_TS_CTRL_TSIPV4ENA_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSIPV4ENA_SHIFT) & ENET_TS_CTRL_TSIPV4ENA_MASK)
3380 #define ENET_TS_CTRL_TSIPV4ENA_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSIPV4ENA_MASK) >> ENET_TS_CTRL_TSIPV4ENA_SHIFT)
3381 
3382 /*
3383  * TSIPV6ENA (RW)
3384  *
3385  * Enable Processing of PTP Frames Sent over IPv6-UDP
3386  * 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.
3387  */
3388 #define ENET_TS_CTRL_TSIPV6ENA_MASK (0x1000U)
3389 #define ENET_TS_CTRL_TSIPV6ENA_SHIFT (12U)
3390 #define ENET_TS_CTRL_TSIPV6ENA_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSIPV6ENA_SHIFT) & ENET_TS_CTRL_TSIPV6ENA_MASK)
3391 #define ENET_TS_CTRL_TSIPV6ENA_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSIPV6ENA_MASK) >> ENET_TS_CTRL_TSIPV6ENA_SHIFT)
3392 
3393 /*
3394  * TSIPENA (RW)
3395  *
3396  * Enable Processing of PTP over Ethernet Frames
3397  * 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
3398  */
3399 #define ENET_TS_CTRL_TSIPENA_MASK (0x800U)
3400 #define ENET_TS_CTRL_TSIPENA_SHIFT (11U)
3401 #define ENET_TS_CTRL_TSIPENA_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSIPENA_SHIFT) & ENET_TS_CTRL_TSIPENA_MASK)
3402 #define ENET_TS_CTRL_TSIPENA_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSIPENA_MASK) >> ENET_TS_CTRL_TSIPENA_SHIFT)
3403 
3404 /*
3405  * TSVER2ENA (RW)
3406  *
3407  * Enable PTP packet Processing for Version 2 Format
3408  * When set, the PTP packets are processed using the 1588 version 2 format. Otherwise, the PTP packets are processed using the version 1 format.
3409  */
3410 #define ENET_TS_CTRL_TSVER2ENA_MASK (0x400U)
3411 #define ENET_TS_CTRL_TSVER2ENA_SHIFT (10U)
3412 #define ENET_TS_CTRL_TSVER2ENA_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSVER2ENA_SHIFT) & ENET_TS_CTRL_TSVER2ENA_MASK)
3413 #define ENET_TS_CTRL_TSVER2ENA_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSVER2ENA_MASK) >> ENET_TS_CTRL_TSVER2ENA_SHIFT)
3414 
3415 /*
3416  * TSCTRLSSR (RW)
3417  *
3418  * Timestamp Digital or Binary Rollover Control
3419  * When set, the Timestamp Low register rolls over after 0x3B9A_C9FF value (that is, 1 nanosecond accuracy) and increments the timestamp (High) seconds.
3420  * When reset, the rollover value of sub-second register is 0x7FFF_FFFF.
3421  * The sub-second increment has to be programmed correctly depending on the PTP reference clock frequency and the value of this bit.
3422  */
3423 #define ENET_TS_CTRL_TSCTRLSSR_MASK (0x200U)
3424 #define ENET_TS_CTRL_TSCTRLSSR_SHIFT (9U)
3425 #define ENET_TS_CTRL_TSCTRLSSR_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSCTRLSSR_SHIFT) & ENET_TS_CTRL_TSCTRLSSR_MASK)
3426 #define ENET_TS_CTRL_TSCTRLSSR_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSCTRLSSR_MASK) >> ENET_TS_CTRL_TSCTRLSSR_SHIFT)
3427 
3428 /*
3429  * TSENALL (RW)
3430  *
3431  * Enable Timestamp for All Frames
3432  * When set, the timestamp snapshot is enabled for all frames received by the MAC.
3433  */
3434 #define ENET_TS_CTRL_TSENALL_MASK (0x100U)
3435 #define ENET_TS_CTRL_TSENALL_SHIFT (8U)
3436 #define ENET_TS_CTRL_TSENALL_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSENALL_SHIFT) & ENET_TS_CTRL_TSENALL_MASK)
3437 #define ENET_TS_CTRL_TSENALL_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSENALL_MASK) >> ENET_TS_CTRL_TSENALL_SHIFT)
3438 
3439 /*
3440  * TSADDREG (RW)
3441  *
3442  * Addend Reg Update
3443  * 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.
3444  * This register bit should be zero before setting it.
3445  */
3446 #define ENET_TS_CTRL_TSADDREG_MASK (0x20U)
3447 #define ENET_TS_CTRL_TSADDREG_SHIFT (5U)
3448 #define ENET_TS_CTRL_TSADDREG_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSADDREG_SHIFT) & ENET_TS_CTRL_TSADDREG_MASK)
3449 #define ENET_TS_CTRL_TSADDREG_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSADDREG_MASK) >> ENET_TS_CTRL_TSADDREG_SHIFT)
3450 
3451 /*
3452  * TSTRIG (RW)
3453  *
3454  * Timestamp Interrupt Trigger Enable
3455  * When set, the timestamp interrupt is generated when the System Time becomes greater than the value written in the Target Time register.
3456  * This bit is reset after the generation of the Timestamp Trigger Interrupt.
3457  */
3458 #define ENET_TS_CTRL_TSTRIG_MASK (0x10U)
3459 #define ENET_TS_CTRL_TSTRIG_SHIFT (4U)
3460 #define ENET_TS_CTRL_TSTRIG_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSTRIG_SHIFT) & ENET_TS_CTRL_TSTRIG_MASK)
3461 #define ENET_TS_CTRL_TSTRIG_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSTRIG_MASK) >> ENET_TS_CTRL_TSTRIG_SHIFT)
3462 
3463 /*
3464  * TSUPDT (RW)
3465  *
3466  * Timestamp Update
3467  * When set, the system time is updated (added or subtracted) with the value specified in Register 452 (System Time – Seconds Update Register)
3468  * and Register 453 (System Time – Nanoseconds Update Register). This bit should be read zero before updating it.
3469  * This bit is reset when the update is completed in hardware. The “Timestamp Higher Word” register (if enabled during core configuration) is not updated.
3470  */
3471 #define ENET_TS_CTRL_TSUPDT_MASK (0x8U)
3472 #define ENET_TS_CTRL_TSUPDT_SHIFT (3U)
3473 #define ENET_TS_CTRL_TSUPDT_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSUPDT_SHIFT) & ENET_TS_CTRL_TSUPDT_MASK)
3474 #define ENET_TS_CTRL_TSUPDT_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSUPDT_MASK) >> ENET_TS_CTRL_TSUPDT_SHIFT)
3475 
3476 /*
3477  * TSINIT (RW)
3478  *
3479  * Timestamp Initialize
3480  * When set, the system time is initialized (overwritten) with the value specified in the Register 452 (System Time – Seconds Update Register)
3481  * and Register 453 (System Time – Nanoseconds Update Register). This bit should be read zero before updating it.
3482  * This bit is reset when the initialization is complete.
3483  * The “Timestamp Higher Word” register (if enabled during core configuration) can only be initialized.
3484  */
3485 #define ENET_TS_CTRL_TSINIT_MASK (0x4U)
3486 #define ENET_TS_CTRL_TSINIT_SHIFT (2U)
3487 #define ENET_TS_CTRL_TSINIT_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSINIT_SHIFT) & ENET_TS_CTRL_TSINIT_MASK)
3488 #define ENET_TS_CTRL_TSINIT_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSINIT_MASK) >> ENET_TS_CTRL_TSINIT_SHIFT)
3489 
3490 /*
3491  * TSCFUPDT (RW)
3492  *
3493  * Timestamp Fine or Coarse Update
3494  * 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.
3495  */
3496 #define ENET_TS_CTRL_TSCFUPDT_MASK (0x2U)
3497 #define ENET_TS_CTRL_TSCFUPDT_SHIFT (1U)
3498 #define ENET_TS_CTRL_TSCFUPDT_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSCFUPDT_SHIFT) & ENET_TS_CTRL_TSCFUPDT_MASK)
3499 #define ENET_TS_CTRL_TSCFUPDT_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSCFUPDT_MASK) >> ENET_TS_CTRL_TSCFUPDT_SHIFT)
3500 
3501 /*
3502  * TSENA (RW)
3503  *
3504  * Timestamp Enable
3505  * 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.
3506  * 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.
3507  */
3508 #define ENET_TS_CTRL_TSENA_MASK (0x1U)
3509 #define ENET_TS_CTRL_TSENA_SHIFT (0U)
3510 #define ENET_TS_CTRL_TSENA_SET(x) (((uint32_t)(x) << ENET_TS_CTRL_TSENA_SHIFT) & ENET_TS_CTRL_TSENA_MASK)
3511 #define ENET_TS_CTRL_TSENA_GET(x) (((uint32_t)(x) & ENET_TS_CTRL_TSENA_MASK) >> ENET_TS_CTRL_TSENA_SHIFT)
3512 
3513 /* Bitfield definition for register: SUB_SEC_INCR */
3514 /*
3515  * SSINC (RW)
3516  *
3517  * Sub-second Increment Value
3518  * The value programmed in this field is accumulated every clock cycle (of clk_ptp_i) with the contents of the sub-second register.
3519  * For example, when PTP clock is 50 MHz (period is 20 ns), you should program 20 (0x14)
3520  * when the System Time- Nanoseconds register has an accuracy of 1 ns [Bit 9 (TSCTRLSSR) is set in Register 448 (Timestamp Control Register)].
3521  * When TSCTRLSSR is clear, the Nanoseconds register has a resolution of ~0.465ns.
3522  * In this case, you should program a value of 43 (0x2B) that is derived by 20ns/0.465.
3523  */
3524 #define ENET_SUB_SEC_INCR_SSINC_MASK (0xFFU)
3525 #define ENET_SUB_SEC_INCR_SSINC_SHIFT (0U)
3526 #define ENET_SUB_SEC_INCR_SSINC_SET(x) (((uint32_t)(x) << ENET_SUB_SEC_INCR_SSINC_SHIFT) & ENET_SUB_SEC_INCR_SSINC_MASK)
3527 #define ENET_SUB_SEC_INCR_SSINC_GET(x) (((uint32_t)(x) & ENET_SUB_SEC_INCR_SSINC_MASK) >> ENET_SUB_SEC_INCR_SSINC_SHIFT)
3528 
3529 /* Bitfield definition for register: SYST_SEC */
3530 /*
3531  * TSS (RO)
3532  *
3533  * Timestamp Second
3534  * The value in this field indicates the current value in seconds of the System Time maintained by the MAC.
3535  */
3536 #define ENET_SYST_SEC_TSS_MASK (0xFFFFFFFFUL)
3537 #define ENET_SYST_SEC_TSS_SHIFT (0U)
3538 #define ENET_SYST_SEC_TSS_GET(x) (((uint32_t)(x) & ENET_SYST_SEC_TSS_MASK) >> ENET_SYST_SEC_TSS_SHIFT)
3539 
3540 /* Bitfield definition for register: SYST_NSEC */
3541 /*
3542  * TSSS (RO)
3543  *
3544  * Timestamp Sub Seconds
3545  * The value in this field has the sub second representation of time, with an accuracy of 0.46 ns.
3546  * 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.
3547  */
3548 #define ENET_SYST_NSEC_TSSS_MASK (0x7FFFFFFFUL)
3549 #define ENET_SYST_NSEC_TSSS_SHIFT (0U)
3550 #define ENET_SYST_NSEC_TSSS_GET(x) (((uint32_t)(x) & ENET_SYST_NSEC_TSSS_MASK) >> ENET_SYST_NSEC_TSSS_SHIFT)
3551 
3552 /* Bitfield definition for register: SYST_SEC_UPD */
3553 /*
3554  * TSS (RW)
3555  *
3556  * Timestamp Second
3557  * The value in this field indicates the time in seconds to be initialized or added to the system time.
3558  */
3559 #define ENET_SYST_SEC_UPD_TSS_MASK (0xFFFFFFFFUL)
3560 #define ENET_SYST_SEC_UPD_TSS_SHIFT (0U)
3561 #define ENET_SYST_SEC_UPD_TSS_SET(x) (((uint32_t)(x) << ENET_SYST_SEC_UPD_TSS_SHIFT) & ENET_SYST_SEC_UPD_TSS_MASK)
3562 #define ENET_SYST_SEC_UPD_TSS_GET(x) (((uint32_t)(x) & ENET_SYST_SEC_UPD_TSS_MASK) >> ENET_SYST_SEC_UPD_TSS_SHIFT)
3563 
3564 /* Bitfield definition for register: SYST_NSEC_UPD */
3565 /*
3566  * ADDSUB (RW)
3567  *
3568  * Add or Subtract Time
3569  * 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.
3570  */
3571 #define ENET_SYST_NSEC_UPD_ADDSUB_MASK (0x80000000UL)
3572 #define ENET_SYST_NSEC_UPD_ADDSUB_SHIFT (31U)
3573 #define ENET_SYST_NSEC_UPD_ADDSUB_SET(x) (((uint32_t)(x) << ENET_SYST_NSEC_UPD_ADDSUB_SHIFT) & ENET_SYST_NSEC_UPD_ADDSUB_MASK)
3574 #define ENET_SYST_NSEC_UPD_ADDSUB_GET(x) (((uint32_t)(x) & ENET_SYST_NSEC_UPD_ADDSUB_MASK) >> ENET_SYST_NSEC_UPD_ADDSUB_SHIFT)
3575 
3576 /*
3577  * TSSS (RW)
3578  *
3579  * Timestamp Sub Seconds
3580  * The value in this field has the sub second representation of time, with an accuracy of 0.46 ns.
3581  * 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.
3582  */
3583 #define ENET_SYST_NSEC_UPD_TSSS_MASK (0x7FFFFFFFUL)
3584 #define ENET_SYST_NSEC_UPD_TSSS_SHIFT (0U)
3585 #define ENET_SYST_NSEC_UPD_TSSS_SET(x) (((uint32_t)(x) << ENET_SYST_NSEC_UPD_TSSS_SHIFT) & ENET_SYST_NSEC_UPD_TSSS_MASK)
3586 #define ENET_SYST_NSEC_UPD_TSSS_GET(x) (((uint32_t)(x) & ENET_SYST_NSEC_UPD_TSSS_MASK) >> ENET_SYST_NSEC_UPD_TSSS_SHIFT)
3587 
3588 /* Bitfield definition for register: TS_ADDEND */
3589 /*
3590  * TSAR (RW)
3591  *
3592  * Timestamp Addend Register
3593  * This field indicates the 32-bit time value to be added to the Accumulator register to achieve time synchronization.
3594  */
3595 #define ENET_TS_ADDEND_TSAR_MASK (0xFFFFFFFFUL)
3596 #define ENET_TS_ADDEND_TSAR_SHIFT (0U)
3597 #define ENET_TS_ADDEND_TSAR_SET(x) (((uint32_t)(x) << ENET_TS_ADDEND_TSAR_SHIFT) & ENET_TS_ADDEND_TSAR_MASK)
3598 #define ENET_TS_ADDEND_TSAR_GET(x) (((uint32_t)(x) & ENET_TS_ADDEND_TSAR_MASK) >> ENET_TS_ADDEND_TSAR_SHIFT)
3599 
3600 /* Bitfield definition for register: TGTTM_SEC */
3601 /*
3602  * TSTR (RW)
3603  *
3604  * Target Time Seconds Register
3605  * This register stores the time in seconds.
3606  * When the timestamp value matches or exceeds both Target Timestamp registers,
3607  * 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).
3608  */
3609 #define ENET_TGTTM_SEC_TSTR_MASK (0xFFFFFFFFUL)
3610 #define ENET_TGTTM_SEC_TSTR_SHIFT (0U)
3611 #define ENET_TGTTM_SEC_TSTR_SET(x) (((uint32_t)(x) << ENET_TGTTM_SEC_TSTR_SHIFT) & ENET_TGTTM_SEC_TSTR_MASK)
3612 #define ENET_TGTTM_SEC_TSTR_GET(x) (((uint32_t)(x) & ENET_TGTTM_SEC_TSTR_MASK) >> ENET_TGTTM_SEC_TSTR_SHIFT)
3613 
3614 /* Bitfield definition for register: TGTTM_NSEC */
3615 /*
3616  * TRGTBUSY (RW)
3617  *
3618  * Target Time Register Busy
3619  * The MAC sets this bit when the PPSCMD field (Bit [3:0]) in Register 459 (PPS Control Register) is programmed to 010 or 011.
3620  * Programming the PPSCMD field to 010 or 011, instructs the MAC to synchronize the Target Time Registers to the PTP clock domain.
3621  * The MAC clears this bit after synchronizing the Target Time Registers to the PTP clock domain
3622  * The application must not update the Target Time Registers when this bit is read as 1.
3623  * 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.
3624  */
3625 #define ENET_TGTTM_NSEC_TRGTBUSY_MASK (0x80000000UL)
3626 #define ENET_TGTTM_NSEC_TRGTBUSY_SHIFT (31U)
3627 #define ENET_TGTTM_NSEC_TRGTBUSY_SET(x) (((uint32_t)(x) << ENET_TGTTM_NSEC_TRGTBUSY_SHIFT) & ENET_TGTTM_NSEC_TRGTBUSY_MASK)
3628 #define ENET_TGTTM_NSEC_TRGTBUSY_GET(x) (((uint32_t)(x) & ENET_TGTTM_NSEC_TRGTBUSY_MASK) >> ENET_TGTTM_NSEC_TRGTBUSY_SHIFT)
3629 
3630 /*
3631  * TTSLO (RW)
3632  *
3633  * Target Timestamp Low Register
3634  * This register stores the time in (signed) nanoseconds.
3635  * When the value of the timestamp matches the both Target Timestamp registers,
3636  * then based on the TRGTMODSEL0 field (Bits [6:5]) in Register 459 (PPS Control Register),
3637  * the MAC starts or stops the PPS signal output and generates an interrupt (if enabled).
3638  * This value should not exceed 0x3B9A_C9FF when Bit 9 (TSCTRLSSR) is set in Register 448 (Timestamp Control Register).
3639  * 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.
3640  */
3641 #define ENET_TGTTM_NSEC_TTSLO_MASK (0x7FFFFFFFUL)
3642 #define ENET_TGTTM_NSEC_TTSLO_SHIFT (0U)
3643 #define ENET_TGTTM_NSEC_TTSLO_SET(x) (((uint32_t)(x) << ENET_TGTTM_NSEC_TTSLO_SHIFT) & ENET_TGTTM_NSEC_TTSLO_MASK)
3644 #define ENET_TGTTM_NSEC_TTSLO_GET(x) (((uint32_t)(x) & ENET_TGTTM_NSEC_TTSLO_MASK) >> ENET_TGTTM_NSEC_TTSLO_SHIFT)
3645 
3646 /* Bitfield definition for register: SYSTM_H_SEC */
3647 /*
3648  * TSHWR (RW)
3649  *
3650  * Timestamp Higher Word Register
3651  * 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.
3652  * 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.
3653  */
3654 #define ENET_SYSTM_H_SEC_TSHWR_MASK (0xFFFFU)
3655 #define ENET_SYSTM_H_SEC_TSHWR_SHIFT (0U)
3656 #define ENET_SYSTM_H_SEC_TSHWR_SET(x) (((uint32_t)(x) << ENET_SYSTM_H_SEC_TSHWR_SHIFT) & ENET_SYSTM_H_SEC_TSHWR_MASK)
3657 #define ENET_SYSTM_H_SEC_TSHWR_GET(x) (((uint32_t)(x) & ENET_SYSTM_H_SEC_TSHWR_MASK) >> ENET_SYSTM_H_SEC_TSHWR_SHIFT)
3658 
3659 /* Bitfield definition for register: TS_STATUS */
3660 /*
3661  * ATSNS (RO)
3662  *
3663  * Number of Auxiliary Timestamp Snapshots
3664  * 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.
3665  * These bits are cleared (to 00000) when the Auxiliary snapshot FIFO clear bit is set.
3666  * This bit is valid only if the Add IEEE 1588 Auxiliary Snapshot option is selected during core configuration.
3667  */
3668 #define ENET_TS_STATUS_ATSNS_MASK (0x3E000000UL)
3669 #define ENET_TS_STATUS_ATSNS_SHIFT (25U)
3670 #define ENET_TS_STATUS_ATSNS_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_ATSNS_MASK) >> ENET_TS_STATUS_ATSNS_SHIFT)
3671 
3672 /*
3673  * ATSSTM (RO)
3674  *
3675  * Auxiliary Timestamp Snapshot Trigger Missed
3676  * This bit is set when the Auxiliary timestamp snapshot FIFO is full and external trigger was set.
3677  * 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.
3678  */
3679 #define ENET_TS_STATUS_ATSSTM_MASK (0x1000000UL)
3680 #define ENET_TS_STATUS_ATSSTM_SHIFT (24U)
3681 #define ENET_TS_STATUS_ATSSTM_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_ATSSTM_MASK) >> ENET_TS_STATUS_ATSSTM_SHIFT)
3682 
3683 /*
3684  * ATSSTN (RO)
3685  *
3686  * Auxiliary Timestamp Snapshot Trigger Identifier
3687  * These bits identify the Auxiliary trigger inputs for which the timestamp available in the Auxiliary Snapshot Register is applicable.
3688  * When more than one bit is set at the same time, it means that corresponding auxiliary triggers were sampled at the same clock.
3689  * These bits are applicable only if the number of Auxiliary snapshots is more than one.
3690  * One bit is assigned for each trigger as shown in the following list:
3691  * - Bit 16: Auxiliary trigger 0
3692  * - Bit 17: Auxiliary trigger 1
3693  * - Bit 18: Auxiliary trigger 2
3694  * - Bit 19: Auxiliary trigger 3
3695  * The software can read this register to find the triggers that are set when the timestamp is taken.
3696  */
3697 #define ENET_TS_STATUS_ATSSTN_MASK (0xF0000UL)
3698 #define ENET_TS_STATUS_ATSSTN_SHIFT (16U)
3699 #define ENET_TS_STATUS_ATSSTN_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_ATSSTN_MASK) >> ENET_TS_STATUS_ATSSTN_SHIFT)
3700 
3701 /*
3702  * TSTRGTERR3 (RO)
3703  *
3704  * Timestamp Target Time Error
3705  * 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.
3706  */
3707 #define ENET_TS_STATUS_TSTRGTERR3_MASK (0x200U)
3708 #define ENET_TS_STATUS_TSTRGTERR3_SHIFT (9U)
3709 #define ENET_TS_STATUS_TSTRGTERR3_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSTRGTERR3_MASK) >> ENET_TS_STATUS_TSTRGTERR3_SHIFT)
3710 
3711 /*
3712  * TSTARGT3 (RO)
3713  *
3714  * Timestamp Target Time Reached for Target Time PPS3
3715  * 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).
3716  */
3717 #define ENET_TS_STATUS_TSTARGT3_MASK (0x100U)
3718 #define ENET_TS_STATUS_TSTARGT3_SHIFT (8U)
3719 #define ENET_TS_STATUS_TSTARGT3_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSTARGT3_MASK) >> ENET_TS_STATUS_TSTARGT3_SHIFT)
3720 
3721 /*
3722  * TSTRGTERR2 (RO)
3723  *
3724  */
3725 #define ENET_TS_STATUS_TSTRGTERR2_MASK (0x80U)
3726 #define ENET_TS_STATUS_TSTRGTERR2_SHIFT (7U)
3727 #define ENET_TS_STATUS_TSTRGTERR2_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSTRGTERR2_MASK) >> ENET_TS_STATUS_TSTRGTERR2_SHIFT)
3728 
3729 /*
3730  * TSTARGT2 (RO)
3731  *
3732  */
3733 #define ENET_TS_STATUS_TSTARGT2_MASK (0x40U)
3734 #define ENET_TS_STATUS_TSTARGT2_SHIFT (6U)
3735 #define ENET_TS_STATUS_TSTARGT2_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSTARGT2_MASK) >> ENET_TS_STATUS_TSTARGT2_SHIFT)
3736 
3737 /*
3738  * TSTRGTERR1 (RO)
3739  *
3740  */
3741 #define ENET_TS_STATUS_TSTRGTERR1_MASK (0x20U)
3742 #define ENET_TS_STATUS_TSTRGTERR1_SHIFT (5U)
3743 #define ENET_TS_STATUS_TSTRGTERR1_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSTRGTERR1_MASK) >> ENET_TS_STATUS_TSTRGTERR1_SHIFT)
3744 
3745 /*
3746  * TSTARGT1 (RO)
3747  *
3748  */
3749 #define ENET_TS_STATUS_TSTARGT1_MASK (0x10U)
3750 #define ENET_TS_STATUS_TSTARGT1_SHIFT (4U)
3751 #define ENET_TS_STATUS_TSTARGT1_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSTARGT1_MASK) >> ENET_TS_STATUS_TSTARGT1_SHIFT)
3752 
3753 /*
3754  * TSTRGTERR (RO)
3755  *
3756  */
3757 #define ENET_TS_STATUS_TSTRGTERR_MASK (0x8U)
3758 #define ENET_TS_STATUS_TSTRGTERR_SHIFT (3U)
3759 #define ENET_TS_STATUS_TSTRGTERR_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSTRGTERR_MASK) >> ENET_TS_STATUS_TSTRGTERR_SHIFT)
3760 
3761 /*
3762  * AUXTSTRIG (RO)
3763  *
3764  */
3765 #define ENET_TS_STATUS_AUXTSTRIG_MASK (0x4U)
3766 #define ENET_TS_STATUS_AUXTSTRIG_SHIFT (2U)
3767 #define ENET_TS_STATUS_AUXTSTRIG_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_AUXTSTRIG_MASK) >> ENET_TS_STATUS_AUXTSTRIG_SHIFT)
3768 
3769 /*
3770  * TSTARGT (RO)
3771  *
3772  */
3773 #define ENET_TS_STATUS_TSTARGT_MASK (0x2U)
3774 #define ENET_TS_STATUS_TSTARGT_SHIFT (1U)
3775 #define ENET_TS_STATUS_TSTARGT_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSTARGT_MASK) >> ENET_TS_STATUS_TSTARGT_SHIFT)
3776 
3777 /*
3778  * TSSOVF (RO)
3779  *
3780  */
3781 #define ENET_TS_STATUS_TSSOVF_MASK (0x1U)
3782 #define ENET_TS_STATUS_TSSOVF_SHIFT (0U)
3783 #define ENET_TS_STATUS_TSSOVF_GET(x) (((uint32_t)(x) & ENET_TS_STATUS_TSSOVF_MASK) >> ENET_TS_STATUS_TSSOVF_SHIFT)
3784 
3785 /* Bitfield definition for register: PPS_CTRL */
3786 /*
3787  * TRGTMODSEL3 (RW)
3788  *
3789  * Target Time Register Mode for PPS3 Output
3790  * This field indicates the Target Time registers (register 496 and 497) mode for PPS3 output signal. This field is similar to the TRGTMODSEL0 field.
3791  */
3792 #define ENET_PPS_CTRL_TRGTMODSEL3_MASK (0x60000000UL)
3793 #define ENET_PPS_CTRL_TRGTMODSEL3_SHIFT (29U)
3794 #define ENET_PPS_CTRL_TRGTMODSEL3_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_TRGTMODSEL3_SHIFT) & ENET_PPS_CTRL_TRGTMODSEL3_MASK)
3795 #define ENET_PPS_CTRL_TRGTMODSEL3_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_TRGTMODSEL3_MASK) >> ENET_PPS_CTRL_TRGTMODSEL3_SHIFT)
3796 
3797 /*
3798  * PPSCMD3 (WO)
3799  *
3800  * Flexible PPS3 Output Control
3801  * This field controls the flexible PPS3 output (ptp_pps_o[3]) signal. This field is similar to PPSCMD0[2:0] in functionality.
3802  */
3803 #define ENET_PPS_CTRL_PPSCMD3_MASK (0x7000000UL)
3804 #define ENET_PPS_CTRL_PPSCMD3_SHIFT (24U)
3805 #define ENET_PPS_CTRL_PPSCMD3_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_PPSCMD3_SHIFT) & ENET_PPS_CTRL_PPSCMD3_MASK)
3806 #define ENET_PPS_CTRL_PPSCMD3_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_PPSCMD3_MASK) >> ENET_PPS_CTRL_PPSCMD3_SHIFT)
3807 
3808 /*
3809  * TRGTMODSEL2 (RW)
3810  *
3811  * Target Time Register Mode for PPS2 Output
3812  * This field indicates the Target Time registers (register 488 and 489) mode for PPS2 output signal. This field is similar to the TRGTMODSEL0 field.
3813  */
3814 #define ENET_PPS_CTRL_TRGTMODSEL2_MASK (0x600000UL)
3815 #define ENET_PPS_CTRL_TRGTMODSEL2_SHIFT (21U)
3816 #define ENET_PPS_CTRL_TRGTMODSEL2_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_TRGTMODSEL2_SHIFT) & ENET_PPS_CTRL_TRGTMODSEL2_MASK)
3817 #define ENET_PPS_CTRL_TRGTMODSEL2_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_TRGTMODSEL2_MASK) >> ENET_PPS_CTRL_TRGTMODSEL2_SHIFT)
3818 
3819 /*
3820  * PPSCMD2 (WO)
3821  *
3822  * Flexible PPS2 Output Control
3823  * This field controls the flexible PPS2 output (ptp_pps_o[2]) signal. This field is similar to PPSCMD0[2:0] in functionality.
3824  */
3825 #define ENET_PPS_CTRL_PPSCMD2_MASK (0x70000UL)
3826 #define ENET_PPS_CTRL_PPSCMD2_SHIFT (16U)
3827 #define ENET_PPS_CTRL_PPSCMD2_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_PPSCMD2_SHIFT) & ENET_PPS_CTRL_PPSCMD2_MASK)
3828 #define ENET_PPS_CTRL_PPSCMD2_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_PPSCMD2_MASK) >> ENET_PPS_CTRL_PPSCMD2_SHIFT)
3829 
3830 /*
3831  * TRGTMODSEL1 (RW)
3832  *
3833  * Target Time Register Mode for PPS1 Output
3834  * This field indicates the Target Time registers (register 480 and 481) mode for PPS1 output signal. This field is similar to the TRGTMODSEL0 field.
3835  */
3836 #define ENET_PPS_CTRL_TRGTMODSEL1_MASK (0x6000U)
3837 #define ENET_PPS_CTRL_TRGTMODSEL1_SHIFT (13U)
3838 #define ENET_PPS_CTRL_TRGTMODSEL1_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_TRGTMODSEL1_SHIFT) & ENET_PPS_CTRL_TRGTMODSEL1_MASK)
3839 #define ENET_PPS_CTRL_TRGTMODSEL1_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_TRGTMODSEL1_MASK) >> ENET_PPS_CTRL_TRGTMODSEL1_SHIFT)
3840 
3841 /*
3842  * PPSCMD1 (WO)
3843  *
3844  * Flexible PPS1 Output Control
3845  * This field controls the flexible PPS1 output (ptp_pps_o[1]) signal. This field is similar to PPSCMD0[2:0] in functionality.
3846  */
3847 #define ENET_PPS_CTRL_PPSCMD1_MASK (0x700U)
3848 #define ENET_PPS_CTRL_PPSCMD1_SHIFT (8U)
3849 #define ENET_PPS_CTRL_PPSCMD1_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_PPSCMD1_SHIFT) & ENET_PPS_CTRL_PPSCMD1_MASK)
3850 #define ENET_PPS_CTRL_PPSCMD1_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_PPSCMD1_MASK) >> ENET_PPS_CTRL_PPSCMD1_SHIFT)
3851 
3852 /*
3853  * TRGTMODSEL0 (RW)
3854  *
3855  * Target Time Register Mode for PPS0 Output
3856  * This field indicates the Target Time registers (register 455 and 456) mode for PPS0 output signal:
3857  * - 00: Indicates that the Target Time registers are programmed only for generating the interrupt event.
3858  * - 01: Reserved
3859  * - 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.
3860  * - 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.
3861  */
3862 #define ENET_PPS_CTRL_TRGTMODSEL0_MASK (0x60U)
3863 #define ENET_PPS_CTRL_TRGTMODSEL0_SHIFT (5U)
3864 #define ENET_PPS_CTRL_TRGTMODSEL0_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_TRGTMODSEL0_SHIFT) & ENET_PPS_CTRL_TRGTMODSEL0_MASK)
3865 #define ENET_PPS_CTRL_TRGTMODSEL0_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_TRGTMODSEL0_MASK) >> ENET_PPS_CTRL_TRGTMODSEL0_SHIFT)
3866 
3867 /*
3868  * PPSEN0 (RW)
3869  *
3870  * Flexible PPS Output Mode Enable
3871  * When set low, Bits [3:0] function as PPSCTRL (backward compatible). When set high, Bits[3:0] function as PPSCMD.
3872  */
3873 #define ENET_PPS_CTRL_PPSEN0_MASK (0x10U)
3874 #define ENET_PPS_CTRL_PPSEN0_SHIFT (4U)
3875 #define ENET_PPS_CTRL_PPSEN0_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_PPSEN0_SHIFT) & ENET_PPS_CTRL_PPSEN0_MASK)
3876 #define ENET_PPS_CTRL_PPSEN0_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_PPSEN0_MASK) >> ENET_PPS_CTRL_PPSEN0_SHIFT)
3877 
3878 /*
3879  * PPSCTRLCMD0 (RW/WO)
3880  *
3881  * PPSCTRL0: PPS0 Output Frequency Control
3882  * This field controls the frequency of the PPS0 output (ptp_pps_o[0]) signal.
3883  * The default value of PPSCTRL is 0000, and the PPS output is 1 pulse (of width clk_ptp_i) every second.
3884  * For other values of PPSCTRL, the PPS output becomes a generated clock of following frequencies:
3885  * - 0001: The binary rollover is 2 Hz, and the digital rollover is 1 Hz.
3886  * - 0010: The binary rollover is 4 Hz, and the digital rollover is 2 Hz.
3887  * - 0011: The binary rollover is 8 Hz, and the digital rollover is 4 Hz.
3888  * - 0100: The binary rollover is 16 Hz, and the digital rollover is 8 Hz. - ...
3889  * - 1111: The binary rollover is 32.768 KHz, and the digital rollover is 16.384 KHz.
3890  * Note: In the binary rollover mode, the PPS output (ptp_pps_o) has a duty cycle of 50 percent with these frequencies.
3891  * In the digital rollover mode, the PPS output frequency is an average number.
3892  * The actual clock is of different frequency that gets synchronized every second. For example:
3893  * - When PPSCTRL = 0001, the PPS (1 Hz) has a low period of 537 ms and a high period of 463 ms
3894  * - When PPSCTRL = 0010, the PPS (2 Hz) is a sequence of:
3895  * - One clock of 50 percent duty cycle and 537 ms period
3896  * - Second clock of 463 ms period (268 ms low and 195 ms high)
3897  * - When PPSCTRL = 0011, the PPS (4 Hz) is a sequence of:
3898  * - Three clocks of 50 percent duty cycle and 268 ms period
3899  * - Fourth clock of 195 ms period (134 ms low and 61 ms high)
3900  * --------------------------------------------------------------------------------------------------------------------------------------
3901  * PPSCMD0: Flexible PPS0 Output Control
3902  * Programming these bits with a non-zero value instructs the MAC to
3903  * initiate an event. When the command is transferred or synchronized to
3904  * the PTP clock domain, these bits get cleared automatically. The
3905  * Software should ensure that these bits are programmed only when they
3906  * are “all-zero”.
3907  * 0000: No Command
3908  * 0001: START Single Pulse
3909  * This command generates single pulse rising at the start point defined in
3910  * Target Time Registers and of a duration defined
3911  * in the PPS0 Width Register.
3912  * 0010: START Pulse Train
3913  * This command generates the train of pulses rising at the start point
3914  * defined in the Target Time Registers and of a duration defined in the
3915  * PPS0 Width Register and repeated at interval defined in the PPS
3916  * Interval Register. By default, the PPS pulse train is free-running unless
3917  * stopped by ‘STOP Pulse train at time’ or ‘STOP Pulse Train
3918  * immediately’ commands.
3919  * 0011: Cancel START
3920  * This command cancels the START Single Pulse and START Pulse Train
3921  * commands if the system time has not crossed the programmed start
3922  * time.
3923  * 0100: STOP Pulse train at time
3924  * This command stops the train of pulses initiated by the START Pulse
3925  * Train command (PPSCMD = 0010) after the time programmed in the
3926  * Target Time registers elapses.
3927  * 0101: STOP Pulse Train immediately
3928  * This command immediately stops the train of pulses initiated by the
3929  * START Pulse Train command (PPSCMD = 0010).
3930  * 0110: Cancel STOP Pulse train
3931  * This command cancels the STOP pulse train at time command if the
3932  * programmed stop time has not elapsed. The PPS pulse train becomes
3933  * free-running on the successful execution of this command.
3934  * 0111-1111: Reserved
3935  * Note: These bits get cleared automatically
3936  */
3937 #define ENET_PPS_CTRL_PPSCTRLCMD0_MASK (0xFU)
3938 #define ENET_PPS_CTRL_PPSCTRLCMD0_SHIFT (0U)
3939 #define ENET_PPS_CTRL_PPSCTRLCMD0_SET(x) (((uint32_t)(x) << ENET_PPS_CTRL_PPSCTRLCMD0_SHIFT) & ENET_PPS_CTRL_PPSCTRLCMD0_MASK)
3940 #define ENET_PPS_CTRL_PPSCTRLCMD0_GET(x) (((uint32_t)(x) & ENET_PPS_CTRL_PPSCTRLCMD0_MASK) >> ENET_PPS_CTRL_PPSCTRLCMD0_SHIFT)
3941 
3942 /* Bitfield definition for register: AUX_TS_NSEC */
3943 /*
3944  * AUXTSLO (RO)
3945  *
3946  * Contains the lower 31 bits (nano-seconds field) of the auxiliary timestamp.
3947  */
3948 #define ENET_AUX_TS_NSEC_AUXTSLO_MASK (0x7FFFFFFFUL)
3949 #define ENET_AUX_TS_NSEC_AUXTSLO_SHIFT (0U)
3950 #define ENET_AUX_TS_NSEC_AUXTSLO_GET(x) (((uint32_t)(x) & ENET_AUX_TS_NSEC_AUXTSLO_MASK) >> ENET_AUX_TS_NSEC_AUXTSLO_SHIFT)
3951 
3952 /* Bitfield definition for register: AUX_TS_SEC */
3953 /*
3954  * AUXTSHI (RO)
3955  *
3956  * Contains the lower 32 bits of the Seconds field of the auxiliary timestamp.
3957  * Note: The top of the FIFO is removed only when the last byte of AUX_TS_SEC is read.
3958  */
3959 #define ENET_AUX_TS_SEC_AUXTSHI_MASK (0xFFFFFFFFUL)
3960 #define ENET_AUX_TS_SEC_AUXTSHI_SHIFT (0U)
3961 #define ENET_AUX_TS_SEC_AUXTSHI_GET(x) (((uint32_t)(x) & ENET_AUX_TS_SEC_AUXTSHI_MASK) >> ENET_AUX_TS_SEC_AUXTSHI_SHIFT)
3962 
3963 /* Bitfield definition for register: PPS0_INTERVAL */
3964 /*
3965  * PPSINT (RW)
3966  *
3967  * PPS0 Output Signal Interval
3968  * These bits store the interval between the rising edges of PPS0 signal output in terms of units of sub-second increment value.
3969  * You need to program one value less than the required interval.
3970  * For example, if the PTP reference clock is 50 MHz (period of 20ns),
3971  * and desired interval between rising edges of PPS0 signal output is 100ns
3972  * (that is, five units of sub-second increment value), then you should program value 4 (5 – 1) in this register.
3973  */
3974 #define ENET_PPS0_INTERVAL_PPSINT_MASK (0xFFFFFFFFUL)
3975 #define ENET_PPS0_INTERVAL_PPSINT_SHIFT (0U)
3976 #define ENET_PPS0_INTERVAL_PPSINT_SET(x) (((uint32_t)(x) << ENET_PPS0_INTERVAL_PPSINT_SHIFT) & ENET_PPS0_INTERVAL_PPSINT_MASK)
3977 #define ENET_PPS0_INTERVAL_PPSINT_GET(x) (((uint32_t)(x) & ENET_PPS0_INTERVAL_PPSINT_MASK) >> ENET_PPS0_INTERVAL_PPSINT_SHIFT)
3978 
3979 /* Bitfield definition for register: PPS0_WIDTH */
3980 /*
3981  * PPSWIDTH (RW)
3982  *
3983  * PPS0 Output Signal Width
3984  * 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.
3985  * You need to program one value less than the required interval.
3986  * For example, if PTP reference clock is 50 MHz (period of 20ns),
3987  * and desired width between the rising and corresponding falling edges of PPS0 signal output is 80ns
3988  * (that is, four units of sub-second increment value), then you should program value 3 (4 – 1) in this register.
3989  */
3990 #define ENET_PPS0_WIDTH_PPSWIDTH_MASK (0xFFFFFFFFUL)
3991 #define ENET_PPS0_WIDTH_PPSWIDTH_SHIFT (0U)
3992 #define ENET_PPS0_WIDTH_PPSWIDTH_SET(x) (((uint32_t)(x) << ENET_PPS0_WIDTH_PPSWIDTH_SHIFT) & ENET_PPS0_WIDTH_PPSWIDTH_MASK)
3993 #define ENET_PPS0_WIDTH_PPSWIDTH_GET(x) (((uint32_t)(x) & ENET_PPS0_WIDTH_PPSWIDTH_MASK) >> ENET_PPS0_WIDTH_PPSWIDTH_SHIFT)
3994 
3995 /* Bitfield definition for register of struct array PPS: TGTTM_SEC */
3996 /*
3997  * TSTRH1 (RW)
3998  *
3999  * PPS1 Target Time Seconds Register
4000  * This register stores the time in seconds.
4001  * When the timestamp value matches or exceeds both Target Timestamp registers,
4002  * then based on Bits [14:13], TRGTMODSEL1, of Register 459 (PPS Control Register),
4003  * the MAC starts or stops the PPS signal output and generates an interrupt (if enabled).
4004  */
4005 #define ENET_PPS_TGTTM_SEC_TSTRH1_MASK (0xFFFFFFFFUL)
4006 #define ENET_PPS_TGTTM_SEC_TSTRH1_SHIFT (0U)
4007 #define ENET_PPS_TGTTM_SEC_TSTRH1_SET(x) (((uint32_t)(x) << ENET_PPS_TGTTM_SEC_TSTRH1_SHIFT) & ENET_PPS_TGTTM_SEC_TSTRH1_MASK)
4008 #define ENET_PPS_TGTTM_SEC_TSTRH1_GET(x) (((uint32_t)(x) & ENET_PPS_TGTTM_SEC_TSTRH1_MASK) >> ENET_PPS_TGTTM_SEC_TSTRH1_SHIFT)
4009 
4010 /* Bitfield definition for register of struct array PPS: TGTTM_NSEC */
4011 /*
4012  * TRGTBUSY1 (RW)
4013  *
4014  * PPS1 Target Time Register Busy
4015  * The MAC sets this bit when the PPSCMD1 field (Bits [10:8]) in Register 459 (PPS Control Register) is programmed to 010 or 011.
4016  * Programming the PPSCMD1 field to 010 or 011 instructs the MAC to synchronize the Target Time Registers to the PTP clock domain.
4017  * The MAC clears this bit after synchronizing the Target Time Registers to the PTP clock domain
4018  * The application must not update the Targeers wht Time Registen this bit is read as 1.
4019  * Otherwise, the synchronization of the previous programmed time gets corrupted.
4020  */
4021 #define ENET_PPS_TGTTM_NSEC_TRGTBUSY1_MASK (0x80000000UL)
4022 #define ENET_PPS_TGTTM_NSEC_TRGTBUSY1_SHIFT (31U)
4023 #define ENET_PPS_TGTTM_NSEC_TRGTBUSY1_SET(x) (((uint32_t)(x) << ENET_PPS_TGTTM_NSEC_TRGTBUSY1_SHIFT) & ENET_PPS_TGTTM_NSEC_TRGTBUSY1_MASK)
4024 #define ENET_PPS_TGTTM_NSEC_TRGTBUSY1_GET(x) (((uint32_t)(x) & ENET_PPS_TGTTM_NSEC_TRGTBUSY1_MASK) >> ENET_PPS_TGTTM_NSEC_TRGTBUSY1_SHIFT)
4025 
4026 /*
4027  * TTSL1 (RW)
4028  *
4029  * Target Time Low for PPS1 Register
4030  * This register stores the time in (signed) nanoseconds.
4031  * When the value of the timestamp matches the both Target Timestamp registers,
4032  * then based on the TRGTMODSEL1 field (Bits [14:13]) in Register 459 (PPS Control Register),
4033  * the MAC starts or stops the PPS signal output and generates an interrupt (if enabled).
4034  * This value should not exceed 0x3B9A_C9FF when Bit 9 (TSCTRLSSR) is set in Register 448 (Timestamp Control Register).
4035  * 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.
4036  */
4037 #define ENET_PPS_TGTTM_NSEC_TTSL1_MASK (0x7FFFFFFFUL)
4038 #define ENET_PPS_TGTTM_NSEC_TTSL1_SHIFT (0U)
4039 #define ENET_PPS_TGTTM_NSEC_TTSL1_SET(x) (((uint32_t)(x) << ENET_PPS_TGTTM_NSEC_TTSL1_SHIFT) & ENET_PPS_TGTTM_NSEC_TTSL1_MASK)
4040 #define ENET_PPS_TGTTM_NSEC_TTSL1_GET(x) (((uint32_t)(x) & ENET_PPS_TGTTM_NSEC_TTSL1_MASK) >> ENET_PPS_TGTTM_NSEC_TTSL1_SHIFT)
4041 
4042 /* Bitfield definition for register of struct array PPS: INTERVAL */
4043 /*
4044  * PPSINT (RW)
4045  *
4046  * PPS1 Output Signal Interval
4047  * These bits store the interval between the rising edges of PPS1 signal output in terms of units of sub-second increment value.
4048  * You need to program one value less than the required interval. For example, if the PTP reference clock is 50 MHz (period of 20ns),
4049  * and desired interval between rising edges of PPS1 signal output is 100ns (that is, five units of sub-second increment value),
4050  * then you should program value 4 (5 – 1) in this register.
4051  */
4052 #define ENET_PPS_INTERVAL_PPSINT_MASK (0xFFFFFFFFUL)
4053 #define ENET_PPS_INTERVAL_PPSINT_SHIFT (0U)
4054 #define ENET_PPS_INTERVAL_PPSINT_SET(x) (((uint32_t)(x) << ENET_PPS_INTERVAL_PPSINT_SHIFT) & ENET_PPS_INTERVAL_PPSINT_MASK)
4055 #define ENET_PPS_INTERVAL_PPSINT_GET(x) (((uint32_t)(x) & ENET_PPS_INTERVAL_PPSINT_MASK) >> ENET_PPS_INTERVAL_PPSINT_SHIFT)
4056 
4057 /* Bitfield definition for register of struct array PPS: WIDTH */
4058 /*
4059  * PPSWIDTH (RW)
4060  *
4061  * PPS1 Output Signal Width
4062  * 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.
4063  * You need to program one value less than the required interval. For example,
4064  * if PTP reference clock is 50 MHz (period of 20ns),
4065  * 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),
4066  * then you should program value 3 (4 – 1) in this register.
4067  */
4068 #define ENET_PPS_WIDTH_PPSWIDTH_MASK (0xFFFFFFFFUL)
4069 #define ENET_PPS_WIDTH_PPSWIDTH_SHIFT (0U)
4070 #define ENET_PPS_WIDTH_PPSWIDTH_SET(x) (((uint32_t)(x) << ENET_PPS_WIDTH_PPSWIDTH_SHIFT) & ENET_PPS_WIDTH_PPSWIDTH_MASK)
4071 #define ENET_PPS_WIDTH_PPSWIDTH_GET(x) (((uint32_t)(x) & ENET_PPS_WIDTH_PPSWIDTH_MASK) >> ENET_PPS_WIDTH_PPSWIDTH_SHIFT)
4072 
4073 /* Bitfield definition for register: DMA_BUS_MODE */
4074 /*
4075  * RIB (RW)
4076  *
4077  * Rebuild INCRx Burst
4078  * When this bit is set high and the AHB master gets an EBT (Retry, Split, or Losing bus grant),
4079  * the AHB master interface rebuilds the pending beats of any burst transfer initiated with INCRx.
4080  * The AHB master interface rebuilds the beats with a combination of specified bursts with INCRx and SINGLE.
4081  * By default, the AHB master interface rebuilds pending beats of an EBT with an unspecified (INCR) burst.
4082  */
4083 #define ENET_DMA_BUS_MODE_RIB_MASK (0x80000000UL)
4084 #define ENET_DMA_BUS_MODE_RIB_SHIFT (31U)
4085 #define ENET_DMA_BUS_MODE_RIB_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_RIB_SHIFT) & ENET_DMA_BUS_MODE_RIB_MASK)
4086 #define ENET_DMA_BUS_MODE_RIB_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_RIB_MASK) >> ENET_DMA_BUS_MODE_RIB_SHIFT)
4087 
4088 /*
4089  * PRWG (RW)
4090  *
4091  * Channel Priority
4092  * Weights This field sets the priority weights for Channel 0 during the round-robin arbitration between the DMA channels for the system bus.
4093  * - 00: The priority weight is 1.
4094  * - 01: The priority weight is 2.
4095  * - 10: The priority weight is 3.
4096  * - 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).
4097  */
4098 #define ENET_DMA_BUS_MODE_PRWG_MASK (0x30000000UL)
4099 #define ENET_DMA_BUS_MODE_PRWG_SHIFT (28U)
4100 #define ENET_DMA_BUS_MODE_PRWG_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_PRWG_SHIFT) & ENET_DMA_BUS_MODE_PRWG_MASK)
4101 #define ENET_DMA_BUS_MODE_PRWG_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_PRWG_MASK) >> ENET_DMA_BUS_MODE_PRWG_SHIFT)
4102 
4103 /*
4104  * TXPR (RW)
4105  *
4106  * Transmit Priority
4107  * 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).
4108  */
4109 #define ENET_DMA_BUS_MODE_TXPR_MASK (0x8000000UL)
4110 #define ENET_DMA_BUS_MODE_TXPR_SHIFT (27U)
4111 #define ENET_DMA_BUS_MODE_TXPR_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_TXPR_SHIFT) & ENET_DMA_BUS_MODE_TXPR_MASK)
4112 #define ENET_DMA_BUS_MODE_TXPR_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_TXPR_MASK) >> ENET_DMA_BUS_MODE_TXPR_SHIFT)
4113 
4114 /*
4115  * MB (RW)
4116  *
4117  * Mixed Burst
4118  * 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),
4119  * whereas it reverts to fixed burst transfers (INCRx and SINGLE) for burst length of 16 and less.
4120  */
4121 #define ENET_DMA_BUS_MODE_MB_MASK (0x4000000UL)
4122 #define ENET_DMA_BUS_MODE_MB_SHIFT (26U)
4123 #define ENET_DMA_BUS_MODE_MB_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_MB_SHIFT) & ENET_DMA_BUS_MODE_MB_MASK)
4124 #define ENET_DMA_BUS_MODE_MB_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_MB_MASK) >> ENET_DMA_BUS_MODE_MB_SHIFT)
4125 
4126 /*
4127  * AAL (RW)
4128  *
4129  * Address-Aligned Beats
4130  * When this bit is set high and the FB bit is equal to 1,
4131  * the AHB or AXI interface generates all bursts aligned to the start address LS bits. If the FB bit is equal to 0,
4132  * the first burst (accessing the start address of data buffer) is not aligned, but subsequent bursts are aligned to the address.
4133  */
4134 #define ENET_DMA_BUS_MODE_AAL_MASK (0x2000000UL)
4135 #define ENET_DMA_BUS_MODE_AAL_SHIFT (25U)
4136 #define ENET_DMA_BUS_MODE_AAL_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_AAL_SHIFT) & ENET_DMA_BUS_MODE_AAL_MASK)
4137 #define ENET_DMA_BUS_MODE_AAL_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_AAL_MASK) >> ENET_DMA_BUS_MODE_AAL_SHIFT)
4138 
4139 /*
4140  * PBLX8 (RW)
4141  *
4142  * PBLx8 Mode
4143  * When set high, this bit multiplies the programmed PBL value (Bits [22:17] and Bits[13:8]) eight times.
4144  * Therefore, the DMA transfers the data in 8, 16, 32, 64, 128, and 256 beats depending on the PBL value.
4145  */
4146 #define ENET_DMA_BUS_MODE_PBLX8_MASK (0x1000000UL)
4147 #define ENET_DMA_BUS_MODE_PBLX8_SHIFT (24U)
4148 #define ENET_DMA_BUS_MODE_PBLX8_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_PBLX8_SHIFT) & ENET_DMA_BUS_MODE_PBLX8_MASK)
4149 #define ENET_DMA_BUS_MODE_PBLX8_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_PBLX8_MASK) >> ENET_DMA_BUS_MODE_PBLX8_SHIFT)
4150 
4151 /*
4152  * USP (RW)
4153  *
4154  * Use Separate PBL
4155  * When set high, this bit configures the Rx DMA to use the value configured in Bits [22:17] as PBL.
4156  * The PBL value in Bits [13:8] is applicable only to the Tx DMA operations.
4157  * When reset to low, the PBL value in Bits [13:8] is applicable for both DMA engines.
4158  */
4159 #define ENET_DMA_BUS_MODE_USP_MASK (0x800000UL)
4160 #define ENET_DMA_BUS_MODE_USP_SHIFT (23U)
4161 #define ENET_DMA_BUS_MODE_USP_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_USP_SHIFT) & ENET_DMA_BUS_MODE_USP_MASK)
4162 #define ENET_DMA_BUS_MODE_USP_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_USP_MASK) >> ENET_DMA_BUS_MODE_USP_SHIFT)
4163 
4164 /*
4165  * RPBL (RW)
4166  *
4167  * Rx DMA PBL
4168  * This field indicates the maximum number of beats to be transferred in one Rx DMA transaction.
4169  * This is the maximum value that is used in a single block Read or Write.
4170  * The Rx DMA always attempts to burst as specified in the RPBL bit each time it starts a Burst transfer on the host bus.
4171  * You can program RPBL with values of 1, 2, 4, 8, 16, and 32. Any other value results in undefined behavior.
4172  * This field is valid and applicable only when USP is set high.
4173  */
4174 #define ENET_DMA_BUS_MODE_RPBL_MASK (0x7E0000UL)
4175 #define ENET_DMA_BUS_MODE_RPBL_SHIFT (17U)
4176 #define ENET_DMA_BUS_MODE_RPBL_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_RPBL_SHIFT) & ENET_DMA_BUS_MODE_RPBL_MASK)
4177 #define ENET_DMA_BUS_MODE_RPBL_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_RPBL_MASK) >> ENET_DMA_BUS_MODE_RPBL_SHIFT)
4178 
4179 /*
4180  * FB (RW)
4181  *
4182  * Fixed Burst
4183  * This bit controls whether the AHB or AXI master interface performs fixed burst transfers or not.
4184  * When set, the AHB interface uses only SINGLE, INCR4, INCR8, or INCR16 during start of the normal burst transfers.
4185  * When reset, the AHB or AXI interface uses SINGLE and INCR burst transfer operations.
4186  */
4187 #define ENET_DMA_BUS_MODE_FB_MASK (0x10000UL)
4188 #define ENET_DMA_BUS_MODE_FB_SHIFT (16U)
4189 #define ENET_DMA_BUS_MODE_FB_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_FB_SHIFT) & ENET_DMA_BUS_MODE_FB_MASK)
4190 #define ENET_DMA_BUS_MODE_FB_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_FB_MASK) >> ENET_DMA_BUS_MODE_FB_SHIFT)
4191 
4192 /*
4193  * PR (RW)
4194  *
4195  * Priority Ratio
4196  * These bits control the priority ratio in the weighted round-robin arbitration between the Rx DMA and Tx DMA.
4197  * 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.
4198  * - 00: The Priority Ratio is 1:1.
4199  * - 01: The Priority Ratio is 2:1.
4200  * - 10: The Priority Ratio is 3:1.
4201  * - 11: The Priority Ratio is 4:1.
4202  */
4203 #define ENET_DMA_BUS_MODE_PR_MASK (0xC000U)
4204 #define ENET_DMA_BUS_MODE_PR_SHIFT (14U)
4205 #define ENET_DMA_BUS_MODE_PR_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_PR_SHIFT) & ENET_DMA_BUS_MODE_PR_MASK)
4206 #define ENET_DMA_BUS_MODE_PR_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_PR_MASK) >> ENET_DMA_BUS_MODE_PR_SHIFT)
4207 
4208 /*
4209  * PBL (RW)
4210  *
4211  * Programmable Burst Length
4212  * These bits indicate the maximum number of beats to be transferred in one DMA transaction.
4213  * This is the maximum value that is used in a single block Read or Write.
4214  * The DMA always attempts to burst as specified in PBL each time it starts a Burst transfer on the host bus.
4215  * PBL can be programmed with permissible values of 1, 2, 4, 8, 16, and 32.
4216  * Any other value results in undefined behavior. When USP is set high, this PBL value is applicable only for Tx DMA transactions.
4217  * 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.
4218  */
4219 #define ENET_DMA_BUS_MODE_PBL_MASK (0x3F00U)
4220 #define ENET_DMA_BUS_MODE_PBL_SHIFT (8U)
4221 #define ENET_DMA_BUS_MODE_PBL_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_PBL_SHIFT) & ENET_DMA_BUS_MODE_PBL_MASK)
4222 #define ENET_DMA_BUS_MODE_PBL_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_PBL_MASK) >> ENET_DMA_BUS_MODE_PBL_SHIFT)
4223 
4224 /*
4225  * ATDS (RW)
4226  *
4227  * Alternate Descriptor Size
4228  * When set, the size of the alternate descriptor (described in “Alternate or Enhanced Descriptors” on page 545) increases to 32 bytes (8 DWORDS).
4229  * This is required when the Advanced Timestamp feature or the IPC Full Checksum Offload Engine (Type 2) is enabled in the receiver.
4230  * The enhanced descriptor is not required if the Advanced Timestamp and IPC Full Checksum Offload Engine (Type 2) features are not enabled.
4231  * In such case, you can use the 16 bytes descriptor to save 4 bytes of memory.
4232  * This bit is present only when you select the Alternate Descriptor feature and any one of the following features during core configuration:
4233  * - Advanced Timestamp feature - IPC Full Checksum Offload Engine (Type 2) feature Otherwise, this bit is reserved and is read-only.
4234  * When reset, the descriptor size reverts back to 4 DWORDs (16 bytes).
4235  */
4236 #define ENET_DMA_BUS_MODE_ATDS_MASK (0x80U)
4237 #define ENET_DMA_BUS_MODE_ATDS_SHIFT (7U)
4238 #define ENET_DMA_BUS_MODE_ATDS_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_ATDS_SHIFT) & ENET_DMA_BUS_MODE_ATDS_MASK)
4239 #define ENET_DMA_BUS_MODE_ATDS_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_ATDS_MASK) >> ENET_DMA_BUS_MODE_ATDS_SHIFT)
4240 
4241 /*
4242  * DSL (RW)
4243  *
4244  * Descriptor Skip Length
4245  * 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.
4246  * The address skipping starts from the end of current descriptor to the start of next descriptor.
4247  * When the DSL value is equal to zero, the descriptor table is taken as contiguous by the DMA in Ring mode.
4248  */
4249 #define ENET_DMA_BUS_MODE_DSL_MASK (0x7CU)
4250 #define ENET_DMA_BUS_MODE_DSL_SHIFT (2U)
4251 #define ENET_DMA_BUS_MODE_DSL_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_DSL_SHIFT) & ENET_DMA_BUS_MODE_DSL_MASK)
4252 #define ENET_DMA_BUS_MODE_DSL_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_DSL_MASK) >> ENET_DMA_BUS_MODE_DSL_SHIFT)
4253 
4254 /*
4255  * DA (RW)
4256  *
4257  * DMA Arbitration Scheme
4258  * This bit specifies the arbitration scheme between the transmit and receive paths of Channel 0.
4259  * - 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).
4260  * - 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.
4261  */
4262 #define ENET_DMA_BUS_MODE_DA_MASK (0x2U)
4263 #define ENET_DMA_BUS_MODE_DA_SHIFT (1U)
4264 #define ENET_DMA_BUS_MODE_DA_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_DA_SHIFT) & ENET_DMA_BUS_MODE_DA_MASK)
4265 #define ENET_DMA_BUS_MODE_DA_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_DA_MASK) >> ENET_DMA_BUS_MODE_DA_SHIFT)
4266 
4267 /*
4268  * SWR (RW)
4269  *
4270  * Software Reset
4271  * When this bit is set, the MAC DMA Controller resets the logic and all internal registers of the MAC.
4272  * It is cleared automatically after the reset operation is complete in all of the DWC_gmac clock domains.
4273  * Before reprogramming any register of the DWC_gmac, you should read a zero (0) value in this bit.
4274  * Note: - The Software reset function is driven only by this bit.
4275  * 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.
4276  * - The reset operation is completed only when all resets in all active clock domains are de-asserted.
4277  * Therefore, it is essential that all PHY inputs clocks (applicable for the selected PHY interface) are present for the software reset completion.
4278  * The time to complete the software reset operation depends on the frequency of the slowest active clock.
4279  */
4280 #define ENET_DMA_BUS_MODE_SWR_MASK (0x1U)
4281 #define ENET_DMA_BUS_MODE_SWR_SHIFT (0U)
4282 #define ENET_DMA_BUS_MODE_SWR_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_MODE_SWR_SHIFT) & ENET_DMA_BUS_MODE_SWR_MASK)
4283 #define ENET_DMA_BUS_MODE_SWR_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_MODE_SWR_MASK) >> ENET_DMA_BUS_MODE_SWR_SHIFT)
4284 
4285 /* Bitfield definition for register: DMA_TX_POLL_DEMAND */
4286 /*
4287  * TPD (RW)
4288  *
4289  * Transmit Poll Demand
4290  * When these bits are written with any value,
4291  * the DMA reads the current descriptor to which the Register 18 (Current Host Transmit Descriptor Register) is pointing.
4292  * If that descriptor is not available (owned by the Host),
4293  * the transmission returns to the Suspend state and Bit 2 (TU) of Register 5 (Status Register) is asserted.
4294  * If the descriptor is available, the transmission resumes.
4295  */
4296 #define ENET_DMA_TX_POLL_DEMAND_TPD_MASK (0xFFFFFFFFUL)
4297 #define ENET_DMA_TX_POLL_DEMAND_TPD_SHIFT (0U)
4298 #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)
4299 #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)
4300 
4301 /* Bitfield definition for register: DMA_RX_POLL_DEMAND */
4302 /*
4303  * RPD (RW)
4304  *
4305  * Receive Poll Demand
4306  * When these bits are written with any value,
4307  * the DMA reads the current descriptor to which the Register 19 (Current Host Receive Descriptor Register) is pointing.
4308  * If that descriptor is not available (owned by the Host),
4309  * the reception returns to the Suspended state and Bit 7 (RU) of Register 5 (Status Register) is asserted.
4310  * If the descriptor is available, the Rx DMA returns to the active state.
4311  */
4312 #define ENET_DMA_RX_POLL_DEMAND_RPD_MASK (0xFFFFFFFFUL)
4313 #define ENET_DMA_RX_POLL_DEMAND_RPD_SHIFT (0U)
4314 #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)
4315 #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)
4316 
4317 /* Bitfield definition for register: DMA_RX_DESC_LIST_ADDR */
4318 /*
4319  * RDESLA (RW)
4320  *
4321  * Start of Receive List
4322  * This field contains the base address of the first descriptor in the Receive Descriptor list.
4323  * 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).
4324  */
4325 #define ENET_DMA_RX_DESC_LIST_ADDR_RDESLA_MASK (0xFFFFFFFFUL)
4326 #define ENET_DMA_RX_DESC_LIST_ADDR_RDESLA_SHIFT (0U)
4327 #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)
4328 #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)
4329 
4330 /* Bitfield definition for register: DMA_TX_DESC_LIST_ADDR */
4331 /*
4332  * TDESLA (RW)
4333  *
4334  * Start of Transmit List
4335  * This field contains the base address of the first descriptor in the Transmit Descriptor list.
4336  * 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).
4337  */
4338 #define ENET_DMA_TX_DESC_LIST_ADDR_TDESLA_MASK (0xFFFFFFFFUL)
4339 #define ENET_DMA_TX_DESC_LIST_ADDR_TDESLA_SHIFT (0U)
4340 #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)
4341 #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)
4342 
4343 /* Bitfield definition for register: DMA_STATUS */
4344 /*
4345  * GLPII (RO)
4346  *
4347  * GLPII: GMAC LPI Interrupt (for Channel 0)
4348  * This bit indicates an interrupt event in the LPI logic of the MAC.
4349  * 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.
4350  * 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.
4351  * When this bit is high, the interrupt signal from the MAC (sbd_intr_o) is high.
4352  * -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.
4353  * 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.
4354  * 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.
4355  * Otherwise, this bit is reserved. When this bit is high, the interrupt signal from the MAC (sbd_intr_o) is high.
4356  */
4357 #define ENET_DMA_STATUS_GLPII_MASK (0x40000000UL)
4358 #define ENET_DMA_STATUS_GLPII_SHIFT (30U)
4359 #define ENET_DMA_STATUS_GLPII_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_GLPII_MASK) >> ENET_DMA_STATUS_GLPII_SHIFT)
4360 
4361 /*
4362  * TTI (RO)
4363  *
4364  * Timestamp Trigger Interrupt
4365  * This bit indicates an interrupt event in the Timestamp Generator block of the DWC_gmac.
4366  * 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.
4367  * When this bit is high, the interrupt signal from the DWC_gmac subsystem (sbd_intr_o) is high.
4368  * This bit is applicable only when the IEEE 1588 Timestamp feature is enabled. Otherwise, this bit is reserved.
4369  */
4370 #define ENET_DMA_STATUS_TTI_MASK (0x20000000UL)
4371 #define ENET_DMA_STATUS_TTI_SHIFT (29U)
4372 #define ENET_DMA_STATUS_TTI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_TTI_MASK) >> ENET_DMA_STATUS_TTI_SHIFT)
4373 
4374 /*
4375  * GPI (RO)
4376  *
4377  * GMAC PMT Interrupt
4378  * This bit indicates an interrupt event in the PMT module of the DWC_gmac.
4379  * 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.
4380  * The interrupt signal from the DWC_gmac subsystem (sbd_intr_o) is high when this bit is high.
4381  * This bit is applicable only when the Power Management feature is enabled.
4382  * Otherwise, this bit is reserved. Note: The GPI and pmt_intr_o interrupts are generated in different clock domains.
4383  */
4384 #define ENET_DMA_STATUS_GPI_MASK (0x10000000UL)
4385 #define ENET_DMA_STATUS_GPI_SHIFT (28U)
4386 #define ENET_DMA_STATUS_GPI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_GPI_MASK) >> ENET_DMA_STATUS_GPI_SHIFT)
4387 
4388 /*
4389  * GMI (RO)
4390  *
4391  * GMAC MMC Interrupt
4392  * This bit reflects an interrupt event in the MMC module of the DWC_gmac.
4393  * The software must read the corresponding registers in the DWC_gmac
4394  * to get the exact cause of the interrupt and clear the source of interrupt to make this bit as 1’b0.
4395  * The interrupt signal from the DWC_gmac subsystem (sbd_intr_o) is high when this bit is high.
4396  * This bit is applicable only when the MAC Management Counters (MMC) are enabled. Otherwise, this bit is reserved.
4397  */
4398 #define ENET_DMA_STATUS_GMI_MASK (0x8000000UL)
4399 #define ENET_DMA_STATUS_GMI_SHIFT (27U)
4400 #define ENET_DMA_STATUS_GMI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_GMI_MASK) >> ENET_DMA_STATUS_GMI_SHIFT)
4401 
4402 /*
4403  * GLI (RO)
4404  *
4405  * GMAC Line Interface Interrupt
4406  * When set, this bit reflects any of the following interrupt events in the DWC_gmac interfaces (if present and enabled in your configuration):
4407  * - PCS (TBI, RTBI, or SGMII): Link change or auto-negotiation complete event
4408  * - SMII or RGMII: Link change event - General Purpose Input Status (GPIS):
4409  * Any LL or LH event on the gpi_i input ports To identify the exact cause of the interrupt,
4410  * 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),
4411  * read any of the following corresponding registers:
4412  * - PCS (TBI, RTBI, or SGMII): Register 49 (AN Status Register)
4413  * - SMII or RGMII: Register 54 (SGMII/RGMII/SMII Control and Status Register)
4414  * - 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.
4415  */
4416 #define ENET_DMA_STATUS_GLI_MASK (0x4000000UL)
4417 #define ENET_DMA_STATUS_GLI_SHIFT (26U)
4418 #define ENET_DMA_STATUS_GLI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_GLI_MASK) >> ENET_DMA_STATUS_GLI_SHIFT)
4419 
4420 /*
4421  * EB (RO)
4422  *
4423  * Error Bits
4424  * This field indicates the type of error that caused a Bus Error, for example, error response on the AHB or AXI interface.
4425  * This field is valid only when Bit 13 (FBI) is set. This field does not generate an interrupt.
4426  * - 0 0 0: Error during Rx DMA Write Data Transfer
4427  * - 0 1 1: Error during Tx DMA Read Data Transfer
4428  * - 1 0 0: Error during Rx DMA Descriptor Write Access
4429  * - 1 0 1: Error during Tx DMA Descriptor Write Access
4430  * - 1 1 0: Error during Rx DMA Descriptor Read Access
4431  * - 1 1 1: Error during Tx DMA Descriptor Read Access Note: 001 and 010 are reserved.
4432  */
4433 #define ENET_DMA_STATUS_EB_MASK (0x3800000UL)
4434 #define ENET_DMA_STATUS_EB_SHIFT (23U)
4435 #define ENET_DMA_STATUS_EB_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_EB_MASK) >> ENET_DMA_STATUS_EB_SHIFT)
4436 
4437 /*
4438  * TS (RO)
4439  *
4440  * Transmit Process State
4441  * This field indicates the Transmit DMA FSM state. This field does not generate an interrupt.
4442  * - 3’b000: Stopped; Reset or Stop Transmit Command issued
4443  * - 3’b001: Running; Fetching Transmit Transfer Descriptor
4444  * - 3’b010: Running; Waiting for status
4445  * - 3’b011: Running; Reading Data from host memory buffer and queuing it to transmit buffer (Tx FIFO)
4446  * - 3’b100: TIME_STAMP write state
4447  * - 3’b101: Reserved for future use
4448  * - 3’b110: Suspended; Transmit Descriptor Unavailable or Transmit Buffer Underflow
4449  * - 3’b111: Running; Closing Transmit Descriptor
4450  */
4451 #define ENET_DMA_STATUS_TS_MASK (0x700000UL)
4452 #define ENET_DMA_STATUS_TS_SHIFT (20U)
4453 #define ENET_DMA_STATUS_TS_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_TS_MASK) >> ENET_DMA_STATUS_TS_SHIFT)
4454 
4455 /*
4456  * RS (RO)
4457  *
4458  * Receive Process State
4459  * This field indicates the Receive DMA FSM state. This field does not generate an interrupt.
4460  * - 3’b000: Stopped: Reset or Stop Receive Command issued
4461  * - 3’b001: Running: Fetching Receive Transfer Descriptor
4462  * - 3’b010: Reserved for future use
4463  * - 3’b011: Running: Waiting for receive packet
4464  * - 3’b100: Suspended: Receive Descriptor Unavailable
4465  * - 3’b101: Running: Closing Receive Descriptor
4466  * - 3’b110: TIME_STAMP write state
4467  * - 3’b111: Running: Transferring the receive packet data from receive buffer to host memory
4468  */
4469 #define ENET_DMA_STATUS_RS_MASK (0xE0000UL)
4470 #define ENET_DMA_STATUS_RS_SHIFT (17U)
4471 #define ENET_DMA_STATUS_RS_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_RS_MASK) >> ENET_DMA_STATUS_RS_SHIFT)
4472 
4473 /*
4474  * NIS (W1C)
4475  *
4476  * Normal Interrupt Summary
4477  * Normal Interrupt Summary bit value is the logical OR of the following bits when the corresponding interrupt bits are enabled in
4478  * Register 7 (Interrupt Enable Register):
4479  * - Register 5[0]: Transmit Interrupt
4480  * - Register 5[2]: Transmit Buffer Unavailable
4481  * - Register 5[6]: Receive Interrupt
4482  * - Register 5[14]: Early Receive Interrupt Only unmasked bits
4483  * (interrupts for which interrupt enable is set in Register 7) affect the Normal Interrupt Summary bit.
4484  * 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.
4485  */
4486 #define ENET_DMA_STATUS_NIS_MASK (0x10000UL)
4487 #define ENET_DMA_STATUS_NIS_SHIFT (16U)
4488 #define ENET_DMA_STATUS_NIS_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_NIS_SHIFT) & ENET_DMA_STATUS_NIS_MASK)
4489 #define ENET_DMA_STATUS_NIS_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_NIS_MASK) >> ENET_DMA_STATUS_NIS_SHIFT)
4490 
4491 /*
4492  * AIS (W1C)
4493  *
4494  * Abnormal Interrupt Summary
4495  * Abnormal Interrupt Summary bit value is the logical OR of the following
4496  * when the corresponding interrupt bits are enabled in Register 7 (Interrupt Enable Register):
4497  * - Register 5[1]: Transmit Process Stopped
4498  * - Register 5[3]: Transmit Jabber Timeout
4499  * - Register 5[4]: Receive FIFO Overflow
4500  * - Register 5[5]: Transmit Underflow
4501  * - Register 5[7]: Receive Buffer Unavailable
4502  * - Register 5[8]: Receive Process Stopped
4503  * - Register 5[9]: Receive Watchdog Timeout
4504  * - Register 5[10]: Early Transmit Interrupt
4505  * - Register 5[13]: Fatal Bus Error Only unmasked bits affect the Abnormal Interrupt Summary bit.
4506  * 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.
4507  */
4508 #define ENET_DMA_STATUS_AIS_MASK (0x8000U)
4509 #define ENET_DMA_STATUS_AIS_SHIFT (15U)
4510 #define ENET_DMA_STATUS_AIS_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_AIS_SHIFT) & ENET_DMA_STATUS_AIS_MASK)
4511 #define ENET_DMA_STATUS_AIS_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_AIS_MASK) >> ENET_DMA_STATUS_AIS_SHIFT)
4512 
4513 /*
4514  * ERI (W1C)
4515  *
4516  * Early Receive Interrupt
4517  * 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).
4518  */
4519 #define ENET_DMA_STATUS_ERI_MASK (0x4000U)
4520 #define ENET_DMA_STATUS_ERI_SHIFT (14U)
4521 #define ENET_DMA_STATUS_ERI_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_ERI_SHIFT) & ENET_DMA_STATUS_ERI_MASK)
4522 #define ENET_DMA_STATUS_ERI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_ERI_MASK) >> ENET_DMA_STATUS_ERI_SHIFT)
4523 
4524 /*
4525  * FBI (W1C)
4526  *
4527  * Fatal Bus Error Interrupt
4528  * 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.
4529  */
4530 #define ENET_DMA_STATUS_FBI_MASK (0x2000U)
4531 #define ENET_DMA_STATUS_FBI_SHIFT (13U)
4532 #define ENET_DMA_STATUS_FBI_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_FBI_SHIFT) & ENET_DMA_STATUS_FBI_MASK)
4533 #define ENET_DMA_STATUS_FBI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_FBI_MASK) >> ENET_DMA_STATUS_FBI_SHIFT)
4534 
4535 /*
4536  * ETI (W1C)
4537  *
4538  * Early Transmit Interrupt
4539  * This bit indicates that the frame to be transmitted is fully transferred to the MTL Transmit FIFO.
4540  */
4541 #define ENET_DMA_STATUS_ETI_MASK (0x400U)
4542 #define ENET_DMA_STATUS_ETI_SHIFT (10U)
4543 #define ENET_DMA_STATUS_ETI_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_ETI_SHIFT) & ENET_DMA_STATUS_ETI_MASK)
4544 #define ENET_DMA_STATUS_ETI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_ETI_MASK) >> ENET_DMA_STATUS_ETI_SHIFT)
4545 
4546 /*
4547  * RWT (W1C)
4548  *
4549  * Receive Watchdog Timeout
4550  * 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.
4551  */
4552 #define ENET_DMA_STATUS_RWT_MASK (0x200U)
4553 #define ENET_DMA_STATUS_RWT_SHIFT (9U)
4554 #define ENET_DMA_STATUS_RWT_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_RWT_SHIFT) & ENET_DMA_STATUS_RWT_MASK)
4555 #define ENET_DMA_STATUS_RWT_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_RWT_MASK) >> ENET_DMA_STATUS_RWT_SHIFT)
4556 
4557 /*
4558  * RPS (W1C)
4559  *
4560  * Receive Process Stopped
4561  * This bit is asserted when the Receive Process enters the Stopped state.
4562  */
4563 #define ENET_DMA_STATUS_RPS_MASK (0x100U)
4564 #define ENET_DMA_STATUS_RPS_SHIFT (8U)
4565 #define ENET_DMA_STATUS_RPS_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_RPS_SHIFT) & ENET_DMA_STATUS_RPS_MASK)
4566 #define ENET_DMA_STATUS_RPS_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_RPS_MASK) >> ENET_DMA_STATUS_RPS_SHIFT)
4567 
4568 /*
4569  * RU (W1C)
4570  *
4571  * Receive Buffer Unavailable
4572  * This bit indicates that the host owns the Next Descriptor in the Receive List and the DMA cannot acquire it.
4573  * The Receive Process is suspended. To resume processing Receive descriptors,
4574  * the host should change the ownership of the descriptor and issue a Receive Poll Demand command.
4575  * If no Receive Poll Demand is issued, the Receive Process resumes when the next recognized incoming frame is received.
4576  * This bit is set only when the previous Receive Descriptor is owned by the DMA.
4577  */
4578 #define ENET_DMA_STATUS_RU_MASK (0x80U)
4579 #define ENET_DMA_STATUS_RU_SHIFT (7U)
4580 #define ENET_DMA_STATUS_RU_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_RU_SHIFT) & ENET_DMA_STATUS_RU_MASK)
4581 #define ENET_DMA_STATUS_RU_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_RU_MASK) >> ENET_DMA_STATUS_RU_SHIFT)
4582 
4583 /*
4584  * RI (W1C)
4585  *
4586  * Receive Interrupt
4587  * This bit indicates that the frame reception is complete and the specific frame status information is updated in the descriptor.
4588  * The reception remains in the Running state.
4589  */
4590 #define ENET_DMA_STATUS_RI_MASK (0x40U)
4591 #define ENET_DMA_STATUS_RI_SHIFT (6U)
4592 #define ENET_DMA_STATUS_RI_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_RI_SHIFT) & ENET_DMA_STATUS_RI_MASK)
4593 #define ENET_DMA_STATUS_RI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_RI_MASK) >> ENET_DMA_STATUS_RI_SHIFT)
4594 
4595 /*
4596  * UNF (W1C)
4597  *
4598  * Transmit Underflow
4599  * This bit indicates that the Transmit Buffer had an Underflow during frame transmission. Transmission is suspended and an Underflow Error TDES0[1] is set.
4600  */
4601 #define ENET_DMA_STATUS_UNF_MASK (0x20U)
4602 #define ENET_DMA_STATUS_UNF_SHIFT (5U)
4603 #define ENET_DMA_STATUS_UNF_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_UNF_SHIFT) & ENET_DMA_STATUS_UNF_MASK)
4604 #define ENET_DMA_STATUS_UNF_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_UNF_MASK) >> ENET_DMA_STATUS_UNF_SHIFT)
4605 
4606 /*
4607  * OVF (W1C)
4608  *
4609  * Receive Overflow
4610  * 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].
4611  */
4612 #define ENET_DMA_STATUS_OVF_MASK (0x10U)
4613 #define ENET_DMA_STATUS_OVF_SHIFT (4U)
4614 #define ENET_DMA_STATUS_OVF_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_OVF_SHIFT) & ENET_DMA_STATUS_OVF_MASK)
4615 #define ENET_DMA_STATUS_OVF_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_OVF_MASK) >> ENET_DMA_STATUS_OVF_SHIFT)
4616 
4617 /*
4618  * TJT (W1C)
4619  *
4620  * Transmit Jabber Timeout
4621  * 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).
4622  * 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.
4623  */
4624 #define ENET_DMA_STATUS_TJT_MASK (0x8U)
4625 #define ENET_DMA_STATUS_TJT_SHIFT (3U)
4626 #define ENET_DMA_STATUS_TJT_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_TJT_SHIFT) & ENET_DMA_STATUS_TJT_MASK)
4627 #define ENET_DMA_STATUS_TJT_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_TJT_MASK) >> ENET_DMA_STATUS_TJT_SHIFT)
4628 
4629 /*
4630  * TU (W1C)
4631  *
4632  * Transmit Buffer Unavailable
4633  * 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.
4634  * 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.
4635  */
4636 #define ENET_DMA_STATUS_TU_MASK (0x4U)
4637 #define ENET_DMA_STATUS_TU_SHIFT (2U)
4638 #define ENET_DMA_STATUS_TU_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_TU_SHIFT) & ENET_DMA_STATUS_TU_MASK)
4639 #define ENET_DMA_STATUS_TU_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_TU_MASK) >> ENET_DMA_STATUS_TU_SHIFT)
4640 
4641 /*
4642  * TPS (W1C)
4643  *
4644  * Transmit Process Stopped
4645  * This bit is set when the transmission is stopped.
4646  */
4647 #define ENET_DMA_STATUS_TPS_MASK (0x2U)
4648 #define ENET_DMA_STATUS_TPS_SHIFT (1U)
4649 #define ENET_DMA_STATUS_TPS_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_TPS_SHIFT) & ENET_DMA_STATUS_TPS_MASK)
4650 #define ENET_DMA_STATUS_TPS_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_TPS_MASK) >> ENET_DMA_STATUS_TPS_SHIFT)
4651 
4652 /*
4653  * TI (W1C)
4654  *
4655  * Transmit Interrupt
4656  * 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.
4657  */
4658 #define ENET_DMA_STATUS_TI_MASK (0x1U)
4659 #define ENET_DMA_STATUS_TI_SHIFT (0U)
4660 #define ENET_DMA_STATUS_TI_SET(x) (((uint32_t)(x) << ENET_DMA_STATUS_TI_SHIFT) & ENET_DMA_STATUS_TI_MASK)
4661 #define ENET_DMA_STATUS_TI_GET(x) (((uint32_t)(x) & ENET_DMA_STATUS_TI_MASK) >> ENET_DMA_STATUS_TI_SHIFT)
4662 
4663 /* Bitfield definition for register: DMA_OP_MODE */
4664 /*
4665  * DT (RW)
4666  *
4667  * Disable Dropping of TCP/IP Checksum Error Frames
4668  * When this bit is set, the MAC does not drop the frames which only have errors detected by the Receive Checksum Offload engine.
4669  * 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.
4670  * 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).
4671  */
4672 #define ENET_DMA_OP_MODE_DT_MASK (0x10000000UL)
4673 #define ENET_DMA_OP_MODE_DT_SHIFT (28U)
4674 #define ENET_DMA_OP_MODE_DT_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_DT_SHIFT) & ENET_DMA_OP_MODE_DT_MASK)
4675 #define ENET_DMA_OP_MODE_DT_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_DT_MASK) >> ENET_DMA_OP_MODE_DT_SHIFT)
4676 
4677 /*
4678  * RSF (RW)
4679  *
4680  * Receive Store and Forward
4681  * 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.
4682  * When this bit is reset, the Rx FIFO operates in the cut-through mode, subject to the threshold specified by the RTC bits.
4683  */
4684 #define ENET_DMA_OP_MODE_RSF_MASK (0x2000000UL)
4685 #define ENET_DMA_OP_MODE_RSF_SHIFT (25U)
4686 #define ENET_DMA_OP_MODE_RSF_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_RSF_SHIFT) & ENET_DMA_OP_MODE_RSF_MASK)
4687 #define ENET_DMA_OP_MODE_RSF_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_RSF_MASK) >> ENET_DMA_OP_MODE_RSF_SHIFT)
4688 
4689 /*
4690  * DFF (RW)
4691  *
4692  * Disable Flushing of Received Frames
4693  * 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.)
4694  */
4695 #define ENET_DMA_OP_MODE_DFF_MASK (0x1000000UL)
4696 #define ENET_DMA_OP_MODE_DFF_SHIFT (24U)
4697 #define ENET_DMA_OP_MODE_DFF_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_DFF_SHIFT) & ENET_DMA_OP_MODE_DFF_MASK)
4698 #define ENET_DMA_OP_MODE_DFF_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_DFF_MASK) >> ENET_DMA_OP_MODE_DFF_SHIFT)
4699 
4700 /*
4701  * RFA_2 (RW)
4702  *
4703  * MSB of Threshold for Activating Flow Control
4704  * If the DWC_gmac is configured for an Rx FIFO size of 8 KB or more,
4705  * this bit (when set) provides additional threshold levels for activating the flow control in both half-duplex and full-duplex modes.
4706  * This bit (as Most Significant Bit), along with the RFA (Bits [10:9]), gives the following thresholds for activating flow control:
4707  * - 100: Full minus 5 KB, that is, FULL — 5 KB
4708  * - 101: Full minus 6 KB, that is, FULL — 6 KB
4709  * - 110: Full minus 7 KB, that is, FULL — 7 KB
4710  * - 111: Reserved This bit is reserved (and RO) if the Rx FIFO is 4 KB or less deep.
4711  */
4712 #define ENET_DMA_OP_MODE_RFA_2_MASK (0x800000UL)
4713 #define ENET_DMA_OP_MODE_RFA_2_SHIFT (23U)
4714 #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)
4715 #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)
4716 
4717 /*
4718  * RFD_2 (RW)
4719  *
4720  * MSB of Threshold for Deactivating Flow Control
4721  * If the DWC_gmac is configured for Rx FIFO size of 8 KB or more,
4722  * this bit (when set) provides additional threshold levels for deactivating the flow control in both half-duplex and full-duplex modes.
4723  * This bit (as Most Significant Bit) along with the RFD (Bits [12:11]) gives the following thresholds for deactivating flow control:
4724  * - 100: Full minus 5 KB, that is, FULL — 5 KB
4725  * - 101: Full minus 6 KB, that is, FULL — 6 KB
4726  * - 110: Full minus 7 KB, that is, FULL — 7 KB
4727  * - 111: Reserved This bit is reserved (and RO) if the Rx FIFO is 4 KB or less deep.
4728  */
4729 #define ENET_DMA_OP_MODE_RFD_2_MASK (0x400000UL)
4730 #define ENET_DMA_OP_MODE_RFD_2_SHIFT (22U)
4731 #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)
4732 #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)
4733 
4734 /*
4735  * TSF (RW)
4736  *
4737  * Transmit Store and Forward
4738  * When this bit is set, transmission starts when a full frame resides in the MTL Transmit FIFO.
4739  * When this bit is set, the TTC values specified in Bits [16:14] are ignored.
4740  * This bit should be changed only when the transmission is stopped.
4741  */
4742 #define ENET_DMA_OP_MODE_TSF_MASK (0x200000UL)
4743 #define ENET_DMA_OP_MODE_TSF_SHIFT (21U)
4744 #define ENET_DMA_OP_MODE_TSF_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_TSF_SHIFT) & ENET_DMA_OP_MODE_TSF_MASK)
4745 #define ENET_DMA_OP_MODE_TSF_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_TSF_MASK) >> ENET_DMA_OP_MODE_TSF_SHIFT)
4746 
4747 /*
4748  * FTF (RW)
4749  *
4750  * Flush Transmit FIFO
4751  * 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.
4752  * This bit is cleared internally when the flushing operation is complete.
4753  * The Operation Mode register should not be written to until this bit is cleared.
4754  * The data which is already accepted by the MAC transmitter is not flushed.
4755  * It is scheduled for transmission and results in underflow and runt frame transmission.
4756  */
4757 #define ENET_DMA_OP_MODE_FTF_MASK (0x100000UL)
4758 #define ENET_DMA_OP_MODE_FTF_SHIFT (20U)
4759 #define ENET_DMA_OP_MODE_FTF_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_FTF_SHIFT) & ENET_DMA_OP_MODE_FTF_MASK)
4760 #define ENET_DMA_OP_MODE_FTF_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_FTF_MASK) >> ENET_DMA_OP_MODE_FTF_SHIFT)
4761 
4762 /*
4763  * TTC (RW)
4764  *
4765  * Transmit Threshold Control
4766  * These bits control the threshold level of the MTL Transmit FIFO.
4767  * Transmission starts when the frame size within the MTL Transmit FIFO is larger than the threshold.
4768  * In addition, full frames with a length less than the threshold are also transmitted.
4769  * These bits are used only when Bit 21 (TSF) is reset.
4770  * - 000: 64
4771  * - 001: 128
4772  * - 010: 192
4773  * - 011: 256
4774  * - 100: 40
4775  * - 101: 32
4776  * - 110: 24
4777  * - 111: 16
4778  */
4779 #define ENET_DMA_OP_MODE_TTC_MASK (0x1C000UL)
4780 #define ENET_DMA_OP_MODE_TTC_SHIFT (14U)
4781 #define ENET_DMA_OP_MODE_TTC_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_TTC_SHIFT) & ENET_DMA_OP_MODE_TTC_MASK)
4782 #define ENET_DMA_OP_MODE_TTC_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_TTC_MASK) >> ENET_DMA_OP_MODE_TTC_SHIFT)
4783 
4784 /*
4785  * ST (RW)
4786  *
4787  * Start or Stop Transmission Command
4788  * 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.
4789  * Descriptor acquisition is attempted either from the current position in the list,
4790  * which is the Transmit List Base Address set by Register 4 (Transmit Descriptor List Address Register),
4791  * or from the position retained when transmission was stopped previously.
4792  * If the DMA does not own the current descriptor,
4793  * transmission enters the Suspended state and Bit 2 (Transmit Buffer Unavailable) of Register 5 (Status Register) is set.
4794  * The Start Transmission command is effective only when transmission is stopped.
4795  * If the command is issued before setting Register 4 (Transmit Descriptor List Address Register),
4796  * then the DMA behavior is unpredictable. When this bit is reset,
4797  * the transmission process is placed in the Stopped state after completing the transmission of the current frame.
4798  * The Next Descriptor position in the Transmit List is saved,
4799  * and it becomes the current position when transmission is restarted.
4800  * 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.
4801  * The new value is considered when this bit is set again.
4802  * The stop transmission command is effective only when the transmission of the current frame is complete or the transmission is in the Suspended state.
4803  */
4804 #define ENET_DMA_OP_MODE_ST_MASK (0x2000U)
4805 #define ENET_DMA_OP_MODE_ST_SHIFT (13U)
4806 #define ENET_DMA_OP_MODE_ST_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_ST_SHIFT) & ENET_DMA_OP_MODE_ST_MASK)
4807 #define ENET_DMA_OP_MODE_ST_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_ST_MASK) >> ENET_DMA_OP_MODE_ST_SHIFT)
4808 
4809 /*
4810  * RFD (RW)
4811  *
4812  * 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.
4813  * - 00: Full minus 1 KB, that is, FULL — 1 KB
4814  * - 01: Full minus 2 KB, that is, FULL — 2 KB
4815  * - 10: Full minus 3 KB, that is, FULL — 3 KB
4816  * - 11: Full minus 4 KB, that is, FULL — 4 KB
4817  * The de-assertion is effective only after flow control is asserted.
4818  * 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.
4819  * These bits are reserved and read-only when the Rx FIFO depth is less than 4 KB.
4820  */
4821 #define ENET_DMA_OP_MODE_RFD_MASK (0x1800U)
4822 #define ENET_DMA_OP_MODE_RFD_SHIFT (11U)
4823 #define ENET_DMA_OP_MODE_RFD_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_RFD_SHIFT) & ENET_DMA_OP_MODE_RFD_MASK)
4824 #define ENET_DMA_OP_MODE_RFD_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_RFD_MASK) >> ENET_DMA_OP_MODE_RFD_SHIFT)
4825 
4826 /*
4827  * RFA (RW)
4828  *
4829  * Threshold for Activating Flow Control (in half-duplex and full-duplex modes)
4830  * These bits control the threshold (Fill level of Rx FIFO) at which the flow control is activated.
4831  * - 00: Full minus 1 KB, that is, FULL—1KB.
4832  * - 01: Full minus 2 KB, that is, FULL—2KB.
4833  * - 10: Full minus 3 KB, that is, FULL—3KB.
4834  * - 11: Full minus 4 KB, that is, FULL—4KB.
4835  * 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,
4836  * an additional Bit (RFA_2) is used for more threshold levels as described in Bit 23.
4837  * These bits are reserved and read-only when the depth of Rx FIFO is less than 4 KB.
4838  * Note: When FIFO size is exactly 4 KB, although the DWC_gmac allows you to program the value of these bits to 11,
4839  * the software should not program these bits to 2'b11. The value 2'b11 means flow control on FIFO empty condition
4840  */
4841 #define ENET_DMA_OP_MODE_RFA_MASK (0x600U)
4842 #define ENET_DMA_OP_MODE_RFA_SHIFT (9U)
4843 #define ENET_DMA_OP_MODE_RFA_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_RFA_SHIFT) & ENET_DMA_OP_MODE_RFA_MASK)
4844 #define ENET_DMA_OP_MODE_RFA_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_RFA_MASK) >> ENET_DMA_OP_MODE_RFA_SHIFT)
4845 
4846 /*
4847  * EFC (RW)
4848  *
4849  * Enable HW Flow Control
4850  * When this bit is set, the flow control signal operation based on the fill-level of Rx FIFO is enabled.
4851  * When reset, the flow control operation is disabled.
4852  * This bit is not used (reserved and always reset) when the Rx FIFO is less than 4 KB.
4853  */
4854 #define ENET_DMA_OP_MODE_EFC_MASK (0x100U)
4855 #define ENET_DMA_OP_MODE_EFC_SHIFT (8U)
4856 #define ENET_DMA_OP_MODE_EFC_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_EFC_SHIFT) & ENET_DMA_OP_MODE_EFC_MASK)
4857 #define ENET_DMA_OP_MODE_EFC_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_EFC_MASK) >> ENET_DMA_OP_MODE_EFC_SHIFT)
4858 
4859 /*
4860  * FEF (RW)
4861  *
4862  * Forward Error Frames
4863  * 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).
4864  * However, if the start byte (write) pointer of a frame is already transferred to the read controller side (in Threshold mode),
4865  * then the frame is not dropped. In the GMAC-MTL configuration in which the Frame Length FIFO is also enabled during core configuration,
4866  * the Rx FIFO drops the error frames if that frame's start byte is not transferred (output) on the ARI bus.
4867  * When the FEF bit is set, all frames except runt error frames are forwarded to the DMA.
4868  * If the Bit 25 (RSF) is set and the Rx FIFO overflows when a partial frame is written,
4869  * then the frame is dropped irrespective of the FEF bit setting.
4870  * 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.
4871  * 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:
4872  * - The IP checksum engine (Type 1) and full checksum offload engine (Type 2) are not selected.
4873  * - The advanced timestamp feature is not selected but the extended status is selected.
4874  * The extended status is available with the following features:
4875  * - L3-L4 filter in GMAC-CORE or GMAC-MTL configurations
4876  * - Full checksum offload engine (Type 2) with enhanced descriptor format in the GMAC-DMA, GMAC-AHB, or GMAC-AXI configurations.
4877  */
4878 #define ENET_DMA_OP_MODE_FEF_MASK (0x80U)
4879 #define ENET_DMA_OP_MODE_FEF_SHIFT (7U)
4880 #define ENET_DMA_OP_MODE_FEF_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_FEF_SHIFT) & ENET_DMA_OP_MODE_FEF_MASK)
4881 #define ENET_DMA_OP_MODE_FEF_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_FEF_MASK) >> ENET_DMA_OP_MODE_FEF_SHIFT)
4882 
4883 /*
4884  * FUF (RW)
4885  *
4886  * Forward Undersized Good Frames
4887  * 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
4888  * 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.
4889  */
4890 #define ENET_DMA_OP_MODE_FUF_MASK (0x40U)
4891 #define ENET_DMA_OP_MODE_FUF_SHIFT (6U)
4892 #define ENET_DMA_OP_MODE_FUF_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_FUF_SHIFT) & ENET_DMA_OP_MODE_FUF_MASK)
4893 #define ENET_DMA_OP_MODE_FUF_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_FUF_MASK) >> ENET_DMA_OP_MODE_FUF_SHIFT)
4894 
4895 /*
4896  * DGF (RW)
4897  *
4898  * Drop Giant Frames
4899  * When set, the MAC drops the received giant frames in the Rx FIFO,
4900  * that is, frames that are larger than the computed giant frame limit.
4901  * When reset, the MAC does not drop the giant frames in the Rx FIFO.
4902  * 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:
4903  * - Configurations in which IP Checksum Offload (Type 1) is selected in Rx
4904  * - Configurations in which the IPC Full Checksum Offload Engine (Type 2) is selected in Rx with normal descriptor format
4905  * - Configurations in which the Advanced Timestamp feature is selected In all other configurations, this bit is not used (reserved and always reset).
4906  */
4907 #define ENET_DMA_OP_MODE_DGF_MASK (0x20U)
4908 #define ENET_DMA_OP_MODE_DGF_SHIFT (5U)
4909 #define ENET_DMA_OP_MODE_DGF_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_DGF_SHIFT) & ENET_DMA_OP_MODE_DGF_MASK)
4910 #define ENET_DMA_OP_MODE_DGF_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_DGF_MASK) >> ENET_DMA_OP_MODE_DGF_SHIFT)
4911 
4912 /*
4913  * RTC (RW)
4914  *
4915  * Receive Threshold Control
4916  * These two bits control the threshold level of the MTL Receive FIFO.
4917  * Transfer (request) to DMA starts when the frame size within the MTL Receive FIFO is larger than the threshold.
4918  * In addition, full frames with length less than the threshold are automatically transferred.
4919  * The value of 11 is not applicable if the configured Receive FIFO size is 128 bytes.
4920  * These bits are valid only when the RSF bit is zero, and are ignored when the RSF bit is set to 1.
4921  * - 00: 64
4922  * - 01: 32
4923  * - 10: 96
4924  * - 11: 128
4925  */
4926 #define ENET_DMA_OP_MODE_RTC_MASK (0x18U)
4927 #define ENET_DMA_OP_MODE_RTC_SHIFT (3U)
4928 #define ENET_DMA_OP_MODE_RTC_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_RTC_SHIFT) & ENET_DMA_OP_MODE_RTC_MASK)
4929 #define ENET_DMA_OP_MODE_RTC_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_RTC_MASK) >> ENET_DMA_OP_MODE_RTC_SHIFT)
4930 
4931 /*
4932  * OSF (RW)
4933  *
4934  * Operate on Second Frame
4935  * 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.
4936  */
4937 #define ENET_DMA_OP_MODE_OSF_MASK (0x4U)
4938 #define ENET_DMA_OP_MODE_OSF_SHIFT (2U)
4939 #define ENET_DMA_OP_MODE_OSF_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_OSF_SHIFT) & ENET_DMA_OP_MODE_OSF_MASK)
4940 #define ENET_DMA_OP_MODE_OSF_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_OSF_MASK) >> ENET_DMA_OP_MODE_OSF_SHIFT)
4941 
4942 /*
4943  * SR (RW)
4944  *
4945  * Start or Stop Receive
4946  * When this bit is set, the Receive process is placed in the Running state.
4947  * The DMA attempts to acquire the descriptor from the Receive list and processes the incoming frames.
4948  * The descriptor acquisition is attempted from the current position in the list,
4949  * 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.
4950  * If the DMA does not own the descriptor, reception is suspended and Bit 7 (Receive Buffer Unavailable) of Register 5 (Status Register) is set.
4951  * The Start Receive command is effective only when the reception has stopped.
4952  * If the command is issued before setting Register 3 (Receive Descriptor List Address Register), the DMA behavior is unpredictable.
4953  * When this bit is cleared, the Rx DMA operation is stopped after the transfer of the current frame.
4954  * The next descriptor position in the Receive list is saved and becomes the current position after the Receive process is restarted.
4955  * 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.
4956  */
4957 #define ENET_DMA_OP_MODE_SR_MASK (0x2U)
4958 #define ENET_DMA_OP_MODE_SR_SHIFT (1U)
4959 #define ENET_DMA_OP_MODE_SR_SET(x) (((uint32_t)(x) << ENET_DMA_OP_MODE_SR_SHIFT) & ENET_DMA_OP_MODE_SR_MASK)
4960 #define ENET_DMA_OP_MODE_SR_GET(x) (((uint32_t)(x) & ENET_DMA_OP_MODE_SR_MASK) >> ENET_DMA_OP_MODE_SR_SHIFT)
4961 
4962 /* Bitfield definition for register: DMA_INTR_EN */
4963 /*
4964  * NIE (RW)
4965  *
4966  * Normal Interrupt Summary Enable
4967  * When this bit is set, normal interrupt summary is enabled.
4968  * When this bit is reset, normal interrupt summary is disabled.
4969  * This bit enables the following interrupts in Register 5 (Status Register):
4970  * - Register 5[0]: Transmit Interrupt
4971  * - Register 5[2]: Transmit Buffer Unavailable
4972  * - Register 5[6]: Receive Interrupt
4973  * - Register 5[14]: Early Receive Interrupt
4974  */
4975 #define ENET_DMA_INTR_EN_NIE_MASK (0x10000UL)
4976 #define ENET_DMA_INTR_EN_NIE_SHIFT (16U)
4977 #define ENET_DMA_INTR_EN_NIE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_NIE_SHIFT) & ENET_DMA_INTR_EN_NIE_MASK)
4978 #define ENET_DMA_INTR_EN_NIE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_NIE_MASK) >> ENET_DMA_INTR_EN_NIE_SHIFT)
4979 
4980 /*
4981  * AIE (RW)
4982  *
4983  * Abnormal Interrupt Summary Enable
4984  * When this bit is set, abnormal interrupt summary is enabled.
4985  * When this bit is reset, the abnormal interrupt summary is disabled.
4986  * This bit enables the following interrupts in Register 5 (Status Register):
4987  * - Register 5[1]: Transmit Process Stopped
4988  * - Register 5[3]: Transmit Jabber Timeout
4989  * - Register 5[4]: Receive Overflow
4990  * - Register 5[5]: Transmit Underflow
4991  * - Register 5[7]: Receive Buffer Unavailable
4992  * - Register 5[8]: Receive Process Stopped
4993  * - Register 5[9]: Receive Watchdog Timeout
4994  * - Register 5[10]: Early Transmit Interrupt
4995  * - Register 5[13]: Fatal Bus Error
4996  */
4997 #define ENET_DMA_INTR_EN_AIE_MASK (0x8000U)
4998 #define ENET_DMA_INTR_EN_AIE_SHIFT (15U)
4999 #define ENET_DMA_INTR_EN_AIE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_AIE_SHIFT) & ENET_DMA_INTR_EN_AIE_MASK)
5000 #define ENET_DMA_INTR_EN_AIE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_AIE_MASK) >> ENET_DMA_INTR_EN_AIE_SHIFT)
5001 
5002 /*
5003  * ERE (RW)
5004  *
5005  * Early Receive Interrupt Enable
5006  * 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.
5007  */
5008 #define ENET_DMA_INTR_EN_ERE_MASK (0x4000U)
5009 #define ENET_DMA_INTR_EN_ERE_SHIFT (14U)
5010 #define ENET_DMA_INTR_EN_ERE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_ERE_SHIFT) & ENET_DMA_INTR_EN_ERE_MASK)
5011 #define ENET_DMA_INTR_EN_ERE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_ERE_MASK) >> ENET_DMA_INTR_EN_ERE_SHIFT)
5012 
5013 /*
5014  * FBE (RW)
5015  *
5016  * Fatal Bus Error Enable
5017  * 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.
5018  */
5019 #define ENET_DMA_INTR_EN_FBE_MASK (0x2000U)
5020 #define ENET_DMA_INTR_EN_FBE_SHIFT (13U)
5021 #define ENET_DMA_INTR_EN_FBE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_FBE_SHIFT) & ENET_DMA_INTR_EN_FBE_MASK)
5022 #define ENET_DMA_INTR_EN_FBE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_FBE_MASK) >> ENET_DMA_INTR_EN_FBE_SHIFT)
5023 
5024 /*
5025  * ETE (RW)
5026  *
5027  * Early Transmit Interrupt Enable
5028  * 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.
5029  */
5030 #define ENET_DMA_INTR_EN_ETE_MASK (0x400U)
5031 #define ENET_DMA_INTR_EN_ETE_SHIFT (10U)
5032 #define ENET_DMA_INTR_EN_ETE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_ETE_SHIFT) & ENET_DMA_INTR_EN_ETE_MASK)
5033 #define ENET_DMA_INTR_EN_ETE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_ETE_MASK) >> ENET_DMA_INTR_EN_ETE_SHIFT)
5034 
5035 /*
5036  * RWE (RW)
5037  *
5038  * Receive Watchdog Timeout Enable
5039  * 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.
5040  */
5041 #define ENET_DMA_INTR_EN_RWE_MASK (0x200U)
5042 #define ENET_DMA_INTR_EN_RWE_SHIFT (9U)
5043 #define ENET_DMA_INTR_EN_RWE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_RWE_SHIFT) & ENET_DMA_INTR_EN_RWE_MASK)
5044 #define ENET_DMA_INTR_EN_RWE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_RWE_MASK) >> ENET_DMA_INTR_EN_RWE_SHIFT)
5045 
5046 /*
5047  * RSE (RW)
5048  *
5049  * Receive Stopped Enable
5050  * 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.
5051  */
5052 #define ENET_DMA_INTR_EN_RSE_MASK (0x100U)
5053 #define ENET_DMA_INTR_EN_RSE_SHIFT (8U)
5054 #define ENET_DMA_INTR_EN_RSE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_RSE_SHIFT) & ENET_DMA_INTR_EN_RSE_MASK)
5055 #define ENET_DMA_INTR_EN_RSE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_RSE_MASK) >> ENET_DMA_INTR_EN_RSE_SHIFT)
5056 
5057 /*
5058  * RUE (RW)
5059  *
5060  * Receive Buffer Unavailable Enable
5061  * 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.
5062  */
5063 #define ENET_DMA_INTR_EN_RUE_MASK (0x80U)
5064 #define ENET_DMA_INTR_EN_RUE_SHIFT (7U)
5065 #define ENET_DMA_INTR_EN_RUE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_RUE_SHIFT) & ENET_DMA_INTR_EN_RUE_MASK)
5066 #define ENET_DMA_INTR_EN_RUE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_RUE_MASK) >> ENET_DMA_INTR_EN_RUE_SHIFT)
5067 
5068 /*
5069  * RIE (RW)
5070  *
5071  * Receive Interrupt Enable
5072  * 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.
5073  */
5074 #define ENET_DMA_INTR_EN_RIE_MASK (0x40U)
5075 #define ENET_DMA_INTR_EN_RIE_SHIFT (6U)
5076 #define ENET_DMA_INTR_EN_RIE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_RIE_SHIFT) & ENET_DMA_INTR_EN_RIE_MASK)
5077 #define ENET_DMA_INTR_EN_RIE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_RIE_MASK) >> ENET_DMA_INTR_EN_RIE_SHIFT)
5078 
5079 /*
5080  * UNE (RW)
5081  *
5082  * Underflow Interrupt Enable
5083  * 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.
5084  */
5085 #define ENET_DMA_INTR_EN_UNE_MASK (0x20U)
5086 #define ENET_DMA_INTR_EN_UNE_SHIFT (5U)
5087 #define ENET_DMA_INTR_EN_UNE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_UNE_SHIFT) & ENET_DMA_INTR_EN_UNE_MASK)
5088 #define ENET_DMA_INTR_EN_UNE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_UNE_MASK) >> ENET_DMA_INTR_EN_UNE_SHIFT)
5089 
5090 /*
5091  * OVE (RW)
5092  *
5093  * Overflow Interrupt Enable
5094  * 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.
5095  */
5096 #define ENET_DMA_INTR_EN_OVE_MASK (0x10U)
5097 #define ENET_DMA_INTR_EN_OVE_SHIFT (4U)
5098 #define ENET_DMA_INTR_EN_OVE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_OVE_SHIFT) & ENET_DMA_INTR_EN_OVE_MASK)
5099 #define ENET_DMA_INTR_EN_OVE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_OVE_MASK) >> ENET_DMA_INTR_EN_OVE_SHIFT)
5100 
5101 /*
5102  * TJE (RW)
5103  *
5104  * Transmit Jabber Timeout Enable
5105  * 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.
5106  */
5107 #define ENET_DMA_INTR_EN_TJE_MASK (0x8U)
5108 #define ENET_DMA_INTR_EN_TJE_SHIFT (3U)
5109 #define ENET_DMA_INTR_EN_TJE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_TJE_SHIFT) & ENET_DMA_INTR_EN_TJE_MASK)
5110 #define ENET_DMA_INTR_EN_TJE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_TJE_MASK) >> ENET_DMA_INTR_EN_TJE_SHIFT)
5111 
5112 /*
5113  * TUE (RW)
5114  *
5115  * Transmit Buffer Unavailable Enable
5116  * 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.
5117  */
5118 #define ENET_DMA_INTR_EN_TUE_MASK (0x4U)
5119 #define ENET_DMA_INTR_EN_TUE_SHIFT (2U)
5120 #define ENET_DMA_INTR_EN_TUE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_TUE_SHIFT) & ENET_DMA_INTR_EN_TUE_MASK)
5121 #define ENET_DMA_INTR_EN_TUE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_TUE_MASK) >> ENET_DMA_INTR_EN_TUE_SHIFT)
5122 
5123 /*
5124  * TSE (RW)
5125  *
5126  * Transmit Stopped Enable
5127  * 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.
5128  */
5129 #define ENET_DMA_INTR_EN_TSE_MASK (0x2U)
5130 #define ENET_DMA_INTR_EN_TSE_SHIFT (1U)
5131 #define ENET_DMA_INTR_EN_TSE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_TSE_SHIFT) & ENET_DMA_INTR_EN_TSE_MASK)
5132 #define ENET_DMA_INTR_EN_TSE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_TSE_MASK) >> ENET_DMA_INTR_EN_TSE_SHIFT)
5133 
5134 /*
5135  * TIE (RW)
5136  *
5137  * Transmit Interrupt Enable
5138  * 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.
5139  */
5140 #define ENET_DMA_INTR_EN_TIE_MASK (0x1U)
5141 #define ENET_DMA_INTR_EN_TIE_SHIFT (0U)
5142 #define ENET_DMA_INTR_EN_TIE_SET(x) (((uint32_t)(x) << ENET_DMA_INTR_EN_TIE_SHIFT) & ENET_DMA_INTR_EN_TIE_MASK)
5143 #define ENET_DMA_INTR_EN_TIE_GET(x) (((uint32_t)(x) & ENET_DMA_INTR_EN_TIE_MASK) >> ENET_DMA_INTR_EN_TIE_SHIFT)
5144 
5145 /* Bitfield definition for register: DMA_MISS_OVF_CNT */
5146 /*
5147  * ONFCNTOVF (RW)
5148  *
5149  * Overflow Bit for FIFO Overflow Counter
5150  * This bit is set every time the Overflow Frame Counter (Bits[27:17]) overflows,
5151  * that is, the Rx FIFO overflows with the overflow frame counter at maximum value.
5152  * In such a scenario, the overflow frame counter is reset to all-zeros and this bit indicates that the rollover happened.
5153  */
5154 #define ENET_DMA_MISS_OVF_CNT_ONFCNTOVF_MASK (0x10000000UL)
5155 #define ENET_DMA_MISS_OVF_CNT_ONFCNTOVF_SHIFT (28U)
5156 #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)
5157 #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)
5158 
5159 /*
5160  * OVFFRMCNT (RW)
5161  *
5162  * Overflow Frame Counter
5163  * 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.
5164  */
5165 #define ENET_DMA_MISS_OVF_CNT_OVFFRMCNT_MASK (0xFFE0000UL)
5166 #define ENET_DMA_MISS_OVF_CNT_OVFFRMCNT_SHIFT (17U)
5167 #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)
5168 #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)
5169 
5170 /*
5171  * MISCNTOVF (RW)
5172  *
5173  * Overflow Bit for Missed Frame Counter
5174  * This bit is set every time Missed Frame Counter (Bits[15:0]) overflows,
5175  * 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,
5176  * the Missed frame counter is reset to all-zeros and this bit indicates that the rollover happened.
5177  */
5178 #define ENET_DMA_MISS_OVF_CNT_MISCNTOVF_MASK (0x10000UL)
5179 #define ENET_DMA_MISS_OVF_CNT_MISCNTOVF_SHIFT (16U)
5180 #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)
5181 #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)
5182 
5183 /*
5184  * MISFRMCNT (RW)
5185  *
5186  * Missed Frame Counter
5187  * This field indicates the number of frames missed by the controller because of the Host Receive Buffer being unavailable.
5188  * 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.
5189  */
5190 #define ENET_DMA_MISS_OVF_CNT_MISFRMCNT_MASK (0xFFFFU)
5191 #define ENET_DMA_MISS_OVF_CNT_MISFRMCNT_SHIFT (0U)
5192 #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)
5193 #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)
5194 
5195 /* Bitfield definition for register: DMA_RX_INTR_WDOG */
5196 /*
5197  * RIWT (RW)
5198  *
5199  * RI Watchdog Timer Count
5200  * This bit indicates the number of system clock cycles multiplied by 256 for which the watchdog timer is set.
5201  * The watchdog timer gets triggered with the programmed value after the Rx DMA completes the transfer
5202  * of a frame for which the RI status bit is not set because of the setting in the corresponding descriptor RDES1[31].
5203  * When the watchdog timer runs out, the RI bit is set and the timer is stopped.
5204  * 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.
5205  */
5206 #define ENET_DMA_RX_INTR_WDOG_RIWT_MASK (0xFFU)
5207 #define ENET_DMA_RX_INTR_WDOG_RIWT_SHIFT (0U)
5208 #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)
5209 #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)
5210 
5211 /* Bitfield definition for register: DMA_AXI_MODE */
5212 /*
5213  * EN_LPI (RW)
5214  *
5215  * Enable Low Power Interface (LPI)
5216  * 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.
5217  * When set to 0, this bit disables the LPI mode and always denies the LPI request from the AXI System Clock controller.
5218  */
5219 #define ENET_DMA_AXI_MODE_EN_LPI_MASK (0x80000000UL)
5220 #define ENET_DMA_AXI_MODE_EN_LPI_SHIFT (31U)
5221 #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)
5222 #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)
5223 
5224 /*
5225  * LPI_XIT_FRM (RW)
5226  *
5227  * Unlock on Magic Packet or Remote Wake-Up Frame
5228  * 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.
5229  * When set to 0, this bit enables the GMAC-AXI to come out of LPI mode when any frame is received.
5230  */
5231 #define ENET_DMA_AXI_MODE_LPI_XIT_FRM_MASK (0x40000000UL)
5232 #define ENET_DMA_AXI_MODE_LPI_XIT_FRM_SHIFT (30U)
5233 #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)
5234 #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)
5235 
5236 /*
5237  * WR_OSR_LMT (RW)
5238  *
5239  * AXI Maximum Write Outstanding Request Limit
5240  * This value limits the maximum outstanding request on the AXI write interface.
5241  * 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.
5242  */
5243 #define ENET_DMA_AXI_MODE_WR_OSR_LMT_MASK (0xF00000UL)
5244 #define ENET_DMA_AXI_MODE_WR_OSR_LMT_SHIFT (20U)
5245 #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)
5246 #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)
5247 
5248 /*
5249  * RD_OSR_LMT (RW)
5250  *
5251  * AXI Maximum Read Outstanding Request Limit
5252  * This value limits the maximum outstanding request on the AXI read interface.
5253  * 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.
5254  */
5255 #define ENET_DMA_AXI_MODE_RD_OSR_LMT_MASK (0xF0000UL)
5256 #define ENET_DMA_AXI_MODE_RD_OSR_LMT_SHIFT (16U)
5257 #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)
5258 #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)
5259 
5260 /*
5261  * ONEKBBE (RW)
5262  *
5263  * 1 KB Boundary Crossing Enable for the GMAC-AXI Master
5264  * When set, the GMAC-AXI master performs burst transfers that do not cross 1 KB boundary.
5265  * When reset, the GMAC-AXI master performs burst transfers that do not cross 4 KB boundary.
5266  */
5267 #define ENET_DMA_AXI_MODE_ONEKBBE_MASK (0x2000U)
5268 #define ENET_DMA_AXI_MODE_ONEKBBE_SHIFT (13U)
5269 #define ENET_DMA_AXI_MODE_ONEKBBE_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_ONEKBBE_SHIFT) & ENET_DMA_AXI_MODE_ONEKBBE_MASK)
5270 #define ENET_DMA_AXI_MODE_ONEKBBE_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_ONEKBBE_MASK) >> ENET_DMA_AXI_MODE_ONEKBBE_SHIFT)
5271 
5272 /*
5273  * AXI_AAL (RW)
5274  *
5275  * Address-Aligned Beats
5276  * This bit is read-only bit and reflects the Bit 25 (AAL) of Register 0 (Bus Mode Register).
5277  * When this bit is set to 1, the GMAC-AXI performs address-aligned burst transfers on both read and write channels.
5278  */
5279 #define ENET_DMA_AXI_MODE_AXI_AAL_MASK (0x1000U)
5280 #define ENET_DMA_AXI_MODE_AXI_AAL_SHIFT (12U)
5281 #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)
5282 #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)
5283 
5284 /*
5285  * BLEN256 (RW)
5286  *
5287  * AXI Burst Length 256
5288  * When this bit is set to 1, the GMAC-AXI is allowed to select a burst length of 256 on the AXI master interface.
5289  * 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).
5290  */
5291 #define ENET_DMA_AXI_MODE_BLEN256_MASK (0x80U)
5292 #define ENET_DMA_AXI_MODE_BLEN256_SHIFT (7U)
5293 #define ENET_DMA_AXI_MODE_BLEN256_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_BLEN256_SHIFT) & ENET_DMA_AXI_MODE_BLEN256_MASK)
5294 #define ENET_DMA_AXI_MODE_BLEN256_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_BLEN256_MASK) >> ENET_DMA_AXI_MODE_BLEN256_SHIFT)
5295 
5296 /*
5297  * BLEN128 (RW)
5298  *
5299  * AXI Burst Length 128
5300  * When this bit is set to 1, the GMAC-AXI is allowed to select a burst length of 128 on the AXI master interface.
5301  * 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).
5302  */
5303 #define ENET_DMA_AXI_MODE_BLEN128_MASK (0x40U)
5304 #define ENET_DMA_AXI_MODE_BLEN128_SHIFT (6U)
5305 #define ENET_DMA_AXI_MODE_BLEN128_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_BLEN128_SHIFT) & ENET_DMA_AXI_MODE_BLEN128_MASK)
5306 #define ENET_DMA_AXI_MODE_BLEN128_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_BLEN128_MASK) >> ENET_DMA_AXI_MODE_BLEN128_SHIFT)
5307 
5308 /*
5309  * BLEN64 (RW)
5310  *
5311  * AXI Burst Length 64
5312  * When this bit is set to 1, the GMAC-AXI is allowed to select a burst length of 64 on the AXI master interface.
5313  * 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).
5314  */
5315 #define ENET_DMA_AXI_MODE_BLEN64_MASK (0x20U)
5316 #define ENET_DMA_AXI_MODE_BLEN64_SHIFT (5U)
5317 #define ENET_DMA_AXI_MODE_BLEN64_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_BLEN64_SHIFT) & ENET_DMA_AXI_MODE_BLEN64_MASK)
5318 #define ENET_DMA_AXI_MODE_BLEN64_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_BLEN64_MASK) >> ENET_DMA_AXI_MODE_BLEN64_SHIFT)
5319 
5320 /*
5321  * BLEN32 (RW)
5322  *
5323  * AXI Burst Length 32
5324  * When this bit is set to 1, the GMAC-AXI is allowed to select a burst length of 32 on the AXI master interface.
5325  * 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).
5326  */
5327 #define ENET_DMA_AXI_MODE_BLEN32_MASK (0x10U)
5328 #define ENET_DMA_AXI_MODE_BLEN32_SHIFT (4U)
5329 #define ENET_DMA_AXI_MODE_BLEN32_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_BLEN32_SHIFT) & ENET_DMA_AXI_MODE_BLEN32_MASK)
5330 #define ENET_DMA_AXI_MODE_BLEN32_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_BLEN32_MASK) >> ENET_DMA_AXI_MODE_BLEN32_SHIFT)
5331 
5332 /*
5333  * BLEN16 (RW)
5334  *
5335  * AXI Burst Length 16
5336  * 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.
5337  */
5338 #define ENET_DMA_AXI_MODE_BLEN16_MASK (0x8U)
5339 #define ENET_DMA_AXI_MODE_BLEN16_SHIFT (3U)
5340 #define ENET_DMA_AXI_MODE_BLEN16_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_BLEN16_SHIFT) & ENET_DMA_AXI_MODE_BLEN16_MASK)
5341 #define ENET_DMA_AXI_MODE_BLEN16_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_BLEN16_MASK) >> ENET_DMA_AXI_MODE_BLEN16_SHIFT)
5342 
5343 /*
5344  * BLEN8 (RW)
5345  *
5346  * AXI Burst Length 8
5347  * When this bit is set to 1, the GMAC-AXI is allowed to select a burst length of 8 on the AXI master interface.
5348  * Setting this bit has no effect when UNDEF is set to 1.
5349  */
5350 #define ENET_DMA_AXI_MODE_BLEN8_MASK (0x4U)
5351 #define ENET_DMA_AXI_MODE_BLEN8_SHIFT (2U)
5352 #define ENET_DMA_AXI_MODE_BLEN8_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_BLEN8_SHIFT) & ENET_DMA_AXI_MODE_BLEN8_MASK)
5353 #define ENET_DMA_AXI_MODE_BLEN8_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_BLEN8_MASK) >> ENET_DMA_AXI_MODE_BLEN8_SHIFT)
5354 
5355 /*
5356  * BLEN4 (RW)
5357  *
5358  * AXI Burst Length 4
5359  * When this bit is set to 1, the GMAC-AXI is allowed to select a burst length of 4 on the AXI master interface.
5360  * Setting this bit has no effect when UNDEF is set to 1.
5361  */
5362 #define ENET_DMA_AXI_MODE_BLEN4_MASK (0x2U)
5363 #define ENET_DMA_AXI_MODE_BLEN4_SHIFT (1U)
5364 #define ENET_DMA_AXI_MODE_BLEN4_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_BLEN4_SHIFT) & ENET_DMA_AXI_MODE_BLEN4_MASK)
5365 #define ENET_DMA_AXI_MODE_BLEN4_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_BLEN4_MASK) >> ENET_DMA_AXI_MODE_BLEN4_SHIFT)
5366 
5367 /*
5368  * UNDEF (RW)
5369  *
5370  * AXI Undefined Burst Length
5371  * This bit is read-only bit and indicates the complement (invert) value of Bit 16 (FB) in Register 0 (Bus Mode Register).
5372  * - 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].
5373  * - 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.
5374  * If UNDEF is set and none of the BLEN bits is set, then GMAC-AXI is allowed to perform a burst length of 16.
5375  */
5376 #define ENET_DMA_AXI_MODE_UNDEF_MASK (0x1U)
5377 #define ENET_DMA_AXI_MODE_UNDEF_SHIFT (0U)
5378 #define ENET_DMA_AXI_MODE_UNDEF_SET(x) (((uint32_t)(x) << ENET_DMA_AXI_MODE_UNDEF_SHIFT) & ENET_DMA_AXI_MODE_UNDEF_MASK)
5379 #define ENET_DMA_AXI_MODE_UNDEF_GET(x) (((uint32_t)(x) & ENET_DMA_AXI_MODE_UNDEF_MASK) >> ENET_DMA_AXI_MODE_UNDEF_SHIFT)
5380 
5381 /* Bitfield definition for register: DMA_BUS_STATUS */
5382 /*
5383  * AXIRDSTS (RW)
5384  *
5385  * AXI Master Read Channel Status
5386  * When high, it indicates that AXI master's read channel is active and transferring data.
5387  */
5388 #define ENET_DMA_BUS_STATUS_AXIRDSTS_MASK (0x2U)
5389 #define ENET_DMA_BUS_STATUS_AXIRDSTS_SHIFT (1U)
5390 #define ENET_DMA_BUS_STATUS_AXIRDSTS_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_STATUS_AXIRDSTS_SHIFT) & ENET_DMA_BUS_STATUS_AXIRDSTS_MASK)
5391 #define ENET_DMA_BUS_STATUS_AXIRDSTS_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_STATUS_AXIRDSTS_MASK) >> ENET_DMA_BUS_STATUS_AXIRDSTS_SHIFT)
5392 
5393 /*
5394  * AXWHSTS (RW)
5395  *
5396  * AXI Master Write Channel or AHB Master Status
5397  * 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,
5398  * it indicates that the AHB master interface FSMs are in the non-idle state.
5399  */
5400 #define ENET_DMA_BUS_STATUS_AXWHSTS_MASK (0x1U)
5401 #define ENET_DMA_BUS_STATUS_AXWHSTS_SHIFT (0U)
5402 #define ENET_DMA_BUS_STATUS_AXWHSTS_SET(x) (((uint32_t)(x) << ENET_DMA_BUS_STATUS_AXWHSTS_SHIFT) & ENET_DMA_BUS_STATUS_AXWHSTS_MASK)
5403 #define ENET_DMA_BUS_STATUS_AXWHSTS_GET(x) (((uint32_t)(x) & ENET_DMA_BUS_STATUS_AXWHSTS_MASK) >> ENET_DMA_BUS_STATUS_AXWHSTS_SHIFT)
5404 
5405 /* Bitfield definition for register: DMA_CURR_HOST_TX_DESC */
5406 /*
5407  * CURTDESAPTR (RW)
5408  *
5409  * Host Transmit Descriptor Address Pointer
5410  * Cleared on Reset. Pointer updated by the DMA during operation.
5411  */
5412 #define ENET_DMA_CURR_HOST_TX_DESC_CURTDESAPTR_MASK (0xFFFFFFFFUL)
5413 #define ENET_DMA_CURR_HOST_TX_DESC_CURTDESAPTR_SHIFT (0U)
5414 #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)
5415 #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)
5416 
5417 /* Bitfield definition for register: DMA_CURR_HOST_RX_DESC */
5418 /*
5419  * CURRDESAPTR (RW)
5420  *
5421  * Host Receive Descriptor Address Pointer
5422  * Cleared on Reset. Pointer updated by the DMA during operation.
5423  */
5424 #define ENET_DMA_CURR_HOST_RX_DESC_CURRDESAPTR_MASK (0xFFFFFFFFUL)
5425 #define ENET_DMA_CURR_HOST_RX_DESC_CURRDESAPTR_SHIFT (0U)
5426 #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)
5427 #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)
5428 
5429 /* Bitfield definition for register: DMA_CURR_HOST_TX_BUF */
5430 /*
5431  * CURTBUFAPTR (RW)
5432  *
5433  * Host Transmit Buffer Address Pointer
5434  * Cleared on Reset. Pointer updated by the DMA during operation.
5435  */
5436 #define ENET_DMA_CURR_HOST_TX_BUF_CURTBUFAPTR_MASK (0xFFFFFFFFUL)
5437 #define ENET_DMA_CURR_HOST_TX_BUF_CURTBUFAPTR_SHIFT (0U)
5438 #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)
5439 #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)
5440 
5441 /* Bitfield definition for register: DMA_CURR_HOST_RX_BUF */
5442 /*
5443  * CURRBUFAPTR (RW)
5444  *
5445  * Host Receive Buffer Address Pointer
5446  * Cleared on Reset. Pointer updated by the DMA during operation.
5447  */
5448 #define ENET_DMA_CURR_HOST_RX_BUF_CURRBUFAPTR_MASK (0xFFFFFFFFUL)
5449 #define ENET_DMA_CURR_HOST_RX_BUF_CURRBUFAPTR_SHIFT (0U)
5450 #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)
5451 #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)
5452 
5453 /* Bitfield definition for register: CTRL0 */
5454 /*
5455  * ENET0_RXCLK_DLY_SEL (RW)
5456  *
5457  */
5458 #define ENET_CTRL0_ENET0_RXCLK_DLY_SEL_MASK (0x3F00U)
5459 #define ENET_CTRL0_ENET0_RXCLK_DLY_SEL_SHIFT (8U)
5460 #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)
5461 #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)
5462 
5463 /*
5464  * ENET0_TXCLK_DLY_SEL (RW)
5465  *
5466  */
5467 #define ENET_CTRL0_ENET0_TXCLK_DLY_SEL_MASK (0x3FU)
5468 #define ENET_CTRL0_ENET0_TXCLK_DLY_SEL_SHIFT (0U)
5469 #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)
5470 #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)
5471 
5472 /* Bitfield definition for register: CTRL2 */
5473 /*
5474  * ENET0_LPI_IRQ_EN (RW)
5475  *
5476  * lowpower interrupt enable, for internal use only, user should use core registers for enable/disable interrupt
5477  */
5478 #define ENET_CTRL2_ENET0_LPI_IRQ_EN_MASK (0x20000000UL)
5479 #define ENET_CTRL2_ENET0_LPI_IRQ_EN_SHIFT (29U)
5480 #define ENET_CTRL2_ENET0_LPI_IRQ_EN_SET(x) (((uint32_t)(x) << ENET_CTRL2_ENET0_LPI_IRQ_EN_SHIFT) & ENET_CTRL2_ENET0_LPI_IRQ_EN_MASK)
5481 #define ENET_CTRL2_ENET0_LPI_IRQ_EN_GET(x) (((uint32_t)(x) & ENET_CTRL2_ENET0_LPI_IRQ_EN_MASK) >> ENET_CTRL2_ENET0_LPI_IRQ_EN_SHIFT)
5482 
5483 /*
5484  * ENET0_REFCLK_OE (RW)
5485  *
5486  * set to enable output 50MHz clock to rmii phy.
5487  * User should set it if use soc internal clock as refclk
5488  */
5489 #define ENET_CTRL2_ENET0_REFCLK_OE_MASK (0x80000UL)
5490 #define ENET_CTRL2_ENET0_REFCLK_OE_SHIFT (19U)
5491 #define ENET_CTRL2_ENET0_REFCLK_OE_SET(x) (((uint32_t)(x) << ENET_CTRL2_ENET0_REFCLK_OE_SHIFT) & ENET_CTRL2_ENET0_REFCLK_OE_MASK)
5492 #define ENET_CTRL2_ENET0_REFCLK_OE_GET(x) (((uint32_t)(x) & ENET_CTRL2_ENET0_REFCLK_OE_MASK) >> ENET_CTRL2_ENET0_REFCLK_OE_SHIFT)
5493 
5494 /*
5495  * ENET0_PHY_INF_SEL (RW)
5496  *
5497  * PHY mode select
5498  * 000MII; 001RGMII; 100RMII;
5499  * should be set before config IOMUX, otherwise may cause glitch for RGMII
5500  */
5501 #define ENET_CTRL2_ENET0_PHY_INF_SEL_MASK (0xE000U)
5502 #define ENET_CTRL2_ENET0_PHY_INF_SEL_SHIFT (13U)
5503 #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)
5504 #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)
5505 
5506 /*
5507  * ENET0_FLOWCTRL (RW)
5508  *
5509  * flow control request
5510  */
5511 #define ENET_CTRL2_ENET0_FLOWCTRL_MASK (0x1000U)
5512 #define ENET_CTRL2_ENET0_FLOWCTRL_SHIFT (12U)
5513 #define ENET_CTRL2_ENET0_FLOWCTRL_SET(x) (((uint32_t)(x) << ENET_CTRL2_ENET0_FLOWCTRL_SHIFT) & ENET_CTRL2_ENET0_FLOWCTRL_MASK)
5514 #define ENET_CTRL2_ENET0_FLOWCTRL_GET(x) (((uint32_t)(x) & ENET_CTRL2_ENET0_FLOWCTRL_MASK) >> ENET_CTRL2_ENET0_FLOWCTRL_SHIFT)
5515 
5516 /*
5517  * ENET0_RMII_TXCLK_SEL (RW)
5518  *
5519  * RMII mode output clock pad select
5520  * set to use txck as RMII refclk;
5521  * clr to use rxck as RMII refclk; default 0(rxck)
5522  * refclk is always from pad, can use external clock from pad, or use internal clock output to pad then loopback.
5523  */
5524 #define ENET_CTRL2_ENET0_RMII_TXCLK_SEL_MASK (0x400U)
5525 #define ENET_CTRL2_ENET0_RMII_TXCLK_SEL_SHIFT (10U)
5526 #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)
5527 #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)
5528 
5529 
5530 
5531 /* MAC_ADDR register group index macro definition */
5532 #define ENET_MAC_ADDR_1 (0UL)
5533 #define ENET_MAC_ADDR_2 (1UL)
5534 #define ENET_MAC_ADDR_3 (2UL)
5535 #define ENET_MAC_ADDR_4 (3UL)
5536 
5537 /* L3_L4_CFG register group index macro definition */
5538 #define ENET_L3_L4_CFG_0 (0UL)
5539 
5540 /* PPS register group index macro definition */
5541 #define ENET_PPS_1 (0UL)
5542 #define ENET_PPS_2 (1UL)
5543 #define ENET_PPS_3 (2UL)
5544 
5545 
5546 #endif /* HPM_ENET_H */
Definition: hpm_enet_regs.h:12