SAME54P20A Test Project
sdhc.h
Go to the documentation of this file.
1 
30 #ifndef _SAME54_SDHC_COMPONENT_
31 #define _SAME54_SDHC_COMPONENT_
32 
33 /* ========================================================================== */
35 /* ========================================================================== */
38 
39 #define SDHC_U2011
40 #define REV_SDHC 0x183
41 
42 /* -------- SDHC_SSAR : (SDHC Offset: 0x000) (R/W 32) SDMA System Address / Argument 2 -------- */
43 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
44 typedef union {
45  struct { // CMD23 mode
46  uint32_t ARG2:32;
47  } CMD23;
48  struct {
49  uint32_t ADDR:32;
50  } bit;
51  uint32_t reg;
53 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
54 
55 #define SDHC_SSAR_OFFSET 0x000
56 #define SDHC_SSAR_RESETVALUE _U_(0x00000000)
58 // CMD23 mode
59 #define SDHC_SSAR_CMD23_ARG2_Pos 0
60 #define SDHC_SSAR_CMD23_ARG2_Msk (_U_(0xFFFFFFFF) << SDHC_SSAR_CMD23_ARG2_Pos)
61 #define SDHC_SSAR_CMD23_ARG2(value) (SDHC_SSAR_CMD23_ARG2_Msk & ((value) << SDHC_SSAR_CMD23_ARG2_Pos))
62 #define SDHC_SSAR_CMD23_MASK _U_(0xFFFFFFFF)
64 #define SDHC_SSAR_ADDR_Pos 0
65 #define SDHC_SSAR_ADDR_Msk (_U_(0xFFFFFFFF) << SDHC_SSAR_ADDR_Pos)
66 #define SDHC_SSAR_ADDR(value) (SDHC_SSAR_ADDR_Msk & ((value) << SDHC_SSAR_ADDR_Pos))
67 #define SDHC_SSAR_MASK _U_(0xFFFFFFFF)
69 /* -------- SDHC_BSR : (SDHC Offset: 0x004) (R/W 16) Block Size -------- */
70 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
71 typedef union {
72  struct {
73  uint16_t BLOCKSIZE:10;
74  uint16_t :2;
75  uint16_t BOUNDARY:3;
76  uint16_t :1;
77  } bit;
78  uint16_t reg;
80 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
81 
82 #define SDHC_BSR_OFFSET 0x004
83 #define SDHC_BSR_RESETVALUE _U_(0x0000)
85 #define SDHC_BSR_BLOCKSIZE_Pos 0
86 #define SDHC_BSR_BLOCKSIZE_Msk (_U_(0x3FF) << SDHC_BSR_BLOCKSIZE_Pos)
87 #define SDHC_BSR_BLOCKSIZE(value) (SDHC_BSR_BLOCKSIZE_Msk & ((value) << SDHC_BSR_BLOCKSIZE_Pos))
88 #define SDHC_BSR_BOUNDARY_Pos 12
89 #define SDHC_BSR_BOUNDARY_Msk (_U_(0x7) << SDHC_BSR_BOUNDARY_Pos)
90 #define SDHC_BSR_BOUNDARY(value) (SDHC_BSR_BOUNDARY_Msk & ((value) << SDHC_BSR_BOUNDARY_Pos))
91 #define SDHC_BSR_BOUNDARY_4K_Val _U_(0x0)
92 #define SDHC_BSR_BOUNDARY_8K_Val _U_(0x1)
93 #define SDHC_BSR_BOUNDARY_16K_Val _U_(0x2)
94 #define SDHC_BSR_BOUNDARY_32K_Val _U_(0x3)
95 #define SDHC_BSR_BOUNDARY_64K_Val _U_(0x4)
96 #define SDHC_BSR_BOUNDARY_128K_Val _U_(0x5)
97 #define SDHC_BSR_BOUNDARY_256K_Val _U_(0x6)
98 #define SDHC_BSR_BOUNDARY_512K_Val _U_(0x7)
99 #define SDHC_BSR_BOUNDARY_4K (SDHC_BSR_BOUNDARY_4K_Val << SDHC_BSR_BOUNDARY_Pos)
100 #define SDHC_BSR_BOUNDARY_8K (SDHC_BSR_BOUNDARY_8K_Val << SDHC_BSR_BOUNDARY_Pos)
101 #define SDHC_BSR_BOUNDARY_16K (SDHC_BSR_BOUNDARY_16K_Val << SDHC_BSR_BOUNDARY_Pos)
102 #define SDHC_BSR_BOUNDARY_32K (SDHC_BSR_BOUNDARY_32K_Val << SDHC_BSR_BOUNDARY_Pos)
103 #define SDHC_BSR_BOUNDARY_64K (SDHC_BSR_BOUNDARY_64K_Val << SDHC_BSR_BOUNDARY_Pos)
104 #define SDHC_BSR_BOUNDARY_128K (SDHC_BSR_BOUNDARY_128K_Val << SDHC_BSR_BOUNDARY_Pos)
105 #define SDHC_BSR_BOUNDARY_256K (SDHC_BSR_BOUNDARY_256K_Val << SDHC_BSR_BOUNDARY_Pos)
106 #define SDHC_BSR_BOUNDARY_512K (SDHC_BSR_BOUNDARY_512K_Val << SDHC_BSR_BOUNDARY_Pos)
107 #define SDHC_BSR_MASK _U_(0x73FF)
109 /* -------- SDHC_BCR : (SDHC Offset: 0x006) (R/W 16) Block Count -------- */
110 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
111 typedef union {
112  struct {
113  uint16_t BCNT:16;
114  } bit;
115  uint16_t reg;
116 } SDHC_BCR_Type;
117 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
118 
119 #define SDHC_BCR_OFFSET 0x006
120 #define SDHC_BCR_RESETVALUE _U_(0x0000)
122 #define SDHC_BCR_BCNT_Pos 0
123 #define SDHC_BCR_BCNT_Msk (_U_(0xFFFF) << SDHC_BCR_BCNT_Pos)
124 #define SDHC_BCR_BCNT(value) (SDHC_BCR_BCNT_Msk & ((value) << SDHC_BCR_BCNT_Pos))
125 #define SDHC_BCR_MASK _U_(0xFFFF)
127 /* -------- SDHC_ARG1R : (SDHC Offset: 0x008) (R/W 32) Argument 1 -------- */
128 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
129 typedef union {
130  struct {
131  uint32_t ARG:32;
132  } bit;
133  uint32_t reg;
135 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
136 
137 #define SDHC_ARG1R_OFFSET 0x008
138 #define SDHC_ARG1R_RESETVALUE _U_(0x00000000)
140 #define SDHC_ARG1R_ARG_Pos 0
141 #define SDHC_ARG1R_ARG_Msk (_U_(0xFFFFFFFF) << SDHC_ARG1R_ARG_Pos)
142 #define SDHC_ARG1R_ARG(value) (SDHC_ARG1R_ARG_Msk & ((value) << SDHC_ARG1R_ARG_Pos))
143 #define SDHC_ARG1R_MASK _U_(0xFFFFFFFF)
145 /* -------- SDHC_TMR : (SDHC Offset: 0x00C) (R/W 16) Transfer Mode -------- */
146 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
147 typedef union {
148  struct {
149  uint16_t DMAEN:1;
150  uint16_t BCEN:1;
151  uint16_t ACMDEN:2;
152  uint16_t DTDSEL:1;
153  uint16_t MSBSEL:1;
154  uint16_t :10;
155  } bit;
156  uint16_t reg;
157 } SDHC_TMR_Type;
158 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
159 
160 #define SDHC_TMR_OFFSET 0x00C
161 #define SDHC_TMR_RESETVALUE _U_(0x0000)
163 #define SDHC_TMR_DMAEN_Pos 0
164 #define SDHC_TMR_DMAEN (_U_(0x1) << SDHC_TMR_DMAEN_Pos)
165 #define SDHC_TMR_DMAEN_DISABLE_Val _U_(0x0)
166 #define SDHC_TMR_DMAEN_ENABLE_Val _U_(0x1)
167 #define SDHC_TMR_DMAEN_DISABLE (SDHC_TMR_DMAEN_DISABLE_Val << SDHC_TMR_DMAEN_Pos)
168 #define SDHC_TMR_DMAEN_ENABLE (SDHC_TMR_DMAEN_ENABLE_Val << SDHC_TMR_DMAEN_Pos)
169 #define SDHC_TMR_BCEN_Pos 1
170 #define SDHC_TMR_BCEN (_U_(0x1) << SDHC_TMR_BCEN_Pos)
171 #define SDHC_TMR_BCEN_DISABLE_Val _U_(0x0)
172 #define SDHC_TMR_BCEN_ENABLE_Val _U_(0x1)
173 #define SDHC_TMR_BCEN_DISABLE (SDHC_TMR_BCEN_DISABLE_Val << SDHC_TMR_BCEN_Pos)
174 #define SDHC_TMR_BCEN_ENABLE (SDHC_TMR_BCEN_ENABLE_Val << SDHC_TMR_BCEN_Pos)
175 #define SDHC_TMR_ACMDEN_Pos 2
176 #define SDHC_TMR_ACMDEN_Msk (_U_(0x3) << SDHC_TMR_ACMDEN_Pos)
177 #define SDHC_TMR_ACMDEN(value) (SDHC_TMR_ACMDEN_Msk & ((value) << SDHC_TMR_ACMDEN_Pos))
178 #define SDHC_TMR_ACMDEN_DISABLED_Val _U_(0x0)
179 #define SDHC_TMR_ACMDEN_CMD12_Val _U_(0x1)
180 #define SDHC_TMR_ACMDEN_CMD23_Val _U_(0x2)
181 #define SDHC_TMR_ACMDEN_3_Val _U_(0x3)
182 #define SDHC_TMR_ACMDEN_DISABLED (SDHC_TMR_ACMDEN_DISABLED_Val << SDHC_TMR_ACMDEN_Pos)
183 #define SDHC_TMR_ACMDEN_CMD12 (SDHC_TMR_ACMDEN_CMD12_Val << SDHC_TMR_ACMDEN_Pos)
184 #define SDHC_TMR_ACMDEN_CMD23 (SDHC_TMR_ACMDEN_CMD23_Val << SDHC_TMR_ACMDEN_Pos)
185 #define SDHC_TMR_ACMDEN_3 (SDHC_TMR_ACMDEN_3_Val << SDHC_TMR_ACMDEN_Pos)
186 #define SDHC_TMR_DTDSEL_Pos 4
187 #define SDHC_TMR_DTDSEL (_U_(0x1) << SDHC_TMR_DTDSEL_Pos)
188 #define SDHC_TMR_DTDSEL_WRITE_Val _U_(0x0)
189 #define SDHC_TMR_DTDSEL_READ_Val _U_(0x1)
190 #define SDHC_TMR_DTDSEL_WRITE (SDHC_TMR_DTDSEL_WRITE_Val << SDHC_TMR_DTDSEL_Pos)
191 #define SDHC_TMR_DTDSEL_READ (SDHC_TMR_DTDSEL_READ_Val << SDHC_TMR_DTDSEL_Pos)
192 #define SDHC_TMR_MSBSEL_Pos 5
193 #define SDHC_TMR_MSBSEL (_U_(0x1) << SDHC_TMR_MSBSEL_Pos)
194 #define SDHC_TMR_MSBSEL_SINGLE_Val _U_(0x0)
195 #define SDHC_TMR_MSBSEL_MULTIPLE_Val _U_(0x1)
196 #define SDHC_TMR_MSBSEL_SINGLE (SDHC_TMR_MSBSEL_SINGLE_Val << SDHC_TMR_MSBSEL_Pos)
197 #define SDHC_TMR_MSBSEL_MULTIPLE (SDHC_TMR_MSBSEL_MULTIPLE_Val << SDHC_TMR_MSBSEL_Pos)
198 #define SDHC_TMR_MASK _U_(0x003F)
200 /* -------- SDHC_CR : (SDHC Offset: 0x00E) (R/W 16) Command -------- */
201 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
202 typedef union {
203  struct {
204  uint16_t RESPTYP:2;
205  uint16_t :1;
206  uint16_t CMDCCEN:1;
207  uint16_t CMDICEN:1;
208  uint16_t DPSEL:1;
209  uint16_t CMDTYP:2;
210  uint16_t CMDIDX:6;
211  uint16_t :2;
212  } bit;
213  uint16_t reg;
214 } SDHC_CR_Type;
215 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
216 
217 #define SDHC_CR_OFFSET 0x00E
218 #define SDHC_CR_RESETVALUE _U_(0x0000)
220 #define SDHC_CR_RESPTYP_Pos 0
221 #define SDHC_CR_RESPTYP_Msk (_U_(0x3) << SDHC_CR_RESPTYP_Pos)
222 #define SDHC_CR_RESPTYP(value) (SDHC_CR_RESPTYP_Msk & ((value) << SDHC_CR_RESPTYP_Pos))
223 #define SDHC_CR_RESPTYP_NONE_Val _U_(0x0)
224 #define SDHC_CR_RESPTYP_136_BIT_Val _U_(0x1)
225 #define SDHC_CR_RESPTYP_48_BIT_Val _U_(0x2)
226 #define SDHC_CR_RESPTYP_48_BIT_BUSY_Val _U_(0x3)
227 #define SDHC_CR_RESPTYP_NONE (SDHC_CR_RESPTYP_NONE_Val << SDHC_CR_RESPTYP_Pos)
228 #define SDHC_CR_RESPTYP_136_BIT (SDHC_CR_RESPTYP_136_BIT_Val << SDHC_CR_RESPTYP_Pos)
229 #define SDHC_CR_RESPTYP_48_BIT (SDHC_CR_RESPTYP_48_BIT_Val << SDHC_CR_RESPTYP_Pos)
230 #define SDHC_CR_RESPTYP_48_BIT_BUSY (SDHC_CR_RESPTYP_48_BIT_BUSY_Val << SDHC_CR_RESPTYP_Pos)
231 #define SDHC_CR_CMDCCEN_Pos 3
232 #define SDHC_CR_CMDCCEN (_U_(0x1) << SDHC_CR_CMDCCEN_Pos)
233 #define SDHC_CR_CMDCCEN_DISABLE_Val _U_(0x0)
234 #define SDHC_CR_CMDCCEN_ENABLE_Val _U_(0x1)
235 #define SDHC_CR_CMDCCEN_DISABLE (SDHC_CR_CMDCCEN_DISABLE_Val << SDHC_CR_CMDCCEN_Pos)
236 #define SDHC_CR_CMDCCEN_ENABLE (SDHC_CR_CMDCCEN_ENABLE_Val << SDHC_CR_CMDCCEN_Pos)
237 #define SDHC_CR_CMDICEN_Pos 4
238 #define SDHC_CR_CMDICEN (_U_(0x1) << SDHC_CR_CMDICEN_Pos)
239 #define SDHC_CR_CMDICEN_DISABLE_Val _U_(0x0)
240 #define SDHC_CR_CMDICEN_ENABLE_Val _U_(0x1)
241 #define SDHC_CR_CMDICEN_DISABLE (SDHC_CR_CMDICEN_DISABLE_Val << SDHC_CR_CMDICEN_Pos)
242 #define SDHC_CR_CMDICEN_ENABLE (SDHC_CR_CMDICEN_ENABLE_Val << SDHC_CR_CMDICEN_Pos)
243 #define SDHC_CR_DPSEL_Pos 5
244 #define SDHC_CR_DPSEL (_U_(0x1) << SDHC_CR_DPSEL_Pos)
245 #define SDHC_CR_DPSEL_NO_DATA_Val _U_(0x0)
246 #define SDHC_CR_DPSEL_DATA_Val _U_(0x1)
247 #define SDHC_CR_DPSEL_NO_DATA (SDHC_CR_DPSEL_NO_DATA_Val << SDHC_CR_DPSEL_Pos)
248 #define SDHC_CR_DPSEL_DATA (SDHC_CR_DPSEL_DATA_Val << SDHC_CR_DPSEL_Pos)
249 #define SDHC_CR_CMDTYP_Pos 6
250 #define SDHC_CR_CMDTYP_Msk (_U_(0x3) << SDHC_CR_CMDTYP_Pos)
251 #define SDHC_CR_CMDTYP(value) (SDHC_CR_CMDTYP_Msk & ((value) << SDHC_CR_CMDTYP_Pos))
252 #define SDHC_CR_CMDTYP_NORMAL_Val _U_(0x0)
253 #define SDHC_CR_CMDTYP_SUSPEND_Val _U_(0x1)
254 #define SDHC_CR_CMDTYP_RESUME_Val _U_(0x2)
255 #define SDHC_CR_CMDTYP_ABORT_Val _U_(0x3)
256 #define SDHC_CR_CMDTYP_NORMAL (SDHC_CR_CMDTYP_NORMAL_Val << SDHC_CR_CMDTYP_Pos)
257 #define SDHC_CR_CMDTYP_SUSPEND (SDHC_CR_CMDTYP_SUSPEND_Val << SDHC_CR_CMDTYP_Pos)
258 #define SDHC_CR_CMDTYP_RESUME (SDHC_CR_CMDTYP_RESUME_Val << SDHC_CR_CMDTYP_Pos)
259 #define SDHC_CR_CMDTYP_ABORT (SDHC_CR_CMDTYP_ABORT_Val << SDHC_CR_CMDTYP_Pos)
260 #define SDHC_CR_CMDIDX_Pos 8
261 #define SDHC_CR_CMDIDX_Msk (_U_(0x3F) << SDHC_CR_CMDIDX_Pos)
262 #define SDHC_CR_CMDIDX(value) (SDHC_CR_CMDIDX_Msk & ((value) << SDHC_CR_CMDIDX_Pos))
263 #define SDHC_CR_MASK _U_(0x3FFB)
265 /* -------- SDHC_RR : (SDHC Offset: 0x010) (R/ 32) Response -------- */
266 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
267 typedef union {
268  struct {
269  uint32_t CMDRESP:32;
270  } bit;
271  uint32_t reg;
272 } SDHC_RR_Type;
273 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
274 
275 #define SDHC_RR_OFFSET 0x010
276 #define SDHC_RR_RESETVALUE _U_(0x00000000)
278 #define SDHC_RR_CMDRESP_Pos 0
279 #define SDHC_RR_CMDRESP_Msk (_U_(0xFFFFFFFF) << SDHC_RR_CMDRESP_Pos)
280 #define SDHC_RR_CMDRESP(value) (SDHC_RR_CMDRESP_Msk & ((value) << SDHC_RR_CMDRESP_Pos))
281 #define SDHC_RR_MASK _U_(0xFFFFFFFF)
283 /* -------- SDHC_BDPR : (SDHC Offset: 0x020) (R/W 32) Buffer Data Port -------- */
284 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
285 typedef union {
286  struct {
287  uint32_t BUFDATA:32;
288  } bit;
289  uint32_t reg;
291 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
292 
293 #define SDHC_BDPR_OFFSET 0x020
294 #define SDHC_BDPR_RESETVALUE _U_(0x00000000)
296 #define SDHC_BDPR_BUFDATA_Pos 0
297 #define SDHC_BDPR_BUFDATA_Msk (_U_(0xFFFFFFFF) << SDHC_BDPR_BUFDATA_Pos)
298 #define SDHC_BDPR_BUFDATA(value) (SDHC_BDPR_BUFDATA_Msk & ((value) << SDHC_BDPR_BUFDATA_Pos))
299 #define SDHC_BDPR_MASK _U_(0xFFFFFFFF)
301 /* -------- SDHC_PSR : (SDHC Offset: 0x024) (R/ 32) Present State -------- */
302 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
303 typedef union {
304  struct {
305  uint32_t CMDINHC:1;
306  uint32_t CMDINHD:1;
307  uint32_t DLACT:1;
308  uint32_t RTREQ:1;
309  uint32_t :4;
310  uint32_t WTACT:1;
311  uint32_t RTACT:1;
312  uint32_t BUFWREN:1;
313  uint32_t BUFRDEN:1;
314  uint32_t :4;
315  uint32_t CARDINS:1;
316  uint32_t CARDSS:1;
317  uint32_t CARDDPL:1;
318  uint32_t WRPPL:1;
319  uint32_t DATLL:4;
320  uint32_t CMDLL:1;
321  uint32_t :7;
322  } bit;
323  uint32_t reg;
324 } SDHC_PSR_Type;
325 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
326 
327 #define SDHC_PSR_OFFSET 0x024
328 #define SDHC_PSR_RESETVALUE _U_(0x00F80000)
330 #define SDHC_PSR_CMDINHC_Pos 0
331 #define SDHC_PSR_CMDINHC (_U_(0x1) << SDHC_PSR_CMDINHC_Pos)
332 #define SDHC_PSR_CMDINHC_CAN_Val _U_(0x0)
333 #define SDHC_PSR_CMDINHC_CANNOT_Val _U_(0x1)
334 #define SDHC_PSR_CMDINHC_CAN (SDHC_PSR_CMDINHC_CAN_Val << SDHC_PSR_CMDINHC_Pos)
335 #define SDHC_PSR_CMDINHC_CANNOT (SDHC_PSR_CMDINHC_CANNOT_Val << SDHC_PSR_CMDINHC_Pos)
336 #define SDHC_PSR_CMDINHD_Pos 1
337 #define SDHC_PSR_CMDINHD (_U_(0x1) << SDHC_PSR_CMDINHD_Pos)
338 #define SDHC_PSR_CMDINHD_CAN_Val _U_(0x0)
339 #define SDHC_PSR_CMDINHD_CANNOT_Val _U_(0x1)
340 #define SDHC_PSR_CMDINHD_CAN (SDHC_PSR_CMDINHD_CAN_Val << SDHC_PSR_CMDINHD_Pos)
341 #define SDHC_PSR_CMDINHD_CANNOT (SDHC_PSR_CMDINHD_CANNOT_Val << SDHC_PSR_CMDINHD_Pos)
342 #define SDHC_PSR_DLACT_Pos 2
343 #define SDHC_PSR_DLACT (_U_(0x1) << SDHC_PSR_DLACT_Pos)
344 #define SDHC_PSR_DLACT_INACTIVE_Val _U_(0x0)
345 #define SDHC_PSR_DLACT_ACTIVE_Val _U_(0x1)
346 #define SDHC_PSR_DLACT_INACTIVE (SDHC_PSR_DLACT_INACTIVE_Val << SDHC_PSR_DLACT_Pos)
347 #define SDHC_PSR_DLACT_ACTIVE (SDHC_PSR_DLACT_ACTIVE_Val << SDHC_PSR_DLACT_Pos)
348 #define SDHC_PSR_RTREQ_Pos 3
349 #define SDHC_PSR_RTREQ (_U_(0x1) << SDHC_PSR_RTREQ_Pos)
350 #define SDHC_PSR_RTREQ_OK_Val _U_(0x0)
351 #define SDHC_PSR_RTREQ_REQUIRED_Val _U_(0x1)
352 #define SDHC_PSR_RTREQ_OK (SDHC_PSR_RTREQ_OK_Val << SDHC_PSR_RTREQ_Pos)
353 #define SDHC_PSR_RTREQ_REQUIRED (SDHC_PSR_RTREQ_REQUIRED_Val << SDHC_PSR_RTREQ_Pos)
354 #define SDHC_PSR_WTACT_Pos 8
355 #define SDHC_PSR_WTACT (_U_(0x1) << SDHC_PSR_WTACT_Pos)
356 #define SDHC_PSR_WTACT_NO_Val _U_(0x0)
357 #define SDHC_PSR_WTACT_YES_Val _U_(0x1)
358 #define SDHC_PSR_WTACT_NO (SDHC_PSR_WTACT_NO_Val << SDHC_PSR_WTACT_Pos)
359 #define SDHC_PSR_WTACT_YES (SDHC_PSR_WTACT_YES_Val << SDHC_PSR_WTACT_Pos)
360 #define SDHC_PSR_RTACT_Pos 9
361 #define SDHC_PSR_RTACT (_U_(0x1) << SDHC_PSR_RTACT_Pos)
362 #define SDHC_PSR_RTACT_NO_Val _U_(0x0)
363 #define SDHC_PSR_RTACT_YES_Val _U_(0x1)
364 #define SDHC_PSR_RTACT_NO (SDHC_PSR_RTACT_NO_Val << SDHC_PSR_RTACT_Pos)
365 #define SDHC_PSR_RTACT_YES (SDHC_PSR_RTACT_YES_Val << SDHC_PSR_RTACT_Pos)
366 #define SDHC_PSR_BUFWREN_Pos 10
367 #define SDHC_PSR_BUFWREN (_U_(0x1) << SDHC_PSR_BUFWREN_Pos)
368 #define SDHC_PSR_BUFWREN_DISABLE_Val _U_(0x0)
369 #define SDHC_PSR_BUFWREN_ENABLE_Val _U_(0x1)
370 #define SDHC_PSR_BUFWREN_DISABLE (SDHC_PSR_BUFWREN_DISABLE_Val << SDHC_PSR_BUFWREN_Pos)
371 #define SDHC_PSR_BUFWREN_ENABLE (SDHC_PSR_BUFWREN_ENABLE_Val << SDHC_PSR_BUFWREN_Pos)
372 #define SDHC_PSR_BUFRDEN_Pos 11
373 #define SDHC_PSR_BUFRDEN (_U_(0x1) << SDHC_PSR_BUFRDEN_Pos)
374 #define SDHC_PSR_BUFRDEN_DISABLE_Val _U_(0x0)
375 #define SDHC_PSR_BUFRDEN_ENABLE_Val _U_(0x1)
376 #define SDHC_PSR_BUFRDEN_DISABLE (SDHC_PSR_BUFRDEN_DISABLE_Val << SDHC_PSR_BUFRDEN_Pos)
377 #define SDHC_PSR_BUFRDEN_ENABLE (SDHC_PSR_BUFRDEN_ENABLE_Val << SDHC_PSR_BUFRDEN_Pos)
378 #define SDHC_PSR_CARDINS_Pos 16
379 #define SDHC_PSR_CARDINS (_U_(0x1) << SDHC_PSR_CARDINS_Pos)
380 #define SDHC_PSR_CARDINS_NO_Val _U_(0x0)
381 #define SDHC_PSR_CARDINS_YES_Val _U_(0x1)
382 #define SDHC_PSR_CARDINS_NO (SDHC_PSR_CARDINS_NO_Val << SDHC_PSR_CARDINS_Pos)
383 #define SDHC_PSR_CARDINS_YES (SDHC_PSR_CARDINS_YES_Val << SDHC_PSR_CARDINS_Pos)
384 #define SDHC_PSR_CARDSS_Pos 17
385 #define SDHC_PSR_CARDSS (_U_(0x1) << SDHC_PSR_CARDSS_Pos)
386 #define SDHC_PSR_CARDSS_NO_Val _U_(0x0)
387 #define SDHC_PSR_CARDSS_YES_Val _U_(0x1)
388 #define SDHC_PSR_CARDSS_NO (SDHC_PSR_CARDSS_NO_Val << SDHC_PSR_CARDSS_Pos)
389 #define SDHC_PSR_CARDSS_YES (SDHC_PSR_CARDSS_YES_Val << SDHC_PSR_CARDSS_Pos)
390 #define SDHC_PSR_CARDDPL_Pos 18
391 #define SDHC_PSR_CARDDPL (_U_(0x1) << SDHC_PSR_CARDDPL_Pos)
392 #define SDHC_PSR_CARDDPL_NO_Val _U_(0x0)
393 #define SDHC_PSR_CARDDPL_YES_Val _U_(0x1)
394 #define SDHC_PSR_CARDDPL_NO (SDHC_PSR_CARDDPL_NO_Val << SDHC_PSR_CARDDPL_Pos)
395 #define SDHC_PSR_CARDDPL_YES (SDHC_PSR_CARDDPL_YES_Val << SDHC_PSR_CARDDPL_Pos)
396 #define SDHC_PSR_WRPPL_Pos 19
397 #define SDHC_PSR_WRPPL (_U_(0x1) << SDHC_PSR_WRPPL_Pos)
398 #define SDHC_PSR_WRPPL_PROTECTED_Val _U_(0x0)
399 #define SDHC_PSR_WRPPL_ENABLED_Val _U_(0x1)
400 #define SDHC_PSR_WRPPL_PROTECTED (SDHC_PSR_WRPPL_PROTECTED_Val << SDHC_PSR_WRPPL_Pos)
401 #define SDHC_PSR_WRPPL_ENABLED (SDHC_PSR_WRPPL_ENABLED_Val << SDHC_PSR_WRPPL_Pos)
402 #define SDHC_PSR_DATLL_Pos 20
403 #define SDHC_PSR_DATLL_Msk (_U_(0xF) << SDHC_PSR_DATLL_Pos)
404 #define SDHC_PSR_DATLL(value) (SDHC_PSR_DATLL_Msk & ((value) << SDHC_PSR_DATLL_Pos))
405 #define SDHC_PSR_CMDLL_Pos 24
406 #define SDHC_PSR_CMDLL (_U_(0x1) << SDHC_PSR_CMDLL_Pos)
407 #define SDHC_PSR_MASK _U_(0x01FF0F0F)
409 /* -------- SDHC_HC1R : (SDHC Offset: 0x028) (R/W 8) Host Control 1 -------- */
410 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
411 typedef union {
412  struct {
413  uint8_t LEDCTRL:1;
414  uint8_t DW:1;
415  uint8_t HSEN:1;
416  uint8_t DMASEL:2;
417  uint8_t :1;
418  uint8_t CARDDTL:1;
419  uint8_t CARDDSEL:1;
420  } bit;
421  struct { // EMMC mode
422  uint8_t :1;
423  uint8_t DW:1;
424  uint8_t HSEN:1;
425  uint8_t DMASEL:2;
426  uint8_t :3;
427  } EMMC;
428  uint8_t reg;
430 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
431 
432 #define SDHC_HC1R_OFFSET 0x028
433 #define SDHC_HC1R_RESETVALUE _U_(0xE00)
435 #define SDHC_HC1R_LEDCTRL_Pos 0
436 #define SDHC_HC1R_LEDCTRL (_U_(0x1) << SDHC_HC1R_LEDCTRL_Pos)
437 #define SDHC_HC1R_LEDCTRL_OFF_Val _U_(0x0)
438 #define SDHC_HC1R_LEDCTRL_ON_Val _U_(0x1)
439 #define SDHC_HC1R_LEDCTRL_OFF (SDHC_HC1R_LEDCTRL_OFF_Val << SDHC_HC1R_LEDCTRL_Pos)
440 #define SDHC_HC1R_LEDCTRL_ON (SDHC_HC1R_LEDCTRL_ON_Val << SDHC_HC1R_LEDCTRL_Pos)
441 #define SDHC_HC1R_DW_Pos 1
442 #define SDHC_HC1R_DW (_U_(0x1) << SDHC_HC1R_DW_Pos)
443 #define SDHC_HC1R_DW_1BIT_Val _U_(0x0)
444 #define SDHC_HC1R_DW_4BIT_Val _U_(0x1)
445 #define SDHC_HC1R_DW_1BIT (SDHC_HC1R_DW_1BIT_Val << SDHC_HC1R_DW_Pos)
446 #define SDHC_HC1R_DW_4BIT (SDHC_HC1R_DW_4BIT_Val << SDHC_HC1R_DW_Pos)
447 #define SDHC_HC1R_HSEN_Pos 2
448 #define SDHC_HC1R_HSEN (_U_(0x1) << SDHC_HC1R_HSEN_Pos)
449 #define SDHC_HC1R_HSEN_NORMAL_Val _U_(0x0)
450 #define SDHC_HC1R_HSEN_HIGH_Val _U_(0x1)
451 #define SDHC_HC1R_HSEN_NORMAL (SDHC_HC1R_HSEN_NORMAL_Val << SDHC_HC1R_HSEN_Pos)
452 #define SDHC_HC1R_HSEN_HIGH (SDHC_HC1R_HSEN_HIGH_Val << SDHC_HC1R_HSEN_Pos)
453 #define SDHC_HC1R_DMASEL_Pos 3
454 #define SDHC_HC1R_DMASEL_Msk (_U_(0x3) << SDHC_HC1R_DMASEL_Pos)
455 #define SDHC_HC1R_DMASEL(value) (SDHC_HC1R_DMASEL_Msk & ((value) << SDHC_HC1R_DMASEL_Pos))
456 #define SDHC_HC1R_DMASEL_SDMA_Val _U_(0x0)
457 #define SDHC_HC1R_DMASEL_1_Val _U_(0x1)
458 #define SDHC_HC1R_DMASEL_32BIT_Val _U_(0x2)
459 #define SDHC_HC1R_DMASEL_SDMA (SDHC_HC1R_DMASEL_SDMA_Val << SDHC_HC1R_DMASEL_Pos)
460 #define SDHC_HC1R_DMASEL_1 (SDHC_HC1R_DMASEL_1_Val << SDHC_HC1R_DMASEL_Pos)
461 #define SDHC_HC1R_DMASEL_32BIT (SDHC_HC1R_DMASEL_32BIT_Val << SDHC_HC1R_DMASEL_Pos)
462 #define SDHC_HC1R_CARDDTL_Pos 6
463 #define SDHC_HC1R_CARDDTL (_U_(0x1) << SDHC_HC1R_CARDDTL_Pos)
464 #define SDHC_HC1R_CARDDTL_NO_Val _U_(0x0)
465 #define SDHC_HC1R_CARDDTL_YES_Val _U_(0x1)
466 #define SDHC_HC1R_CARDDTL_NO (SDHC_HC1R_CARDDTL_NO_Val << SDHC_HC1R_CARDDTL_Pos)
467 #define SDHC_HC1R_CARDDTL_YES (SDHC_HC1R_CARDDTL_YES_Val << SDHC_HC1R_CARDDTL_Pos)
468 #define SDHC_HC1R_CARDDSEL_Pos 7
469 #define SDHC_HC1R_CARDDSEL (_U_(0x1) << SDHC_HC1R_CARDDSEL_Pos)
470 #define SDHC_HC1R_CARDDSEL_NORMAL_Val _U_(0x0)
471 #define SDHC_HC1R_CARDDSEL_TEST_Val _U_(0x1)
472 #define SDHC_HC1R_CARDDSEL_NORMAL (SDHC_HC1R_CARDDSEL_NORMAL_Val << SDHC_HC1R_CARDDSEL_Pos)
473 #define SDHC_HC1R_CARDDSEL_TEST (SDHC_HC1R_CARDDSEL_TEST_Val << SDHC_HC1R_CARDDSEL_Pos)
474 #define SDHC_HC1R_MASK _U_(0xDF)
476 // EMMC mode
477 #define SDHC_HC1R_EMMC_DW_Pos 1
478 #define SDHC_HC1R_EMMC_DW (_U_(0x1) << SDHC_HC1R_EMMC_DW_Pos)
479 #define SDHC_HC1R_EMMC_DW_1BIT_Val _U_(0x0)
480 #define SDHC_HC1R_EMMC_DW_4BIT_Val _U_(0x1)
481 #define SDHC_HC1R_EMMC_DW_1BIT (SDHC_HC1R_EMMC_DW_1BIT_Val << SDHC_HC1R_EMMC_DW_Pos)
482 #define SDHC_HC1R_EMMC_DW_4BIT (SDHC_HC1R_EMMC_DW_4BIT_Val << SDHC_HC1R_EMMC_DW_Pos)
483 #define SDHC_HC1R_EMMC_HSEN_Pos 2
484 #define SDHC_HC1R_EMMC_HSEN (_U_(0x1) << SDHC_HC1R_EMMC_HSEN_Pos)
485 #define SDHC_HC1R_EMMC_HSEN_NORMAL_Val _U_(0x0)
486 #define SDHC_HC1R_EMMC_HSEN_HIGH_Val _U_(0x1)
487 #define SDHC_HC1R_EMMC_HSEN_NORMAL (SDHC_HC1R_EMMC_HSEN_NORMAL_Val << SDHC_HC1R_EMMC_HSEN_Pos)
488 #define SDHC_HC1R_EMMC_HSEN_HIGH (SDHC_HC1R_EMMC_HSEN_HIGH_Val << SDHC_HC1R_EMMC_HSEN_Pos)
489 #define SDHC_HC1R_EMMC_DMASEL_Pos 3
490 #define SDHC_HC1R_EMMC_DMASEL_Msk (_U_(0x3) << SDHC_HC1R_EMMC_DMASEL_Pos)
491 #define SDHC_HC1R_EMMC_DMASEL(value) (SDHC_HC1R_EMMC_DMASEL_Msk & ((value) << SDHC_HC1R_EMMC_DMASEL_Pos))
492 #define SDHC_HC1R_EMMC_DMASEL_SDMA_Val _U_(0x0)
493 #define SDHC_HC1R_EMMC_DMASEL_1_Val _U_(0x1)
494 #define SDHC_HC1R_EMMC_DMASEL_32BIT_Val _U_(0x2)
495 #define SDHC_HC1R_EMMC_DMASEL_SDMA (SDHC_HC1R_EMMC_DMASEL_SDMA_Val << SDHC_HC1R_EMMC_DMASEL_Pos)
496 #define SDHC_HC1R_EMMC_DMASEL_1 (SDHC_HC1R_EMMC_DMASEL_1_Val << SDHC_HC1R_EMMC_DMASEL_Pos)
497 #define SDHC_HC1R_EMMC_DMASEL_32BIT (SDHC_HC1R_EMMC_DMASEL_32BIT_Val << SDHC_HC1R_EMMC_DMASEL_Pos)
498 #define SDHC_HC1R_EMMC_MASK _U_(0x1E)
500 /* -------- SDHC_PCR : (SDHC Offset: 0x029) (R/W 8) Power Control -------- */
501 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
502 typedef union {
503  struct {
504  uint8_t SDBPWR:1;
505  uint8_t SDBVSEL:3;
506  uint8_t :4;
507  } bit;
508  uint8_t reg;
509 } SDHC_PCR_Type;
510 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
511 
512 #define SDHC_PCR_OFFSET 0x029
513 #define SDHC_PCR_RESETVALUE _U_(0x0E)
515 #define SDHC_PCR_SDBPWR_Pos 0
516 #define SDHC_PCR_SDBPWR (_U_(0x1) << SDHC_PCR_SDBPWR_Pos)
517 #define SDHC_PCR_SDBPWR_OFF_Val _U_(0x0)
518 #define SDHC_PCR_SDBPWR_ON_Val _U_(0x1)
519 #define SDHC_PCR_SDBPWR_OFF (SDHC_PCR_SDBPWR_OFF_Val << SDHC_PCR_SDBPWR_Pos)
520 #define SDHC_PCR_SDBPWR_ON (SDHC_PCR_SDBPWR_ON_Val << SDHC_PCR_SDBPWR_Pos)
521 #define SDHC_PCR_SDBVSEL_Pos 1
522 #define SDHC_PCR_SDBVSEL_Msk (_U_(0x7) << SDHC_PCR_SDBVSEL_Pos)
523 #define SDHC_PCR_SDBVSEL(value) (SDHC_PCR_SDBVSEL_Msk & ((value) << SDHC_PCR_SDBVSEL_Pos))
524 #define SDHC_PCR_SDBVSEL_1V8_Val _U_(0x5)
525 #define SDHC_PCR_SDBVSEL_3V0_Val _U_(0x6)
526 #define SDHC_PCR_SDBVSEL_3V3_Val _U_(0x7)
527 #define SDHC_PCR_SDBVSEL_1V8 (SDHC_PCR_SDBVSEL_1V8_Val << SDHC_PCR_SDBVSEL_Pos)
528 #define SDHC_PCR_SDBVSEL_3V0 (SDHC_PCR_SDBVSEL_3V0_Val << SDHC_PCR_SDBVSEL_Pos)
529 #define SDHC_PCR_SDBVSEL_3V3 (SDHC_PCR_SDBVSEL_3V3_Val << SDHC_PCR_SDBVSEL_Pos)
530 #define SDHC_PCR_MASK _U_(0x0F)
532 /* -------- SDHC_BGCR : (SDHC Offset: 0x02A) (R/W 8) Block Gap Control -------- */
533 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
534 typedef union {
535  struct {
536  uint8_t STPBGR:1;
537  uint8_t CONTR:1;
538  uint8_t RWCTRL:1;
539  uint8_t INTBG:1;
540  uint8_t :4;
541  } bit;
542  struct { // EMMC mode
543  uint8_t STPBGR:1;
544  uint8_t CONTR:1;
545  uint8_t :6;
546  } EMMC;
547  uint8_t reg;
549 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
550 
551 #define SDHC_BGCR_OFFSET 0x02A
552 #define SDHC_BGCR_RESETVALUE _U_(0x00)
554 #define SDHC_BGCR_STPBGR_Pos 0
555 #define SDHC_BGCR_STPBGR (_U_(0x1) << SDHC_BGCR_STPBGR_Pos)
556 #define SDHC_BGCR_STPBGR_TRANSFER_Val _U_(0x0)
557 #define SDHC_BGCR_STPBGR_STOP_Val _U_(0x1)
558 #define SDHC_BGCR_STPBGR_TRANSFER (SDHC_BGCR_STPBGR_TRANSFER_Val << SDHC_BGCR_STPBGR_Pos)
559 #define SDHC_BGCR_STPBGR_STOP (SDHC_BGCR_STPBGR_STOP_Val << SDHC_BGCR_STPBGR_Pos)
560 #define SDHC_BGCR_CONTR_Pos 1
561 #define SDHC_BGCR_CONTR (_U_(0x1) << SDHC_BGCR_CONTR_Pos)
562 #define SDHC_BGCR_CONTR_GO_ON_Val _U_(0x0)
563 #define SDHC_BGCR_CONTR_RESTART_Val _U_(0x1)
564 #define SDHC_BGCR_CONTR_GO_ON (SDHC_BGCR_CONTR_GO_ON_Val << SDHC_BGCR_CONTR_Pos)
565 #define SDHC_BGCR_CONTR_RESTART (SDHC_BGCR_CONTR_RESTART_Val << SDHC_BGCR_CONTR_Pos)
566 #define SDHC_BGCR_RWCTRL_Pos 2
567 #define SDHC_BGCR_RWCTRL (_U_(0x1) << SDHC_BGCR_RWCTRL_Pos)
568 #define SDHC_BGCR_RWCTRL_DISABLE_Val _U_(0x0)
569 #define SDHC_BGCR_RWCTRL_ENABLE_Val _U_(0x1)
570 #define SDHC_BGCR_RWCTRL_DISABLE (SDHC_BGCR_RWCTRL_DISABLE_Val << SDHC_BGCR_RWCTRL_Pos)
571 #define SDHC_BGCR_RWCTRL_ENABLE (SDHC_BGCR_RWCTRL_ENABLE_Val << SDHC_BGCR_RWCTRL_Pos)
572 #define SDHC_BGCR_INTBG_Pos 3
573 #define SDHC_BGCR_INTBG (_U_(0x1) << SDHC_BGCR_INTBG_Pos)
574 #define SDHC_BGCR_INTBG_DISABLED_Val _U_(0x0)
575 #define SDHC_BGCR_INTBG_ENABLED_Val _U_(0x1)
576 #define SDHC_BGCR_INTBG_DISABLED (SDHC_BGCR_INTBG_DISABLED_Val << SDHC_BGCR_INTBG_Pos)
577 #define SDHC_BGCR_INTBG_ENABLED (SDHC_BGCR_INTBG_ENABLED_Val << SDHC_BGCR_INTBG_Pos)
578 #define SDHC_BGCR_MASK _U_(0x0F)
580 // EMMC mode
581 #define SDHC_BGCR_EMMC_STPBGR_Pos 0
582 #define SDHC_BGCR_EMMC_STPBGR (_U_(0x1) << SDHC_BGCR_EMMC_STPBGR_Pos)
583 #define SDHC_BGCR_EMMC_STPBGR_TRANSFER_Val _U_(0x0)
584 #define SDHC_BGCR_EMMC_STPBGR_STOP_Val _U_(0x1)
585 #define SDHC_BGCR_EMMC_STPBGR_TRANSFER (SDHC_BGCR_EMMC_STPBGR_TRANSFER_Val << SDHC_BGCR_EMMC_STPBGR_Pos)
586 #define SDHC_BGCR_EMMC_STPBGR_STOP (SDHC_BGCR_EMMC_STPBGR_STOP_Val << SDHC_BGCR_EMMC_STPBGR_Pos)
587 #define SDHC_BGCR_EMMC_CONTR_Pos 1
588 #define SDHC_BGCR_EMMC_CONTR (_U_(0x1) << SDHC_BGCR_EMMC_CONTR_Pos)
589 #define SDHC_BGCR_EMMC_CONTR_GO_ON_Val _U_(0x0)
590 #define SDHC_BGCR_EMMC_CONTR_RESTART_Val _U_(0x1)
591 #define SDHC_BGCR_EMMC_CONTR_GO_ON (SDHC_BGCR_EMMC_CONTR_GO_ON_Val << SDHC_BGCR_EMMC_CONTR_Pos)
592 #define SDHC_BGCR_EMMC_CONTR_RESTART (SDHC_BGCR_EMMC_CONTR_RESTART_Val << SDHC_BGCR_EMMC_CONTR_Pos)
593 #define SDHC_BGCR_EMMC_MASK _U_(0x03)
595 /* -------- SDHC_WCR : (SDHC Offset: 0x02B) (R/W 8) Wakeup Control -------- */
596 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
597 typedef union {
598  struct {
599  uint8_t WKENCINT:1;
600  uint8_t WKENCINS:1;
601  uint8_t WKENCREM:1;
602  uint8_t :5;
603  } bit;
604  uint8_t reg;
605 } SDHC_WCR_Type;
606 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
607 
608 #define SDHC_WCR_OFFSET 0x02B
609 #define SDHC_WCR_RESETVALUE _U_(0x00)
611 #define SDHC_WCR_WKENCINT_Pos 0
612 #define SDHC_WCR_WKENCINT (_U_(0x1) << SDHC_WCR_WKENCINT_Pos)
613 #define SDHC_WCR_WKENCINT_DISABLE_Val _U_(0x0)
614 #define SDHC_WCR_WKENCINT_ENABLE_Val _U_(0x1)
615 #define SDHC_WCR_WKENCINT_DISABLE (SDHC_WCR_WKENCINT_DISABLE_Val << SDHC_WCR_WKENCINT_Pos)
616 #define SDHC_WCR_WKENCINT_ENABLE (SDHC_WCR_WKENCINT_ENABLE_Val << SDHC_WCR_WKENCINT_Pos)
617 #define SDHC_WCR_WKENCINS_Pos 1
618 #define SDHC_WCR_WKENCINS (_U_(0x1) << SDHC_WCR_WKENCINS_Pos)
619 #define SDHC_WCR_WKENCINS_DISABLE_Val _U_(0x0)
620 #define SDHC_WCR_WKENCINS_ENABLE_Val _U_(0x1)
621 #define SDHC_WCR_WKENCINS_DISABLE (SDHC_WCR_WKENCINS_DISABLE_Val << SDHC_WCR_WKENCINS_Pos)
622 #define SDHC_WCR_WKENCINS_ENABLE (SDHC_WCR_WKENCINS_ENABLE_Val << SDHC_WCR_WKENCINS_Pos)
623 #define SDHC_WCR_WKENCREM_Pos 2
624 #define SDHC_WCR_WKENCREM (_U_(0x1) << SDHC_WCR_WKENCREM_Pos)
625 #define SDHC_WCR_WKENCREM_DISABLE_Val _U_(0x0)
626 #define SDHC_WCR_WKENCREM_ENABLE_Val _U_(0x1)
627 #define SDHC_WCR_WKENCREM_DISABLE (SDHC_WCR_WKENCREM_DISABLE_Val << SDHC_WCR_WKENCREM_Pos)
628 #define SDHC_WCR_WKENCREM_ENABLE (SDHC_WCR_WKENCREM_ENABLE_Val << SDHC_WCR_WKENCREM_Pos)
629 #define SDHC_WCR_MASK _U_(0x07)
631 /* -------- SDHC_CCR : (SDHC Offset: 0x02C) (R/W 16) Clock Control -------- */
632 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
633 typedef union {
634  struct {
635  uint16_t INTCLKEN:1;
636  uint16_t INTCLKS:1;
637  uint16_t SDCLKEN:1;
638  uint16_t :2;
639  uint16_t CLKGSEL:1;
640  uint16_t USDCLKFSEL:2;
641  uint16_t SDCLKFSEL:8;
642  } bit;
643  uint16_t reg;
644 } SDHC_CCR_Type;
645 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
646 
647 #define SDHC_CCR_OFFSET 0x02C
648 #define SDHC_CCR_RESETVALUE _U_(0x0000)
650 #define SDHC_CCR_INTCLKEN_Pos 0
651 #define SDHC_CCR_INTCLKEN (_U_(0x1) << SDHC_CCR_INTCLKEN_Pos)
652 #define SDHC_CCR_INTCLKEN_OFF_Val _U_(0x0)
653 #define SDHC_CCR_INTCLKEN_ON_Val _U_(0x1)
654 #define SDHC_CCR_INTCLKEN_OFF (SDHC_CCR_INTCLKEN_OFF_Val << SDHC_CCR_INTCLKEN_Pos)
655 #define SDHC_CCR_INTCLKEN_ON (SDHC_CCR_INTCLKEN_ON_Val << SDHC_CCR_INTCLKEN_Pos)
656 #define SDHC_CCR_INTCLKS_Pos 1
657 #define SDHC_CCR_INTCLKS (_U_(0x1) << SDHC_CCR_INTCLKS_Pos)
658 #define SDHC_CCR_INTCLKS_NOT_READY_Val _U_(0x0)
659 #define SDHC_CCR_INTCLKS_READY_Val _U_(0x1)
660 #define SDHC_CCR_INTCLKS_NOT_READY (SDHC_CCR_INTCLKS_NOT_READY_Val << SDHC_CCR_INTCLKS_Pos)
661 #define SDHC_CCR_INTCLKS_READY (SDHC_CCR_INTCLKS_READY_Val << SDHC_CCR_INTCLKS_Pos)
662 #define SDHC_CCR_SDCLKEN_Pos 2
663 #define SDHC_CCR_SDCLKEN (_U_(0x1) << SDHC_CCR_SDCLKEN_Pos)
664 #define SDHC_CCR_SDCLKEN_DISABLE_Val _U_(0x0)
665 #define SDHC_CCR_SDCLKEN_ENABLE_Val _U_(0x1)
666 #define SDHC_CCR_SDCLKEN_DISABLE (SDHC_CCR_SDCLKEN_DISABLE_Val << SDHC_CCR_SDCLKEN_Pos)
667 #define SDHC_CCR_SDCLKEN_ENABLE (SDHC_CCR_SDCLKEN_ENABLE_Val << SDHC_CCR_SDCLKEN_Pos)
668 #define SDHC_CCR_CLKGSEL_Pos 5
669 #define SDHC_CCR_CLKGSEL (_U_(0x1) << SDHC_CCR_CLKGSEL_Pos)
670 #define SDHC_CCR_CLKGSEL_DIV_Val _U_(0x0)
671 #define SDHC_CCR_CLKGSEL_PROG_Val _U_(0x1)
672 #define SDHC_CCR_CLKGSEL_DIV (SDHC_CCR_CLKGSEL_DIV_Val << SDHC_CCR_CLKGSEL_Pos)
673 #define SDHC_CCR_CLKGSEL_PROG (SDHC_CCR_CLKGSEL_PROG_Val << SDHC_CCR_CLKGSEL_Pos)
674 #define SDHC_CCR_USDCLKFSEL_Pos 6
675 #define SDHC_CCR_USDCLKFSEL_Msk (_U_(0x3) << SDHC_CCR_USDCLKFSEL_Pos)
676 #define SDHC_CCR_USDCLKFSEL(value) (SDHC_CCR_USDCLKFSEL_Msk & ((value) << SDHC_CCR_USDCLKFSEL_Pos))
677 #define SDHC_CCR_SDCLKFSEL_Pos 8
678 #define SDHC_CCR_SDCLKFSEL_Msk (_U_(0xFF) << SDHC_CCR_SDCLKFSEL_Pos)
679 #define SDHC_CCR_SDCLKFSEL(value) (SDHC_CCR_SDCLKFSEL_Msk & ((value) << SDHC_CCR_SDCLKFSEL_Pos))
680 #define SDHC_CCR_MASK _U_(0xFFE7)
682 /* -------- SDHC_TCR : (SDHC Offset: 0x02E) (R/W 8) Timeout Control -------- */
683 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
684 typedef union {
685  struct {
686  uint8_t DTCVAL:4;
687  uint8_t :4;
688  } bit;
689  uint8_t reg;
690 } SDHC_TCR_Type;
691 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
692 
693 #define SDHC_TCR_OFFSET 0x02E
694 #define SDHC_TCR_RESETVALUE _U_(0x00)
696 #define SDHC_TCR_DTCVAL_Pos 0
697 #define SDHC_TCR_DTCVAL_Msk (_U_(0xF) << SDHC_TCR_DTCVAL_Pos)
698 #define SDHC_TCR_DTCVAL(value) (SDHC_TCR_DTCVAL_Msk & ((value) << SDHC_TCR_DTCVAL_Pos))
699 #define SDHC_TCR_MASK _U_(0x0F)
701 /* -------- SDHC_SRR : (SDHC Offset: 0x02F) (R/W 8) Software Reset -------- */
702 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
703 typedef union {
704  struct {
705  uint8_t SWRSTALL:1;
706  uint8_t SWRSTCMD:1;
707  uint8_t SWRSTDAT:1;
708  uint8_t :5;
709  } bit;
710  uint8_t reg;
711 } SDHC_SRR_Type;
712 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
713 
714 #define SDHC_SRR_OFFSET 0x02F
715 #define SDHC_SRR_RESETVALUE _U_(0x00)
717 #define SDHC_SRR_SWRSTALL_Pos 0
718 #define SDHC_SRR_SWRSTALL (_U_(0x1) << SDHC_SRR_SWRSTALL_Pos)
719 #define SDHC_SRR_SWRSTALL_WORK_Val _U_(0x0)
720 #define SDHC_SRR_SWRSTALL_RESET_Val _U_(0x1)
721 #define SDHC_SRR_SWRSTALL_WORK (SDHC_SRR_SWRSTALL_WORK_Val << SDHC_SRR_SWRSTALL_Pos)
722 #define SDHC_SRR_SWRSTALL_RESET (SDHC_SRR_SWRSTALL_RESET_Val << SDHC_SRR_SWRSTALL_Pos)
723 #define SDHC_SRR_SWRSTCMD_Pos 1
724 #define SDHC_SRR_SWRSTCMD (_U_(0x1) << SDHC_SRR_SWRSTCMD_Pos)
725 #define SDHC_SRR_SWRSTCMD_WORK_Val _U_(0x0)
726 #define SDHC_SRR_SWRSTCMD_RESET_Val _U_(0x1)
727 #define SDHC_SRR_SWRSTCMD_WORK (SDHC_SRR_SWRSTCMD_WORK_Val << SDHC_SRR_SWRSTCMD_Pos)
728 #define SDHC_SRR_SWRSTCMD_RESET (SDHC_SRR_SWRSTCMD_RESET_Val << SDHC_SRR_SWRSTCMD_Pos)
729 #define SDHC_SRR_SWRSTDAT_Pos 2
730 #define SDHC_SRR_SWRSTDAT (_U_(0x1) << SDHC_SRR_SWRSTDAT_Pos)
731 #define SDHC_SRR_SWRSTDAT_WORK_Val _U_(0x0)
732 #define SDHC_SRR_SWRSTDAT_RESET_Val _U_(0x1)
733 #define SDHC_SRR_SWRSTDAT_WORK (SDHC_SRR_SWRSTDAT_WORK_Val << SDHC_SRR_SWRSTDAT_Pos)
734 #define SDHC_SRR_SWRSTDAT_RESET (SDHC_SRR_SWRSTDAT_RESET_Val << SDHC_SRR_SWRSTDAT_Pos)
735 #define SDHC_SRR_MASK _U_(0x07)
737 /* -------- SDHC_NISTR : (SDHC Offset: 0x030) (R/W 16) Normal Interrupt Status -------- */
738 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
739 typedef union {
740  struct {
741  uint16_t CMDC:1;
742  uint16_t TRFC:1;
743  uint16_t BLKGE:1;
744  uint16_t DMAINT:1;
745  uint16_t BWRRDY:1;
746  uint16_t BRDRDY:1;
747  uint16_t CINS:1;
748  uint16_t CREM:1;
749  uint16_t CINT:1;
750  uint16_t :6;
751  uint16_t ERRINT:1;
752  } bit;
753  struct { // EMMC mode
754  uint16_t CMDC:1;
755  uint16_t TRFC:1;
756  uint16_t BLKGE:1;
757  uint16_t DMAINT:1;
758  uint16_t BWRRDY:1;
759  uint16_t BRDRDY:1;
760  uint16_t :8;
761  uint16_t BOOTAR:1;
762  uint16_t ERRINT:1;
763  } EMMC;
764  uint16_t reg;
766 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
767 
768 #define SDHC_NISTR_OFFSET 0x030
769 #define SDHC_NISTR_RESETVALUE _U_(0x0000)
771 #define SDHC_NISTR_CMDC_Pos 0
772 #define SDHC_NISTR_CMDC (_U_(0x1) << SDHC_NISTR_CMDC_Pos)
773 #define SDHC_NISTR_CMDC_NO_Val _U_(0x0)
774 #define SDHC_NISTR_CMDC_YES_Val _U_(0x1)
775 #define SDHC_NISTR_CMDC_NO (SDHC_NISTR_CMDC_NO_Val << SDHC_NISTR_CMDC_Pos)
776 #define SDHC_NISTR_CMDC_YES (SDHC_NISTR_CMDC_YES_Val << SDHC_NISTR_CMDC_Pos)
777 #define SDHC_NISTR_TRFC_Pos 1
778 #define SDHC_NISTR_TRFC (_U_(0x1) << SDHC_NISTR_TRFC_Pos)
779 #define SDHC_NISTR_TRFC_NO_Val _U_(0x0)
780 #define SDHC_NISTR_TRFC_YES_Val _U_(0x1)
781 #define SDHC_NISTR_TRFC_NO (SDHC_NISTR_TRFC_NO_Val << SDHC_NISTR_TRFC_Pos)
782 #define SDHC_NISTR_TRFC_YES (SDHC_NISTR_TRFC_YES_Val << SDHC_NISTR_TRFC_Pos)
783 #define SDHC_NISTR_BLKGE_Pos 2
784 #define SDHC_NISTR_BLKGE (_U_(0x1) << SDHC_NISTR_BLKGE_Pos)
785 #define SDHC_NISTR_BLKGE_NO_Val _U_(0x0)
786 #define SDHC_NISTR_BLKGE_STOP_Val _U_(0x1)
787 #define SDHC_NISTR_BLKGE_NO (SDHC_NISTR_BLKGE_NO_Val << SDHC_NISTR_BLKGE_Pos)
788 #define SDHC_NISTR_BLKGE_STOP (SDHC_NISTR_BLKGE_STOP_Val << SDHC_NISTR_BLKGE_Pos)
789 #define SDHC_NISTR_DMAINT_Pos 3
790 #define SDHC_NISTR_DMAINT (_U_(0x1) << SDHC_NISTR_DMAINT_Pos)
791 #define SDHC_NISTR_DMAINT_NO_Val _U_(0x0)
792 #define SDHC_NISTR_DMAINT_YES_Val _U_(0x1)
793 #define SDHC_NISTR_DMAINT_NO (SDHC_NISTR_DMAINT_NO_Val << SDHC_NISTR_DMAINT_Pos)
794 #define SDHC_NISTR_DMAINT_YES (SDHC_NISTR_DMAINT_YES_Val << SDHC_NISTR_DMAINT_Pos)
795 #define SDHC_NISTR_BWRRDY_Pos 4
796 #define SDHC_NISTR_BWRRDY (_U_(0x1) << SDHC_NISTR_BWRRDY_Pos)
797 #define SDHC_NISTR_BWRRDY_NO_Val _U_(0x0)
798 #define SDHC_NISTR_BWRRDY_YES_Val _U_(0x1)
799 #define SDHC_NISTR_BWRRDY_NO (SDHC_NISTR_BWRRDY_NO_Val << SDHC_NISTR_BWRRDY_Pos)
800 #define SDHC_NISTR_BWRRDY_YES (SDHC_NISTR_BWRRDY_YES_Val << SDHC_NISTR_BWRRDY_Pos)
801 #define SDHC_NISTR_BRDRDY_Pos 5
802 #define SDHC_NISTR_BRDRDY (_U_(0x1) << SDHC_NISTR_BRDRDY_Pos)
803 #define SDHC_NISTR_BRDRDY_NO_Val _U_(0x0)
804 #define SDHC_NISTR_BRDRDY_YES_Val _U_(0x1)
805 #define SDHC_NISTR_BRDRDY_NO (SDHC_NISTR_BRDRDY_NO_Val << SDHC_NISTR_BRDRDY_Pos)
806 #define SDHC_NISTR_BRDRDY_YES (SDHC_NISTR_BRDRDY_YES_Val << SDHC_NISTR_BRDRDY_Pos)
807 #define SDHC_NISTR_CINS_Pos 6
808 #define SDHC_NISTR_CINS (_U_(0x1) << SDHC_NISTR_CINS_Pos)
809 #define SDHC_NISTR_CINS_NO_Val _U_(0x0)
810 #define SDHC_NISTR_CINS_YES_Val _U_(0x1)
811 #define SDHC_NISTR_CINS_NO (SDHC_NISTR_CINS_NO_Val << SDHC_NISTR_CINS_Pos)
812 #define SDHC_NISTR_CINS_YES (SDHC_NISTR_CINS_YES_Val << SDHC_NISTR_CINS_Pos)
813 #define SDHC_NISTR_CREM_Pos 7
814 #define SDHC_NISTR_CREM (_U_(0x1) << SDHC_NISTR_CREM_Pos)
815 #define SDHC_NISTR_CREM_NO_Val _U_(0x0)
816 #define SDHC_NISTR_CREM_YES_Val _U_(0x1)
817 #define SDHC_NISTR_CREM_NO (SDHC_NISTR_CREM_NO_Val << SDHC_NISTR_CREM_Pos)
818 #define SDHC_NISTR_CREM_YES (SDHC_NISTR_CREM_YES_Val << SDHC_NISTR_CREM_Pos)
819 #define SDHC_NISTR_CINT_Pos 8
820 #define SDHC_NISTR_CINT (_U_(0x1) << SDHC_NISTR_CINT_Pos)
821 #define SDHC_NISTR_CINT_NO_Val _U_(0x0)
822 #define SDHC_NISTR_CINT_YES_Val _U_(0x1)
823 #define SDHC_NISTR_CINT_NO (SDHC_NISTR_CINT_NO_Val << SDHC_NISTR_CINT_Pos)
824 #define SDHC_NISTR_CINT_YES (SDHC_NISTR_CINT_YES_Val << SDHC_NISTR_CINT_Pos)
825 #define SDHC_NISTR_ERRINT_Pos 15
826 #define SDHC_NISTR_ERRINT (_U_(0x1) << SDHC_NISTR_ERRINT_Pos)
827 #define SDHC_NISTR_ERRINT_NO_Val _U_(0x0)
828 #define SDHC_NISTR_ERRINT_YES_Val _U_(0x1)
829 #define SDHC_NISTR_ERRINT_NO (SDHC_NISTR_ERRINT_NO_Val << SDHC_NISTR_ERRINT_Pos)
830 #define SDHC_NISTR_ERRINT_YES (SDHC_NISTR_ERRINT_YES_Val << SDHC_NISTR_ERRINT_Pos)
831 #define SDHC_NISTR_MASK _U_(0x81FF)
833 // EMMC mode
834 #define SDHC_NISTR_EMMC_CMDC_Pos 0
835 #define SDHC_NISTR_EMMC_CMDC (_U_(0x1) << SDHC_NISTR_EMMC_CMDC_Pos)
836 #define SDHC_NISTR_EMMC_CMDC_NO_Val _U_(0x0)
837 #define SDHC_NISTR_EMMC_CMDC_YES_Val _U_(0x1)
838 #define SDHC_NISTR_EMMC_CMDC_NO (SDHC_NISTR_EMMC_CMDC_NO_Val << SDHC_NISTR_EMMC_CMDC_Pos)
839 #define SDHC_NISTR_EMMC_CMDC_YES (SDHC_NISTR_EMMC_CMDC_YES_Val << SDHC_NISTR_EMMC_CMDC_Pos)
840 #define SDHC_NISTR_EMMC_TRFC_Pos 1
841 #define SDHC_NISTR_EMMC_TRFC (_U_(0x1) << SDHC_NISTR_EMMC_TRFC_Pos)
842 #define SDHC_NISTR_EMMC_TRFC_NO_Val _U_(0x0)
843 #define SDHC_NISTR_EMMC_TRFC_YES_Val _U_(0x1)
844 #define SDHC_NISTR_EMMC_TRFC_NO (SDHC_NISTR_EMMC_TRFC_NO_Val << SDHC_NISTR_EMMC_TRFC_Pos)
845 #define SDHC_NISTR_EMMC_TRFC_YES (SDHC_NISTR_EMMC_TRFC_YES_Val << SDHC_NISTR_EMMC_TRFC_Pos)
846 #define SDHC_NISTR_EMMC_BLKGE_Pos 2
847 #define SDHC_NISTR_EMMC_BLKGE (_U_(0x1) << SDHC_NISTR_EMMC_BLKGE_Pos)
848 #define SDHC_NISTR_EMMC_BLKGE_NO_Val _U_(0x0)
849 #define SDHC_NISTR_EMMC_BLKGE_STOP_Val _U_(0x1)
850 #define SDHC_NISTR_EMMC_BLKGE_NO (SDHC_NISTR_EMMC_BLKGE_NO_Val << SDHC_NISTR_EMMC_BLKGE_Pos)
851 #define SDHC_NISTR_EMMC_BLKGE_STOP (SDHC_NISTR_EMMC_BLKGE_STOP_Val << SDHC_NISTR_EMMC_BLKGE_Pos)
852 #define SDHC_NISTR_EMMC_DMAINT_Pos 3
853 #define SDHC_NISTR_EMMC_DMAINT (_U_(0x1) << SDHC_NISTR_EMMC_DMAINT_Pos)
854 #define SDHC_NISTR_EMMC_DMAINT_NO_Val _U_(0x0)
855 #define SDHC_NISTR_EMMC_DMAINT_YES_Val _U_(0x1)
856 #define SDHC_NISTR_EMMC_DMAINT_NO (SDHC_NISTR_EMMC_DMAINT_NO_Val << SDHC_NISTR_EMMC_DMAINT_Pos)
857 #define SDHC_NISTR_EMMC_DMAINT_YES (SDHC_NISTR_EMMC_DMAINT_YES_Val << SDHC_NISTR_EMMC_DMAINT_Pos)
858 #define SDHC_NISTR_EMMC_BWRRDY_Pos 4
859 #define SDHC_NISTR_EMMC_BWRRDY (_U_(0x1) << SDHC_NISTR_EMMC_BWRRDY_Pos)
860 #define SDHC_NISTR_EMMC_BWRRDY_NO_Val _U_(0x0)
861 #define SDHC_NISTR_EMMC_BWRRDY_YES_Val _U_(0x1)
862 #define SDHC_NISTR_EMMC_BWRRDY_NO (SDHC_NISTR_EMMC_BWRRDY_NO_Val << SDHC_NISTR_EMMC_BWRRDY_Pos)
863 #define SDHC_NISTR_EMMC_BWRRDY_YES (SDHC_NISTR_EMMC_BWRRDY_YES_Val << SDHC_NISTR_EMMC_BWRRDY_Pos)
864 #define SDHC_NISTR_EMMC_BRDRDY_Pos 5
865 #define SDHC_NISTR_EMMC_BRDRDY (_U_(0x1) << SDHC_NISTR_EMMC_BRDRDY_Pos)
866 #define SDHC_NISTR_EMMC_BRDRDY_NO_Val _U_(0x0)
867 #define SDHC_NISTR_EMMC_BRDRDY_YES_Val _U_(0x1)
868 #define SDHC_NISTR_EMMC_BRDRDY_NO (SDHC_NISTR_EMMC_BRDRDY_NO_Val << SDHC_NISTR_EMMC_BRDRDY_Pos)
869 #define SDHC_NISTR_EMMC_BRDRDY_YES (SDHC_NISTR_EMMC_BRDRDY_YES_Val << SDHC_NISTR_EMMC_BRDRDY_Pos)
870 #define SDHC_NISTR_EMMC_BOOTAR_Pos 14
871 #define SDHC_NISTR_EMMC_BOOTAR (_U_(0x1) << SDHC_NISTR_EMMC_BOOTAR_Pos)
872 #define SDHC_NISTR_EMMC_ERRINT_Pos 15
873 #define SDHC_NISTR_EMMC_ERRINT (_U_(0x1) << SDHC_NISTR_EMMC_ERRINT_Pos)
874 #define SDHC_NISTR_EMMC_ERRINT_NO_Val _U_(0x0)
875 #define SDHC_NISTR_EMMC_ERRINT_YES_Val _U_(0x1)
876 #define SDHC_NISTR_EMMC_ERRINT_NO (SDHC_NISTR_EMMC_ERRINT_NO_Val << SDHC_NISTR_EMMC_ERRINT_Pos)
877 #define SDHC_NISTR_EMMC_ERRINT_YES (SDHC_NISTR_EMMC_ERRINT_YES_Val << SDHC_NISTR_EMMC_ERRINT_Pos)
878 #define SDHC_NISTR_EMMC_MASK _U_(0xC03F)
880 /* -------- SDHC_EISTR : (SDHC Offset: 0x032) (R/W 16) Error Interrupt Status -------- */
881 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
882 typedef union {
883  struct {
884  uint16_t CMDTEO:1;
885  uint16_t CMDCRC:1;
886  uint16_t CMDEND:1;
887  uint16_t CMDIDX:1;
888  uint16_t DATTEO:1;
889  uint16_t DATCRC:1;
890  uint16_t DATEND:1;
891  uint16_t CURLIM:1;
892  uint16_t ACMD:1;
893  uint16_t ADMA:1;
894  uint16_t :6;
895  } bit;
896  struct { // EMMC mode
897  uint16_t CMDTEO:1;
898  uint16_t CMDCRC:1;
899  uint16_t CMDEND:1;
900  uint16_t CMDIDX:1;
901  uint16_t DATTEO:1;
902  uint16_t DATCRC:1;
903  uint16_t DATEND:1;
904  uint16_t CURLIM:1;
905  uint16_t ACMD:1;
906  uint16_t ADMA:1;
907  uint16_t :2;
908  uint16_t BOOTAE:1;
909  uint16_t :3;
910  } EMMC;
911  uint16_t reg;
913 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
914 
915 #define SDHC_EISTR_OFFSET 0x032
916 #define SDHC_EISTR_RESETVALUE _U_(0x0000)
918 #define SDHC_EISTR_CMDTEO_Pos 0
919 #define SDHC_EISTR_CMDTEO (_U_(0x1) << SDHC_EISTR_CMDTEO_Pos)
920 #define SDHC_EISTR_CMDTEO_NO_Val _U_(0x0)
921 #define SDHC_EISTR_CMDTEO_YES_Val _U_(0x1)
922 #define SDHC_EISTR_CMDTEO_NO (SDHC_EISTR_CMDTEO_NO_Val << SDHC_EISTR_CMDTEO_Pos)
923 #define SDHC_EISTR_CMDTEO_YES (SDHC_EISTR_CMDTEO_YES_Val << SDHC_EISTR_CMDTEO_Pos)
924 #define SDHC_EISTR_CMDCRC_Pos 1
925 #define SDHC_EISTR_CMDCRC (_U_(0x1) << SDHC_EISTR_CMDCRC_Pos)
926 #define SDHC_EISTR_CMDCRC_NO_Val _U_(0x0)
927 #define SDHC_EISTR_CMDCRC_YES_Val _U_(0x1)
928 #define SDHC_EISTR_CMDCRC_NO (SDHC_EISTR_CMDCRC_NO_Val << SDHC_EISTR_CMDCRC_Pos)
929 #define SDHC_EISTR_CMDCRC_YES (SDHC_EISTR_CMDCRC_YES_Val << SDHC_EISTR_CMDCRC_Pos)
930 #define SDHC_EISTR_CMDEND_Pos 2
931 #define SDHC_EISTR_CMDEND (_U_(0x1) << SDHC_EISTR_CMDEND_Pos)
932 #define SDHC_EISTR_CMDEND_NO_Val _U_(0x0)
933 #define SDHC_EISTR_CMDEND_YES_Val _U_(0x1)
934 #define SDHC_EISTR_CMDEND_NO (SDHC_EISTR_CMDEND_NO_Val << SDHC_EISTR_CMDEND_Pos)
935 #define SDHC_EISTR_CMDEND_YES (SDHC_EISTR_CMDEND_YES_Val << SDHC_EISTR_CMDEND_Pos)
936 #define SDHC_EISTR_CMDIDX_Pos 3
937 #define SDHC_EISTR_CMDIDX (_U_(0x1) << SDHC_EISTR_CMDIDX_Pos)
938 #define SDHC_EISTR_CMDIDX_NO_Val _U_(0x0)
939 #define SDHC_EISTR_CMDIDX_YES_Val _U_(0x1)
940 #define SDHC_EISTR_CMDIDX_NO (SDHC_EISTR_CMDIDX_NO_Val << SDHC_EISTR_CMDIDX_Pos)
941 #define SDHC_EISTR_CMDIDX_YES (SDHC_EISTR_CMDIDX_YES_Val << SDHC_EISTR_CMDIDX_Pos)
942 #define SDHC_EISTR_DATTEO_Pos 4
943 #define SDHC_EISTR_DATTEO (_U_(0x1) << SDHC_EISTR_DATTEO_Pos)
944 #define SDHC_EISTR_DATTEO_NO_Val _U_(0x0)
945 #define SDHC_EISTR_DATTEO_YES_Val _U_(0x1)
946 #define SDHC_EISTR_DATTEO_NO (SDHC_EISTR_DATTEO_NO_Val << SDHC_EISTR_DATTEO_Pos)
947 #define SDHC_EISTR_DATTEO_YES (SDHC_EISTR_DATTEO_YES_Val << SDHC_EISTR_DATTEO_Pos)
948 #define SDHC_EISTR_DATCRC_Pos 5
949 #define SDHC_EISTR_DATCRC (_U_(0x1) << SDHC_EISTR_DATCRC_Pos)
950 #define SDHC_EISTR_DATCRC_NO_Val _U_(0x0)
951 #define SDHC_EISTR_DATCRC_YES_Val _U_(0x1)
952 #define SDHC_EISTR_DATCRC_NO (SDHC_EISTR_DATCRC_NO_Val << SDHC_EISTR_DATCRC_Pos)
953 #define SDHC_EISTR_DATCRC_YES (SDHC_EISTR_DATCRC_YES_Val << SDHC_EISTR_DATCRC_Pos)
954 #define SDHC_EISTR_DATEND_Pos 6
955 #define SDHC_EISTR_DATEND (_U_(0x1) << SDHC_EISTR_DATEND_Pos)
956 #define SDHC_EISTR_DATEND_NO_Val _U_(0x0)
957 #define SDHC_EISTR_DATEND_YES_Val _U_(0x1)
958 #define SDHC_EISTR_DATEND_NO (SDHC_EISTR_DATEND_NO_Val << SDHC_EISTR_DATEND_Pos)
959 #define SDHC_EISTR_DATEND_YES (SDHC_EISTR_DATEND_YES_Val << SDHC_EISTR_DATEND_Pos)
960 #define SDHC_EISTR_CURLIM_Pos 7
961 #define SDHC_EISTR_CURLIM (_U_(0x1) << SDHC_EISTR_CURLIM_Pos)
962 #define SDHC_EISTR_CURLIM_NO_Val _U_(0x0)
963 #define SDHC_EISTR_CURLIM_YES_Val _U_(0x1)
964 #define SDHC_EISTR_CURLIM_NO (SDHC_EISTR_CURLIM_NO_Val << SDHC_EISTR_CURLIM_Pos)
965 #define SDHC_EISTR_CURLIM_YES (SDHC_EISTR_CURLIM_YES_Val << SDHC_EISTR_CURLIM_Pos)
966 #define SDHC_EISTR_ACMD_Pos 8
967 #define SDHC_EISTR_ACMD (_U_(0x1) << SDHC_EISTR_ACMD_Pos)
968 #define SDHC_EISTR_ACMD_NO_Val _U_(0x0)
969 #define SDHC_EISTR_ACMD_YES_Val _U_(0x1)
970 #define SDHC_EISTR_ACMD_NO (SDHC_EISTR_ACMD_NO_Val << SDHC_EISTR_ACMD_Pos)
971 #define SDHC_EISTR_ACMD_YES (SDHC_EISTR_ACMD_YES_Val << SDHC_EISTR_ACMD_Pos)
972 #define SDHC_EISTR_ADMA_Pos 9
973 #define SDHC_EISTR_ADMA (_U_(0x1) << SDHC_EISTR_ADMA_Pos)
974 #define SDHC_EISTR_ADMA_NO_Val _U_(0x0)
975 #define SDHC_EISTR_ADMA_YES_Val _U_(0x1)
976 #define SDHC_EISTR_ADMA_NO (SDHC_EISTR_ADMA_NO_Val << SDHC_EISTR_ADMA_Pos)
977 #define SDHC_EISTR_ADMA_YES (SDHC_EISTR_ADMA_YES_Val << SDHC_EISTR_ADMA_Pos)
978 #define SDHC_EISTR_MASK _U_(0x03FF)
980 // EMMC mode
981 #define SDHC_EISTR_EMMC_CMDTEO_Pos 0
982 #define SDHC_EISTR_EMMC_CMDTEO (_U_(0x1) << SDHC_EISTR_EMMC_CMDTEO_Pos)
983 #define SDHC_EISTR_EMMC_CMDTEO_NO_Val _U_(0x0)
984 #define SDHC_EISTR_EMMC_CMDTEO_YES_Val _U_(0x1)
985 #define SDHC_EISTR_EMMC_CMDTEO_NO (SDHC_EISTR_EMMC_CMDTEO_NO_Val << SDHC_EISTR_EMMC_CMDTEO_Pos)
986 #define SDHC_EISTR_EMMC_CMDTEO_YES (SDHC_EISTR_EMMC_CMDTEO_YES_Val << SDHC_EISTR_EMMC_CMDTEO_Pos)
987 #define SDHC_EISTR_EMMC_CMDCRC_Pos 1
988 #define SDHC_EISTR_EMMC_CMDCRC (_U_(0x1) << SDHC_EISTR_EMMC_CMDCRC_Pos)
989 #define SDHC_EISTR_EMMC_CMDCRC_NO_Val _U_(0x0)
990 #define SDHC_EISTR_EMMC_CMDCRC_YES_Val _U_(0x1)
991 #define SDHC_EISTR_EMMC_CMDCRC_NO (SDHC_EISTR_EMMC_CMDCRC_NO_Val << SDHC_EISTR_EMMC_CMDCRC_Pos)
992 #define SDHC_EISTR_EMMC_CMDCRC_YES (SDHC_EISTR_EMMC_CMDCRC_YES_Val << SDHC_EISTR_EMMC_CMDCRC_Pos)
993 #define SDHC_EISTR_EMMC_CMDEND_Pos 2
994 #define SDHC_EISTR_EMMC_CMDEND (_U_(0x1) << SDHC_EISTR_EMMC_CMDEND_Pos)
995 #define SDHC_EISTR_EMMC_CMDEND_NO_Val _U_(0x0)
996 #define SDHC_EISTR_EMMC_CMDEND_YES_Val _U_(0x1)
997 #define SDHC_EISTR_EMMC_CMDEND_NO (SDHC_EISTR_EMMC_CMDEND_NO_Val << SDHC_EISTR_EMMC_CMDEND_Pos)
998 #define SDHC_EISTR_EMMC_CMDEND_YES (SDHC_EISTR_EMMC_CMDEND_YES_Val << SDHC_EISTR_EMMC_CMDEND_Pos)
999 #define SDHC_EISTR_EMMC_CMDIDX_Pos 3
1000 #define SDHC_EISTR_EMMC_CMDIDX (_U_(0x1) << SDHC_EISTR_EMMC_CMDIDX_Pos)
1001 #define SDHC_EISTR_EMMC_CMDIDX_NO_Val _U_(0x0)
1002 #define SDHC_EISTR_EMMC_CMDIDX_YES_Val _U_(0x1)
1003 #define SDHC_EISTR_EMMC_CMDIDX_NO (SDHC_EISTR_EMMC_CMDIDX_NO_Val << SDHC_EISTR_EMMC_CMDIDX_Pos)
1004 #define SDHC_EISTR_EMMC_CMDIDX_YES (SDHC_EISTR_EMMC_CMDIDX_YES_Val << SDHC_EISTR_EMMC_CMDIDX_Pos)
1005 #define SDHC_EISTR_EMMC_DATTEO_Pos 4
1006 #define SDHC_EISTR_EMMC_DATTEO (_U_(0x1) << SDHC_EISTR_EMMC_DATTEO_Pos)
1007 #define SDHC_EISTR_EMMC_DATTEO_NO_Val _U_(0x0)
1008 #define SDHC_EISTR_EMMC_DATTEO_YES_Val _U_(0x1)
1009 #define SDHC_EISTR_EMMC_DATTEO_NO (SDHC_EISTR_EMMC_DATTEO_NO_Val << SDHC_EISTR_EMMC_DATTEO_Pos)
1010 #define SDHC_EISTR_EMMC_DATTEO_YES (SDHC_EISTR_EMMC_DATTEO_YES_Val << SDHC_EISTR_EMMC_DATTEO_Pos)
1011 #define SDHC_EISTR_EMMC_DATCRC_Pos 5
1012 #define SDHC_EISTR_EMMC_DATCRC (_U_(0x1) << SDHC_EISTR_EMMC_DATCRC_Pos)
1013 #define SDHC_EISTR_EMMC_DATCRC_NO_Val _U_(0x0)
1014 #define SDHC_EISTR_EMMC_DATCRC_YES_Val _U_(0x1)
1015 #define SDHC_EISTR_EMMC_DATCRC_NO (SDHC_EISTR_EMMC_DATCRC_NO_Val << SDHC_EISTR_EMMC_DATCRC_Pos)
1016 #define SDHC_EISTR_EMMC_DATCRC_YES (SDHC_EISTR_EMMC_DATCRC_YES_Val << SDHC_EISTR_EMMC_DATCRC_Pos)
1017 #define SDHC_EISTR_EMMC_DATEND_Pos 6
1018 #define SDHC_EISTR_EMMC_DATEND (_U_(0x1) << SDHC_EISTR_EMMC_DATEND_Pos)
1019 #define SDHC_EISTR_EMMC_DATEND_NO_Val _U_(0x0)
1020 #define SDHC_EISTR_EMMC_DATEND_YES_Val _U_(0x1)
1021 #define SDHC_EISTR_EMMC_DATEND_NO (SDHC_EISTR_EMMC_DATEND_NO_Val << SDHC_EISTR_EMMC_DATEND_Pos)
1022 #define SDHC_EISTR_EMMC_DATEND_YES (SDHC_EISTR_EMMC_DATEND_YES_Val << SDHC_EISTR_EMMC_DATEND_Pos)
1023 #define SDHC_EISTR_EMMC_CURLIM_Pos 7
1024 #define SDHC_EISTR_EMMC_CURLIM (_U_(0x1) << SDHC_EISTR_EMMC_CURLIM_Pos)
1025 #define SDHC_EISTR_EMMC_CURLIM_NO_Val _U_(0x0)
1026 #define SDHC_EISTR_EMMC_CURLIM_YES_Val _U_(0x1)
1027 #define SDHC_EISTR_EMMC_CURLIM_NO (SDHC_EISTR_EMMC_CURLIM_NO_Val << SDHC_EISTR_EMMC_CURLIM_Pos)
1028 #define SDHC_EISTR_EMMC_CURLIM_YES (SDHC_EISTR_EMMC_CURLIM_YES_Val << SDHC_EISTR_EMMC_CURLIM_Pos)
1029 #define SDHC_EISTR_EMMC_ACMD_Pos 8
1030 #define SDHC_EISTR_EMMC_ACMD (_U_(0x1) << SDHC_EISTR_EMMC_ACMD_Pos)
1031 #define SDHC_EISTR_EMMC_ACMD_NO_Val _U_(0x0)
1032 #define SDHC_EISTR_EMMC_ACMD_YES_Val _U_(0x1)
1033 #define SDHC_EISTR_EMMC_ACMD_NO (SDHC_EISTR_EMMC_ACMD_NO_Val << SDHC_EISTR_EMMC_ACMD_Pos)
1034 #define SDHC_EISTR_EMMC_ACMD_YES (SDHC_EISTR_EMMC_ACMD_YES_Val << SDHC_EISTR_EMMC_ACMD_Pos)
1035 #define SDHC_EISTR_EMMC_ADMA_Pos 9
1036 #define SDHC_EISTR_EMMC_ADMA (_U_(0x1) << SDHC_EISTR_EMMC_ADMA_Pos)
1037 #define SDHC_EISTR_EMMC_ADMA_NO_Val _U_(0x0)
1038 #define SDHC_EISTR_EMMC_ADMA_YES_Val _U_(0x1)
1039 #define SDHC_EISTR_EMMC_ADMA_NO (SDHC_EISTR_EMMC_ADMA_NO_Val << SDHC_EISTR_EMMC_ADMA_Pos)
1040 #define SDHC_EISTR_EMMC_ADMA_YES (SDHC_EISTR_EMMC_ADMA_YES_Val << SDHC_EISTR_EMMC_ADMA_Pos)
1041 #define SDHC_EISTR_EMMC_BOOTAE_Pos 12
1042 #define SDHC_EISTR_EMMC_BOOTAE (_U_(0x1) << SDHC_EISTR_EMMC_BOOTAE_Pos)
1043 #define SDHC_EISTR_EMMC_BOOTAE_0_Val _U_(0x0)
1044 #define SDHC_EISTR_EMMC_BOOTAE_1_Val _U_(0x1)
1045 #define SDHC_EISTR_EMMC_BOOTAE_0 (SDHC_EISTR_EMMC_BOOTAE_0_Val << SDHC_EISTR_EMMC_BOOTAE_Pos)
1046 #define SDHC_EISTR_EMMC_BOOTAE_1 (SDHC_EISTR_EMMC_BOOTAE_1_Val << SDHC_EISTR_EMMC_BOOTAE_Pos)
1047 #define SDHC_EISTR_EMMC_MASK _U_(0x13FF)
1049 /* -------- SDHC_NISTER : (SDHC Offset: 0x034) (R/W 16) Normal Interrupt Status Enable -------- */
1050 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
1051 typedef union {
1052  struct {
1053  uint16_t CMDC:1;
1054  uint16_t TRFC:1;
1055  uint16_t BLKGE:1;
1056  uint16_t DMAINT:1;
1057  uint16_t BWRRDY:1;
1058  uint16_t BRDRDY:1;
1059  uint16_t CINS:1;
1060  uint16_t CREM:1;
1061  uint16_t CINT:1;
1062  uint16_t :7;
1063  } bit;
1064  struct { // EMMC mode
1065  uint16_t CMDC:1;
1066  uint16_t TRFC:1;
1067  uint16_t BLKGE:1;
1068  uint16_t DMAINT:1;
1069  uint16_t BWRRDY:1;
1070  uint16_t BRDRDY:1;
1071  uint16_t :8;
1072  uint16_t BOOTAR:1;
1073  uint16_t :1;
1074  } EMMC;
1075  uint16_t reg;
1077 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
1078 
1079 #define SDHC_NISTER_OFFSET 0x034
1080 #define SDHC_NISTER_RESETVALUE _U_(0x0000)
1082 #define SDHC_NISTER_CMDC_Pos 0
1083 #define SDHC_NISTER_CMDC (_U_(0x1) << SDHC_NISTER_CMDC_Pos)
1084 #define SDHC_NISTER_CMDC_MASKED_Val _U_(0x0)
1085 #define SDHC_NISTER_CMDC_ENABLED_Val _U_(0x1)
1086 #define SDHC_NISTER_CMDC_MASKED (SDHC_NISTER_CMDC_MASKED_Val << SDHC_NISTER_CMDC_Pos)
1087 #define SDHC_NISTER_CMDC_ENABLED (SDHC_NISTER_CMDC_ENABLED_Val << SDHC_NISTER_CMDC_Pos)
1088 #define SDHC_NISTER_TRFC_Pos 1
1089 #define SDHC_NISTER_TRFC (_U_(0x1) << SDHC_NISTER_TRFC_Pos)
1090 #define SDHC_NISTER_TRFC_MASKED_Val _U_(0x0)
1091 #define SDHC_NISTER_TRFC_ENABLED_Val _U_(0x1)
1092 #define SDHC_NISTER_TRFC_MASKED (SDHC_NISTER_TRFC_MASKED_Val << SDHC_NISTER_TRFC_Pos)
1093 #define SDHC_NISTER_TRFC_ENABLED (SDHC_NISTER_TRFC_ENABLED_Val << SDHC_NISTER_TRFC_Pos)
1094 #define SDHC_NISTER_BLKGE_Pos 2
1095 #define SDHC_NISTER_BLKGE (_U_(0x1) << SDHC_NISTER_BLKGE_Pos)
1096 #define SDHC_NISTER_BLKGE_MASKED_Val _U_(0x0)
1097 #define SDHC_NISTER_BLKGE_ENABLED_Val _U_(0x1)
1098 #define SDHC_NISTER_BLKGE_MASKED (SDHC_NISTER_BLKGE_MASKED_Val << SDHC_NISTER_BLKGE_Pos)
1099 #define SDHC_NISTER_BLKGE_ENABLED (SDHC_NISTER_BLKGE_ENABLED_Val << SDHC_NISTER_BLKGE_Pos)
1100 #define SDHC_NISTER_DMAINT_Pos 3
1101 #define SDHC_NISTER_DMAINT (_U_(0x1) << SDHC_NISTER_DMAINT_Pos)
1102 #define SDHC_NISTER_DMAINT_MASKED_Val _U_(0x0)
1103 #define SDHC_NISTER_DMAINT_ENABLED_Val _U_(0x1)
1104 #define SDHC_NISTER_DMAINT_MASKED (SDHC_NISTER_DMAINT_MASKED_Val << SDHC_NISTER_DMAINT_Pos)
1105 #define SDHC_NISTER_DMAINT_ENABLED (SDHC_NISTER_DMAINT_ENABLED_Val << SDHC_NISTER_DMAINT_Pos)
1106 #define SDHC_NISTER_BWRRDY_Pos 4
1107 #define SDHC_NISTER_BWRRDY (_U_(0x1) << SDHC_NISTER_BWRRDY_Pos)
1108 #define SDHC_NISTER_BWRRDY_MASKED_Val _U_(0x0)
1109 #define SDHC_NISTER_BWRRDY_ENABLED_Val _U_(0x1)
1110 #define SDHC_NISTER_BWRRDY_MASKED (SDHC_NISTER_BWRRDY_MASKED_Val << SDHC_NISTER_BWRRDY_Pos)
1111 #define SDHC_NISTER_BWRRDY_ENABLED (SDHC_NISTER_BWRRDY_ENABLED_Val << SDHC_NISTER_BWRRDY_Pos)
1112 #define SDHC_NISTER_BRDRDY_Pos 5
1113 #define SDHC_NISTER_BRDRDY (_U_(0x1) << SDHC_NISTER_BRDRDY_Pos)
1114 #define SDHC_NISTER_BRDRDY_MASKED_Val _U_(0x0)
1115 #define SDHC_NISTER_BRDRDY_ENABLED_Val _U_(0x1)
1116 #define SDHC_NISTER_BRDRDY_MASKED (SDHC_NISTER_BRDRDY_MASKED_Val << SDHC_NISTER_BRDRDY_Pos)
1117 #define SDHC_NISTER_BRDRDY_ENABLED (SDHC_NISTER_BRDRDY_ENABLED_Val << SDHC_NISTER_BRDRDY_Pos)
1118 #define SDHC_NISTER_CINS_Pos 6
1119 #define SDHC_NISTER_CINS (_U_(0x1) << SDHC_NISTER_CINS_Pos)
1120 #define SDHC_NISTER_CINS_MASKED_Val _U_(0x0)
1121 #define SDHC_NISTER_CINS_ENABLED_Val _U_(0x1)
1122 #define SDHC_NISTER_CINS_MASKED (SDHC_NISTER_CINS_MASKED_Val << SDHC_NISTER_CINS_Pos)
1123 #define SDHC_NISTER_CINS_ENABLED (SDHC_NISTER_CINS_ENABLED_Val << SDHC_NISTER_CINS_Pos)
1124 #define SDHC_NISTER_CREM_Pos 7
1125 #define SDHC_NISTER_CREM (_U_(0x1) << SDHC_NISTER_CREM_Pos)
1126 #define SDHC_NISTER_CREM_MASKED_Val _U_(0x0)
1127 #define SDHC_NISTER_CREM_ENABLED_Val _U_(0x1)
1128 #define SDHC_NISTER_CREM_MASKED (SDHC_NISTER_CREM_MASKED_Val << SDHC_NISTER_CREM_Pos)
1129 #define SDHC_NISTER_CREM_ENABLED (SDHC_NISTER_CREM_ENABLED_Val << SDHC_NISTER_CREM_Pos)
1130 #define SDHC_NISTER_CINT_Pos 8
1131 #define SDHC_NISTER_CINT (_U_(0x1) << SDHC_NISTER_CINT_Pos)
1132 #define SDHC_NISTER_CINT_MASKED_Val _U_(0x0)
1133 #define SDHC_NISTER_CINT_ENABLED_Val _U_(0x1)
1134 #define SDHC_NISTER_CINT_MASKED (SDHC_NISTER_CINT_MASKED_Val << SDHC_NISTER_CINT_Pos)
1135 #define SDHC_NISTER_CINT_ENABLED (SDHC_NISTER_CINT_ENABLED_Val << SDHC_NISTER_CINT_Pos)
1136 #define SDHC_NISTER_MASK _U_(0x01FF)
1138 // EMMC mode
1139 #define SDHC_NISTER_EMMC_CMDC_Pos 0
1140 #define SDHC_NISTER_EMMC_CMDC (_U_(0x1) << SDHC_NISTER_EMMC_CMDC_Pos)
1141 #define SDHC_NISTER_EMMC_CMDC_MASKED_Val _U_(0x0)
1142 #define SDHC_NISTER_EMMC_CMDC_ENABLED_Val _U_(0x1)
1143 #define SDHC_NISTER_EMMC_CMDC_MASKED (SDHC_NISTER_EMMC_CMDC_MASKED_Val << SDHC_NISTER_EMMC_CMDC_Pos)
1144 #define SDHC_NISTER_EMMC_CMDC_ENABLED (SDHC_NISTER_EMMC_CMDC_ENABLED_Val << SDHC_NISTER_EMMC_CMDC_Pos)
1145 #define SDHC_NISTER_EMMC_TRFC_Pos 1
1146 #define SDHC_NISTER_EMMC_TRFC (_U_(0x1) << SDHC_NISTER_EMMC_TRFC_Pos)
1147 #define SDHC_NISTER_EMMC_TRFC_MASKED_Val _U_(0x0)
1148 #define SDHC_NISTER_EMMC_TRFC_ENABLED_Val _U_(0x1)
1149 #define SDHC_NISTER_EMMC_TRFC_MASKED (SDHC_NISTER_EMMC_TRFC_MASKED_Val << SDHC_NISTER_EMMC_TRFC_Pos)
1150 #define SDHC_NISTER_EMMC_TRFC_ENABLED (SDHC_NISTER_EMMC_TRFC_ENABLED_Val << SDHC_NISTER_EMMC_TRFC_Pos)
1151 #define SDHC_NISTER_EMMC_BLKGE_Pos 2
1152 #define SDHC_NISTER_EMMC_BLKGE (_U_(0x1) << SDHC_NISTER_EMMC_BLKGE_Pos)
1153 #define SDHC_NISTER_EMMC_BLKGE_MASKED_Val _U_(0x0)
1154 #define SDHC_NISTER_EMMC_BLKGE_ENABLED_Val _U_(0x1)
1155 #define SDHC_NISTER_EMMC_BLKGE_MASKED (SDHC_NISTER_EMMC_BLKGE_MASKED_Val << SDHC_NISTER_EMMC_BLKGE_Pos)
1156 #define SDHC_NISTER_EMMC_BLKGE_ENABLED (SDHC_NISTER_EMMC_BLKGE_ENABLED_Val << SDHC_NISTER_EMMC_BLKGE_Pos)
1157 #define SDHC_NISTER_EMMC_DMAINT_Pos 3
1158 #define SDHC_NISTER_EMMC_DMAINT (_U_(0x1) << SDHC_NISTER_EMMC_DMAINT_Pos)
1159 #define SDHC_NISTER_EMMC_DMAINT_MASKED_Val _U_(0x0)
1160 #define SDHC_NISTER_EMMC_DMAINT_ENABLED_Val _U_(0x1)
1161 #define SDHC_NISTER_EMMC_DMAINT_MASKED (SDHC_NISTER_EMMC_DMAINT_MASKED_Val << SDHC_NISTER_EMMC_DMAINT_Pos)
1162 #define SDHC_NISTER_EMMC_DMAINT_ENABLED (SDHC_NISTER_EMMC_DMAINT_ENABLED_Val << SDHC_NISTER_EMMC_DMAINT_Pos)
1163 #define SDHC_NISTER_EMMC_BWRRDY_Pos 4
1164 #define SDHC_NISTER_EMMC_BWRRDY (_U_(0x1) << SDHC_NISTER_EMMC_BWRRDY_Pos)
1165 #define SDHC_NISTER_EMMC_BWRRDY_MASKED_Val _U_(0x0)
1166 #define SDHC_NISTER_EMMC_BWRRDY_ENABLED_Val _U_(0x1)
1167 #define SDHC_NISTER_EMMC_BWRRDY_MASKED (SDHC_NISTER_EMMC_BWRRDY_MASKED_Val << SDHC_NISTER_EMMC_BWRRDY_Pos)
1168 #define SDHC_NISTER_EMMC_BWRRDY_ENABLED (SDHC_NISTER_EMMC_BWRRDY_ENABLED_Val << SDHC_NISTER_EMMC_BWRRDY_Pos)
1169 #define SDHC_NISTER_EMMC_BRDRDY_Pos 5
1170 #define SDHC_NISTER_EMMC_BRDRDY (_U_(0x1) << SDHC_NISTER_EMMC_BRDRDY_Pos)
1171 #define SDHC_NISTER_EMMC_BRDRDY_MASKED_Val _U_(0x0)
1172 #define SDHC_NISTER_EMMC_BRDRDY_ENABLED_Val _U_(0x1)
1173 #define SDHC_NISTER_EMMC_BRDRDY_MASKED (SDHC_NISTER_EMMC_BRDRDY_MASKED_Val << SDHC_NISTER_EMMC_BRDRDY_Pos)
1174 #define SDHC_NISTER_EMMC_BRDRDY_ENABLED (SDHC_NISTER_EMMC_BRDRDY_ENABLED_Val << SDHC_NISTER_EMMC_BRDRDY_Pos)
1175 #define SDHC_NISTER_EMMC_BOOTAR_Pos 14
1176 #define SDHC_NISTER_EMMC_BOOTAR (_U_(0x1) << SDHC_NISTER_EMMC_BOOTAR_Pos)
1177 #define SDHC_NISTER_EMMC_MASK _U_(0x403F)
1179 /* -------- SDHC_EISTER : (SDHC Offset: 0x036) (R/W 16) Error Interrupt Status Enable -------- */
1180 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
1181 typedef union {
1182  struct {
1183  uint16_t CMDTEO:1;
1184  uint16_t CMDCRC:1;
1185  uint16_t CMDEND:1;
1186  uint16_t CMDIDX:1;
1187  uint16_t DATTEO:1;
1188  uint16_t DATCRC:1;
1189  uint16_t DATEND:1;
1190  uint16_t CURLIM:1;
1191  uint16_t ACMD:1;
1192  uint16_t ADMA:1;
1193  uint16_t :6;
1194  } bit;
1195  struct { // EMMC mode
1196  uint16_t CMDTEO:1;
1197  uint16_t CMDCRC:1;
1198  uint16_t CMDEND:1;
1199  uint16_t CMDIDX:1;
1200  uint16_t DATTEO:1;
1201  uint16_t DATCRC:1;
1202  uint16_t DATEND:1;
1203  uint16_t CURLIM:1;
1204  uint16_t ACMD:1;
1205  uint16_t ADMA:1;
1206  uint16_t :2;
1207  uint16_t BOOTAE:1;
1208  uint16_t :3;
1209  } EMMC;
1210  uint16_t reg;
1212 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
1213 
1214 #define SDHC_EISTER_OFFSET 0x036
1215 #define SDHC_EISTER_RESETVALUE _U_(0x0000)
1217 #define SDHC_EISTER_CMDTEO_Pos 0
1218 #define SDHC_EISTER_CMDTEO (_U_(0x1) << SDHC_EISTER_CMDTEO_Pos)
1219 #define SDHC_EISTER_CMDTEO_MASKED_Val _U_(0x0)
1220 #define SDHC_EISTER_CMDTEO_ENABLED_Val _U_(0x1)
1221 #define SDHC_EISTER_CMDTEO_MASKED (SDHC_EISTER_CMDTEO_MASKED_Val << SDHC_EISTER_CMDTEO_Pos)
1222 #define SDHC_EISTER_CMDTEO_ENABLED (SDHC_EISTER_CMDTEO_ENABLED_Val << SDHC_EISTER_CMDTEO_Pos)
1223 #define SDHC_EISTER_CMDCRC_Pos 1
1224 #define SDHC_EISTER_CMDCRC (_U_(0x1) << SDHC_EISTER_CMDCRC_Pos)
1225 #define SDHC_EISTER_CMDCRC_MASKED_Val _U_(0x0)
1226 #define SDHC_EISTER_CMDCRC_ENABLED_Val _U_(0x1)
1227 #define SDHC_EISTER_CMDCRC_MASKED (SDHC_EISTER_CMDCRC_MASKED_Val << SDHC_EISTER_CMDCRC_Pos)
1228 #define SDHC_EISTER_CMDCRC_ENABLED (SDHC_EISTER_CMDCRC_ENABLED_Val << SDHC_EISTER_CMDCRC_Pos)
1229 #define SDHC_EISTER_CMDEND_Pos 2
1230 #define SDHC_EISTER_CMDEND (_U_(0x1) << SDHC_EISTER_CMDEND_Pos)
1231 #define SDHC_EISTER_CMDEND_MASKED_Val _U_(0x0)
1232 #define SDHC_EISTER_CMDEND_ENABLED_Val _U_(0x1)
1233 #define SDHC_EISTER_CMDEND_MASKED (SDHC_EISTER_CMDEND_MASKED_Val << SDHC_EISTER_CMDEND_Pos)
1234 #define SDHC_EISTER_CMDEND_ENABLED (SDHC_EISTER_CMDEND_ENABLED_Val << SDHC_EISTER_CMDEND_Pos)
1235 #define SDHC_EISTER_CMDIDX_Pos 3
1236 #define SDHC_EISTER_CMDIDX (_U_(0x1) << SDHC_EISTER_CMDIDX_Pos)
1237 #define SDHC_EISTER_CMDIDX_MASKED_Val _U_(0x0)
1238 #define SDHC_EISTER_CMDIDX_ENABLED_Val _U_(0x1)
1239 #define SDHC_EISTER_CMDIDX_MASKED (SDHC_EISTER_CMDIDX_MASKED_Val << SDHC_EISTER_CMDIDX_Pos)
1240 #define SDHC_EISTER_CMDIDX_ENABLED (SDHC_EISTER_CMDIDX_ENABLED_Val << SDHC_EISTER_CMDIDX_Pos)
1241 #define SDHC_EISTER_DATTEO_Pos 4
1242 #define SDHC_EISTER_DATTEO (_U_(0x1) << SDHC_EISTER_DATTEO_Pos)
1243 #define SDHC_EISTER_DATTEO_MASKED_Val _U_(0x0)
1244 #define SDHC_EISTER_DATTEO_ENABLED_Val _U_(0x1)
1245 #define SDHC_EISTER_DATTEO_MASKED (SDHC_EISTER_DATTEO_MASKED_Val << SDHC_EISTER_DATTEO_Pos)
1246 #define SDHC_EISTER_DATTEO_ENABLED (SDHC_EISTER_DATTEO_ENABLED_Val << SDHC_EISTER_DATTEO_Pos)
1247 #define SDHC_EISTER_DATCRC_Pos 5
1248 #define SDHC_EISTER_DATCRC (_U_(0x1) << SDHC_EISTER_DATCRC_Pos)
1249 #define SDHC_EISTER_DATCRC_MASKED_Val _U_(0x0)
1250 #define SDHC_EISTER_DATCRC_ENABLED_Val _U_(0x1)
1251 #define SDHC_EISTER_DATCRC_MASKED (SDHC_EISTER_DATCRC_MASKED_Val << SDHC_EISTER_DATCRC_Pos)
1252 #define SDHC_EISTER_DATCRC_ENABLED (SDHC_EISTER_DATCRC_ENABLED_Val << SDHC_EISTER_DATCRC_Pos)
1253 #define SDHC_EISTER_DATEND_Pos 6
1254 #define SDHC_EISTER_DATEND (_U_(0x1) << SDHC_EISTER_DATEND_Pos)
1255 #define SDHC_EISTER_DATEND_MASKED_Val _U_(0x0)
1256 #define SDHC_EISTER_DATEND_ENABLED_Val _U_(0x1)
1257 #define SDHC_EISTER_DATEND_MASKED (SDHC_EISTER_DATEND_MASKED_Val << SDHC_EISTER_DATEND_Pos)
1258 #define SDHC_EISTER_DATEND_ENABLED (SDHC_EISTER_DATEND_ENABLED_Val << SDHC_EISTER_DATEND_Pos)
1259 #define SDHC_EISTER_CURLIM_Pos 7
1260 #define SDHC_EISTER_CURLIM (_U_(0x1) << SDHC_EISTER_CURLIM_Pos)
1261 #define SDHC_EISTER_CURLIM_MASKED_Val _U_(0x0)
1262 #define SDHC_EISTER_CURLIM_ENABLED_Val _U_(0x1)
1263 #define SDHC_EISTER_CURLIM_MASKED (SDHC_EISTER_CURLIM_MASKED_Val << SDHC_EISTER_CURLIM_Pos)
1264 #define SDHC_EISTER_CURLIM_ENABLED (SDHC_EISTER_CURLIM_ENABLED_Val << SDHC_EISTER_CURLIM_Pos)
1265 #define SDHC_EISTER_ACMD_Pos 8
1266 #define SDHC_EISTER_ACMD (_U_(0x1) << SDHC_EISTER_ACMD_Pos)
1267 #define SDHC_EISTER_ACMD_MASKED_Val _U_(0x0)
1268 #define SDHC_EISTER_ACMD_ENABLED_Val _U_(0x1)
1269 #define SDHC_EISTER_ACMD_MASKED (SDHC_EISTER_ACMD_MASKED_Val << SDHC_EISTER_ACMD_Pos)
1270 #define SDHC_EISTER_ACMD_ENABLED (SDHC_EISTER_ACMD_ENABLED_Val << SDHC_EISTER_ACMD_Pos)
1271 #define SDHC_EISTER_ADMA_Pos 9
1272 #define SDHC_EISTER_ADMA (_U_(0x1) << SDHC_EISTER_ADMA_Pos)
1273 #define SDHC_EISTER_ADMA_MASKED_Val _U_(0x0)
1274 #define SDHC_EISTER_ADMA_ENABLED_Val _U_(0x1)
1275 #define SDHC_EISTER_ADMA_MASKED (SDHC_EISTER_ADMA_MASKED_Val << SDHC_EISTER_ADMA_Pos)
1276 #define SDHC_EISTER_ADMA_ENABLED (SDHC_EISTER_ADMA_ENABLED_Val << SDHC_EISTER_ADMA_Pos)
1277 #define SDHC_EISTER_MASK _U_(0x03FF)
1279 // EMMC mode
1280 #define SDHC_EISTER_EMMC_CMDTEO_Pos 0
1281 #define SDHC_EISTER_EMMC_CMDTEO (_U_(0x1) << SDHC_EISTER_EMMC_CMDTEO_Pos)
1282 #define SDHC_EISTER_EMMC_CMDTEO_MASKED_Val _U_(0x0)
1283 #define SDHC_EISTER_EMMC_CMDTEO_ENABLED_Val _U_(0x1)
1284 #define SDHC_EISTER_EMMC_CMDTEO_MASKED (SDHC_EISTER_EMMC_CMDTEO_MASKED_Val << SDHC_EISTER_EMMC_CMDTEO_Pos)
1285 #define SDHC_EISTER_EMMC_CMDTEO_ENABLED (SDHC_EISTER_EMMC_CMDTEO_ENABLED_Val << SDHC_EISTER_EMMC_CMDTEO_Pos)
1286 #define SDHC_EISTER_EMMC_CMDCRC_Pos 1
1287 #define SDHC_EISTER_EMMC_CMDCRC (_U_(0x1) << SDHC_EISTER_EMMC_CMDCRC_Pos)
1288 #define SDHC_EISTER_EMMC_CMDCRC_MASKED_Val _U_(0x0)
1289 #define SDHC_EISTER_EMMC_CMDCRC_ENABLED_Val _U_(0x1)
1290 #define SDHC_EISTER_EMMC_CMDCRC_MASKED (SDHC_EISTER_EMMC_CMDCRC_MASKED_Val << SDHC_EISTER_EMMC_CMDCRC_Pos)
1291 #define SDHC_EISTER_EMMC_CMDCRC_ENABLED (SDHC_EISTER_EMMC_CMDCRC_ENABLED_Val << SDHC_EISTER_EMMC_CMDCRC_Pos)
1292 #define SDHC_EISTER_EMMC_CMDEND_Pos 2
1293 #define SDHC_EISTER_EMMC_CMDEND (_U_(0x1) << SDHC_EISTER_EMMC_CMDEND_Pos)
1294 #define SDHC_EISTER_EMMC_CMDEND_MASKED_Val _U_(0x0)
1295 #define SDHC_EISTER_EMMC_CMDEND_ENABLED_Val _U_(0x1)
1296 #define SDHC_EISTER_EMMC_CMDEND_MASKED (SDHC_EISTER_EMMC_CMDEND_MASKED_Val << SDHC_EISTER_EMMC_CMDEND_Pos)
1297 #define SDHC_EISTER_EMMC_CMDEND_ENABLED (SDHC_EISTER_EMMC_CMDEND_ENABLED_Val << SDHC_EISTER_EMMC_CMDEND_Pos)
1298 #define SDHC_EISTER_EMMC_CMDIDX_Pos 3
1299 #define SDHC_EISTER_EMMC_CMDIDX (_U_(0x1) << SDHC_EISTER_EMMC_CMDIDX_Pos)
1300 #define SDHC_EISTER_EMMC_CMDIDX_MASKED_Val _U_(0x0)
1301 #define SDHC_EISTER_EMMC_CMDIDX_ENABLED_Val _U_(0x1)
1302 #define SDHC_EISTER_EMMC_CMDIDX_MASKED (SDHC_EISTER_EMMC_CMDIDX_MASKED_Val << SDHC_EISTER_EMMC_CMDIDX_Pos)
1303 #define SDHC_EISTER_EMMC_CMDIDX_ENABLED (SDHC_EISTER_EMMC_CMDIDX_ENABLED_Val << SDHC_EISTER_EMMC_CMDIDX_Pos)
1304 #define SDHC_EISTER_EMMC_DATTEO_Pos 4
1305 #define SDHC_EISTER_EMMC_DATTEO (_U_(0x1) << SDHC_EISTER_EMMC_DATTEO_Pos)
1306 #define SDHC_EISTER_EMMC_DATTEO_MASKED_Val _U_(0x0)
1307 #define SDHC_EISTER_EMMC_DATTEO_ENABLED_Val _U_(0x1)
1308 #define SDHC_EISTER_EMMC_DATTEO_MASKED (SDHC_EISTER_EMMC_DATTEO_MASKED_Val << SDHC_EISTER_EMMC_DATTEO_Pos)
1309 #define SDHC_EISTER_EMMC_DATTEO_ENABLED (SDHC_EISTER_EMMC_DATTEO_ENABLED_Val << SDHC_EISTER_EMMC_DATTEO_Pos)
1310 #define SDHC_EISTER_EMMC_DATCRC_Pos 5
1311 #define SDHC_EISTER_EMMC_DATCRC (_U_(0x1) << SDHC_EISTER_EMMC_DATCRC_Pos)
1312 #define SDHC_EISTER_EMMC_DATCRC_MASKED_Val _U_(0x0)
1313 #define SDHC_EISTER_EMMC_DATCRC_ENABLED_Val _U_(0x1)
1314 #define SDHC_EISTER_EMMC_DATCRC_MASKED (SDHC_EISTER_EMMC_DATCRC_MASKED_Val << SDHC_EISTER_EMMC_DATCRC_Pos)
1315 #define SDHC_EISTER_EMMC_DATCRC_ENABLED (SDHC_EISTER_EMMC_DATCRC_ENABLED_Val << SDHC_EISTER_EMMC_DATCRC_Pos)
1316 #define SDHC_EISTER_EMMC_DATEND_Pos 6
1317 #define SDHC_EISTER_EMMC_DATEND (_U_(0x1) << SDHC_EISTER_EMMC_DATEND_Pos)
1318 #define SDHC_EISTER_EMMC_DATEND_MASKED_Val _U_(0x0)
1319 #define SDHC_EISTER_EMMC_DATEND_ENABLED_Val _U_(0x1)
1320 #define SDHC_EISTER_EMMC_DATEND_MASKED (SDHC_EISTER_EMMC_DATEND_MASKED_Val << SDHC_EISTER_EMMC_DATEND_Pos)
1321 #define SDHC_EISTER_EMMC_DATEND_ENABLED (SDHC_EISTER_EMMC_DATEND_ENABLED_Val << SDHC_EISTER_EMMC_DATEND_Pos)
1322 #define SDHC_EISTER_EMMC_CURLIM_Pos 7
1323 #define SDHC_EISTER_EMMC_CURLIM (_U_(0x1) << SDHC_EISTER_EMMC_CURLIM_Pos)
1324 #define SDHC_EISTER_EMMC_CURLIM_MASKED_Val _U_(0x0)
1325 #define SDHC_EISTER_EMMC_CURLIM_ENABLED_Val _U_(0x1)
1326 #define SDHC_EISTER_EMMC_CURLIM_MASKED (SDHC_EISTER_EMMC_CURLIM_MASKED_Val << SDHC_EISTER_EMMC_CURLIM_Pos)
1327 #define SDHC_EISTER_EMMC_CURLIM_ENABLED (SDHC_EISTER_EMMC_CURLIM_ENABLED_Val << SDHC_EISTER_EMMC_CURLIM_Pos)
1328 #define SDHC_EISTER_EMMC_ACMD_Pos 8
1329 #define SDHC_EISTER_EMMC_ACMD (_U_(0x1) << SDHC_EISTER_EMMC_ACMD_Pos)
1330 #define SDHC_EISTER_EMMC_ACMD_MASKED_Val _U_(0x0)
1331 #define SDHC_EISTER_EMMC_ACMD_ENABLED_Val _U_(0x1)
1332 #define SDHC_EISTER_EMMC_ACMD_MASKED (SDHC_EISTER_EMMC_ACMD_MASKED_Val << SDHC_EISTER_EMMC_ACMD_Pos)
1333 #define SDHC_EISTER_EMMC_ACMD_ENABLED (SDHC_EISTER_EMMC_ACMD_ENABLED_Val << SDHC_EISTER_EMMC_ACMD_Pos)
1334 #define SDHC_EISTER_EMMC_ADMA_Pos 9
1335 #define SDHC_EISTER_EMMC_ADMA (_U_(0x1) << SDHC_EISTER_EMMC_ADMA_Pos)
1336 #define SDHC_EISTER_EMMC_ADMA_MASKED_Val _U_(0x0)
1337 #define SDHC_EISTER_EMMC_ADMA_ENABLED_Val _U_(0x1)
1338 #define SDHC_EISTER_EMMC_ADMA_MASKED (SDHC_EISTER_EMMC_ADMA_MASKED_Val << SDHC_EISTER_EMMC_ADMA_Pos)
1339 #define SDHC_EISTER_EMMC_ADMA_ENABLED (SDHC_EISTER_EMMC_ADMA_ENABLED_Val << SDHC_EISTER_EMMC_ADMA_Pos)
1340 #define SDHC_EISTER_EMMC_BOOTAE_Pos 12
1341 #define SDHC_EISTER_EMMC_BOOTAE (_U_(0x1) << SDHC_EISTER_EMMC_BOOTAE_Pos)
1342 #define SDHC_EISTER_EMMC_MASK _U_(0x13FF)
1344 /* -------- SDHC_NISIER : (SDHC Offset: 0x038) (R/W 16) Normal Interrupt Signal Enable -------- */
1345 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
1346 typedef union {
1347  struct {
1348  uint16_t CMDC:1;
1349  uint16_t TRFC:1;
1350  uint16_t BLKGE:1;
1351  uint16_t DMAINT:1;
1352  uint16_t BWRRDY:1;
1353  uint16_t BRDRDY:1;
1354  uint16_t CINS:1;
1355  uint16_t CREM:1;
1356  uint16_t CINT:1;
1357  uint16_t :7;
1358  } bit;
1359  struct { // EMMC mode
1360  uint16_t CMDC:1;
1361  uint16_t TRFC:1;
1362  uint16_t BLKGE:1;
1363  uint16_t DMAINT:1;
1364  uint16_t BWRRDY:1;
1365  uint16_t BRDRDY:1;
1366  uint16_t :8;
1367  uint16_t BOOTAR:1;
1368  uint16_t :1;
1369  } EMMC;
1370  uint16_t reg;
1372 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
1373 
1374 #define SDHC_NISIER_OFFSET 0x038
1375 #define SDHC_NISIER_RESETVALUE _U_(0x0000)
1377 #define SDHC_NISIER_CMDC_Pos 0
1378 #define SDHC_NISIER_CMDC (_U_(0x1) << SDHC_NISIER_CMDC_Pos)
1379 #define SDHC_NISIER_CMDC_MASKED_Val _U_(0x0)
1380 #define SDHC_NISIER_CMDC_ENABLED_Val _U_(0x1)
1381 #define SDHC_NISIER_CMDC_MASKED (SDHC_NISIER_CMDC_MASKED_Val << SDHC_NISIER_CMDC_Pos)
1382 #define SDHC_NISIER_CMDC_ENABLED (SDHC_NISIER_CMDC_ENABLED_Val << SDHC_NISIER_CMDC_Pos)
1383 #define SDHC_NISIER_TRFC_Pos 1
1384 #define SDHC_NISIER_TRFC (_U_(0x1) << SDHC_NISIER_TRFC_Pos)
1385 #define SDHC_NISIER_TRFC_MASKED_Val _U_(0x0)
1386 #define SDHC_NISIER_TRFC_ENABLED_Val _U_(0x1)
1387 #define SDHC_NISIER_TRFC_MASKED (SDHC_NISIER_TRFC_MASKED_Val << SDHC_NISIER_TRFC_Pos)
1388 #define SDHC_NISIER_TRFC_ENABLED (SDHC_NISIER_TRFC_ENABLED_Val << SDHC_NISIER_TRFC_Pos)
1389 #define SDHC_NISIER_BLKGE_Pos 2
1390 #define SDHC_NISIER_BLKGE (_U_(0x1) << SDHC_NISIER_BLKGE_Pos)
1391 #define SDHC_NISIER_BLKGE_MASKED_Val _U_(0x0)
1392 #define SDHC_NISIER_BLKGE_ENABLED_Val _U_(0x1)
1393 #define SDHC_NISIER_BLKGE_MASKED (SDHC_NISIER_BLKGE_MASKED_Val << SDHC_NISIER_BLKGE_Pos)
1394 #define SDHC_NISIER_BLKGE_ENABLED (SDHC_NISIER_BLKGE_ENABLED_Val << SDHC_NISIER_BLKGE_Pos)
1395 #define SDHC_NISIER_DMAINT_Pos 3
1396 #define SDHC_NISIER_DMAINT (_U_(0x1) << SDHC_NISIER_DMAINT_Pos)
1397 #define SDHC_NISIER_DMAINT_MASKED_Val _U_(0x0)
1398 #define SDHC_NISIER_DMAINT_ENABLED_Val _U_(0x1)
1399 #define SDHC_NISIER_DMAINT_MASKED (SDHC_NISIER_DMAINT_MASKED_Val << SDHC_NISIER_DMAINT_Pos)
1400 #define SDHC_NISIER_DMAINT_ENABLED (SDHC_NISIER_DMAINT_ENABLED_Val << SDHC_NISIER_DMAINT_Pos)
1401 #define SDHC_NISIER_BWRRDY_Pos 4
1402 #define SDHC_NISIER_BWRRDY (_U_(0x1) << SDHC_NISIER_BWRRDY_Pos)
1403 #define SDHC_NISIER_BWRRDY_MASKED_Val _U_(0x0)
1404 #define SDHC_NISIER_BWRRDY_ENABLED_Val _U_(0x1)
1405 #define SDHC_NISIER_BWRRDY_MASKED (SDHC_NISIER_BWRRDY_MASKED_Val << SDHC_NISIER_BWRRDY_Pos)
1406 #define SDHC_NISIER_BWRRDY_ENABLED (SDHC_NISIER_BWRRDY_ENABLED_Val << SDHC_NISIER_BWRRDY_Pos)
1407 #define SDHC_NISIER_BRDRDY_Pos 5
1408 #define SDHC_NISIER_BRDRDY (_U_(0x1) << SDHC_NISIER_BRDRDY_Pos)
1409 #define SDHC_NISIER_BRDRDY_MASKED_Val _U_(0x0)
1410 #define SDHC_NISIER_BRDRDY_ENABLED_Val _U_(0x1)
1411 #define SDHC_NISIER_BRDRDY_MASKED (SDHC_NISIER_BRDRDY_MASKED_Val << SDHC_NISIER_BRDRDY_Pos)
1412 #define SDHC_NISIER_BRDRDY_ENABLED (SDHC_NISIER_BRDRDY_ENABLED_Val << SDHC_NISIER_BRDRDY_Pos)
1413 #define SDHC_NISIER_CINS_Pos 6
1414 #define SDHC_NISIER_CINS (_U_(0x1) << SDHC_NISIER_CINS_Pos)
1415 #define SDHC_NISIER_CINS_MASKED_Val _U_(0x0)
1416 #define SDHC_NISIER_CINS_ENABLED_Val _U_(0x1)
1417 #define SDHC_NISIER_CINS_MASKED (SDHC_NISIER_CINS_MASKED_Val << SDHC_NISIER_CINS_Pos)
1418 #define SDHC_NISIER_CINS_ENABLED (SDHC_NISIER_CINS_ENABLED_Val << SDHC_NISIER_CINS_Pos)
1419 #define SDHC_NISIER_CREM_Pos 7
1420 #define SDHC_NISIER_CREM (_U_(0x1) << SDHC_NISIER_CREM_Pos)
1421 #define SDHC_NISIER_CREM_MASKED_Val _U_(0x0)
1422 #define SDHC_NISIER_CREM_ENABLED_Val _U_(0x1)
1423 #define SDHC_NISIER_CREM_MASKED (SDHC_NISIER_CREM_MASKED_Val << SDHC_NISIER_CREM_Pos)
1424 #define SDHC_NISIER_CREM_ENABLED (SDHC_NISIER_CREM_ENABLED_Val << SDHC_NISIER_CREM_Pos)
1425 #define SDHC_NISIER_CINT_Pos 8
1426 #define SDHC_NISIER_CINT (_U_(0x1) << SDHC_NISIER_CINT_Pos)
1427 #define SDHC_NISIER_CINT_MASKED_Val _U_(0x0)
1428 #define SDHC_NISIER_CINT_ENABLED_Val _U_(0x1)
1429 #define SDHC_NISIER_CINT_MASKED (SDHC_NISIER_CINT_MASKED_Val << SDHC_NISIER_CINT_Pos)
1430 #define SDHC_NISIER_CINT_ENABLED (SDHC_NISIER_CINT_ENABLED_Val << SDHC_NISIER_CINT_Pos)
1431 #define SDHC_NISIER_MASK _U_(0x01FF)
1433 // EMMC mode
1434 #define SDHC_NISIER_EMMC_CMDC_Pos 0
1435 #define SDHC_NISIER_EMMC_CMDC (_U_(0x1) << SDHC_NISIER_EMMC_CMDC_Pos)
1436 #define SDHC_NISIER_EMMC_CMDC_MASKED_Val _U_(0x0)
1437 #define SDHC_NISIER_EMMC_CMDC_ENABLED_Val _U_(0x1)
1438 #define SDHC_NISIER_EMMC_CMDC_MASKED (SDHC_NISIER_EMMC_CMDC_MASKED_Val << SDHC_NISIER_EMMC_CMDC_Pos)
1439 #define SDHC_NISIER_EMMC_CMDC_ENABLED (SDHC_NISIER_EMMC_CMDC_ENABLED_Val << SDHC_NISIER_EMMC_CMDC_Pos)
1440 #define SDHC_NISIER_EMMC_TRFC_Pos 1
1441 #define SDHC_NISIER_EMMC_TRFC (_U_(0x1) << SDHC_NISIER_EMMC_TRFC_Pos)
1442 #define SDHC_NISIER_EMMC_TRFC_MASKED_Val _U_(0x0)
1443 #define SDHC_NISIER_EMMC_TRFC_ENABLED_Val _U_(0x1)
1444 #define SDHC_NISIER_EMMC_TRFC_MASKED (SDHC_NISIER_EMMC_TRFC_MASKED_Val << SDHC_NISIER_EMMC_TRFC_Pos)
1445 #define SDHC_NISIER_EMMC_TRFC_ENABLED (SDHC_NISIER_EMMC_TRFC_ENABLED_Val << SDHC_NISIER_EMMC_TRFC_Pos)
1446 #define SDHC_NISIER_EMMC_BLKGE_Pos 2
1447 #define SDHC_NISIER_EMMC_BLKGE (_U_(0x1) << SDHC_NISIER_EMMC_BLKGE_Pos)
1448 #define SDHC_NISIER_EMMC_BLKGE_MASKED_Val _U_(0x0)
1449 #define SDHC_NISIER_EMMC_BLKGE_ENABLED_Val _U_(0x1)
1450 #define SDHC_NISIER_EMMC_BLKGE_MASKED (SDHC_NISIER_EMMC_BLKGE_MASKED_Val << SDHC_NISIER_EMMC_BLKGE_Pos)
1451 #define SDHC_NISIER_EMMC_BLKGE_ENABLED (SDHC_NISIER_EMMC_BLKGE_ENABLED_Val << SDHC_NISIER_EMMC_BLKGE_Pos)
1452 #define SDHC_NISIER_EMMC_DMAINT_Pos 3
1453 #define SDHC_NISIER_EMMC_DMAINT (_U_(0x1) << SDHC_NISIER_EMMC_DMAINT_Pos)
1454 #define SDHC_NISIER_EMMC_DMAINT_MASKED_Val _U_(0x0)
1455 #define SDHC_NISIER_EMMC_DMAINT_ENABLED_Val _U_(0x1)
1456 #define SDHC_NISIER_EMMC_DMAINT_MASKED (SDHC_NISIER_EMMC_DMAINT_MASKED_Val << SDHC_NISIER_EMMC_DMAINT_Pos)
1457 #define SDHC_NISIER_EMMC_DMAINT_ENABLED (SDHC_NISIER_EMMC_DMAINT_ENABLED_Val << SDHC_NISIER_EMMC_DMAINT_Pos)
1458 #define SDHC_NISIER_EMMC_BWRRDY_Pos 4
1459 #define SDHC_NISIER_EMMC_BWRRDY (_U_(0x1) << SDHC_NISIER_EMMC_BWRRDY_Pos)
1460 #define SDHC_NISIER_EMMC_BWRRDY_MASKED_Val _U_(0x0)
1461 #define SDHC_NISIER_EMMC_BWRRDY_ENABLED_Val _U_(0x1)
1462 #define SDHC_NISIER_EMMC_BWRRDY_MASKED (SDHC_NISIER_EMMC_BWRRDY_MASKED_Val << SDHC_NISIER_EMMC_BWRRDY_Pos)
1463 #define SDHC_NISIER_EMMC_BWRRDY_ENABLED (SDHC_NISIER_EMMC_BWRRDY_ENABLED_Val << SDHC_NISIER_EMMC_BWRRDY_Pos)
1464 #define SDHC_NISIER_EMMC_BRDRDY_Pos 5
1465 #define SDHC_NISIER_EMMC_BRDRDY (_U_(0x1) << SDHC_NISIER_EMMC_BRDRDY_Pos)
1466 #define SDHC_NISIER_EMMC_BRDRDY_MASKED_Val _U_(0x0)
1467 #define SDHC_NISIER_EMMC_BRDRDY_ENABLED_Val _U_(0x1)
1468 #define SDHC_NISIER_EMMC_BRDRDY_MASKED (SDHC_NISIER_EMMC_BRDRDY_MASKED_Val << SDHC_NISIER_EMMC_BRDRDY_Pos)
1469 #define SDHC_NISIER_EMMC_BRDRDY_ENABLED (SDHC_NISIER_EMMC_BRDRDY_ENABLED_Val << SDHC_NISIER_EMMC_BRDRDY_Pos)
1470 #define SDHC_NISIER_EMMC_BOOTAR_Pos 14
1471 #define SDHC_NISIER_EMMC_BOOTAR (_U_(0x1) << SDHC_NISIER_EMMC_BOOTAR_Pos)
1472 #define SDHC_NISIER_EMMC_MASK _U_(0x403F)
1474 /* -------- SDHC_EISIER : (SDHC Offset: 0x03A) (R/W 16) Error Interrupt Signal Enable -------- */
1475 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
1476 typedef union {
1477  struct {
1478  uint16_t CMDTEO:1;
1479  uint16_t CMDCRC:1;
1480  uint16_t CMDEND:1;
1481  uint16_t CMDIDX:1;
1482  uint16_t DATTEO:1;
1483  uint16_t DATCRC:1;
1484  uint16_t DATEND:1;
1485  uint16_t CURLIM:1;
1486  uint16_t ACMD:1;
1487  uint16_t ADMA:1;
1488  uint16_t :6;
1489  } bit;
1490  struct { // EMMC mode
1491  uint16_t CMDTEO:1;
1492  uint16_t CMDCRC:1;
1493  uint16_t CMDEND:1;
1494  uint16_t CMDIDX:1;
1495  uint16_t DATTEO:1;
1496  uint16_t DATCRC:1;
1497  uint16_t DATEND:1;
1498  uint16_t CURLIM:1;
1499  uint16_t ACMD:1;
1500  uint16_t ADMA:1;
1501  uint16_t :2;
1502  uint16_t BOOTAE:1;
1503  uint16_t :3;
1504  } EMMC;
1505  uint16_t reg;
1507 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
1508 
1509 #define SDHC_EISIER_OFFSET 0x03A
1510 #define SDHC_EISIER_RESETVALUE _U_(0x0000)
1512 #define SDHC_EISIER_CMDTEO_Pos 0
1513 #define SDHC_EISIER_CMDTEO (_U_(0x1) << SDHC_EISIER_CMDTEO_Pos)
1514 #define SDHC_EISIER_CMDTEO_MASKED_Val _U_(0x0)
1515 #define SDHC_EISIER_CMDTEO_ENABLED_Val _U_(0x1)
1516 #define SDHC_EISIER_CMDTEO_MASKED (SDHC_EISIER_CMDTEO_MASKED_Val << SDHC_EISIER_CMDTEO_Pos)
1517 #define SDHC_EISIER_CMDTEO_ENABLED (SDHC_EISIER_CMDTEO_ENABLED_Val << SDHC_EISIER_CMDTEO_Pos)
1518 #define SDHC_EISIER_CMDCRC_Pos 1
1519 #define SDHC_EISIER_CMDCRC (_U_(0x1) << SDHC_EISIER_CMDCRC_Pos)
1520 #define SDHC_EISIER_CMDCRC_MASKED_Val _U_(0x0)
1521 #define SDHC_EISIER_CMDCRC_ENABLED_Val _U_(0x1)
1522 #define SDHC_EISIER_CMDCRC_MASKED (SDHC_EISIER_CMDCRC_MASKED_Val << SDHC_EISIER_CMDCRC_Pos)
1523 #define SDHC_EISIER_CMDCRC_ENABLED (SDHC_EISIER_CMDCRC_ENABLED_Val << SDHC_EISIER_CMDCRC_Pos)
1524 #define SDHC_EISIER_CMDEND_Pos 2
1525 #define SDHC_EISIER_CMDEND (_U_(0x1) << SDHC_EISIER_CMDEND_Pos)
1526 #define SDHC_EISIER_CMDEND_MASKED_Val _U_(0x0)
1527 #define SDHC_EISIER_CMDEND_ENABLED_Val _U_(0x1)
1528 #define SDHC_EISIER_CMDEND_MASKED (SDHC_EISIER_CMDEND_MASKED_Val << SDHC_EISIER_CMDEND_Pos)
1529 #define SDHC_EISIER_CMDEND_ENABLED (SDHC_EISIER_CMDEND_ENABLED_Val << SDHC_EISIER_CMDEND_Pos)
1530 #define SDHC_EISIER_CMDIDX_Pos 3
1531 #define SDHC_EISIER_CMDIDX (_U_(0x1) << SDHC_EISIER_CMDIDX_Pos)
1532 #define SDHC_EISIER_CMDIDX_MASKED_Val _U_(0x0)
1533 #define SDHC_EISIER_CMDIDX_ENABLED_Val _U_(0x1)
1534 #define SDHC_EISIER_CMDIDX_MASKED (SDHC_EISIER_CMDIDX_MASKED_Val << SDHC_EISIER_CMDIDX_Pos)
1535 #define SDHC_EISIER_CMDIDX_ENABLED (SDHC_EISIER_CMDIDX_ENABLED_Val << SDHC_EISIER_CMDIDX_Pos)
1536 #define SDHC_EISIER_DATTEO_Pos 4
1537 #define SDHC_EISIER_DATTEO (_U_(0x1) << SDHC_EISIER_DATTEO_Pos)
1538 #define SDHC_EISIER_DATTEO_MASKED_Val _U_(0x0)
1539 #define SDHC_EISIER_DATTEO_ENABLED_Val _U_(0x1)
1540 #define SDHC_EISIER_DATTEO_MASKED (SDHC_EISIER_DATTEO_MASKED_Val << SDHC_EISIER_DATTEO_Pos)
1541 #define SDHC_EISIER_DATTEO_ENABLED (SDHC_EISIER_DATTEO_ENABLED_Val << SDHC_EISIER_DATTEO_Pos)
1542 #define SDHC_EISIER_DATCRC_Pos 5
1543 #define SDHC_EISIER_DATCRC (_U_(0x1) << SDHC_EISIER_DATCRC_Pos)
1544 #define SDHC_EISIER_DATCRC_MASKED_Val _U_(0x0)
1545 #define SDHC_EISIER_DATCRC_ENABLED_Val _U_(0x1)
1546 #define SDHC_EISIER_DATCRC_MASKED (SDHC_EISIER_DATCRC_MASKED_Val << SDHC_EISIER_DATCRC_Pos)
1547 #define SDHC_EISIER_DATCRC_ENABLED (SDHC_EISIER_DATCRC_ENABLED_Val << SDHC_EISIER_DATCRC_Pos)
1548 #define SDHC_EISIER_DATEND_Pos 6
1549 #define SDHC_EISIER_DATEND (_U_(0x1) << SDHC_EISIER_DATEND_Pos)
1550 #define SDHC_EISIER_DATEND_MASKED_Val _U_(0x0)
1551 #define SDHC_EISIER_DATEND_ENABLED_Val _U_(0x1)
1552 #define SDHC_EISIER_DATEND_MASKED (SDHC_EISIER_DATEND_MASKED_Val << SDHC_EISIER_DATEND_Pos)
1553 #define SDHC_EISIER_DATEND_ENABLED (SDHC_EISIER_DATEND_ENABLED_Val << SDHC_EISIER_DATEND_Pos)
1554 #define SDHC_EISIER_CURLIM_Pos 7
1555 #define SDHC_EISIER_CURLIM (_U_(0x1) << SDHC_EISIER_CURLIM_Pos)
1556 #define SDHC_EISIER_CURLIM_MASKED_Val _U_(0x0)
1557 #define SDHC_EISIER_CURLIM_ENABLED_Val _U_(0x1)
1558 #define SDHC_EISIER_CURLIM_MASKED (SDHC_EISIER_CURLIM_MASKED_Val << SDHC_EISIER_CURLIM_Pos)
1559 #define SDHC_EISIER_CURLIM_ENABLED (SDHC_EISIER_CURLIM_ENABLED_Val << SDHC_EISIER_CURLIM_Pos)
1560 #define SDHC_EISIER_ACMD_Pos 8
1561 #define SDHC_EISIER_ACMD (_U_(0x1) << SDHC_EISIER_ACMD_Pos)
1562 #define SDHC_EISIER_ACMD_MASKED_Val _U_(0x0)
1563 #define SDHC_EISIER_ACMD_ENABLED_Val _U_(0x1)
1564 #define SDHC_EISIER_ACMD_MASKED (SDHC_EISIER_ACMD_MASKED_Val << SDHC_EISIER_ACMD_Pos)
1565 #define SDHC_EISIER_ACMD_ENABLED (SDHC_EISIER_ACMD_ENABLED_Val << SDHC_EISIER_ACMD_Pos)
1566 #define SDHC_EISIER_ADMA_Pos 9
1567 #define SDHC_EISIER_ADMA (_U_(0x1) << SDHC_EISIER_ADMA_Pos)
1568 #define SDHC_EISIER_ADMA_MASKED_Val _U_(0x0)
1569 #define SDHC_EISIER_ADMA_ENABLED_Val _U_(0x1)
1570 #define SDHC_EISIER_ADMA_MASKED (SDHC_EISIER_ADMA_MASKED_Val << SDHC_EISIER_ADMA_Pos)
1571 #define SDHC_EISIER_ADMA_ENABLED (SDHC_EISIER_ADMA_ENABLED_Val << SDHC_EISIER_ADMA_Pos)
1572 #define SDHC_EISIER_MASK _U_(0x03FF)
1574 // EMMC mode
1575 #define SDHC_EISIER_EMMC_CMDTEO_Pos 0
1576 #define SDHC_EISIER_EMMC_CMDTEO (_U_(0x1) << SDHC_EISIER_EMMC_CMDTEO_Pos)
1577 #define SDHC_EISIER_EMMC_CMDTEO_MASKED_Val _U_(0x0)
1578 #define SDHC_EISIER_EMMC_CMDTEO_ENABLED_Val _U_(0x1)
1579 #define SDHC_EISIER_EMMC_CMDTEO_MASKED (SDHC_EISIER_EMMC_CMDTEO_MASKED_Val << SDHC_EISIER_EMMC_CMDTEO_Pos)
1580 #define SDHC_EISIER_EMMC_CMDTEO_ENABLED (SDHC_EISIER_EMMC_CMDTEO_ENABLED_Val << SDHC_EISIER_EMMC_CMDTEO_Pos)
1581 #define SDHC_EISIER_EMMC_CMDCRC_Pos 1
1582 #define SDHC_EISIER_EMMC_CMDCRC (_U_(0x1) << SDHC_EISIER_EMMC_CMDCRC_Pos)
1583 #define SDHC_EISIER_EMMC_CMDCRC_MASKED_Val _U_(0x0)
1584 #define SDHC_EISIER_EMMC_CMDCRC_ENABLED_Val _U_(0x1)
1585 #define SDHC_EISIER_EMMC_CMDCRC_MASKED (SDHC_EISIER_EMMC_CMDCRC_MASKED_Val << SDHC_EISIER_EMMC_CMDCRC_Pos)
1586 #define SDHC_EISIER_EMMC_CMDCRC_ENABLED (SDHC_EISIER_EMMC_CMDCRC_ENABLED_Val << SDHC_EISIER_EMMC_CMDCRC_Pos)
1587 #define SDHC_EISIER_EMMC_CMDEND_Pos 2
1588 #define SDHC_EISIER_EMMC_CMDEND (_U_(0x1) << SDHC_EISIER_EMMC_CMDEND_Pos)
1589 #define SDHC_EISIER_EMMC_CMDEND_MASKED_Val _U_(0x0)
1590 #define SDHC_EISIER_EMMC_CMDEND_ENABLED_Val _U_(0x1)
1591 #define SDHC_EISIER_EMMC_CMDEND_MASKED (SDHC_EISIER_EMMC_CMDEND_MASKED_Val << SDHC_EISIER_EMMC_CMDEND_Pos)
1592 #define SDHC_EISIER_EMMC_CMDEND_ENABLED (SDHC_EISIER_EMMC_CMDEND_ENABLED_Val << SDHC_EISIER_EMMC_CMDEND_Pos)
1593 #define SDHC_EISIER_EMMC_CMDIDX_Pos 3
1594 #define SDHC_EISIER_EMMC_CMDIDX (_U_(0x1) << SDHC_EISIER_EMMC_CMDIDX_Pos)
1595 #define SDHC_EISIER_EMMC_CMDIDX_MASKED_Val _U_(0x0)
1596 #define SDHC_EISIER_EMMC_CMDIDX_ENABLED_Val _U_(0x1)
1597 #define SDHC_EISIER_EMMC_CMDIDX_MASKED (SDHC_EISIER_EMMC_CMDIDX_MASKED_Val << SDHC_EISIER_EMMC_CMDIDX_Pos)
1598 #define SDHC_EISIER_EMMC_CMDIDX_ENABLED (SDHC_EISIER_EMMC_CMDIDX_ENABLED_Val << SDHC_EISIER_EMMC_CMDIDX_Pos)
1599 #define SDHC_EISIER_EMMC_DATTEO_Pos 4
1600 #define SDHC_EISIER_EMMC_DATTEO (_U_(0x1) << SDHC_EISIER_EMMC_DATTEO_Pos)
1601 #define SDHC_EISIER_EMMC_DATTEO_MASKED_Val _U_(0x0)
1602 #define SDHC_EISIER_EMMC_DATTEO_ENABLED_Val _U_(0x1)
1603 #define SDHC_EISIER_EMMC_DATTEO_MASKED (SDHC_EISIER_EMMC_DATTEO_MASKED_Val << SDHC_EISIER_EMMC_DATTEO_Pos)
1604 #define SDHC_EISIER_EMMC_DATTEO_ENABLED (SDHC_EISIER_EMMC_DATTEO_ENABLED_Val << SDHC_EISIER_EMMC_DATTEO_Pos)
1605 #define SDHC_EISIER_EMMC_DATCRC_Pos 5
1606 #define SDHC_EISIER_EMMC_DATCRC (_U_(0x1) << SDHC_EISIER_EMMC_DATCRC_Pos)
1607 #define SDHC_EISIER_EMMC_DATCRC_MASKED_Val _U_(0x0)
1608 #define SDHC_EISIER_EMMC_DATCRC_ENABLED_Val _U_(0x1)
1609 #define SDHC_EISIER_EMMC_DATCRC_MASKED (SDHC_EISIER_EMMC_DATCRC_MASKED_Val << SDHC_EISIER_EMMC_DATCRC_Pos)
1610 #define SDHC_EISIER_EMMC_DATCRC_ENABLED (SDHC_EISIER_EMMC_DATCRC_ENABLED_Val << SDHC_EISIER_EMMC_DATCRC_Pos)
1611 #define SDHC_EISIER_EMMC_DATEND_Pos 6
1612 #define SDHC_EISIER_EMMC_DATEND (_U_(0x1) << SDHC_EISIER_EMMC_DATEND_Pos)
1613 #define SDHC_EISIER_EMMC_DATEND_MASKED_Val _U_(0x0)
1614 #define SDHC_EISIER_EMMC_DATEND_ENABLED_Val _U_(0x1)
1615 #define SDHC_EISIER_EMMC_DATEND_MASKED (SDHC_EISIER_EMMC_DATEND_MASKED_Val << SDHC_EISIER_EMMC_DATEND_Pos)
1616 #define SDHC_EISIER_EMMC_DATEND_ENABLED (SDHC_EISIER_EMMC_DATEND_ENABLED_Val << SDHC_EISIER_EMMC_DATEND_Pos)
1617 #define SDHC_EISIER_EMMC_CURLIM_Pos 7
1618 #define SDHC_EISIER_EMMC_CURLIM (_U_(0x1) << SDHC_EISIER_EMMC_CURLIM_Pos)
1619 #define SDHC_EISIER_EMMC_CURLIM_MASKED_Val _U_(0x0)
1620 #define SDHC_EISIER_EMMC_CURLIM_ENABLED_Val _U_(0x1)
1621 #define SDHC_EISIER_EMMC_CURLIM_MASKED (SDHC_EISIER_EMMC_CURLIM_MASKED_Val << SDHC_EISIER_EMMC_CURLIM_Pos)
1622 #define SDHC_EISIER_EMMC_CURLIM_ENABLED (SDHC_EISIER_EMMC_CURLIM_ENABLED_Val << SDHC_EISIER_EMMC_CURLIM_Pos)
1623 #define SDHC_EISIER_EMMC_ACMD_Pos 8
1624 #define SDHC_EISIER_EMMC_ACMD (_U_(0x1) << SDHC_EISIER_EMMC_ACMD_Pos)
1625 #define SDHC_EISIER_EMMC_ACMD_MASKED_Val _U_(0x0)
1626 #define SDHC_EISIER_EMMC_ACMD_ENABLED_Val _U_(0x1)
1627 #define SDHC_EISIER_EMMC_ACMD_MASKED (SDHC_EISIER_EMMC_ACMD_MASKED_Val << SDHC_EISIER_EMMC_ACMD_Pos)
1628 #define SDHC_EISIER_EMMC_ACMD_ENABLED (SDHC_EISIER_EMMC_ACMD_ENABLED_Val << SDHC_EISIER_EMMC_ACMD_Pos)
1629 #define SDHC_EISIER_EMMC_ADMA_Pos 9
1630 #define SDHC_EISIER_EMMC_ADMA (_U_(0x1) << SDHC_EISIER_EMMC_ADMA_Pos)
1631 #define SDHC_EISIER_EMMC_ADMA_MASKED_Val _U_(0x0)
1632 #define SDHC_EISIER_EMMC_ADMA_ENABLED_Val _U_(0x1)
1633 #define SDHC_EISIER_EMMC_ADMA_MASKED (SDHC_EISIER_EMMC_ADMA_MASKED_Val << SDHC_EISIER_EMMC_ADMA_Pos)
1634 #define SDHC_EISIER_EMMC_ADMA_ENABLED (SDHC_EISIER_EMMC_ADMA_ENABLED_Val << SDHC_EISIER_EMMC_ADMA_Pos)
1635 #define SDHC_EISIER_EMMC_BOOTAE_Pos 12
1636 #define SDHC_EISIER_EMMC_BOOTAE (_U_(0x1) << SDHC_EISIER_EMMC_BOOTAE_Pos)
1637 #define SDHC_EISIER_EMMC_MASK _U_(0x13FF)
1639 /* -------- SDHC_ACESR : (SDHC Offset: 0x03C) (R/ 16) Auto CMD Error Status -------- */
1640 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
1641 typedef union {
1642  struct {
1643  uint16_t ACMD12NE:1;
1644  uint16_t ACMDTEO:1;
1645  uint16_t ACMDCRC:1;
1646  uint16_t ACMDEND:1;
1647  uint16_t ACMDIDX:1;
1648  uint16_t :2;
1649  uint16_t CMDNI:1;
1650  uint16_t :8;
1651  } bit;
1652  uint16_t reg;
1653 } SDHC_ACESR_Type;
1654 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
1655 
1656 #define SDHC_ACESR_OFFSET 0x03C
1657 #define SDHC_ACESR_RESETVALUE _U_(0x0000)
1659 #define SDHC_ACESR_ACMD12NE_Pos 0
1660 #define SDHC_ACESR_ACMD12NE (_U_(0x1) << SDHC_ACESR_ACMD12NE_Pos)
1661 #define SDHC_ACESR_ACMD12NE_EXEC_Val _U_(0x0)
1662 #define SDHC_ACESR_ACMD12NE_NOT_EXEC_Val _U_(0x1)
1663 #define SDHC_ACESR_ACMD12NE_EXEC (SDHC_ACESR_ACMD12NE_EXEC_Val << SDHC_ACESR_ACMD12NE_Pos)
1664 #define SDHC_ACESR_ACMD12NE_NOT_EXEC (SDHC_ACESR_ACMD12NE_NOT_EXEC_Val << SDHC_ACESR_ACMD12NE_Pos)
1665 #define SDHC_ACESR_ACMDTEO_Pos 1
1666 #define SDHC_ACESR_ACMDTEO (_U_(0x1) << SDHC_ACESR_ACMDTEO_Pos)
1667 #define SDHC_ACESR_ACMDTEO_NO_Val _U_(0x0)
1668 #define SDHC_ACESR_ACMDTEO_YES_Val _U_(0x1)
1669 #define SDHC_ACESR_ACMDTEO_NO (SDHC_ACESR_ACMDTEO_NO_Val << SDHC_ACESR_ACMDTEO_Pos)
1670 #define SDHC_ACESR_ACMDTEO_YES (SDHC_ACESR_ACMDTEO_YES_Val << SDHC_ACESR_ACMDTEO_Pos)
1671 #define SDHC_ACESR_ACMDCRC_Pos 2
1672 #define SDHC_ACESR_ACMDCRC (_U_(0x1) << SDHC_ACESR_ACMDCRC_Pos)
1673 #define SDHC_ACESR_ACMDCRC_NO_Val _U_(0x0)
1674 #define SDHC_ACESR_ACMDCRC_YES_Val _U_(0x1)
1675 #define SDHC_ACESR_ACMDCRC_NO (SDHC_ACESR_ACMDCRC_NO_Val << SDHC_ACESR_ACMDCRC_Pos)
1676 #define SDHC_ACESR_ACMDCRC_YES (SDHC_ACESR_ACMDCRC_YES_Val << SDHC_ACESR_ACMDCRC_Pos)
1677 #define SDHC_ACESR_ACMDEND_Pos 3
1678 #define SDHC_ACESR_ACMDEND (_U_(0x1) << SDHC_ACESR_ACMDEND_Pos)
1679 #define SDHC_ACESR_ACMDEND_NO_Val _U_(0x0)
1680 #define SDHC_ACESR_ACMDEND_YES_Val _U_(0x1)
1681 #define SDHC_ACESR_ACMDEND_NO (SDHC_ACESR_ACMDEND_NO_Val << SDHC_ACESR_ACMDEND_Pos)
1682 #define SDHC_ACESR_ACMDEND_YES (SDHC_ACESR_ACMDEND_YES_Val << SDHC_ACESR_ACMDEND_Pos)
1683 #define SDHC_ACESR_ACMDIDX_Pos 4
1684 #define SDHC_ACESR_ACMDIDX (_U_(0x1) << SDHC_ACESR_ACMDIDX_Pos)
1685 #define SDHC_ACESR_ACMDIDX_NO_Val _U_(0x0)
1686 #define SDHC_ACESR_ACMDIDX_YES_Val _U_(0x1)
1687 #define SDHC_ACESR_ACMDIDX_NO (SDHC_ACESR_ACMDIDX_NO_Val << SDHC_ACESR_ACMDIDX_Pos)
1688 #define SDHC_ACESR_ACMDIDX_YES (SDHC_ACESR_ACMDIDX_YES_Val << SDHC_ACESR_ACMDIDX_Pos)
1689 #define SDHC_ACESR_CMDNI_Pos 7
1690 #define SDHC_ACESR_CMDNI (_U_(0x1) << SDHC_ACESR_CMDNI_Pos)
1691 #define SDHC_ACESR_CMDNI_OK_Val _U_(0x0)
1692 #define SDHC_ACESR_CMDNI_NOT_ISSUED_Val _U_(0x1)
1693 #define SDHC_ACESR_CMDNI_OK (SDHC_ACESR_CMDNI_OK_Val << SDHC_ACESR_CMDNI_Pos)
1694 #define SDHC_ACESR_CMDNI_NOT_ISSUED (SDHC_ACESR_CMDNI_NOT_ISSUED_Val << SDHC_ACESR_CMDNI_Pos)
1695 #define SDHC_ACESR_MASK _U_(0x009F)
1697 /* -------- SDHC_HC2R : (SDHC Offset: 0x03E) (R/W 16) Host Control 2 -------- */
1698 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
1699 typedef union {
1700  struct {
1701  uint16_t UHSMS:3;
1702  uint16_t VS18EN:1;
1703  uint16_t DRVSEL:2;
1704  uint16_t EXTUN:1;
1705  uint16_t SLCKSEL:1;
1706  uint16_t :6;
1707  uint16_t ASINTEN:1;
1708  uint16_t PVALEN:1;
1709  } bit;
1710  struct { // EMMC mode
1711  uint16_t HS200EN:4;
1712  uint16_t DRVSEL:2;
1713  uint16_t EXTUN:1;
1714  uint16_t SLCKSEL:1;
1715  uint16_t :7;
1716  uint16_t PVALEN:1;
1717  } EMMC;
1718  uint16_t reg;
1719 } SDHC_HC2R_Type;
1720 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
1721 
1722 #define SDHC_HC2R_OFFSET 0x03E
1723 #define SDHC_HC2R_RESETVALUE _U_(0x0000)
1725 #define SDHC_HC2R_UHSMS_Pos 0
1726 #define SDHC_HC2R_UHSMS_Msk (_U_(0x7) << SDHC_HC2R_UHSMS_Pos)
1727 #define SDHC_HC2R_UHSMS(value) (SDHC_HC2R_UHSMS_Msk & ((value) << SDHC_HC2R_UHSMS_Pos))
1728 #define SDHC_HC2R_UHSMS_SDR12_Val _U_(0x0)
1729 #define SDHC_HC2R_UHSMS_SDR25_Val _U_(0x1)
1730 #define SDHC_HC2R_UHSMS_SDR50_Val _U_(0x2)
1731 #define SDHC_HC2R_UHSMS_SDR104_Val _U_(0x3)
1732 #define SDHC_HC2R_UHSMS_DDR50_Val _U_(0x4)
1733 #define SDHC_HC2R_UHSMS_SDR12 (SDHC_HC2R_UHSMS_SDR12_Val << SDHC_HC2R_UHSMS_Pos)
1734 #define SDHC_HC2R_UHSMS_SDR25 (SDHC_HC2R_UHSMS_SDR25_Val << SDHC_HC2R_UHSMS_Pos)
1735 #define SDHC_HC2R_UHSMS_SDR50 (SDHC_HC2R_UHSMS_SDR50_Val << SDHC_HC2R_UHSMS_Pos)
1736 #define SDHC_HC2R_UHSMS_SDR104 (SDHC_HC2R_UHSMS_SDR104_Val << SDHC_HC2R_UHSMS_Pos)
1737 #define SDHC_HC2R_UHSMS_DDR50 (SDHC_HC2R_UHSMS_DDR50_Val << SDHC_HC2R_UHSMS_Pos)
1738 #define SDHC_HC2R_VS18EN_Pos 3
1739 #define SDHC_HC2R_VS18EN (_U_(0x1) << SDHC_HC2R_VS18EN_Pos)
1740 #define SDHC_HC2R_VS18EN_S33V_Val _U_(0x0)
1741 #define SDHC_HC2R_VS18EN_S18V_Val _U_(0x1)
1742 #define SDHC_HC2R_VS18EN_S33V (SDHC_HC2R_VS18EN_S33V_Val << SDHC_HC2R_VS18EN_Pos)
1743 #define SDHC_HC2R_VS18EN_S18V (SDHC_HC2R_VS18EN_S18V_Val << SDHC_HC2R_VS18EN_Pos)
1744 #define SDHC_HC2R_DRVSEL_Pos 4
1745 #define SDHC_HC2R_DRVSEL_Msk (_U_(0x3) << SDHC_HC2R_DRVSEL_Pos)
1746 #define SDHC_HC2R_DRVSEL(value) (SDHC_HC2R_DRVSEL_Msk & ((value) << SDHC_HC2R_DRVSEL_Pos))
1747 #define SDHC_HC2R_DRVSEL_B_Val _U_(0x0)
1748 #define SDHC_HC2R_DRVSEL_A_Val _U_(0x1)
1749 #define SDHC_HC2R_DRVSEL_C_Val _U_(0x2)
1750 #define SDHC_HC2R_DRVSEL_D_Val _U_(0x3)
1751 #define SDHC_HC2R_DRVSEL_B (SDHC_HC2R_DRVSEL_B_Val << SDHC_HC2R_DRVSEL_Pos)
1752 #define SDHC_HC2R_DRVSEL_A (SDHC_HC2R_DRVSEL_A_Val << SDHC_HC2R_DRVSEL_Pos)
1753 #define SDHC_HC2R_DRVSEL_C (SDHC_HC2R_DRVSEL_C_Val << SDHC_HC2R_DRVSEL_Pos)
1754 #define SDHC_HC2R_DRVSEL_D (SDHC_HC2R_DRVSEL_D_Val << SDHC_HC2R_DRVSEL_Pos)
1755 #define SDHC_HC2R_EXTUN_Pos 6
1756 #define SDHC_HC2R_EXTUN (_U_(0x1) << SDHC_HC2R_EXTUN_Pos)
1757 #define SDHC_HC2R_EXTUN_NO_Val _U_(0x0)
1758 #define SDHC_HC2R_EXTUN_REQUESTED_Val _U_(0x1)
1759 #define SDHC_HC2R_EXTUN_NO (SDHC_HC2R_EXTUN_NO_Val << SDHC_HC2R_EXTUN_Pos)
1760 #define SDHC_HC2R_EXTUN_REQUESTED (SDHC_HC2R_EXTUN_REQUESTED_Val << SDHC_HC2R_EXTUN_Pos)
1761 #define SDHC_HC2R_SLCKSEL_Pos 7
1762 #define SDHC_HC2R_SLCKSEL (_U_(0x1) << SDHC_HC2R_SLCKSEL_Pos)
1763 #define SDHC_HC2R_SLCKSEL_FIXED_Val _U_(0x0)
1764 #define SDHC_HC2R_SLCKSEL_TUNED_Val _U_(0x1)
1765 #define SDHC_HC2R_SLCKSEL_FIXED (SDHC_HC2R_SLCKSEL_FIXED_Val << SDHC_HC2R_SLCKSEL_Pos)
1766 #define SDHC_HC2R_SLCKSEL_TUNED (SDHC_HC2R_SLCKSEL_TUNED_Val << SDHC_HC2R_SLCKSEL_Pos)
1767 #define SDHC_HC2R_ASINTEN_Pos 14
1768 #define SDHC_HC2R_ASINTEN (_U_(0x1) << SDHC_HC2R_ASINTEN_Pos)
1769 #define SDHC_HC2R_ASINTEN_DISABLED_Val _U_(0x0)
1770 #define SDHC_HC2R_ASINTEN_ENABLED_Val _U_(0x1)
1771 #define SDHC_HC2R_ASINTEN_DISABLED (SDHC_HC2R_ASINTEN_DISABLED_Val << SDHC_HC2R_ASINTEN_Pos)
1772 #define SDHC_HC2R_ASINTEN_ENABLED (SDHC_HC2R_ASINTEN_ENABLED_Val << SDHC_HC2R_ASINTEN_Pos)
1773 #define SDHC_HC2R_PVALEN_Pos 15
1774 #define SDHC_HC2R_PVALEN (_U_(0x1) << SDHC_HC2R_PVALEN_Pos)
1775 #define SDHC_HC2R_PVALEN_HOST_Val _U_(0x0)
1776 #define SDHC_HC2R_PVALEN_AUTO_Val _U_(0x1)
1777 #define SDHC_HC2R_PVALEN_HOST (SDHC_HC2R_PVALEN_HOST_Val << SDHC_HC2R_PVALEN_Pos)
1778 #define SDHC_HC2R_PVALEN_AUTO (SDHC_HC2R_PVALEN_AUTO_Val << SDHC_HC2R_PVALEN_Pos)
1779 #define SDHC_HC2R_MASK _U_(0xC0FF)
1781 // EMMC mode
1782 #define SDHC_HC2R_EMMC_HS200EN_Pos 0
1783 #define SDHC_HC2R_EMMC_HS200EN_Msk (_U_(0xF) << SDHC_HC2R_EMMC_HS200EN_Pos)
1784 #define SDHC_HC2R_EMMC_HS200EN(value) (SDHC_HC2R_EMMC_HS200EN_Msk & ((value) << SDHC_HC2R_EMMC_HS200EN_Pos))
1785 #define SDHC_HC2R_EMMC_HS200EN_SDR12_Val _U_(0x0)
1786 #define SDHC_HC2R_EMMC_HS200EN_SDR25_Val _U_(0x1)
1787 #define SDHC_HC2R_EMMC_HS200EN_SDR50_Val _U_(0x2)
1788 #define SDHC_HC2R_EMMC_HS200EN_SDR104_Val _U_(0x3)
1789 #define SDHC_HC2R_EMMC_HS200EN_DDR50_Val _U_(0x4)
1790 #define SDHC_HC2R_EMMC_HS200EN_SDR12 (SDHC_HC2R_EMMC_HS200EN_SDR12_Val << SDHC_HC2R_EMMC_HS200EN_Pos)
1791 #define SDHC_HC2R_EMMC_HS200EN_SDR25 (SDHC_HC2R_EMMC_HS200EN_SDR25_Val << SDHC_HC2R_EMMC_HS200EN_Pos)
1792 #define SDHC_HC2R_EMMC_HS200EN_SDR50 (SDHC_HC2R_EMMC_HS200EN_SDR50_Val << SDHC_HC2R_EMMC_HS200EN_Pos)
1793 #define SDHC_HC2R_EMMC_HS200EN_SDR104 (SDHC_HC2R_EMMC_HS200EN_SDR104_Val << SDHC_HC2R_EMMC_HS200EN_Pos)
1794 #define SDHC_HC2R_EMMC_HS200EN_DDR50 (SDHC_HC2R_EMMC_HS200EN_DDR50_Val << SDHC_HC2R_EMMC_HS200EN_Pos)
1795 #define SDHC_HC2R_EMMC_DRVSEL_Pos 4
1796 #define SDHC_HC2R_EMMC_DRVSEL_Msk (_U_(0x3) << SDHC_HC2R_EMMC_DRVSEL_Pos)
1797 #define SDHC_HC2R_EMMC_DRVSEL(value) (SDHC_HC2R_EMMC_DRVSEL_Msk & ((value) << SDHC_HC2R_EMMC_DRVSEL_Pos))
1798 #define SDHC_HC2R_EMMC_DRVSEL_B_Val _U_(0x0)
1799 #define SDHC_HC2R_EMMC_DRVSEL_A_Val _U_(0x1)
1800 #define SDHC_HC2R_EMMC_DRVSEL_C_Val _U_(0x2)
1801 #define SDHC_HC2R_EMMC_DRVSEL_D_Val _U_(0x3)
1802 #define SDHC_HC2R_EMMC_DRVSEL_B (SDHC_HC2R_EMMC_DRVSEL_B_Val << SDHC_HC2R_EMMC_DRVSEL_Pos)
1803 #define SDHC_HC2R_EMMC_DRVSEL_A (SDHC_HC2R_EMMC_DRVSEL_A_Val << SDHC_HC2R_EMMC_DRVSEL_Pos)
1804 #define SDHC_HC2R_EMMC_DRVSEL_C (SDHC_HC2R_EMMC_DRVSEL_C_Val << SDHC_HC2R_EMMC_DRVSEL_Pos)
1805 #define SDHC_HC2R_EMMC_DRVSEL_D (SDHC_HC2R_EMMC_DRVSEL_D_Val << SDHC_HC2R_EMMC_DRVSEL_Pos)
1806 #define SDHC_HC2R_EMMC_EXTUN_Pos 6
1807 #define SDHC_HC2R_EMMC_EXTUN (_U_(0x1) << SDHC_HC2R_EMMC_EXTUN_Pos)
1808 #define SDHC_HC2R_EMMC_EXTUN_NO_Val _U_(0x0)
1809 #define SDHC_HC2R_EMMC_EXTUN_REQUESTED_Val _U_(0x1)
1810 #define SDHC_HC2R_EMMC_EXTUN_NO (SDHC_HC2R_EMMC_EXTUN_NO_Val << SDHC_HC2R_EMMC_EXTUN_Pos)
1811 #define SDHC_HC2R_EMMC_EXTUN_REQUESTED (SDHC_HC2R_EMMC_EXTUN_REQUESTED_Val << SDHC_HC2R_EMMC_EXTUN_Pos)
1812 #define SDHC_HC2R_EMMC_SLCKSEL_Pos 7
1813 #define SDHC_HC2R_EMMC_SLCKSEL (_U_(0x1) << SDHC_HC2R_EMMC_SLCKSEL_Pos)
1814 #define SDHC_HC2R_EMMC_SLCKSEL_FIXED_Val _U_(0x0)
1815 #define SDHC_HC2R_EMMC_SLCKSEL_TUNED_Val _U_(0x1)
1816 #define SDHC_HC2R_EMMC_SLCKSEL_FIXED (SDHC_HC2R_EMMC_SLCKSEL_FIXED_Val << SDHC_HC2R_EMMC_SLCKSEL_Pos)
1817 #define SDHC_HC2R_EMMC_SLCKSEL_TUNED (SDHC_HC2R_EMMC_SLCKSEL_TUNED_Val << SDHC_HC2R_EMMC_SLCKSEL_Pos)
1818 #define SDHC_HC2R_EMMC_PVALEN_Pos 15
1819 #define SDHC_HC2R_EMMC_PVALEN (_U_(0x1) << SDHC_HC2R_EMMC_PVALEN_Pos)
1820 #define SDHC_HC2R_EMMC_PVALEN_HOST_Val _U_(0x0)
1821 #define SDHC_HC2R_EMMC_PVALEN_AUTO_Val _U_(0x1)
1822 #define SDHC_HC2R_EMMC_PVALEN_HOST (SDHC_HC2R_EMMC_PVALEN_HOST_Val << SDHC_HC2R_EMMC_PVALEN_Pos)
1823 #define SDHC_HC2R_EMMC_PVALEN_AUTO (SDHC_HC2R_EMMC_PVALEN_AUTO_Val << SDHC_HC2R_EMMC_PVALEN_Pos)
1824 #define SDHC_HC2R_EMMC_MASK _U_(0x80FF)
1826 /* -------- SDHC_CA0R : (SDHC Offset: 0x040) (R/ 32) Capabilities 0 -------- */
1827 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
1828 typedef union {
1829  struct {
1830  uint32_t TEOCLKF:6;
1831  uint32_t :1;
1832  uint32_t TEOCLKU:1;
1833  uint32_t BASECLKF:8;
1834  uint32_t MAXBLKL:2;
1835  uint32_t ED8SUP:1;
1836  uint32_t ADMA2SUP:1;
1837  uint32_t :1;
1838  uint32_t HSSUP:1;
1839  uint32_t SDMASUP:1;
1840  uint32_t SRSUP:1;
1841  uint32_t V33VSUP:1;
1842  uint32_t V30VSUP:1;
1843  uint32_t V18VSUP:1;
1844  uint32_t :1;
1845  uint32_t SB64SUP:1;
1846  uint32_t ASINTSUP:1;
1847  uint32_t SLTYPE:2;
1848  } bit;
1849  uint32_t reg;
1850 } SDHC_CA0R_Type;
1851 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
1852 
1853 #define SDHC_CA0R_OFFSET 0x040
1854 #define SDHC_CA0R_RESETVALUE _U_(0x27E80080)
1856 #define SDHC_CA0R_TEOCLKF_Pos 0
1857 #define SDHC_CA0R_TEOCLKF_Msk (_U_(0x3F) << SDHC_CA0R_TEOCLKF_Pos)
1858 #define SDHC_CA0R_TEOCLKF(value) (SDHC_CA0R_TEOCLKF_Msk & ((value) << SDHC_CA0R_TEOCLKF_Pos))
1859 #define SDHC_CA0R_TEOCLKF_OTHER_Val _U_(0x0)
1860 #define SDHC_CA0R_TEOCLKF_OTHER (SDHC_CA0R_TEOCLKF_OTHER_Val << SDHC_CA0R_TEOCLKF_Pos)
1861 #define SDHC_CA0R_TEOCLKU_Pos 7
1862 #define SDHC_CA0R_TEOCLKU (_U_(0x1) << SDHC_CA0R_TEOCLKU_Pos)
1863 #define SDHC_CA0R_TEOCLKU_KHZ_Val _U_(0x0)
1864 #define SDHC_CA0R_TEOCLKU_MHZ_Val _U_(0x1)
1865 #define SDHC_CA0R_TEOCLKU_KHZ (SDHC_CA0R_TEOCLKU_KHZ_Val << SDHC_CA0R_TEOCLKU_Pos)
1866 #define SDHC_CA0R_TEOCLKU_MHZ (SDHC_CA0R_TEOCLKU_MHZ_Val << SDHC_CA0R_TEOCLKU_Pos)
1867 #define SDHC_CA0R_BASECLKF_Pos 8
1868 #define SDHC_CA0R_BASECLKF_Msk (_U_(0xFF) << SDHC_CA0R_BASECLKF_Pos)
1869 #define SDHC_CA0R_BASECLKF(value) (SDHC_CA0R_BASECLKF_Msk & ((value) << SDHC_CA0R_BASECLKF_Pos))
1870 #define SDHC_CA0R_BASECLKF_OTHER_Val _U_(0x0)
1871 #define SDHC_CA0R_BASECLKF_OTHER (SDHC_CA0R_BASECLKF_OTHER_Val << SDHC_CA0R_BASECLKF_Pos)
1872 #define SDHC_CA0R_MAXBLKL_Pos 16
1873 #define SDHC_CA0R_MAXBLKL_Msk (_U_(0x3) << SDHC_CA0R_MAXBLKL_Pos)
1874 #define SDHC_CA0R_MAXBLKL(value) (SDHC_CA0R_MAXBLKL_Msk & ((value) << SDHC_CA0R_MAXBLKL_Pos))
1875 #define SDHC_CA0R_MAXBLKL_512_Val _U_(0x0)
1876 #define SDHC_CA0R_MAXBLKL_1024_Val _U_(0x1)
1877 #define SDHC_CA0R_MAXBLKL_2048_Val _U_(0x2)
1878 #define SDHC_CA0R_MAXBLKL_512 (SDHC_CA0R_MAXBLKL_512_Val << SDHC_CA0R_MAXBLKL_Pos)
1879 #define SDHC_CA0R_MAXBLKL_1024 (SDHC_CA0R_MAXBLKL_1024_Val << SDHC_CA0R_MAXBLKL_Pos)
1880 #define SDHC_CA0R_MAXBLKL_2048 (SDHC_CA0R_MAXBLKL_2048_Val << SDHC_CA0R_MAXBLKL_Pos)
1881 #define SDHC_CA0R_ED8SUP_Pos 18
1882 #define SDHC_CA0R_ED8SUP (_U_(0x1) << SDHC_CA0R_ED8SUP_Pos)
1883 #define SDHC_CA0R_ED8SUP_NO_Val _U_(0x0)
1884 #define SDHC_CA0R_ED8SUP_YES_Val _U_(0x1)
1885 #define SDHC_CA0R_ED8SUP_NO (SDHC_CA0R_ED8SUP_NO_Val << SDHC_CA0R_ED8SUP_Pos)
1886 #define SDHC_CA0R_ED8SUP_YES (SDHC_CA0R_ED8SUP_YES_Val << SDHC_CA0R_ED8SUP_Pos)
1887 #define SDHC_CA0R_ADMA2SUP_Pos 19
1888 #define SDHC_CA0R_ADMA2SUP (_U_(0x1) << SDHC_CA0R_ADMA2SUP_Pos)
1889 #define SDHC_CA0R_ADMA2SUP_NO_Val _U_(0x0)
1890 #define SDHC_CA0R_ADMA2SUP_YES_Val _U_(0x1)
1891 #define SDHC_CA0R_ADMA2SUP_NO (SDHC_CA0R_ADMA2SUP_NO_Val << SDHC_CA0R_ADMA2SUP_Pos)
1892 #define SDHC_CA0R_ADMA2SUP_YES (SDHC_CA0R_ADMA2SUP_YES_Val << SDHC_CA0R_ADMA2SUP_Pos)
1893 #define SDHC_CA0R_HSSUP_Pos 21
1894 #define SDHC_CA0R_HSSUP (_U_(0x1) << SDHC_CA0R_HSSUP_Pos)
1895 #define SDHC_CA0R_HSSUP_NO_Val _U_(0x0)
1896 #define SDHC_CA0R_HSSUP_YES_Val _U_(0x1)
1897 #define SDHC_CA0R_HSSUP_NO (SDHC_CA0R_HSSUP_NO_Val << SDHC_CA0R_HSSUP_Pos)
1898 #define SDHC_CA0R_HSSUP_YES (SDHC_CA0R_HSSUP_YES_Val << SDHC_CA0R_HSSUP_Pos)
1899 #define SDHC_CA0R_SDMASUP_Pos 22
1900 #define SDHC_CA0R_SDMASUP (_U_(0x1) << SDHC_CA0R_SDMASUP_Pos)
1901 #define SDHC_CA0R_SDMASUP_NO_Val _U_(0x0)
1902 #define SDHC_CA0R_SDMASUP_YES_Val _U_(0x1)
1903 #define SDHC_CA0R_SDMASUP_NO (SDHC_CA0R_SDMASUP_NO_Val << SDHC_CA0R_SDMASUP_Pos)
1904 #define SDHC_CA0R_SDMASUP_YES (SDHC_CA0R_SDMASUP_YES_Val << SDHC_CA0R_SDMASUP_Pos)
1905 #define SDHC_CA0R_SRSUP_Pos 23
1906 #define SDHC_CA0R_SRSUP (_U_(0x1) << SDHC_CA0R_SRSUP_Pos)
1907 #define SDHC_CA0R_SRSUP_NO_Val _U_(0x0)
1908 #define SDHC_CA0R_SRSUP_YES_Val _U_(0x1)
1909 #define SDHC_CA0R_SRSUP_NO (SDHC_CA0R_SRSUP_NO_Val << SDHC_CA0R_SRSUP_Pos)
1910 #define SDHC_CA0R_SRSUP_YES (SDHC_CA0R_SRSUP_YES_Val << SDHC_CA0R_SRSUP_Pos)
1911 #define SDHC_CA0R_V33VSUP_Pos 24
1912 #define SDHC_CA0R_V33VSUP (_U_(0x1) << SDHC_CA0R_V33VSUP_Pos)
1913 #define SDHC_CA0R_V33VSUP_NO_Val _U_(0x0)
1914 #define SDHC_CA0R_V33VSUP_YES_Val _U_(0x1)
1915 #define SDHC_CA0R_V33VSUP_NO (SDHC_CA0R_V33VSUP_NO_Val << SDHC_CA0R_V33VSUP_Pos)
1916 #define SDHC_CA0R_V33VSUP_YES (SDHC_CA0R_V33VSUP_YES_Val << SDHC_CA0R_V33VSUP_Pos)
1917 #define SDHC_CA0R_V30VSUP_Pos 25
1918 #define SDHC_CA0R_V30VSUP (_U_(0x1) << SDHC_CA0R_V30VSUP_Pos)
1919 #define SDHC_CA0R_V30VSUP_NO_Val _U_(0x0)
1920 #define SDHC_CA0R_V30VSUP_YES_Val _U_(0x1)
1921 #define SDHC_CA0R_V30VSUP_NO (SDHC_CA0R_V30VSUP_NO_Val << SDHC_CA0R_V30VSUP_Pos)
1922 #define SDHC_CA0R_V30VSUP_YES (SDHC_CA0R_V30VSUP_YES_Val << SDHC_CA0R_V30VSUP_Pos)
1923 #define SDHC_CA0R_V18VSUP_Pos 26
1924 #define SDHC_CA0R_V18VSUP (_U_(0x1) << SDHC_CA0R_V18VSUP_Pos)
1925 #define SDHC_CA0R_V18VSUP_NO_Val _U_(0x0)
1926 #define SDHC_CA0R_V18VSUP_YES_Val _U_(0x1)
1927 #define SDHC_CA0R_V18VSUP_NO (SDHC_CA0R_V18VSUP_NO_Val << SDHC_CA0R_V18VSUP_Pos)
1928 #define SDHC_CA0R_V18VSUP_YES (SDHC_CA0R_V18VSUP_YES_Val << SDHC_CA0R_V18VSUP_Pos)
1929 #define SDHC_CA0R_SB64SUP_Pos 28
1930 #define SDHC_CA0R_SB64SUP (_U_(0x1) << SDHC_CA0R_SB64SUP_Pos)
1931 #define SDHC_CA0R_SB64SUP_NO_Val _U_(0x0)
1932 #define SDHC_CA0R_SB64SUP_YES_Val _U_(0x1)
1933 #define SDHC_CA0R_SB64SUP_NO (SDHC_CA0R_SB64SUP_NO_Val << SDHC_CA0R_SB64SUP_Pos)
1934 #define SDHC_CA0R_SB64SUP_YES (SDHC_CA0R_SB64SUP_YES_Val << SDHC_CA0R_SB64SUP_Pos)
1935 #define SDHC_CA0R_ASINTSUP_Pos 29
1936 #define SDHC_CA0R_ASINTSUP (_U_(0x1) << SDHC_CA0R_ASINTSUP_Pos)
1937 #define SDHC_CA0R_ASINTSUP_NO_Val _U_(0x0)
1938 #define SDHC_CA0R_ASINTSUP_YES_Val _U_(0x1)
1939 #define SDHC_CA0R_ASINTSUP_NO (SDHC_CA0R_ASINTSUP_NO_Val << SDHC_CA0R_ASINTSUP_Pos)
1940 #define SDHC_CA0R_ASINTSUP_YES (SDHC_CA0R_ASINTSUP_YES_Val << SDHC_CA0R_ASINTSUP_Pos)
1941 #define SDHC_CA0R_SLTYPE_Pos 30
1942 #define SDHC_CA0R_SLTYPE_Msk (_U_(0x3) << SDHC_CA0R_SLTYPE_Pos)
1943 #define SDHC_CA0R_SLTYPE(value) (SDHC_CA0R_SLTYPE_Msk & ((value) << SDHC_CA0R_SLTYPE_Pos))
1944 #define SDHC_CA0R_SLTYPE_REMOVABLE_Val _U_(0x0)
1945 #define SDHC_CA0R_SLTYPE_EMBEDDED_Val _U_(0x1)
1946 #define SDHC_CA0R_SLTYPE_REMOVABLE (SDHC_CA0R_SLTYPE_REMOVABLE_Val << SDHC_CA0R_SLTYPE_Pos)
1947 #define SDHC_CA0R_SLTYPE_EMBEDDED (SDHC_CA0R_SLTYPE_EMBEDDED_Val << SDHC_CA0R_SLTYPE_Pos)
1948 #define SDHC_CA0R_MASK _U_(0xF7EFFFBF)
1950 /* -------- SDHC_CA1R : (SDHC Offset: 0x044) (R/ 32) Capabilities 1 -------- */
1951 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
1952 typedef union {
1953  struct {
1954  uint32_t SDR50SUP:1;
1955  uint32_t SDR104SUP:1;
1956  uint32_t DDR50SUP:1;
1957  uint32_t :1;
1958  uint32_t DRVASUP:1;
1959  uint32_t DRVCSUP:1;
1960  uint32_t DRVDSUP:1;
1961  uint32_t :1;
1962  uint32_t TCNTRT:4;
1963  uint32_t :1;
1964  uint32_t TSDR50:1;
1965  uint32_t :2;
1966  uint32_t CLKMULT:8;
1967  uint32_t :8;
1968  } bit;
1969  uint32_t reg;
1970 } SDHC_CA1R_Type;
1971 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
1972 
1973 #define SDHC_CA1R_OFFSET 0x044
1974 #define SDHC_CA1R_RESETVALUE _U_(0x00000070)
1976 #define SDHC_CA1R_SDR50SUP_Pos 0
1977 #define SDHC_CA1R_SDR50SUP (_U_(0x1) << SDHC_CA1R_SDR50SUP_Pos)
1978 #define SDHC_CA1R_SDR50SUP_NO_Val _U_(0x0)
1979 #define SDHC_CA1R_SDR50SUP_YES_Val _U_(0x1)
1980 #define SDHC_CA1R_SDR50SUP_NO (SDHC_CA1R_SDR50SUP_NO_Val << SDHC_CA1R_SDR50SUP_Pos)
1981 #define SDHC_CA1R_SDR50SUP_YES (SDHC_CA1R_SDR50SUP_YES_Val << SDHC_CA1R_SDR50SUP_Pos)
1982 #define SDHC_CA1R_SDR104SUP_Pos 1
1983 #define SDHC_CA1R_SDR104SUP (_U_(0x1) << SDHC_CA1R_SDR104SUP_Pos)
1984 #define SDHC_CA1R_SDR104SUP_NO_Val _U_(0x0)
1985 #define SDHC_CA1R_SDR104SUP_YES_Val _U_(0x1)
1986 #define SDHC_CA1R_SDR104SUP_NO (SDHC_CA1R_SDR104SUP_NO_Val << SDHC_CA1R_SDR104SUP_Pos)
1987 #define SDHC_CA1R_SDR104SUP_YES (SDHC_CA1R_SDR104SUP_YES_Val << SDHC_CA1R_SDR104SUP_Pos)
1988 #define SDHC_CA1R_DDR50SUP_Pos 2
1989 #define SDHC_CA1R_DDR50SUP (_U_(0x1) << SDHC_CA1R_DDR50SUP_Pos)
1990 #define SDHC_CA1R_DDR50SUP_NO_Val _U_(0x0)
1991 #define SDHC_CA1R_DDR50SUP_YES_Val _U_(0x1)
1992 #define SDHC_CA1R_DDR50SUP_NO (SDHC_CA1R_DDR50SUP_NO_Val << SDHC_CA1R_DDR50SUP_Pos)
1993 #define SDHC_CA1R_DDR50SUP_YES (SDHC_CA1R_DDR50SUP_YES_Val << SDHC_CA1R_DDR50SUP_Pos)
1994 #define SDHC_CA1R_DRVASUP_Pos 4
1995 #define SDHC_CA1R_DRVASUP (_U_(0x1) << SDHC_CA1R_DRVASUP_Pos)
1996 #define SDHC_CA1R_DRVASUP_NO_Val _U_(0x0)
1997 #define SDHC_CA1R_DRVASUP_YES_Val _U_(0x1)
1998 #define SDHC_CA1R_DRVASUP_NO (SDHC_CA1R_DRVASUP_NO_Val << SDHC_CA1R_DRVASUP_Pos)
1999 #define SDHC_CA1R_DRVASUP_YES (SDHC_CA1R_DRVASUP_YES_Val << SDHC_CA1R_DRVASUP_Pos)
2000 #define SDHC_CA1R_DRVCSUP_Pos 5
2001 #define SDHC_CA1R_DRVCSUP (_U_(0x1) << SDHC_CA1R_DRVCSUP_Pos)
2002 #define SDHC_CA1R_DRVCSUP_NO_Val _U_(0x0)
2003 #define SDHC_CA1R_DRVCSUP_YES_Val _U_(0x1)
2004 #define SDHC_CA1R_DRVCSUP_NO (SDHC_CA1R_DRVCSUP_NO_Val << SDHC_CA1R_DRVCSUP_Pos)
2005 #define SDHC_CA1R_DRVCSUP_YES (SDHC_CA1R_DRVCSUP_YES_Val << SDHC_CA1R_DRVCSUP_Pos)
2006 #define SDHC_CA1R_DRVDSUP_Pos 6
2007 #define SDHC_CA1R_DRVDSUP (_U_(0x1) << SDHC_CA1R_DRVDSUP_Pos)
2008 #define SDHC_CA1R_DRVDSUP_NO_Val _U_(0x0)
2009 #define SDHC_CA1R_DRVDSUP_YES_Val _U_(0x1)
2010 #define SDHC_CA1R_DRVDSUP_NO (SDHC_CA1R_DRVDSUP_NO_Val << SDHC_CA1R_DRVDSUP_Pos)
2011 #define SDHC_CA1R_DRVDSUP_YES (SDHC_CA1R_DRVDSUP_YES_Val << SDHC_CA1R_DRVDSUP_Pos)
2012 #define SDHC_CA1R_TCNTRT_Pos 8
2013 #define SDHC_CA1R_TCNTRT_Msk (_U_(0xF) << SDHC_CA1R_TCNTRT_Pos)
2014 #define SDHC_CA1R_TCNTRT(value) (SDHC_CA1R_TCNTRT_Msk & ((value) << SDHC_CA1R_TCNTRT_Pos))
2015 #define SDHC_CA1R_TCNTRT_DISABLED_Val _U_(0x0)
2016 #define SDHC_CA1R_TCNTRT_1S_Val _U_(0x1)
2017 #define SDHC_CA1R_TCNTRT_2S_Val _U_(0x2)
2018 #define SDHC_CA1R_TCNTRT_4S_Val _U_(0x3)
2019 #define SDHC_CA1R_TCNTRT_8S_Val _U_(0x4)
2020 #define SDHC_CA1R_TCNTRT_16S_Val _U_(0x5)
2021 #define SDHC_CA1R_TCNTRT_32S_Val _U_(0x6)
2022 #define SDHC_CA1R_TCNTRT_64S_Val _U_(0x7)
2023 #define SDHC_CA1R_TCNTRT_128S_Val _U_(0x8)
2024 #define SDHC_CA1R_TCNTRT_256S_Val _U_(0x9)
2025 #define SDHC_CA1R_TCNTRT_512S_Val _U_(0xA)
2026 #define SDHC_CA1R_TCNTRT_1024S_Val _U_(0xB)
2027 #define SDHC_CA1R_TCNTRT_OTHER_Val _U_(0xF)
2028 #define SDHC_CA1R_TCNTRT_DISABLED (SDHC_CA1R_TCNTRT_DISABLED_Val << SDHC_CA1R_TCNTRT_Pos)
2029 #define SDHC_CA1R_TCNTRT_1S (SDHC_CA1R_TCNTRT_1S_Val << SDHC_CA1R_TCNTRT_Pos)
2030 #define SDHC_CA1R_TCNTRT_2S (SDHC_CA1R_TCNTRT_2S_Val << SDHC_CA1R_TCNTRT_Pos)
2031 #define SDHC_CA1R_TCNTRT_4S (SDHC_CA1R_TCNTRT_4S_Val << SDHC_CA1R_TCNTRT_Pos)
2032 #define SDHC_CA1R_TCNTRT_8S (SDHC_CA1R_TCNTRT_8S_Val << SDHC_CA1R_TCNTRT_Pos)
2033 #define SDHC_CA1R_TCNTRT_16S (SDHC_CA1R_TCNTRT_16S_Val << SDHC_CA1R_TCNTRT_Pos)
2034 #define SDHC_CA1R_TCNTRT_32S (SDHC_CA1R_TCNTRT_32S_Val << SDHC_CA1R_TCNTRT_Pos)
2035 #define SDHC_CA1R_TCNTRT_64S (SDHC_CA1R_TCNTRT_64S_Val << SDHC_CA1R_TCNTRT_Pos)
2036 #define SDHC_CA1R_TCNTRT_128S (SDHC_CA1R_TCNTRT_128S_Val << SDHC_CA1R_TCNTRT_Pos)
2037 #define SDHC_CA1R_TCNTRT_256S (SDHC_CA1R_TCNTRT_256S_Val << SDHC_CA1R_TCNTRT_Pos)
2038 #define SDHC_CA1R_TCNTRT_512S (SDHC_CA1R_TCNTRT_512S_Val << SDHC_CA1R_TCNTRT_Pos)
2039 #define SDHC_CA1R_TCNTRT_1024S (SDHC_CA1R_TCNTRT_1024S_Val << SDHC_CA1R_TCNTRT_Pos)
2040 #define SDHC_CA1R_TCNTRT_OTHER (SDHC_CA1R_TCNTRT_OTHER_Val << SDHC_CA1R_TCNTRT_Pos)
2041 #define SDHC_CA1R_TSDR50_Pos 13
2042 #define SDHC_CA1R_TSDR50 (_U_(0x1) << SDHC_CA1R_TSDR50_Pos)
2043 #define SDHC_CA1R_TSDR50_NO_Val _U_(0x0)
2044 #define SDHC_CA1R_TSDR50_YES_Val _U_(0x1)
2045 #define SDHC_CA1R_TSDR50_NO (SDHC_CA1R_TSDR50_NO_Val << SDHC_CA1R_TSDR50_Pos)
2046 #define SDHC_CA1R_TSDR50_YES (SDHC_CA1R_TSDR50_YES_Val << SDHC_CA1R_TSDR50_Pos)
2047 #define SDHC_CA1R_CLKMULT_Pos 16
2048 #define SDHC_CA1R_CLKMULT_Msk (_U_(0xFF) << SDHC_CA1R_CLKMULT_Pos)
2049 #define SDHC_CA1R_CLKMULT(value) (SDHC_CA1R_CLKMULT_Msk & ((value) << SDHC_CA1R_CLKMULT_Pos))
2050 #define SDHC_CA1R_CLKMULT_NO_Val _U_(0x0)
2051 #define SDHC_CA1R_CLKMULT_NO (SDHC_CA1R_CLKMULT_NO_Val << SDHC_CA1R_CLKMULT_Pos)
2052 #define SDHC_CA1R_MASK _U_(0x00FF2F77)
2054 /* -------- SDHC_MCCAR : (SDHC Offset: 0x048) (R/ 32) Maximum Current Capabilities -------- */
2055 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
2056 typedef union {
2057  struct {
2058  uint32_t MAXCUR33V:8;
2059  uint32_t MAXCUR30V:8;
2060  uint32_t MAXCUR18V:8;
2061  uint32_t :8;
2062  } bit;
2063  uint32_t reg;
2064 } SDHC_MCCAR_Type;
2065 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
2066 
2067 #define SDHC_MCCAR_OFFSET 0x048
2068 #define SDHC_MCCAR_RESETVALUE _U_(0x00000000)
2070 #define SDHC_MCCAR_MAXCUR33V_Pos 0
2071 #define SDHC_MCCAR_MAXCUR33V_Msk (_U_(0xFF) << SDHC_MCCAR_MAXCUR33V_Pos)
2072 #define SDHC_MCCAR_MAXCUR33V(value) (SDHC_MCCAR_MAXCUR33V_Msk & ((value) << SDHC_MCCAR_MAXCUR33V_Pos))
2073 #define SDHC_MCCAR_MAXCUR33V_OTHER_Val _U_(0x0)
2074 #define SDHC_MCCAR_MAXCUR33V_4MA_Val _U_(0x1)
2075 #define SDHC_MCCAR_MAXCUR33V_8MA_Val _U_(0x2)
2076 #define SDHC_MCCAR_MAXCUR33V_12MA_Val _U_(0x3)
2077 #define SDHC_MCCAR_MAXCUR33V_OTHER (SDHC_MCCAR_MAXCUR33V_OTHER_Val << SDHC_MCCAR_MAXCUR33V_Pos)
2078 #define SDHC_MCCAR_MAXCUR33V_4MA (SDHC_MCCAR_MAXCUR33V_4MA_Val << SDHC_MCCAR_MAXCUR33V_Pos)
2079 #define SDHC_MCCAR_MAXCUR33V_8MA (SDHC_MCCAR_MAXCUR33V_8MA_Val << SDHC_MCCAR_MAXCUR33V_Pos)
2080 #define SDHC_MCCAR_MAXCUR33V_12MA (SDHC_MCCAR_MAXCUR33V_12MA_Val << SDHC_MCCAR_MAXCUR33V_Pos)
2081 #define SDHC_MCCAR_MAXCUR30V_Pos 8
2082 #define SDHC_MCCAR_MAXCUR30V_Msk (_U_(0xFF) << SDHC_MCCAR_MAXCUR30V_Pos)
2083 #define SDHC_MCCAR_MAXCUR30V(value) (SDHC_MCCAR_MAXCUR30V_Msk & ((value) << SDHC_MCCAR_MAXCUR30V_Pos))
2084 #define SDHC_MCCAR_MAXCUR30V_OTHER_Val _U_(0x0)
2085 #define SDHC_MCCAR_MAXCUR30V_4MA_Val _U_(0x1)
2086 #define SDHC_MCCAR_MAXCUR30V_8MA_Val _U_(0x2)
2087 #define SDHC_MCCAR_MAXCUR30V_12MA_Val _U_(0x3)
2088 #define SDHC_MCCAR_MAXCUR30V_OTHER (SDHC_MCCAR_MAXCUR30V_OTHER_Val << SDHC_MCCAR_MAXCUR30V_Pos)
2089 #define SDHC_MCCAR_MAXCUR30V_4MA (SDHC_MCCAR_MAXCUR30V_4MA_Val << SDHC_MCCAR_MAXCUR30V_Pos)
2090 #define SDHC_MCCAR_MAXCUR30V_8MA (SDHC_MCCAR_MAXCUR30V_8MA_Val << SDHC_MCCAR_MAXCUR30V_Pos)
2091 #define SDHC_MCCAR_MAXCUR30V_12MA (SDHC_MCCAR_MAXCUR30V_12MA_Val << SDHC_MCCAR_MAXCUR30V_Pos)
2092 #define SDHC_MCCAR_MAXCUR18V_Pos 16
2093 #define SDHC_MCCAR_MAXCUR18V_Msk (_U_(0xFF) << SDHC_MCCAR_MAXCUR18V_Pos)
2094 #define SDHC_MCCAR_MAXCUR18V(value) (SDHC_MCCAR_MAXCUR18V_Msk & ((value) << SDHC_MCCAR_MAXCUR18V_Pos))
2095 #define SDHC_MCCAR_MAXCUR18V_OTHER_Val _U_(0x0)
2096 #define SDHC_MCCAR_MAXCUR18V_4MA_Val _U_(0x1)
2097 #define SDHC_MCCAR_MAXCUR18V_8MA_Val _U_(0x2)
2098 #define SDHC_MCCAR_MAXCUR18V_12MA_Val _U_(0x3)
2099 #define SDHC_MCCAR_MAXCUR18V_OTHER (SDHC_MCCAR_MAXCUR18V_OTHER_Val << SDHC_MCCAR_MAXCUR18V_Pos)
2100 #define SDHC_MCCAR_MAXCUR18V_4MA (SDHC_MCCAR_MAXCUR18V_4MA_Val << SDHC_MCCAR_MAXCUR18V_Pos)
2101 #define SDHC_MCCAR_MAXCUR18V_8MA (SDHC_MCCAR_MAXCUR18V_8MA_Val << SDHC_MCCAR_MAXCUR18V_Pos)
2102 #define SDHC_MCCAR_MAXCUR18V_12MA (SDHC_MCCAR_MAXCUR18V_12MA_Val << SDHC_MCCAR_MAXCUR18V_Pos)
2103 #define SDHC_MCCAR_MASK _U_(0x00FFFFFF)
2105 /* -------- SDHC_FERACES : (SDHC Offset: 0x050) ( /W 16) Force Event for Auto CMD Error Status -------- */
2106 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
2107 typedef union {
2108  struct {
2109  uint16_t ACMD12NE:1;
2110  uint16_t ACMDTEO:1;
2111  uint16_t ACMDCRC:1;
2112  uint16_t ACMDEND:1;
2113  uint16_t ACMDIDX:1;
2114  uint16_t :2;
2115  uint16_t CMDNI:1;
2116  uint16_t :8;
2117  } bit;
2118  uint16_t reg;
2120 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
2121 
2122 #define SDHC_FERACES_OFFSET 0x050
2123 #define SDHC_FERACES_RESETVALUE _U_(0x0000)
2125 #define SDHC_FERACES_ACMD12NE_Pos 0
2126 #define SDHC_FERACES_ACMD12NE (_U_(0x1) << SDHC_FERACES_ACMD12NE_Pos)
2127 #define SDHC_FERACES_ACMD12NE_NO_Val _U_(0x0)
2128 #define SDHC_FERACES_ACMD12NE_YES_Val _U_(0x1)
2129 #define SDHC_FERACES_ACMD12NE_NO (SDHC_FERACES_ACMD12NE_NO_Val << SDHC_FERACES_ACMD12NE_Pos)
2130 #define SDHC_FERACES_ACMD12NE_YES (SDHC_FERACES_ACMD12NE_YES_Val << SDHC_FERACES_ACMD12NE_Pos)
2131 #define SDHC_FERACES_ACMDTEO_Pos 1
2132 #define SDHC_FERACES_ACMDTEO (_U_(0x1) << SDHC_FERACES_ACMDTEO_Pos)
2133 #define SDHC_FERACES_ACMDTEO_NO_Val _U_(0x0)
2134 #define SDHC_FERACES_ACMDTEO_YES_Val _U_(0x1)
2135 #define SDHC_FERACES_ACMDTEO_NO (SDHC_FERACES_ACMDTEO_NO_Val << SDHC_FERACES_ACMDTEO_Pos)
2136 #define SDHC_FERACES_ACMDTEO_YES (SDHC_FERACES_ACMDTEO_YES_Val << SDHC_FERACES_ACMDTEO_Pos)
2137 #define SDHC_FERACES_ACMDCRC_Pos 2
2138 #define SDHC_FERACES_ACMDCRC (_U_(0x1) << SDHC_FERACES_ACMDCRC_Pos)
2139 #define SDHC_FERACES_ACMDCRC_NO_Val _U_(0x0)
2140 #define SDHC_FERACES_ACMDCRC_YES_Val _U_(0x1)
2141 #define SDHC_FERACES_ACMDCRC_NO (SDHC_FERACES_ACMDCRC_NO_Val << SDHC_FERACES_ACMDCRC_Pos)
2142 #define SDHC_FERACES_ACMDCRC_YES (SDHC_FERACES_ACMDCRC_YES_Val << SDHC_FERACES_ACMDCRC_Pos)
2143 #define SDHC_FERACES_ACMDEND_Pos 3
2144 #define SDHC_FERACES_ACMDEND (_U_(0x1) << SDHC_FERACES_ACMDEND_Pos)
2145 #define SDHC_FERACES_ACMDEND_NO_Val _U_(0x0)
2146 #define SDHC_FERACES_ACMDEND_YES_Val _U_(0x1)
2147 #define SDHC_FERACES_ACMDEND_NO (SDHC_FERACES_ACMDEND_NO_Val << SDHC_FERACES_ACMDEND_Pos)
2148 #define SDHC_FERACES_ACMDEND_YES (SDHC_FERACES_ACMDEND_YES_Val << SDHC_FERACES_ACMDEND_Pos)
2149 #define SDHC_FERACES_ACMDIDX_Pos 4
2150 #define SDHC_FERACES_ACMDIDX (_U_(0x1) << SDHC_FERACES_ACMDIDX_Pos)
2151 #define SDHC_FERACES_ACMDIDX_NO_Val _U_(0x0)
2152 #define SDHC_FERACES_ACMDIDX_YES_Val _U_(0x1)
2153 #define SDHC_FERACES_ACMDIDX_NO (SDHC_FERACES_ACMDIDX_NO_Val << SDHC_FERACES_ACMDIDX_Pos)
2154 #define SDHC_FERACES_ACMDIDX_YES (SDHC_FERACES_ACMDIDX_YES_Val << SDHC_FERACES_ACMDIDX_Pos)
2155 #define SDHC_FERACES_CMDNI_Pos 7
2156 #define SDHC_FERACES_CMDNI (_U_(0x1) << SDHC_FERACES_CMDNI_Pos)
2157 #define SDHC_FERACES_CMDNI_NO_Val _U_(0x0)
2158 #define SDHC_FERACES_CMDNI_YES_Val _U_(0x1)
2159 #define SDHC_FERACES_CMDNI_NO (SDHC_FERACES_CMDNI_NO_Val << SDHC_FERACES_CMDNI_Pos)
2160 #define SDHC_FERACES_CMDNI_YES (SDHC_FERACES_CMDNI_YES_Val << SDHC_FERACES_CMDNI_Pos)
2161 #define SDHC_FERACES_MASK _U_(0x009F)
2163 /* -------- SDHC_FEREIS : (SDHC Offset: 0x052) ( /W 16) Force Event for Error Interrupt Status -------- */
2164 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
2165 typedef union {
2166  struct {
2167  uint16_t CMDTEO:1;
2168  uint16_t CMDCRC:1;
2169  uint16_t CMDEND:1;
2170  uint16_t CMDIDX:1;
2171  uint16_t DATTEO:1;
2172  uint16_t DATCRC:1;
2173  uint16_t DATEND:1;
2174  uint16_t CURLIM:1;
2175  uint16_t ACMD:1;
2176  uint16_t ADMA:1;
2177  uint16_t :2;
2178  uint16_t BOOTAE:1;
2179  uint16_t :3;
2180  } bit;
2181  uint16_t reg;
2183 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
2184 
2185 #define SDHC_FEREIS_OFFSET 0x052
2186 #define SDHC_FEREIS_RESETVALUE _U_(0x0000)
2188 #define SDHC_FEREIS_CMDTEO_Pos 0
2189 #define SDHC_FEREIS_CMDTEO (_U_(0x1) << SDHC_FEREIS_CMDTEO_Pos)
2190 #define SDHC_FEREIS_CMDTEO_NO_Val _U_(0x0)
2191 #define SDHC_FEREIS_CMDTEO_YES_Val _U_(0x1)
2192 #define SDHC_FEREIS_CMDTEO_NO (SDHC_FEREIS_CMDTEO_NO_Val << SDHC_FEREIS_CMDTEO_Pos)
2193 #define SDHC_FEREIS_CMDTEO_YES (SDHC_FEREIS_CMDTEO_YES_Val << SDHC_FEREIS_CMDTEO_Pos)
2194 #define SDHC_FEREIS_CMDCRC_Pos 1
2195 #define SDHC_FEREIS_CMDCRC (_U_(0x1) << SDHC_FEREIS_CMDCRC_Pos)
2196 #define SDHC_FEREIS_CMDCRC_NO_Val _U_(0x0)
2197 #define SDHC_FEREIS_CMDCRC_YES_Val _U_(0x1)
2198 #define SDHC_FEREIS_CMDCRC_NO (SDHC_FEREIS_CMDCRC_NO_Val << SDHC_FEREIS_CMDCRC_Pos)
2199 #define SDHC_FEREIS_CMDCRC_YES (SDHC_FEREIS_CMDCRC_YES_Val << SDHC_FEREIS_CMDCRC_Pos)
2200 #define SDHC_FEREIS_CMDEND_Pos 2
2201 #define SDHC_FEREIS_CMDEND (_U_(0x1) << SDHC_FEREIS_CMDEND_Pos)
2202 #define SDHC_FEREIS_CMDEND_NO_Val _U_(0x0)
2203 #define SDHC_FEREIS_CMDEND_YES_Val _U_(0x1)
2204 #define SDHC_FEREIS_CMDEND_NO (SDHC_FEREIS_CMDEND_NO_Val << SDHC_FEREIS_CMDEND_Pos)
2205 #define SDHC_FEREIS_CMDEND_YES (SDHC_FEREIS_CMDEND_YES_Val << SDHC_FEREIS_CMDEND_Pos)
2206 #define SDHC_FEREIS_CMDIDX_Pos 3
2207 #define SDHC_FEREIS_CMDIDX (_U_(0x1) << SDHC_FEREIS_CMDIDX_Pos)
2208 #define SDHC_FEREIS_CMDIDX_NO_Val _U_(0x0)
2209 #define SDHC_FEREIS_CMDIDX_YES_Val _U_(0x1)
2210 #define SDHC_FEREIS_CMDIDX_NO (SDHC_FEREIS_CMDIDX_NO_Val << SDHC_FEREIS_CMDIDX_Pos)
2211 #define SDHC_FEREIS_CMDIDX_YES (SDHC_FEREIS_CMDIDX_YES_Val << SDHC_FEREIS_CMDIDX_Pos)
2212 #define SDHC_FEREIS_DATTEO_Pos 4
2213 #define SDHC_FEREIS_DATTEO (_U_(0x1) << SDHC_FEREIS_DATTEO_Pos)
2214 #define SDHC_FEREIS_DATTEO_NO_Val _U_(0x0)
2215 #define SDHC_FEREIS_DATTEO_YES_Val _U_(0x1)
2216 #define SDHC_FEREIS_DATTEO_NO (SDHC_FEREIS_DATTEO_NO_Val << SDHC_FEREIS_DATTEO_Pos)
2217 #define SDHC_FEREIS_DATTEO_YES (SDHC_FEREIS_DATTEO_YES_Val << SDHC_FEREIS_DATTEO_Pos)
2218 #define SDHC_FEREIS_DATCRC_Pos 5
2219 #define SDHC_FEREIS_DATCRC (_U_(0x1) << SDHC_FEREIS_DATCRC_Pos)
2220 #define SDHC_FEREIS_DATCRC_NO_Val _U_(0x0)
2221 #define SDHC_FEREIS_DATCRC_YES_Val _U_(0x1)
2222 #define SDHC_FEREIS_DATCRC_NO (SDHC_FEREIS_DATCRC_NO_Val << SDHC_FEREIS_DATCRC_Pos)
2223 #define SDHC_FEREIS_DATCRC_YES (SDHC_FEREIS_DATCRC_YES_Val << SDHC_FEREIS_DATCRC_Pos)
2224 #define SDHC_FEREIS_DATEND_Pos 6
2225 #define SDHC_FEREIS_DATEND (_U_(0x1) << SDHC_FEREIS_DATEND_Pos)
2226 #define SDHC_FEREIS_DATEND_NO_Val _U_(0x0)
2227 #define SDHC_FEREIS_DATEND_YES_Val _U_(0x1)
2228 #define SDHC_FEREIS_DATEND_NO (SDHC_FEREIS_DATEND_NO_Val << SDHC_FEREIS_DATEND_Pos)
2229 #define SDHC_FEREIS_DATEND_YES (SDHC_FEREIS_DATEND_YES_Val << SDHC_FEREIS_DATEND_Pos)
2230 #define SDHC_FEREIS_CURLIM_Pos 7
2231 #define SDHC_FEREIS_CURLIM (_U_(0x1) << SDHC_FEREIS_CURLIM_Pos)
2232 #define SDHC_FEREIS_CURLIM_NO_Val _U_(0x0)
2233 #define SDHC_FEREIS_CURLIM_YES_Val _U_(0x1)
2234 #define SDHC_FEREIS_CURLIM_NO (SDHC_FEREIS_CURLIM_NO_Val << SDHC_FEREIS_CURLIM_Pos)
2235 #define SDHC_FEREIS_CURLIM_YES (SDHC_FEREIS_CURLIM_YES_Val << SDHC_FEREIS_CURLIM_Pos)
2236 #define SDHC_FEREIS_ACMD_Pos 8
2237 #define SDHC_FEREIS_ACMD (_U_(0x1) << SDHC_FEREIS_ACMD_Pos)
2238 #define SDHC_FEREIS_ACMD_NO_Val _U_(0x0)
2239 #define SDHC_FEREIS_ACMD_YES_Val _U_(0x1)
2240 #define SDHC_FEREIS_ACMD_NO (SDHC_FEREIS_ACMD_NO_Val << SDHC_FEREIS_ACMD_Pos)
2241 #define SDHC_FEREIS_ACMD_YES (SDHC_FEREIS_ACMD_YES_Val << SDHC_FEREIS_ACMD_Pos)
2242 #define SDHC_FEREIS_ADMA_Pos 9
2243 #define SDHC_FEREIS_ADMA (_U_(0x1) << SDHC_FEREIS_ADMA_Pos)
2244 #define SDHC_FEREIS_ADMA_NO_Val _U_(0x0)
2245 #define SDHC_FEREIS_ADMA_YES_Val _U_(0x1)
2246 #define SDHC_FEREIS_ADMA_NO (SDHC_FEREIS_ADMA_NO_Val << SDHC_FEREIS_ADMA_Pos)
2247 #define SDHC_FEREIS_ADMA_YES (SDHC_FEREIS_ADMA_YES_Val << SDHC_FEREIS_ADMA_Pos)
2248 #define SDHC_FEREIS_BOOTAE_Pos 12
2249 #define SDHC_FEREIS_BOOTAE (_U_(0x1) << SDHC_FEREIS_BOOTAE_Pos)
2250 #define SDHC_FEREIS_BOOTAE_NO_Val _U_(0x0)
2251 #define SDHC_FEREIS_BOOTAE_YES_Val _U_(0x1)
2252 #define SDHC_FEREIS_BOOTAE_NO (SDHC_FEREIS_BOOTAE_NO_Val << SDHC_FEREIS_BOOTAE_Pos)
2253 #define SDHC_FEREIS_BOOTAE_YES (SDHC_FEREIS_BOOTAE_YES_Val << SDHC_FEREIS_BOOTAE_Pos)
2254 #define SDHC_FEREIS_MASK _U_(0x13FF)
2256 /* -------- SDHC_AESR : (SDHC Offset: 0x054) (R/ 8) ADMA Error Status -------- */
2257 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
2258 typedef union {
2259  struct {
2260  uint8_t ERRST:2;
2261  uint8_t LMIS:1;
2262  uint8_t :5;
2263  } bit;
2264  uint8_t reg;
2265 } SDHC_AESR_Type;
2266 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
2267 
2268 #define SDHC_AESR_OFFSET 0x054
2269 #define SDHC_AESR_RESETVALUE _U_(0x00)
2271 #define SDHC_AESR_ERRST_Pos 0
2272 #define SDHC_AESR_ERRST_Msk (_U_(0x3) << SDHC_AESR_ERRST_Pos)
2273 #define SDHC_AESR_ERRST(value) (SDHC_AESR_ERRST_Msk & ((value) << SDHC_AESR_ERRST_Pos))
2274 #define SDHC_AESR_ERRST_STOP_Val _U_(0x0)
2275 #define SDHC_AESR_ERRST_FDS_Val _U_(0x1)
2276 #define SDHC_AESR_ERRST_2_Val _U_(0x2)
2277 #define SDHC_AESR_ERRST_TFR_Val _U_(0x3)
2278 #define SDHC_AESR_ERRST_STOP (SDHC_AESR_ERRST_STOP_Val << SDHC_AESR_ERRST_Pos)
2279 #define SDHC_AESR_ERRST_FDS (SDHC_AESR_ERRST_FDS_Val << SDHC_AESR_ERRST_Pos)
2280 #define SDHC_AESR_ERRST_2 (SDHC_AESR_ERRST_2_Val << SDHC_AESR_ERRST_Pos)
2281 #define SDHC_AESR_ERRST_TFR (SDHC_AESR_ERRST_TFR_Val << SDHC_AESR_ERRST_Pos)
2282 #define SDHC_AESR_LMIS_Pos 2
2283 #define SDHC_AESR_LMIS (_U_(0x1) << SDHC_AESR_LMIS_Pos)
2284 #define SDHC_AESR_LMIS_NO_Val _U_(0x0)
2285 #define SDHC_AESR_LMIS_YES_Val _U_(0x1)
2286 #define SDHC_AESR_LMIS_NO (SDHC_AESR_LMIS_NO_Val << SDHC_AESR_LMIS_Pos)
2287 #define SDHC_AESR_LMIS_YES (SDHC_AESR_LMIS_YES_Val << SDHC_AESR_LMIS_Pos)
2288 #define SDHC_AESR_MASK _U_(0x07)
2290 /* -------- SDHC_ASAR : (SDHC Offset: 0x058) (R/W 32) ADMA System Address n -------- */
2291 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
2292 typedef union {
2293  struct {
2294  uint32_t ADMASA:32;
2295  } bit;
2296  uint32_t reg;
2297 } SDHC_ASAR_Type;
2298 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
2299 
2300 #define SDHC_ASAR_OFFSET 0x058
2301 #define SDHC_ASAR_RESETVALUE _U_(0x00000000)
2303 #define SDHC_ASAR_ADMASA_Pos 0
2304 #define SDHC_ASAR_ADMASA_Msk (_U_(0xFFFFFFFF) << SDHC_ASAR_ADMASA_Pos)
2305 #define SDHC_ASAR_ADMASA(value) (SDHC_ASAR_ADMASA_Msk & ((value) << SDHC_ASAR_ADMASA_Pos))
2306 #define SDHC_ASAR_MASK _U_(0xFFFFFFFF)
2308 /* -------- SDHC_PVR : (SDHC Offset: 0x060) (R/W 16) Preset Value n -------- */
2309 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
2310 typedef union {
2311  struct {
2312  uint16_t SDCLKFSEL:10;
2313  uint16_t CLKGSEL:1;
2314  uint16_t :3;
2315  uint16_t DRVSEL:2;
2316  } bit;
2317  uint16_t reg;
2318 } SDHC_PVR_Type;
2319 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
2320 
2321 #define SDHC_PVR_OFFSET 0x060
2322 #define SDHC_PVR_RESETVALUE _U_(0x0000)
2324 #define SDHC_PVR_SDCLKFSEL_Pos 0
2325 #define SDHC_PVR_SDCLKFSEL_Msk (_U_(0x3FF) << SDHC_PVR_SDCLKFSEL_Pos)
2326 #define SDHC_PVR_SDCLKFSEL(value) (SDHC_PVR_SDCLKFSEL_Msk & ((value) << SDHC_PVR_SDCLKFSEL_Pos))
2327 #define SDHC_PVR_CLKGSEL_Pos 10
2328 #define SDHC_PVR_CLKGSEL (_U_(0x1) << SDHC_PVR_CLKGSEL_Pos)
2329 #define SDHC_PVR_CLKGSEL_DIV_Val _U_(0x0)
2330 #define SDHC_PVR_CLKGSEL_PROG_Val _U_(0x1)
2331 #define SDHC_PVR_CLKGSEL_DIV (SDHC_PVR_CLKGSEL_DIV_Val << SDHC_PVR_CLKGSEL_Pos)
2332 #define SDHC_PVR_CLKGSEL_PROG (SDHC_PVR_CLKGSEL_PROG_Val << SDHC_PVR_CLKGSEL_Pos)
2333 #define SDHC_PVR_DRVSEL_Pos 14
2334 #define SDHC_PVR_DRVSEL_Msk (_U_(0x3) << SDHC_PVR_DRVSEL_Pos)
2335 #define SDHC_PVR_DRVSEL(value) (SDHC_PVR_DRVSEL_Msk & ((value) << SDHC_PVR_DRVSEL_Pos))
2336 #define SDHC_PVR_DRVSEL_B_Val _U_(0x0)
2337 #define SDHC_PVR_DRVSEL_A_Val _U_(0x1)
2338 #define SDHC_PVR_DRVSEL_C_Val _U_(0x2)
2339 #define SDHC_PVR_DRVSEL_D_Val _U_(0x3)
2340 #define SDHC_PVR_DRVSEL_B (SDHC_PVR_DRVSEL_B_Val << SDHC_PVR_DRVSEL_Pos)
2341 #define SDHC_PVR_DRVSEL_A (SDHC_PVR_DRVSEL_A_Val << SDHC_PVR_DRVSEL_Pos)
2342 #define SDHC_PVR_DRVSEL_C (SDHC_PVR_DRVSEL_C_Val << SDHC_PVR_DRVSEL_Pos)
2343 #define SDHC_PVR_DRVSEL_D (SDHC_PVR_DRVSEL_D_Val << SDHC_PVR_DRVSEL_Pos)
2344 #define SDHC_PVR_MASK _U_(0xC7FF)
2346 /* -------- SDHC_SISR : (SDHC Offset: 0x0FC) (R/ 16) Slot Interrupt Status -------- */
2347 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
2348 typedef union {
2349  struct {
2350  uint16_t INTSSL:1;
2351  uint16_t :15;
2352  } bit;
2353  uint16_t reg;
2354 } SDHC_SISR_Type;
2355 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
2356 
2357 #define SDHC_SISR_OFFSET 0x0FC
2358 #define SDHC_SISR_RESETVALUE _U_(0x20000)
2360 #define SDHC_SISR_INTSSL_Pos 0
2361 #define SDHC_SISR_INTSSL_Msk (_U_(0x1) << SDHC_SISR_INTSSL_Pos)
2362 #define SDHC_SISR_INTSSL(value) (SDHC_SISR_INTSSL_Msk & ((value) << SDHC_SISR_INTSSL_Pos))
2363 #define SDHC_SISR_MASK _U_(0x0001)
2365 /* -------- SDHC_HCVR : (SDHC Offset: 0x0FE) (R/ 16) Host Controller Version -------- */
2366 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
2367 typedef union {
2368  struct {
2369  uint16_t SVER:8;
2370  uint16_t VVER:8;
2371  } bit;
2372  uint16_t reg;
2373 } SDHC_HCVR_Type;
2374 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
2375 
2376 #define SDHC_HCVR_OFFSET 0x0FE
2377 #define SDHC_HCVR_RESETVALUE _U_(0x1802)
2379 #define SDHC_HCVR_SVER_Pos 0
2380 #define SDHC_HCVR_SVER_Msk (_U_(0xFF) << SDHC_HCVR_SVER_Pos)
2381 #define SDHC_HCVR_SVER(value) (SDHC_HCVR_SVER_Msk & ((value) << SDHC_HCVR_SVER_Pos))
2382 #define SDHC_HCVR_VVER_Pos 8
2383 #define SDHC_HCVR_VVER_Msk (_U_(0xFF) << SDHC_HCVR_VVER_Pos)
2384 #define SDHC_HCVR_VVER(value) (SDHC_HCVR_VVER_Msk & ((value) << SDHC_HCVR_VVER_Pos))
2385 #define SDHC_HCVR_MASK _U_(0xFFFF)
2387 /* -------- SDHC_MC1R : (SDHC Offset: 0x204) (R/W 8) MMC Control 1 -------- */
2388 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
2389 typedef union {
2390  struct {
2391  uint8_t CMDTYP:2;
2392  uint8_t :1;
2393  uint8_t DDR:1;
2394  uint8_t OPD:1;
2395  uint8_t BOOTA:1;
2396  uint8_t RSTN:1;
2397  uint8_t FCD:1;
2398  } bit;
2399  uint8_t reg;
2400 } SDHC_MC1R_Type;
2401 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
2402 
2403 #define SDHC_MC1R_OFFSET 0x204
2404 #define SDHC_MC1R_RESETVALUE _U_(0x00)
2406 #define SDHC_MC1R_CMDTYP_Pos 0
2407 #define SDHC_MC1R_CMDTYP_Msk (_U_(0x3) << SDHC_MC1R_CMDTYP_Pos)
2408 #define SDHC_MC1R_CMDTYP(value) (SDHC_MC1R_CMDTYP_Msk & ((value) << SDHC_MC1R_CMDTYP_Pos))
2409 #define SDHC_MC1R_CMDTYP_NORMAL_Val _U_(0x0)
2410 #define SDHC_MC1R_CMDTYP_WAITIRQ_Val _U_(0x1)
2411 #define SDHC_MC1R_CMDTYP_STREAM_Val _U_(0x2)
2412 #define SDHC_MC1R_CMDTYP_BOOT_Val _U_(0x3)
2413 #define SDHC_MC1R_CMDTYP_NORMAL (SDHC_MC1R_CMDTYP_NORMAL_Val << SDHC_MC1R_CMDTYP_Pos)
2414 #define SDHC_MC1R_CMDTYP_WAITIRQ (SDHC_MC1R_CMDTYP_WAITIRQ_Val << SDHC_MC1R_CMDTYP_Pos)
2415 #define SDHC_MC1R_CMDTYP_STREAM (SDHC_MC1R_CMDTYP_STREAM_Val << SDHC_MC1R_CMDTYP_Pos)
2416 #define SDHC_MC1R_CMDTYP_BOOT (SDHC_MC1R_CMDTYP_BOOT_Val << SDHC_MC1R_CMDTYP_Pos)
2417 #define SDHC_MC1R_DDR_Pos 3
2418 #define SDHC_MC1R_DDR (_U_(0x1) << SDHC_MC1R_DDR_Pos)
2419 #define SDHC_MC1R_OPD_Pos 4
2420 #define SDHC_MC1R_OPD (_U_(0x1) << SDHC_MC1R_OPD_Pos)
2421 #define SDHC_MC1R_BOOTA_Pos 5
2422 #define SDHC_MC1R_BOOTA (_U_(0x1) << SDHC_MC1R_BOOTA_Pos)
2423 #define SDHC_MC1R_RSTN_Pos 6
2424 #define SDHC_MC1R_RSTN (_U_(0x1) << SDHC_MC1R_RSTN_Pos)
2425 #define SDHC_MC1R_FCD_Pos 7
2426 #define SDHC_MC1R_FCD (_U_(0x1) << SDHC_MC1R_FCD_Pos)
2427 #define SDHC_MC1R_MASK _U_(0xFB)
2429 /* -------- SDHC_MC2R : (SDHC Offset: 0x205) ( /W 8) MMC Control 2 -------- */
2430 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
2431 typedef union {
2432  struct {
2433  uint8_t SRESP:1;
2434  uint8_t ABOOT:1;
2435  uint8_t :6;
2436  } bit;
2437  uint8_t reg;
2438 } SDHC_MC2R_Type;
2439 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
2440 
2441 #define SDHC_MC2R_OFFSET 0x205
2442 #define SDHC_MC2R_RESETVALUE _U_(0x00)
2444 #define SDHC_MC2R_SRESP_Pos 0
2445 #define SDHC_MC2R_SRESP (_U_(0x1) << SDHC_MC2R_SRESP_Pos)
2446 #define SDHC_MC2R_ABOOT_Pos 1
2447 #define SDHC_MC2R_ABOOT (_U_(0x1) << SDHC_MC2R_ABOOT_Pos)
2448 #define SDHC_MC2R_MASK _U_(0x03)
2450 /* -------- SDHC_ACR : (SDHC Offset: 0x208) (R/W 32) AHB Control -------- */
2451 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
2452 typedef union {
2453  struct {
2454  uint32_t BMAX:2;
2455  uint32_t :30;
2456  } bit;
2457  uint32_t reg;
2458 } SDHC_ACR_Type;
2459 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
2460 
2461 #define SDHC_ACR_OFFSET 0x208
2462 #define SDHC_ACR_RESETVALUE _U_(0x00000000)
2464 #define SDHC_ACR_BMAX_Pos 0
2465 #define SDHC_ACR_BMAX_Msk (_U_(0x3) << SDHC_ACR_BMAX_Pos)
2466 #define SDHC_ACR_BMAX(value) (SDHC_ACR_BMAX_Msk & ((value) << SDHC_ACR_BMAX_Pos))
2467 #define SDHC_ACR_BMAX_INCR16_Val _U_(0x0)
2468 #define SDHC_ACR_BMAX_INCR8_Val _U_(0x1)
2469 #define SDHC_ACR_BMAX_INCR4_Val _U_(0x2)
2470 #define SDHC_ACR_BMAX_SINGLE_Val _U_(0x3)
2471 #define SDHC_ACR_BMAX_INCR16 (SDHC_ACR_BMAX_INCR16_Val << SDHC_ACR_BMAX_Pos)
2472 #define SDHC_ACR_BMAX_INCR8 (SDHC_ACR_BMAX_INCR8_Val << SDHC_ACR_BMAX_Pos)
2473 #define SDHC_ACR_BMAX_INCR4 (SDHC_ACR_BMAX_INCR4_Val << SDHC_ACR_BMAX_Pos)
2474 #define SDHC_ACR_BMAX_SINGLE (SDHC_ACR_BMAX_SINGLE_Val << SDHC_ACR_BMAX_Pos)
2475 #define SDHC_ACR_MASK _U_(0x00000003)
2477 /* -------- SDHC_CC2R : (SDHC Offset: 0x20C) (R/W 32) Clock Control 2 -------- */
2478 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
2479 typedef union {
2480  struct {
2481  uint32_t FSDCLKD:1;
2482  uint32_t :31;
2483  } bit;
2484  uint32_t reg;
2485 } SDHC_CC2R_Type;
2486 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
2487 
2488 #define SDHC_CC2R_OFFSET 0x20C
2489 #define SDHC_CC2R_RESETVALUE _U_(0x00000000)
2491 #define SDHC_CC2R_FSDCLKD_Pos 0
2492 #define SDHC_CC2R_FSDCLKD (_U_(0x1) << SDHC_CC2R_FSDCLKD_Pos)
2493 #define SDHC_CC2R_FSDCLKD_NOEFFECT_Val _U_(0x0)
2494 #define SDHC_CC2R_FSDCLKD_DISABLE_Val _U_(0x1)
2495 #define SDHC_CC2R_FSDCLKD_NOEFFECT (SDHC_CC2R_FSDCLKD_NOEFFECT_Val << SDHC_CC2R_FSDCLKD_Pos)
2496 #define SDHC_CC2R_FSDCLKD_DISABLE (SDHC_CC2R_FSDCLKD_DISABLE_Val << SDHC_CC2R_FSDCLKD_Pos)
2497 #define SDHC_CC2R_MASK _U_(0x00000001)
2499 /* -------- SDHC_CACR : (SDHC Offset: 0x230) (R/W 32) Capabilities Control -------- */
2500 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
2501 typedef union {
2502  struct {
2503  uint32_t CAPWREN:1;
2504  uint32_t :7;
2505  uint32_t KEY:8;
2506  uint32_t :16;
2507  } bit;
2508  uint32_t reg;
2509 } SDHC_CACR_Type;
2510 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
2511 
2512 #define SDHC_CACR_OFFSET 0x230
2513 #define SDHC_CACR_RESETVALUE _U_(0x00000000)
2515 #define SDHC_CACR_CAPWREN_Pos 0
2516 #define SDHC_CACR_CAPWREN (_U_(0x1) << SDHC_CACR_CAPWREN_Pos)
2517 #define SDHC_CACR_KEY_Pos 8
2518 #define SDHC_CACR_KEY_Msk (_U_(0xFF) << SDHC_CACR_KEY_Pos)
2519 #define SDHC_CACR_KEY(value) (SDHC_CACR_KEY_Msk & ((value) << SDHC_CACR_KEY_Pos))
2520 #define SDHC_CACR_MASK _U_(0x0000FF01)
2522 /* -------- SDHC_DBGR : (SDHC Offset: 0x234) (R/W 8) Debug -------- */
2523 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
2524 typedef union {
2525  struct {
2526  uint8_t NIDBG:1;
2527  uint8_t :7;
2528  } bit;
2529  uint8_t reg;
2530 } SDHC_DBGR_Type;
2531 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
2532 
2533 #define SDHC_DBGR_OFFSET 0x234
2534 #define SDHC_DBGR_RESETVALUE _U_(0x00)
2536 #define SDHC_DBGR_NIDBG_Pos 0
2537 #define SDHC_DBGR_NIDBG (_U_(0x1) << SDHC_DBGR_NIDBG_Pos)
2538 #define SDHC_DBGR_NIDBG_IDBG_Val _U_(0x0)
2539 #define SDHC_DBGR_NIDBG_NIDBG_Val _U_(0x1)
2540 #define SDHC_DBGR_NIDBG_IDBG (SDHC_DBGR_NIDBG_IDBG_Val << SDHC_DBGR_NIDBG_Pos)
2541 #define SDHC_DBGR_NIDBG_NIDBG (SDHC_DBGR_NIDBG_NIDBG_Val << SDHC_DBGR_NIDBG_Pos)
2542 #define SDHC_DBGR_MASK _U_(0x01)
2545 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
2546 typedef struct {
2553  __I SDHC_RR_Type RR[4];
2574  RoReg8 Reserved1[0x4];
2578  RoReg8 Reserved2[0x3];
2579  __IO SDHC_ASAR_Type ASAR[1];
2580  RoReg8 Reserved3[0x4];
2581  __IO SDHC_PVR_Type PVR[8];
2582  RoReg8 Reserved4[0x8C];
2585  RoReg8 Reserved5[0x104];
2588  RoReg8 Reserved6[0x2];
2591  RoReg8 Reserved7[0x20];
2594 } Sdhc;
2595 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
2596 
2599 #endif /* _SAME54_SDHC_COMPONENT_ */
SDHC_NISTER_Type::reg
uint16_t reg
Definition: sdhc.h:1075
SDHC_HC2R_Type::DRVSEL
uint16_t DRVSEL
Definition: sdhc.h:1703
SDHC_ACESR_Type::ACMDIDX
uint16_t ACMDIDX
Definition: sdhc.h:1647
SDHC_HC1R_Type::reg
uint8_t reg
Definition: sdhc.h:428
SDHC_SRR_Type::SWRSTDAT
uint8_t SWRSTDAT
Definition: sdhc.h:707
SDHC_FEREIS_Type::CURLIM
uint16_t CURLIM
Definition: sdhc.h:2174
SDHC_NISTR_Type::BLKGE
uint16_t BLKGE
Definition: sdhc.h:743
SDHC_DBGR_Type
Definition: sdhc.h:2524
SDHC_PVR_Type
Definition: sdhc.h:2310
SDHC_FERACES_Type::ACMDTEO
uint16_t ACMDTEO
Definition: sdhc.h:2110
SDHC_MC1R_Type
Definition: sdhc.h:2389
Sdhc::FERACES
__O SDHC_FERACES_Type FERACES
Offset: 0x050 ( /W 16) Force Event for Auto CMD Error Status.
Definition: sdhc.h:2575
SDHC_PSR_Type::CMDINHC
uint32_t CMDINHC
Definition: sdhc.h:305
SDHC_NISTR_Type::BRDRDY
uint16_t BRDRDY
Definition: sdhc.h:746
SDHC_FEREIS_Type::DATCRC
uint16_t DATCRC
Definition: sdhc.h:2172
SDHC_CA0R_Type
Definition: sdhc.h:1828
Sdhc::PSR
__I SDHC_PSR_Type PSR
Offset: 0x024 (R/ 32) Present State.
Definition: sdhc.h:2555
SDHC_NISIER_Type::BLKGE
uint16_t BLKGE
Definition: sdhc.h:1350
SDHC_EISTER_Type
Definition: sdhc.h:1181
SDHC_FEREIS_Type
Definition: sdhc.h:2165
SDHC_EISTER_Type::DATCRC
uint16_t DATCRC
Definition: sdhc.h:1188
SDHC_NISTR_Type::CINS
uint16_t CINS
Definition: sdhc.h:747
Sdhc::EISTR
__IO SDHC_EISTR_Type EISTR
Offset: 0x032 (R/W 16) Error Interrupt Status.
Definition: sdhc.h:2564
SDHC_FERACES_Type::ACMDEND
uint16_t ACMDEND
Definition: sdhc.h:2112
SDHC_EISTER_Type::reg
uint16_t reg
Definition: sdhc.h:1210
SDHC_EISTER_Type::ADMA
uint16_t ADMA
Definition: sdhc.h:1192
SDHC_EISTR_Type::CURLIM
uint16_t CURLIM
Definition: sdhc.h:891
SDHC_MC1R_Type::reg
uint8_t reg
Definition: sdhc.h:2399
SDHC_MCCAR_Type::MAXCUR33V
uint32_t MAXCUR33V
Definition: sdhc.h:2058
Sdhc::PCR
__IO SDHC_PCR_Type PCR
Offset: 0x029 (R/W 8) Power Control.
Definition: sdhc.h:2557
SDHC_CA0R_Type::SRSUP
uint32_t SRSUP
Definition: sdhc.h:1840
SDHC_CR_Type::CMDTYP
uint16_t CMDTYP
Definition: sdhc.h:209
SDHC_SSAR_Type
Definition: sdhc.h:44
Sdhc::ACESR
__I SDHC_ACESR_Type ACESR
Offset: 0x03C (R/ 16) Auto CMD Error Status.
Definition: sdhc.h:2569
SDHC_NISTR_Type
Definition: sdhc.h:739
SDHC_CA0R_Type::BASECLKF
uint32_t BASECLKF
Definition: sdhc.h:1833
SDHC_CA0R_Type::TEOCLKF
uint32_t TEOCLKF
Definition: sdhc.h:1830
Sdhc::TMR
__IO SDHC_TMR_Type TMR
Offset: 0x00C (R/W 16) Transfer Mode.
Definition: sdhc.h:2551
SDHC_TMR_Type
Definition: sdhc.h:147
SDHC_FEREIS_Type::CMDIDX
uint16_t CMDIDX
Definition: sdhc.h:2170
Sdhc::NISTER
__IO SDHC_NISTER_Type NISTER
Offset: 0x034 (R/W 16) Normal Interrupt Status Enable.
Definition: sdhc.h:2565
SDHC_CA1R_Type::DRVDSUP
uint32_t DRVDSUP
Definition: sdhc.h:1960
SDHC_NISIER_Type::CMDC
uint16_t CMDC
Definition: sdhc.h:1348
SDHC_CA0R_Type::V18VSUP
uint32_t V18VSUP
Definition: sdhc.h:1843
Sdhc::BDPR
__IO SDHC_BDPR_Type BDPR
Offset: 0x020 (R/W 32) Buffer Data Port.
Definition: sdhc.h:2554
SDHC_MC2R_Type::ABOOT
uint8_t ABOOT
Definition: sdhc.h:2434
SDHC_ASAR_Type::ADMASA
uint32_t ADMASA
Definition: sdhc.h:2294
SDHC_CC2R_Type::reg
uint32_t reg
Definition: sdhc.h:2484
Sdhc::SSAR
__IO SDHC_SSAR_Type SSAR
Offset: 0x000 (R/W 32) SDMA System Address / Argument 2.
Definition: sdhc.h:2547
Sdhc::CCR
__IO SDHC_CCR_Type CCR
Offset: 0x02C (R/W 16) Clock Control.
Definition: sdhc.h:2560
SDHC_EISTR_Type::CMDIDX
uint16_t CMDIDX
Definition: sdhc.h:887
SDHC_CR_Type::RESPTYP
uint16_t RESPTYP
Definition: sdhc.h:204
SDHC_CACR_Type::CAPWREN
uint32_t CAPWREN
Definition: sdhc.h:2503
SDHC_EISTR_Type::BOOTAE
uint16_t BOOTAE
Definition: sdhc.h:908
Sdhc::ACR
__IO SDHC_ACR_Type ACR
Offset: 0x208 (R/W 32) AHB Control.
Definition: sdhc.h:2589
SDHC_AESR_Type::ERRST
uint8_t ERRST
Definition: sdhc.h:2260
SDHC_DBGR_Type::reg
uint8_t reg
Definition: sdhc.h:2529
SDHC_NISTER_Type::BWRRDY
uint16_t BWRRDY
Definition: sdhc.h:1057
SDHC_CA1R_Type::DRVCSUP
uint32_t DRVCSUP
Definition: sdhc.h:1959
SDHC_FERACES_Type::reg
uint16_t reg
Definition: sdhc.h:2118
SDHC_NISTR_Type::BWRRDY
uint16_t BWRRDY
Definition: sdhc.h:745
SDHC_SISR_Type
Definition: sdhc.h:2348
SDHC_TMR_Type::MSBSEL
uint16_t MSBSEL
Definition: sdhc.h:153
SDHC_NISTR_Type::reg
uint16_t reg
Definition: sdhc.h:764
SDHC_NISTR_Type::CREM
uint16_t CREM
Definition: sdhc.h:748
SDHC_ACR_Type::BMAX
uint32_t BMAX
Definition: sdhc.h:2454
SDHC_CCR_Type::INTCLKEN
uint16_t INTCLKEN
Definition: sdhc.h:635
SDHC_PVR_Type::DRVSEL
uint16_t DRVSEL
Definition: sdhc.h:2315
SDHC_BSR_Type::BOUNDARY
uint16_t BOUNDARY
Definition: sdhc.h:75
SDHC_WCR_Type::reg
uint8_t reg
Definition: sdhc.h:604
SDHC_ACESR_Type
Definition: sdhc.h:1641
SDHC_CA1R_Type::TCNTRT
uint32_t TCNTRT
Definition: sdhc.h:1962
SDHC_TMR_Type::DTDSEL
uint16_t DTDSEL
Definition: sdhc.h:152
SDHC_PSR_Type::DATLL
uint32_t DATLL
Definition: sdhc.h:319
Sdhc::TCR
__IO SDHC_TCR_Type TCR
Offset: 0x02E (R/W 8) Timeout Control.
Definition: sdhc.h:2561
SDHC_MCCAR_Type
Definition: sdhc.h:2056
SDHC_HC1R_Type
Definition: sdhc.h:411
SDHC_CA0R_Type::reg
uint32_t reg
Definition: sdhc.h:1849
SDHC_HC1R_Type::DW
uint8_t DW
Definition: sdhc.h:414
SDHC_NISIER_Type::BRDRDY
uint16_t BRDRDY
Definition: sdhc.h:1353
SDHC_EISTR_Type::CMDTEO
uint16_t CMDTEO
Definition: sdhc.h:884
SDHC_ACESR_Type::ACMDEND
uint16_t ACMDEND
Definition: sdhc.h:1646
SDHC_PSR_Type::reg
uint32_t reg
Definition: sdhc.h:323
SDHC_EISTER_Type::CMDTEO
uint16_t CMDTEO
Definition: sdhc.h:1183
SDHC_NISTER_Type::CREM
uint16_t CREM
Definition: sdhc.h:1060
SDHC_EISIER_Type::CMDEND
uint16_t CMDEND
Definition: sdhc.h:1480
SDHC_RR_Type::CMDRESP
uint32_t CMDRESP
Definition: sdhc.h:269
SDHC_CA1R_Type::DRVASUP
uint32_t DRVASUP
Definition: sdhc.h:1958
SDHC_TMR_Type::ACMDEN
uint16_t ACMDEN
Definition: sdhc.h:151
SDHC_EISTER_Type::BOOTAE
uint16_t BOOTAE
Definition: sdhc.h:1207
SDHC_AESR_Type
Definition: sdhc.h:2258
Sdhc::MC2R
__O SDHC_MC2R_Type MC2R
Offset: 0x205 ( /W 8) MMC Control 2.
Definition: sdhc.h:2587
SDHC_WCR_Type::WKENCREM
uint8_t WKENCREM
Definition: sdhc.h:601
SDHC_HCVR_Type::SVER
uint16_t SVER
Definition: sdhc.h:2369
SDHC_MC1R_Type::FCD
uint8_t FCD
Definition: sdhc.h:2397
SDHC_BGCR_Type
Definition: sdhc.h:534
SDHC_PVR_Type::CLKGSEL
uint16_t CLKGSEL
Definition: sdhc.h:2313
SDHC_CR_Type
Definition: sdhc.h:202
SDHC_NISTER_Type::CINT
uint16_t CINT
Definition: sdhc.h:1061
SDHC_HC2R_Type::UHSMS
uint16_t UHSMS
Definition: sdhc.h:1701
SDHC_PSR_Type::CMDINHD
uint32_t CMDINHD
Definition: sdhc.h:306
Sdhc::MC1R
__IO SDHC_MC1R_Type MC1R
Offset: 0x204 (R/W 8) MMC Control 1.
Definition: sdhc.h:2586
SDHC_PSR_Type::WTACT
uint32_t WTACT
Definition: sdhc.h:310
Sdhc::WCR
__IO SDHC_WCR_Type WCR
Offset: 0x02B (R/W 8) Wakeup Control.
Definition: sdhc.h:2559
SDHC_CA1R_Type::reg
uint32_t reg
Definition: sdhc.h:1969
SDHC_EISIER_Type::CMDIDX
uint16_t CMDIDX
Definition: sdhc.h:1481
SDHC_HC1R_Type::LEDCTRL
uint8_t LEDCTRL
Definition: sdhc.h:413
SDHC_PSR_Type::BUFWREN
uint32_t BUFWREN
Definition: sdhc.h:312
SDHC_FERACES_Type::ACMDCRC
uint16_t ACMDCRC
Definition: sdhc.h:2111
SDHC_TMR_Type::reg
uint16_t reg
Definition: sdhc.h:156
SDHC_EISIER_Type
Definition: sdhc.h:1476
SDHC_NISTER_Type
Definition: sdhc.h:1051
SDHC_CA1R_Type::TSDR50
uint32_t TSDR50
Definition: sdhc.h:1964
SDHC_BCR_Type::BCNT
uint16_t BCNT
Definition: sdhc.h:113
SDHC_MC1R_Type::CMDTYP
uint8_t CMDTYP
Definition: sdhc.h:2391
SDHC_NISTER_Type::TRFC
uint16_t TRFC
Definition: sdhc.h:1054
SDHC_EISTER_Type::CURLIM
uint16_t CURLIM
Definition: sdhc.h:1190
SDHC_ASAR_Type
Definition: sdhc.h:2292
SDHC_CA0R_Type::SLTYPE
uint32_t SLTYPE
Definition: sdhc.h:1847
Sdhc::NISIER
__IO SDHC_NISIER_Type NISIER
Offset: 0x038 (R/W 16) Normal Interrupt Signal Enable.
Definition: sdhc.h:2567
SDHC_CACR_Type::KEY
uint32_t KEY
Definition: sdhc.h:2505
SDHC_SRR_Type::reg
uint8_t reg
Definition: sdhc.h:710
SDHC_HC2R_Type::ASINTEN
uint16_t ASINTEN
Definition: sdhc.h:1707
SDHC_EISTER_Type::ACMD
uint16_t ACMD
Definition: sdhc.h:1191
SDHC_FEREIS_Type::DATTEO
uint16_t DATTEO
Definition: sdhc.h:2171
SDHC_PSR_Type::CARDDPL
uint32_t CARDDPL
Definition: sdhc.h:317
SDHC_ACESR_Type::ACMDTEO
uint16_t ACMDTEO
Definition: sdhc.h:1644
SDHC_EISTER_Type::CMDIDX
uint16_t CMDIDX
Definition: sdhc.h:1186
SDHC_CACR_Type
Definition: sdhc.h:2501
SDHC_HC1R_Type::CARDDTL
uint8_t CARDDTL
Definition: sdhc.h:418
SDHC_MC1R_Type::BOOTA
uint8_t BOOTA
Definition: sdhc.h:2395
SDHC_PSR_Type::RTACT
uint32_t RTACT
Definition: sdhc.h:311
SDHC_FEREIS_Type::ADMA
uint16_t ADMA
Definition: sdhc.h:2176
SDHC_EISIER_Type::DATEND
uint16_t DATEND
Definition: sdhc.h:1484
SDHC_PSR_Type::BUFRDEN
uint32_t BUFRDEN
Definition: sdhc.h:313
SDHC_CA0R_Type::TEOCLKU
uint32_t TEOCLKU
Definition: sdhc.h:1832
SDHC_RR_Type
Definition: sdhc.h:267
SDHC_FEREIS_Type::BOOTAE
uint16_t BOOTAE
Definition: sdhc.h:2178
SDHC_CCR_Type::INTCLKS
uint16_t INTCLKS
Definition: sdhc.h:636
SDHC_BSR_Type::reg
uint16_t reg
Definition: sdhc.h:78
SDHC_EISIER_Type::ACMD
uint16_t ACMD
Definition: sdhc.h:1486
SDHC_NISTER_Type::BLKGE
uint16_t BLKGE
Definition: sdhc.h:1055
SDHC_EISTR_Type::DATTEO
uint16_t DATTEO
Definition: sdhc.h:888
Sdhc::AESR
__I SDHC_AESR_Type AESR
Offset: 0x054 (R/ 8) ADMA Error Status.
Definition: sdhc.h:2577
SDHC_NISTR_Type::DMAINT
uint16_t DMAINT
Definition: sdhc.h:744
Sdhc::CR
__IO SDHC_CR_Type CR
Offset: 0x00E (R/W 16) Command.
Definition: sdhc.h:2552
SDHC_CR_Type::DPSEL
uint16_t DPSEL
Definition: sdhc.h:208
Sdhc::NISTR
__IO SDHC_NISTR_Type NISTR
Offset: 0x030 (R/W 16) Normal Interrupt Status.
Definition: sdhc.h:2563
SDHC_PVR_Type::SDCLKFSEL
uint16_t SDCLKFSEL
Definition: sdhc.h:2312
SDHC_MC2R_Type
Definition: sdhc.h:2431
Sdhc::CACR
__IO SDHC_CACR_Type CACR
Offset: 0x230 (R/W 32) Capabilities Control.
Definition: sdhc.h:2592
SDHC_SRR_Type::SWRSTALL
uint8_t SWRSTALL
Definition: sdhc.h:705
SDHC_BGCR_Type::INTBG
uint8_t INTBG
Definition: sdhc.h:539
SDHC_MC2R_Type::reg
uint8_t reg
Definition: sdhc.h:2437
SDHC_HCVR_Type
Definition: sdhc.h:2367
SDHC_CA1R_Type
Definition: sdhc.h:1952
SDHC_HC2R_Type::VS18EN
uint16_t VS18EN
Definition: sdhc.h:1702
SDHC_BGCR_Type::reg
uint8_t reg
Definition: sdhc.h:547
SDHC_MC1R_Type::OPD
uint8_t OPD
Definition: sdhc.h:2394
SDHC_BDPR_Type::reg
uint32_t reg
Definition: sdhc.h:289
SDHC_NISIER_Type::BWRRDY
uint16_t BWRRDY
Definition: sdhc.h:1352
Sdhc::DBGR
__IO SDHC_DBGR_Type DBGR
Offset: 0x234 (R/W 8) Debug.
Definition: sdhc.h:2593
Sdhc::BCR
__IO SDHC_BCR_Type BCR
Offset: 0x006 (R/W 16) Block Count.
Definition: sdhc.h:2549
SDHC_HC1R_Type::DMASEL
uint8_t DMASEL
Definition: sdhc.h:416
Sdhc::BSR
__IO SDHC_BSR_Type BSR
Offset: 0x004 (R/W 16) Block Size.
Definition: sdhc.h:2548
SDHC_TCR_Type::reg
uint8_t reg
Definition: sdhc.h:689
SDHC_NISTER_Type::CMDC
uint16_t CMDC
Definition: sdhc.h:1053
SDHC_AESR_Type::LMIS
uint8_t LMIS
Definition: sdhc.h:2261
SDHC_MC1R_Type::DDR
uint8_t DDR
Definition: sdhc.h:2393
SDHC_EISTR_Type::ADMA
uint16_t ADMA
Definition: sdhc.h:893
SDHC_FERACES_Type::ACMDIDX
uint16_t ACMDIDX
Definition: sdhc.h:2113
SDHC_BCR_Type::reg
uint16_t reg
Definition: sdhc.h:115
SDHC_CCR_Type::CLKGSEL
uint16_t CLKGSEL
Definition: sdhc.h:639
SDHC_MCCAR_Type::MAXCUR18V
uint32_t MAXCUR18V
Definition: sdhc.h:2060
SDHC_NISIER_Type::CINS
uint16_t CINS
Definition: sdhc.h:1354
SDHC_NISTR_Type::CINT
uint16_t CINT
Definition: sdhc.h:749
SDHC_TCR_Type
Definition: sdhc.h:684
Sdhc::EISTER
__IO SDHC_EISTER_Type EISTER
Offset: 0x036 (R/W 16) Error Interrupt Status Enable.
Definition: sdhc.h:2566
SDHC_WCR_Type
Definition: sdhc.h:597
SDHC_NISTER_Type::DMAINT
uint16_t DMAINT
Definition: sdhc.h:1056
SDHC_PCR_Type
Definition: sdhc.h:502
SDHC_PSR_Type::CARDSS
uint32_t CARDSS
Definition: sdhc.h:316
SDHC_PSR_Type
Definition: sdhc.h:303
SDHC_FERACES_Type::CMDNI
uint16_t CMDNI
Definition: sdhc.h:2115
SDHC_EISTR_Type::reg
uint16_t reg
Definition: sdhc.h:911
SDHC_SSAR_Type::ADDR
uint32_t ADDR
Definition: sdhc.h:49
SDHC_NISTER_Type::BRDRDY
uint16_t BRDRDY
Definition: sdhc.h:1058
SDHC_NISTR_Type::BOOTAR
uint16_t BOOTAR
Definition: sdhc.h:761
SDHC_HC2R_Type::HS200EN
uint16_t HS200EN
Definition: sdhc.h:1711
SDHC_HC2R_Type::EXTUN
uint16_t EXTUN
Definition: sdhc.h:1704
Sdhc::SISR
__I SDHC_SISR_Type SISR
Offset: 0x0FC (R/ 16) Slot Interrupt Status.
Definition: sdhc.h:2583
SDHC_NISIER_Type::CREM
uint16_t CREM
Definition: sdhc.h:1355
SDHC_CR_Type::CMDCCEN
uint16_t CMDCCEN
Definition: sdhc.h:206
SDHC_NISIER_Type::BOOTAR
uint16_t BOOTAR
Definition: sdhc.h:1367
SDHC_ASAR_Type::reg
uint32_t reg
Definition: sdhc.h:2296
SDHC_PSR_Type::WRPPL
uint32_t WRPPL
Definition: sdhc.h:318
SDHC_TMR_Type::BCEN
uint16_t BCEN
Definition: sdhc.h:150
Sdhc::HC1R
__IO SDHC_HC1R_Type HC1R
Offset: 0x028 (R/W 8) Host Control 1.
Definition: sdhc.h:2556
SDHC_MCCAR_Type::reg
uint32_t reg
Definition: sdhc.h:2063
SDHC_CCR_Type::reg
uint16_t reg
Definition: sdhc.h:643
SDHC_CA0R_Type::V33VSUP
uint32_t V33VSUP
Definition: sdhc.h:1841
SDHC_PCR_Type::SDBVSEL
uint8_t SDBVSEL
Definition: sdhc.h:505
Sdhc::ARG1R
__IO SDHC_ARG1R_Type ARG1R
Offset: 0x008 (R/W 32) Argument 1.
Definition: sdhc.h:2550
SDHC_CA0R_Type::HSSUP
uint32_t HSSUP
Definition: sdhc.h:1838
SDHC_HCVR_Type::VVER
uint16_t VVER
Definition: sdhc.h:2370
SDHC_SSAR_Type::reg
uint32_t reg
Definition: sdhc.h:51
SDHC_ARG1R_Type
Definition: sdhc.h:129
SDHC_NISIER_Type
Definition: sdhc.h:1346
Sdhc::CC2R
__IO SDHC_CC2R_Type CC2R
Offset: 0x20C (R/W 32) Clock Control 2.
Definition: sdhc.h:2590
SDHC_EISIER_Type::BOOTAE
uint16_t BOOTAE
Definition: sdhc.h:1502
SDHC_NISTER_Type::CINS
uint16_t CINS
Definition: sdhc.h:1059
SDHC_FERACES_Type::ACMD12NE
uint16_t ACMD12NE
Definition: sdhc.h:2109
SDHC_NISTR_Type::ERRINT
uint16_t ERRINT
Definition: sdhc.h:751
SDHC_CA0R_Type::V30VSUP
uint32_t V30VSUP
Definition: sdhc.h:1842
SDHC_SRR_Type::SWRSTCMD
uint8_t SWRSTCMD
Definition: sdhc.h:706
SDHC_EISIER_Type::DATTEO
uint16_t DATTEO
Definition: sdhc.h:1482
SDHC_ACR_Type
Definition: sdhc.h:2452
SDHC_SSAR_Type::ARG2
uint32_t ARG2
Definition: sdhc.h:46
SDHC_BCR_Type
Definition: sdhc.h:111
SDHC_CCR_Type
Definition: sdhc.h:633
SDHC_BSR_Type
Definition: sdhc.h:71
SDHC_HC2R_Type
Definition: sdhc.h:1699
Sdhc::CA0R
__I SDHC_CA0R_Type CA0R
Offset: 0x040 (R/ 32) Capabilities 0.
Definition: sdhc.h:2571
SDHC_FEREIS_Type::CMDCRC
uint16_t CMDCRC
Definition: sdhc.h:2168
SDHC_CA1R_Type::SDR50SUP
uint32_t SDR50SUP
Definition: sdhc.h:1954
SDHC_EISTR_Type::DATEND
uint16_t DATEND
Definition: sdhc.h:890
SDHC_MC1R_Type::RSTN
uint8_t RSTN
Definition: sdhc.h:2396
Sdhc::HC2R
__IO SDHC_HC2R_Type HC2R
Offset: 0x03E (R/W 16) Host Control 2.
Definition: sdhc.h:2570
SDHC_BSR_Type::BLOCKSIZE
uint16_t BLOCKSIZE
Definition: sdhc.h:73
SDHC_CA1R_Type::SDR104SUP
uint32_t SDR104SUP
Definition: sdhc.h:1955
SDHC_EISIER_Type::CMDCRC
uint16_t CMDCRC
Definition: sdhc.h:1479
Sdhc::FEREIS
__O SDHC_FEREIS_Type FEREIS
Offset: 0x052 ( /W 16) Force Event for Error Interrupt Status.
Definition: sdhc.h:2576
SDHC_EISTR_Type
Definition: sdhc.h:882
SDHC_CR_Type::CMDICEN
uint16_t CMDICEN
Definition: sdhc.h:207
SDHC_PVR_Type::reg
uint16_t reg
Definition: sdhc.h:2317
SDHC_CCR_Type::USDCLKFSEL
uint16_t USDCLKFSEL
Definition: sdhc.h:640
SDHC_CA0R_Type::SB64SUP
uint32_t SB64SUP
Definition: sdhc.h:1845
SDHC_CA0R_Type::ASINTSUP
uint32_t ASINTSUP
Definition: sdhc.h:1846
SDHC_EISTR_Type::DATCRC
uint16_t DATCRC
Definition: sdhc.h:889
SDHC_FEREIS_Type::DATEND
uint16_t DATEND
Definition: sdhc.h:2173
SDHC_CC2R_Type::FSDCLKD
uint32_t FSDCLKD
Definition: sdhc.h:2481
SDHC_CA1R_Type::DDR50SUP
uint32_t DDR50SUP
Definition: sdhc.h:1956
SDHC_EISTER_Type::DATTEO
uint16_t DATTEO
Definition: sdhc.h:1187
SDHC_HC1R_Type::HSEN
uint8_t HSEN
Definition: sdhc.h:415
SDHC_WCR_Type::WKENCINS
uint8_t WKENCINS
Definition: sdhc.h:600
SDHC_EISTR_Type::CMDEND
uint16_t CMDEND
Definition: sdhc.h:886
SDHC_NISIER_Type::DMAINT
uint16_t DMAINT
Definition: sdhc.h:1351
SDHC_EISIER_Type::CMDTEO
uint16_t CMDTEO
Definition: sdhc.h:1478
SDHC_ACESR_Type::ACMD12NE
uint16_t ACMD12NE
Definition: sdhc.h:1643
SDHC_ACR_Type::reg
uint32_t reg
Definition: sdhc.h:2457
SDHC_CCR_Type::SDCLKFSEL
uint16_t SDCLKFSEL
Definition: sdhc.h:641
SDHC_CA1R_Type::CLKMULT
uint32_t CLKMULT
Definition: sdhc.h:1966
SDHC_ARG1R_Type::ARG
uint32_t ARG
Definition: sdhc.h:131
SDHC_EISIER_Type::reg
uint16_t reg
Definition: sdhc.h:1505
SDHC_MCCAR_Type::MAXCUR30V
uint32_t MAXCUR30V
Definition: sdhc.h:2059
SDHC_CA0R_Type::SDMASUP
uint32_t SDMASUP
Definition: sdhc.h:1839
SDHC_CA0R_Type::ED8SUP
uint32_t ED8SUP
Definition: sdhc.h:1835
SDHC_WCR_Type::WKENCINT
uint8_t WKENCINT
Definition: sdhc.h:599
SDHC_EISIER_Type::DATCRC
uint16_t DATCRC
Definition: sdhc.h:1483
SDHC_NISTR_Type::TRFC
uint16_t TRFC
Definition: sdhc.h:742
SDHC_HCVR_Type::reg
uint16_t reg
Definition: sdhc.h:2372
SDHC_EISTER_Type::DATEND
uint16_t DATEND
Definition: sdhc.h:1189
SDHC_NISTR_Type::CMDC
uint16_t CMDC
Definition: sdhc.h:741
SDHC_TMR_Type::DMAEN
uint16_t DMAEN
Definition: sdhc.h:149
Sdhc::EISIER
__IO SDHC_EISIER_Type EISIER
Offset: 0x03A (R/W 16) Error Interrupt Signal Enable.
Definition: sdhc.h:2568
SDHC_BGCR_Type::RWCTRL
uint8_t RWCTRL
Definition: sdhc.h:538
SDHC_SISR_Type::INTSSL
uint16_t INTSSL
Definition: sdhc.h:2350
SDHC_CR_Type::CMDIDX
uint16_t CMDIDX
Definition: sdhc.h:210
SDHC_BGCR_Type::STPBGR
uint8_t STPBGR
Definition: sdhc.h:536
SDHC_ACESR_Type::CMDNI
uint16_t CMDNI
Definition: sdhc.h:1649
SDHC_BGCR_Type::CONTR
uint8_t CONTR
Definition: sdhc.h:537
SDHC_PSR_Type::CMDLL
uint32_t CMDLL
Definition: sdhc.h:320
SDHC_CA0R_Type::ADMA2SUP
uint32_t ADMA2SUP
Definition: sdhc.h:1836
SDHC_HC2R_Type::PVALEN
uint16_t PVALEN
Definition: sdhc.h:1708
SDHC_FERACES_Type
Definition: sdhc.h:2107
Sdhc::BGCR
__IO SDHC_BGCR_Type BGCR
Offset: 0x02A (R/W 8) Block Gap Control.
Definition: sdhc.h:2558
SDHC_SRR_Type
Definition: sdhc.h:703
Sdhc::MCCAR
__I SDHC_MCCAR_Type MCCAR
Offset: 0x048 (R/ 32) Maximum Current Capabilities.
Definition: sdhc.h:2573
SDHC_HC1R_Type::CARDDSEL
uint8_t CARDDSEL
Definition: sdhc.h:419
SDHC_EISTER_Type::CMDCRC
uint16_t CMDCRC
Definition: sdhc.h:1184
SDHC_EISTR_Type::CMDCRC
uint16_t CMDCRC
Definition: sdhc.h:885
SDHC_ACESR_Type::reg
uint16_t reg
Definition: sdhc.h:1652
RoReg8
volatile const uint8_t RoReg8
Definition: same54n19a.h:53
SDHC_PSR_Type::RTREQ
uint32_t RTREQ
Definition: sdhc.h:308
SDHC_PSR_Type::CARDINS
uint32_t CARDINS
Definition: sdhc.h:315
SDHC_ARG1R_Type::reg
uint32_t reg
Definition: sdhc.h:133
SDHC_FEREIS_Type::ACMD
uint16_t ACMD
Definition: sdhc.h:2175
SDHC_NISIER_Type::reg
uint16_t reg
Definition: sdhc.h:1370
SDHC_PSR_Type::DLACT
uint32_t DLACT
Definition: sdhc.h:307
SDHC_CA0R_Type::MAXBLKL
uint32_t MAXBLKL
Definition: sdhc.h:1834
SDHC_FEREIS_Type::CMDTEO
uint16_t CMDTEO
Definition: sdhc.h:2167
Sdhc::CA1R
__I SDHC_CA1R_Type CA1R
Offset: 0x044 (R/ 32) Capabilities 1.
Definition: sdhc.h:2572
SDHC_EISTER_Type::CMDEND
uint16_t CMDEND
Definition: sdhc.h:1185
SDHC_RR_Type::reg
uint32_t reg
Definition: sdhc.h:271
SDHC_CACR_Type::reg
uint32_t reg
Definition: sdhc.h:2508
Sdhc
SDHC hardware registers.
Definition: sdhc.h:2546
SDHC_EISIER_Type::CURLIM
uint16_t CURLIM
Definition: sdhc.h:1485
SDHC_FEREIS_Type::reg
uint16_t reg
Definition: sdhc.h:2181
SDHC_HC2R_Type::reg
uint16_t reg
Definition: sdhc.h:1718
SDHC_MC2R_Type::SRESP
uint8_t SRESP
Definition: sdhc.h:2433
SDHC_BDPR_Type
Definition: sdhc.h:285
SDHC_AESR_Type::reg
uint8_t reg
Definition: sdhc.h:2264
SDHC_CC2R_Type
Definition: sdhc.h:2479
SDHC_DBGR_Type::NIDBG
uint8_t NIDBG
Definition: sdhc.h:2526
SDHC_ACESR_Type::ACMDCRC
uint16_t ACMDCRC
Definition: sdhc.h:1645
SDHC_BDPR_Type::BUFDATA
uint32_t BUFDATA
Definition: sdhc.h:287
SDHC_SISR_Type::reg
uint16_t reg
Definition: sdhc.h:2353
Sdhc::HCVR
__I SDHC_HCVR_Type HCVR
Offset: 0x0FE (R/ 16) Host Controller Version.
Definition: sdhc.h:2584
SDHC_FEREIS_Type::CMDEND
uint16_t CMDEND
Definition: sdhc.h:2169
SDHC_PCR_Type::reg
uint8_t reg
Definition: sdhc.h:508
SDHC_NISIER_Type::TRFC
uint16_t TRFC
Definition: sdhc.h:1349
SDHC_TCR_Type::DTCVAL
uint8_t DTCVAL
Definition: sdhc.h:686
SDHC_EISTR_Type::ACMD
uint16_t ACMD
Definition: sdhc.h:892
SDHC_HC2R_Type::SLCKSEL
uint16_t SLCKSEL
Definition: sdhc.h:1705
SDHC_NISIER_Type::CINT
uint16_t CINT
Definition: sdhc.h:1356
SDHC_PCR_Type::SDBPWR
uint8_t SDBPWR
Definition: sdhc.h:504
SDHC_CCR_Type::SDCLKEN
uint16_t SDCLKEN
Definition: sdhc.h:637
Sdhc::SRR
__IO SDHC_SRR_Type SRR
Offset: 0x02F (R/W 8) Software Reset.
Definition: sdhc.h:2562
SDHC_EISIER_Type::ADMA
uint16_t ADMA
Definition: sdhc.h:1487
SDHC_CR_Type::reg
uint16_t reg
Definition: sdhc.h:213
SDHC_NISTER_Type::BOOTAR
uint16_t BOOTAR
Definition: sdhc.h:1072