1 /*
2  * Copyright 1997-2016 Freescale Semiconductor, Inc.
3  * Copyright 2016-2023 NXP
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 /*!
9  * @file S32Z2_EDMA4_MP.h
10  * @version 2.1
11  * @date 2023-07-20
12  * @brief Peripheral Access Layer for S32Z2_EDMA4_MP
13  *
14  * This file contains register definitions and macros for easy access to their
15  * bit fields.
16  *
17  * This file assumes LITTLE endian system.
18  */
19 
20 /**
21 * @page misra_violations MISRA-C:2012 violations
22 *
23 * @section [global]
24 * Violates MISRA 2012 Advisory Rule 2.3, local typedef not referenced
25 * The SoC header defines typedef for all modules.
26 *
27 * @section [global]
28 * Violates MISRA 2012 Advisory Rule 2.5, local macro not referenced
29 * The SoC header defines macros for all modules and registers.
30 *
31 * @section [global]
32 * Violates MISRA 2012 Advisory Directive 4.9, Function-like macro
33 * These are generated macros used for accessing the bit-fields from registers.
34 *
35 * @section [global]
36 * Violates MISRA 2012 Required Rule 5.1, identifier clash
37 * The supported compilers use more than 31 significant characters for identifiers.
38 *
39 * @section [global]
40 * Violates MISRA 2012 Required Rule 5.2, identifier clash
41 * The supported compilers use more than 31 significant characters for identifiers.
42 *
43 * @section [global]
44 * Violates MISRA 2012 Required Rule 5.4, identifier clash
45 * The supported compilers use more than 31 significant characters for identifiers.
46 *
47 * @section [global]
48 * Violates MISRA 2012 Required Rule 5.5, identifier clash
49 * The supported compilers use more than 31 significant characters for identifiers.
50 *
51 * @section [global]
52 * Violates MISRA 2012 Required Rule 21.1, defined macro '__I' is reserved to the compiler
53 * This type qualifier is needed to ensure correct I/O access and addressing.
54 */
55 
56 /* Prevention from multiple including the same memory map */
57 #if !defined(S32Z2_EDMA4_MP_H_)  /* Check if memory map has not been already included */
58 #define S32Z2_EDMA4_MP_H_
59 
60 #include "S32Z2_COMMON.h"
61 
62 /* ----------------------------------------------------------------------------
63    -- EDMA4_MP Peripheral Access Layer
64    ---------------------------------------------------------------------------- */
65 
66 /*!
67  * @addtogroup EDMA4_MP_Peripheral_Access_Layer EDMA4_MP Peripheral Access Layer
68  * @{
69  */
70 
71 /** EDMA4_MP - Size of Registers Arrays */
72 #define EDMA4_MP_MP_GRPRI_COUNT                   32u
73 
74 /** EDMA4_MP - Register Layout Typedef */
75 typedef struct {
76   __IO uint32_t CSR;                               /**< Management Page Control Register, offset: 0x0 */
77   __I  uint32_t ES;                                /**< Management Page Error Status Register, offset: 0x4 */
78   __I  uint32_t INT;                               /**< Management Page Interrupt Request Status Register, offset: 0x8 */
79   uint8_t RESERVED_0[4];
80   __I  uint32_t HRS;                               /**< Management Page Hardware Request Status Register, offset: 0x10 */
81   uint8_t RESERVED_1[236];
82   __IO uint32_t CH_GRPRI[EDMA4_MP_MP_GRPRI_COUNT]; /**< Channel Arbitration Group Register, array offset: 0x100, array step: 0x4 */
83 } EDMA4_MP_Type, *EDMA4_MP_MemMapPtr;
84 
85 /** Number of instances of the EDMA4_MP module. */
86 #define EDMA4_MP_INSTANCE_COUNT                  (1u)
87 
88 /* EDMA4_MP - Peripheral instance base addresses */
89 /** Peripheral EDMA_3_MP base address */
90 #define IP_EDMA_3_MP_BASE                        (0x41DD0000u)
91 /** Peripheral EDMA_3_MP base pointer */
92 #define IP_EDMA_3_MP                             ((EDMA4_MP_Type *)IP_EDMA_3_MP_BASE)
93 /** Array initializer of EDMA4_MP peripheral base addresses */
94 #define IP_EDMA4_MP_BASE_ADDRS                   { IP_EDMA_3_MP_BASE }
95 /** Array initializer of EDMA4_MP peripheral base pointers */
96 #define IP_EDMA4_MP_BASE_PTRS                    { IP_EDMA_3_MP }
97 
98 /* ----------------------------------------------------------------------------
99    -- EDMA4_MP Register Masks
100    ---------------------------------------------------------------------------- */
101 
102 /*!
103  * @addtogroup EDMA4_MP_Register_Masks EDMA4_MP Register Masks
104  * @{
105  */
106 
107 /*! @name CSR - Management Page Control Register */
108 /*! @{ */
109 
110 #define EDMA4_MP_CSR_EDBG_MASK                   (0x2U)
111 #define EDMA4_MP_CSR_EDBG_SHIFT                  (1U)
112 #define EDMA4_MP_CSR_EDBG_WIDTH                  (1U)
113 #define EDMA4_MP_CSR_EDBG(x)                     (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_CSR_EDBG_SHIFT)) & EDMA4_MP_CSR_EDBG_MASK)
114 
115 #define EDMA4_MP_CSR_ERCA_MASK                   (0x4U)
116 #define EDMA4_MP_CSR_ERCA_SHIFT                  (2U)
117 #define EDMA4_MP_CSR_ERCA_WIDTH                  (1U)
118 #define EDMA4_MP_CSR_ERCA(x)                     (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_CSR_ERCA_SHIFT)) & EDMA4_MP_CSR_ERCA_MASK)
119 
120 #define EDMA4_MP_CSR_HAE_MASK                    (0x10U)
121 #define EDMA4_MP_CSR_HAE_SHIFT                   (4U)
122 #define EDMA4_MP_CSR_HAE_WIDTH                   (1U)
123 #define EDMA4_MP_CSR_HAE(x)                      (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_CSR_HAE_SHIFT)) & EDMA4_MP_CSR_HAE_MASK)
124 
125 #define EDMA4_MP_CSR_HALT_MASK                   (0x20U)
126 #define EDMA4_MP_CSR_HALT_SHIFT                  (5U)
127 #define EDMA4_MP_CSR_HALT_WIDTH                  (1U)
128 #define EDMA4_MP_CSR_HALT(x)                     (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_CSR_HALT_SHIFT)) & EDMA4_MP_CSR_HALT_MASK)
129 
130 #define EDMA4_MP_CSR_GCLC_MASK                   (0x40U)
131 #define EDMA4_MP_CSR_GCLC_SHIFT                  (6U)
132 #define EDMA4_MP_CSR_GCLC_WIDTH                  (1U)
133 #define EDMA4_MP_CSR_GCLC(x)                     (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_CSR_GCLC_SHIFT)) & EDMA4_MP_CSR_GCLC_MASK)
134 
135 #define EDMA4_MP_CSR_GMRC_MASK                   (0x80U)
136 #define EDMA4_MP_CSR_GMRC_SHIFT                  (7U)
137 #define EDMA4_MP_CSR_GMRC_WIDTH                  (1U)
138 #define EDMA4_MP_CSR_GMRC(x)                     (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_CSR_GMRC_SHIFT)) & EDMA4_MP_CSR_GMRC_MASK)
139 
140 #define EDMA4_MP_CSR_VER_MASK                    (0xFF0000U)
141 #define EDMA4_MP_CSR_VER_SHIFT                   (16U)
142 #define EDMA4_MP_CSR_VER_WIDTH                   (8U)
143 #define EDMA4_MP_CSR_VER(x)                      (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_CSR_VER_SHIFT)) & EDMA4_MP_CSR_VER_MASK)
144 
145 #define EDMA4_MP_CSR_ACTIVE_ID_MASK              (0x1F000000U)
146 #define EDMA4_MP_CSR_ACTIVE_ID_SHIFT             (24U)
147 #define EDMA4_MP_CSR_ACTIVE_ID_WIDTH             (5U)
148 #define EDMA4_MP_CSR_ACTIVE_ID(x)                (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_CSR_ACTIVE_ID_SHIFT)) & EDMA4_MP_CSR_ACTIVE_ID_MASK)
149 
150 #define EDMA4_MP_CSR_ACTIVE_MASK                 (0x80000000U)
151 #define EDMA4_MP_CSR_ACTIVE_SHIFT                (31U)
152 #define EDMA4_MP_CSR_ACTIVE_WIDTH                (1U)
153 #define EDMA4_MP_CSR_ACTIVE(x)                   (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_CSR_ACTIVE_SHIFT)) & EDMA4_MP_CSR_ACTIVE_MASK)
154 /*! @} */
155 
156 /*! @name ES - Management Page Error Status Register */
157 /*! @{ */
158 
159 #define EDMA4_MP_ES_DBE_MASK                     (0x1U)
160 #define EDMA4_MP_ES_DBE_SHIFT                    (0U)
161 #define EDMA4_MP_ES_DBE_WIDTH                    (1U)
162 #define EDMA4_MP_ES_DBE(x)                       (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_ES_DBE_SHIFT)) & EDMA4_MP_ES_DBE_MASK)
163 
164 #define EDMA4_MP_ES_SBE_MASK                     (0x2U)
165 #define EDMA4_MP_ES_SBE_SHIFT                    (1U)
166 #define EDMA4_MP_ES_SBE_WIDTH                    (1U)
167 #define EDMA4_MP_ES_SBE(x)                       (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_ES_SBE_SHIFT)) & EDMA4_MP_ES_SBE_MASK)
168 
169 #define EDMA4_MP_ES_SGE_MASK                     (0x4U)
170 #define EDMA4_MP_ES_SGE_SHIFT                    (2U)
171 #define EDMA4_MP_ES_SGE_WIDTH                    (1U)
172 #define EDMA4_MP_ES_SGE(x)                       (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_ES_SGE_SHIFT)) & EDMA4_MP_ES_SGE_MASK)
173 
174 #define EDMA4_MP_ES_NCE_MASK                     (0x8U)
175 #define EDMA4_MP_ES_NCE_SHIFT                    (3U)
176 #define EDMA4_MP_ES_NCE_WIDTH                    (1U)
177 #define EDMA4_MP_ES_NCE(x)                       (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_ES_NCE_SHIFT)) & EDMA4_MP_ES_NCE_MASK)
178 
179 #define EDMA4_MP_ES_DOE_MASK                     (0x10U)
180 #define EDMA4_MP_ES_DOE_SHIFT                    (4U)
181 #define EDMA4_MP_ES_DOE_WIDTH                    (1U)
182 #define EDMA4_MP_ES_DOE(x)                       (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_ES_DOE_SHIFT)) & EDMA4_MP_ES_DOE_MASK)
183 
184 #define EDMA4_MP_ES_DAE_MASK                     (0x20U)
185 #define EDMA4_MP_ES_DAE_SHIFT                    (5U)
186 #define EDMA4_MP_ES_DAE_WIDTH                    (1U)
187 #define EDMA4_MP_ES_DAE(x)                       (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_ES_DAE_SHIFT)) & EDMA4_MP_ES_DAE_MASK)
188 
189 #define EDMA4_MP_ES_SOE_MASK                     (0x40U)
190 #define EDMA4_MP_ES_SOE_SHIFT                    (6U)
191 #define EDMA4_MP_ES_SOE_WIDTH                    (1U)
192 #define EDMA4_MP_ES_SOE(x)                       (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_ES_SOE_SHIFT)) & EDMA4_MP_ES_SOE_MASK)
193 
194 #define EDMA4_MP_ES_SAE_MASK                     (0x80U)
195 #define EDMA4_MP_ES_SAE_SHIFT                    (7U)
196 #define EDMA4_MP_ES_SAE_WIDTH                    (1U)
197 #define EDMA4_MP_ES_SAE(x)                       (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_ES_SAE_SHIFT)) & EDMA4_MP_ES_SAE_MASK)
198 
199 #define EDMA4_MP_ES_ECX_MASK                     (0x100U)
200 #define EDMA4_MP_ES_ECX_SHIFT                    (8U)
201 #define EDMA4_MP_ES_ECX_WIDTH                    (1U)
202 #define EDMA4_MP_ES_ECX(x)                       (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_ES_ECX_SHIFT)) & EDMA4_MP_ES_ECX_MASK)
203 
204 #define EDMA4_MP_ES_UCE_MASK                     (0x200U)
205 #define EDMA4_MP_ES_UCE_SHIFT                    (9U)
206 #define EDMA4_MP_ES_UCE_WIDTH                    (1U)
207 #define EDMA4_MP_ES_UCE(x)                       (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_ES_UCE_SHIFT)) & EDMA4_MP_ES_UCE_MASK)
208 
209 #define EDMA4_MP_ES_ERRCHN_MASK                  (0x1F000000U)
210 #define EDMA4_MP_ES_ERRCHN_SHIFT                 (24U)
211 #define EDMA4_MP_ES_ERRCHN_WIDTH                 (5U)
212 #define EDMA4_MP_ES_ERRCHN(x)                    (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_ES_ERRCHN_SHIFT)) & EDMA4_MP_ES_ERRCHN_MASK)
213 
214 #define EDMA4_MP_ES_VLD_MASK                     (0x80000000U)
215 #define EDMA4_MP_ES_VLD_SHIFT                    (31U)
216 #define EDMA4_MP_ES_VLD_WIDTH                    (1U)
217 #define EDMA4_MP_ES_VLD(x)                       (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_ES_VLD_SHIFT)) & EDMA4_MP_ES_VLD_MASK)
218 /*! @} */
219 
220 /*! @name INT - Management Page Interrupt Request Status Register */
221 /*! @{ */
222 
223 #define EDMA4_MP_INT_INT_MASK                    (0xFFFFFFFFU)
224 #define EDMA4_MP_INT_INT_SHIFT                   (0U)
225 #define EDMA4_MP_INT_INT_WIDTH                   (32U)
226 #define EDMA4_MP_INT_INT(x)                      (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_INT_INT_SHIFT)) & EDMA4_MP_INT_INT_MASK)
227 /*! @} */
228 
229 /*! @name HRS - Management Page Hardware Request Status Register */
230 /*! @{ */
231 
232 #define EDMA4_MP_HRS_HRS_MASK                    (0xFFFFFFFFU)
233 #define EDMA4_MP_HRS_HRS_SHIFT                   (0U)
234 #define EDMA4_MP_HRS_HRS_WIDTH                   (32U)
235 #define EDMA4_MP_HRS_HRS(x)                      (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_HRS_HRS_SHIFT)) & EDMA4_MP_HRS_HRS_MASK)
236 /*! @} */
237 
238 /*! @name CH_GRPRI - Channel Arbitration Group Register */
239 /*! @{ */
240 
241 #define EDMA4_MP_CH_GRPRI_GRPRI_MASK             (0x3FU)
242 #define EDMA4_MP_CH_GRPRI_GRPRI_SHIFT            (0U)
243 #define EDMA4_MP_CH_GRPRI_GRPRI_WIDTH            (6U)
244 #define EDMA4_MP_CH_GRPRI_GRPRI(x)               (((uint32_t)(((uint32_t)(x)) << EDMA4_MP_CH_GRPRI_GRPRI_SHIFT)) & EDMA4_MP_CH_GRPRI_GRPRI_MASK)
245 /*! @} */
246 
247 /*!
248  * @}
249  */ /* end of group EDMA4_MP_Register_Masks */
250 
251 /*!
252  * @}
253  */ /* end of group EDMA4_MP_Peripheral_Access_Layer */
254 
255 #endif  /* #if !defined(S32Z2_EDMA4_MP_H_) */
256