CC35xxDriverLibrary
hw_sdmmc.h
Go to the documentation of this file.
1 /******************************************************************************
2 * Filename: hw_sdmmc.h
3 *
4 * Description: Defines and prototypes for the SDMMC peripheral.
5 *
6 * Copyright (c) 2023, Texas Instruments Incorporated
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are met:
11 *
12 * 1) Redistributions of source code must retain the above copyright notice,
13 * this list of conditions and the following disclaimer.
14 *
15 * 2) Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 *
19 * 3) Neither the name of the ORGANIZATION nor the names of its contributors may
20 * be used to endorse or promote products derived from this software without
21 * specific prior written permission.
22 *
23  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
34 *
35 ******************************************************************************/
36 #ifndef __HW_SDMMC_H__
37 #define __HW_SDMMC_H__
38 /*-------------------------------------------------------------------------------
39 
40 This section defines the register offsets of the SDMMC component
41 
42 --------------------------------------------------------------------------------- */
43 
44 //This register allows controlling various parameters of the OCP interface
45 #define SDMMC_O_SYSCFG 0x00000110U
46 
47 //This register provides status information about the module excluding the interrupt status information
48 #define SDMMC_O_SYSSTA 0x00000114U
49 
50 //Card Status Response Error Detection
51 #define SDMMC_O_CSRE 0x00000124U
52 
53 //SDMMC System Test Register
54 #define SDMMC_O_SYSTEST 0x00000128U
55 
56 //SDMMC Configuration Register
57 #define SDMMC_O_CON 0x0000012CU
58 
59 //SDMMC Power counter register
60 #define SDMMC_O_PWCNT 0x00000130U
61 
62 //DMA System Address
63 #define SDMMC_O_SDMASA 0x00000200U
64 
65 //Transfer Length Configuration Register
66 #define SDMMC_O_BLK 0x00000204U
67 
68 //Command argument register
69 #define SDMMC_O_ARG 0x00000208U
70 
71 //Command and data transfer register
72 #define SDMMC_O_CMD 0x0000020CU
73 
74 //Response register 10
75 #define SDMMC_O_RSP10 0x00000210U
76 
77 //Response register 32
78 #define SDMMC_O_RSP32 0x00000214U
79 
80 //Response register 54
81 #define SDMMC_O_RSP54 0x00000218U
82 
83 //Response register 76
84 #define SDMMC_O_RSP76 0x0000021CU
85 
86 //Data register
87 #define SDMMC_O_DATA 0x00000220U
88 
89 //SDMMC controller status register
90 #define SDMMC_O_PSTATE 0x00000224U
91 
92 //Host Control Register
93 #define SDMMC_O_HCTL 0x00000228U
94 
95 //SD System Control Register
96 #define SDMMC_O_SYSCTL 0x0000022CU
97 
98 //The interrupt status regroups all the status of the module internal events that can generate an interrupt
99 #define SDMMC_O_STAT 0x00000230U
100 
101 //This register allows to enable/disable the module to set status bits on an event-by-event basis
102 #define SDMMC_O_IE 0x00000234U
103 
104 //This register allows to enable/disable the module internal interrupt signaling on an event-by-event basis
105 #define SDMMC_O_ISE 0x00000238U
106 
107 //SD_AC12 Error register
108 #define SDMMC_O_AC12 0x0000023CU
109 
110 //Capability register
111 #define SDMMC_O_CAPA 0x00000240U
112 
113 //Current capability register
114 #define SDMMC_O_CURCAPA 0x00000248U
115 
116 //Revision register
117 #define SDMMC_O_REV 0x000002FCU
118 
119 //The Force Event register is not a physically implemented register
120 #define SDMMC_O_FE 0x00000250U
121 
122 //Test-Port select
123 #define SDMMC_O_TPSEL 0x00001040U
124 
125 //DMA mode select:
126 #define SDMMC_O_DMAMODE 0x00001048U
127 
128 //DMA indication select:
129 #define SDMMC_O_DMAIND 0x00001050U
130 
131 //This register define the functional clock frequency, and whether the clock is synchronized to main clock
132 #define SDMMC_O_CLKSEL 0x00001054U
133 
134 //Event mode register
135 #define SDMMC_O_EVTMODE 0x000010E0U
136 
137 //This register identifies the peripheral and its exact version
138 #define SDMMC_O_DESC 0x000010FCU
139 
140 //SDMMC Status register
141 #define SDMMC_O_SDMMCSTAT 0x00001100U
142 
143 //SRAM Data Access Registers
144 #define SDMMC_O_BUFIF 0x00001110U
145 
146 //Clock Enable Register
147 #define SDMMC_O_CLKCFG 0x00004000U
148 
149 
150 
151 /*-----------------------------------REGISTER------------------------------------
152  Register name: SYSCFG
153  Offset name: SDMMC_O_SYSCFG
154  Relative address: 0x110
155  Description: This register allows controlling various parameters of the OCP interface.
156  Default Value: 0x00002015
157 
158  Field: AUTOIDLE
159  From..to bits: 0...0
160  DefaultValue: 0x1
161  Access type: read-write
162  Description: Internal Clock gating strategy
163  0: Clocks are free-running
164  1: Automatic clock gating strategy is applied, based on the OCP and MMC interface activity
165 
166 
167  ENUMs:
168  OFF: Clocks are free-running
169  ON: Automatic clock gating strategy is applied
170 */
171 #define SDMMC_SYSCFG_AUTOIDLE 0x00000001U
172 #define SDMMC_SYSCFG_AUTOIDLE_M 0x00000001U
173 #define SDMMC_SYSCFG_AUTOIDLE_S 0U
174 #define SDMMC_SYSCFG_AUTOIDLE_OFF 0x00000000U
175 #define SDMMC_SYSCFG_AUTOIDLE_ON 0x00000001U
176 /*
177 
178  Field: SOFTRST
179  From..to bits: 1...1
180  DefaultValue: 0x0
181  Access type: read-write
182  Description: Software reset.
183 
184  The bit is automatically reset by the hardware. During reset, it always returns 0.
185 
186 
187 */
188 #define SDMMC_SYSCFG_SOFTRST 0x00000002U
189 #define SDMMC_SYSCFG_SOFTRST_M 0x00000002U
190 #define SDMMC_SYSCFG_SOFTRST_S 1U
191 /*
192 
193  Field: WUEN
194  From..to bits: 2...2
195  DefaultValue: 0x1
196  Access type: read-write
197  Description: This field controls the wakeup capability of the module.
198 
199  ENUMs:
200  OFF: Wakeup capability is disabled
201  EN: Wakeup capability is enabled
202 */
203 #define SDMMC_SYSCFG_WUEN 0x00000004U
204 #define SDMMC_SYSCFG_WUEN_M 0x00000004U
205 #define SDMMC_SYSCFG_WUEN_S 2U
206 #define SDMMC_SYSCFG_WUEN_OFF 0x00000000U
207 #define SDMMC_SYSCFG_WUEN_EN 0x00000004U
208 /*
209 
210  Field: SIDLEMODE
211  From..to bits: 3...4
212  DefaultValue: 0x2
213  Access type: read-write
214  Description: Power management
215  We are using this register only to change CON.DVAL,
216  else these bit fields are *not used*, since Idle request is not supported.
217 
218 */
219 #define SDMMC_SYSCFG_SIDLEMODE_W 2U
220 #define SDMMC_SYSCFG_SIDLEMODE_M 0x00000018U
221 #define SDMMC_SYSCFG_SIDLEMODE_S 3U
222 /*
223 
224  Field: CLKIDLECFG
225  From..to bits: 8...9
226  DefaultValue: 0x0
227  Access type: read-write
228  Description: Clock idle policy register, Clocks activity during wake up mode period.
229  Bit8: OCP interface clock
230  Bit9: Functional clock
231 
232 
233  ENUMs:
234  OFF: Interface and Functional clock may be switched off
235  INT: Interface clock is maintained. Functional clock may be switched-off.
236  FUNC: Functional clock is maintained. Interface clock may be switched-off.
237  ALL: Interface and Functional clocks are maintained.
238 */
239 #define SDMMC_SYSCFG_CLKIDLECFG_W 2U
240 #define SDMMC_SYSCFG_CLKIDLECFG_M 0x00000300U
241 #define SDMMC_SYSCFG_CLKIDLECFG_S 8U
242 #define SDMMC_SYSCFG_CLKIDLECFG_OFF 0x00000000U
243 #define SDMMC_SYSCFG_CLKIDLECFG_INT 0x00000100U
244 #define SDMMC_SYSCFG_CLKIDLECFG_FUNC 0x00000200U
245 #define SDMMC_SYSCFG_CLKIDLECFG_ALL 0x00000300U
246 
247 
248 /*-----------------------------------REGISTER------------------------------------
249  Register name: SYSSTA
250  Offset name: SDMMC_O_SYSSTA
251  Relative address: 0x114
252  Description: This register provides status information about the module excluding the interrupt status information.
253  Default Value: 0x00000000
254 
255  Field: RSTDONE
256  From..to bits: 0...0
257  DefaultValue: 0x0
258  Access type: read-only
259  Description: Internal Reset Monitoring
260  Note: The debounce clock , the interface clock and the functional clock must be provided to the SDMMC host controller to allow the internal reset monitoring.
261 
262  ENUMs:
263  ONGOING: Internal module reset is on-going
264  COMPLETE: Reset completed
265 */
266 #define SDMMC_SYSSTA_RSTDONE 0x00000001U
267 #define SDMMC_SYSSTA_RSTDONE_M 0x00000001U
268 #define SDMMC_SYSSTA_RSTDONE_S 0U
269 #define SDMMC_SYSSTA_RSTDONE_ONGOING 0x00000000U
270 #define SDMMC_SYSSTA_RSTDONE_COMPLETE 0x00000001U
271 
272 
273 /*-----------------------------------REGISTER------------------------------------
274  Register name: CSRE
275  Offset name: SDMMC_O_CSRE
276  Relative address: 0x124
277  Description: Card Status Response Error Detection
278  This register enables the host controller to detect card status errors of response type R1, R1b for all cards and of R5, R5b and R6 response for cards types SD or SDIO. When a bit SD_SD_CSRE[i] is set to 1, if the corresponding bit at the same position in the response RSP10[i] is set to 1, the host controller indicates a card error (SD_STAT.CERR bit) interrupt status to avoid the host driver reading the response register (RSP10).
279  No automatic card error detection for autoCMD12 is implemented; the host system has to check autoCMD12 response register (RSP76) for possible card errors.
280  Default Value: 0x00000000
281 
282  Field: STA
283  From..to bits: 0...31
284  DefaultValue: 0x0
285  Access type: read-write
286  Description: Card status response error
287 
288  ENUMs:
289  MINIMUM: Minimum value
290  MAXIMUM: Maximum value
291 */
292 #define SDMMC_CSRE_STA_W 32U
293 #define SDMMC_CSRE_STA_M 0xFFFFFFFFU
294 #define SDMMC_CSRE_STA_S 0U
295 #define SDMMC_CSRE_STA_MINIMUM 0x00000000U
296 #define SDMMC_CSRE_STA_MAXIMUM 0xFFFFFFFFU
297 
298 
299 /*-----------------------------------REGISTER------------------------------------
300  Register name: SYSTEST
301  Offset name: SDMMC_O_SYSTEST
302  Relative address: 0x128
303  Description: SDMMC System Test Register
304  This register is used to control the signals that connect to I/O pins when the module is configured in system test (SD_SYSTEST) mode for boundary connectivity verification. In SD_SYSTEST mode, a write into SD_CMD register will not start a transfer.
305  Default Value: 0x00000000
306 
307  Field: MCKD
308  From..to bits: 0...0
309  DefaultValue: 0x0
310  Access type: read-write
311  Description: MMC clock output signal data value
312 
313  ENUMs:
314  LOW: The output clock is driven low
315  HIGH: The output clock is driven high
316 */
317 #define SDMMC_SYSTEST_MCKD 0x00000001U
318 #define SDMMC_SYSTEST_MCKD_M 0x00000001U
319 #define SDMMC_SYSTEST_MCKD_S 0U
320 #define SDMMC_SYSTEST_MCKD_LOW 0x00000000U
321 #define SDMMC_SYSTEST_MCKD_HIGH 0x00000001U
322 /*
323 
324  Field: CDIR
325  From..to bits: 1...1
326  DefaultValue: 0x0
327  Access type: read-write
328  Description: Control of the CMD pin direction
329 
330  ENUMs:
331  OUT: The CMD line is an output (host to card)
332  IN: The CMD line is an input (card to host)
333 */
334 #define SDMMC_SYSTEST_CDIR 0x00000002U
335 #define SDMMC_SYSTEST_CDIR_M 0x00000002U
336 #define SDMMC_SYSTEST_CDIR_S 1U
337 #define SDMMC_SYSTEST_CDIR_OUT 0x00000000U
338 #define SDMMC_SYSTEST_CDIR_IN 0x00000002U
339 /*
340 
341  Field: CDAT
342  From..to bits: 2...2
343  DefaultValue: 0x0
344  Access type: read-write
345  Description: CMD input/output signal data value
346 
347  ENUMs:
348  LOW: If SD_SYSTEST.CDIR bit = 0 (output mode direction), the CMD line is driven low. If SD_SYSTEST.CDIR bit = 1 (input mode direction), no effect.
349  HIGH: If SD_SYSTEST.CDIR bit = 0 (output mode direction), the CMD line is driven high. If SD_SYSTEST.CDIR bit = 1 (input mode direction), no effect.
350 */
351 #define SDMMC_SYSTEST_CDAT 0x00000004U
352 #define SDMMC_SYSTEST_CDAT_M 0x00000004U
353 #define SDMMC_SYSTEST_CDAT_S 2U
354 #define SDMMC_SYSTEST_CDAT_LOW 0x00000000U
355 #define SDMMC_SYSTEST_CDAT_HIGH 0x00000004U
356 /*
357 
358  Field: DDIR
359  From..to bits: 3...3
360  DefaultValue: 0x0
361  Access type: read-write
362  Description: Control of the DAT[7:0] pins direction
363 
364  ENUMs:
365  OUT: The DAT lines are outputs (host to card)
366  IN: The DAT lines are inputs (card to host)
367 */
368 #define SDMMC_SYSTEST_DDIR 0x00000008U
369 #define SDMMC_SYSTEST_DDIR_M 0x00000008U
370 #define SDMMC_SYSTEST_DDIR_S 3U
371 #define SDMMC_SYSTEST_DDIR_OUT 0x00000000U
372 #define SDMMC_SYSTEST_DDIR_IN 0x00000008U
373 /*
374 
375  Field: D0D
376  From..to bits: 4...4
377  DefaultValue: 0x0
378  Access type: read-write
379  Description: DAT0 input/output signal data value
380 
381  ENUMs:
382  LOW: If SD_SYSTEST.DDIR bit = 0 (output mode direction), the DAT0 line is driven low. If SD_SYSTEST.DDIR bit = 1 (input mode direction), no effect.
383  HIGH: If SD_SYSTEST.DDIR bit = 0 (output mode direction), the DAT0 line is driven high. If SD_SYSTEST.DDIR bit = 1 (input mode direction), no effect.
384 */
385 #define SDMMC_SYSTEST_D0D 0x00000010U
386 #define SDMMC_SYSTEST_D0D_M 0x00000010U
387 #define SDMMC_SYSTEST_D0D_S 4U
388 #define SDMMC_SYSTEST_D0D_LOW 0x00000000U
389 #define SDMMC_SYSTEST_D0D_HIGH 0x00000010U
390 /*
391 
392  Field: D1D
393  From..to bits: 5...5
394  DefaultValue: 0x0
395  Access type: read-write
396  Description: DAT1 input/output signal data value
397 
398  ENUMs:
399  LOW: If SD_SYSTEST.DDIR bit = 0 (output mode direction), the DAT1 line is driven low. If SD_SYSTEST.DDIR bit = 1 (input mode direction), no effect.
400  HIGH: If SD_SYSTEST.DDIR bit = 0 (output mode direction), the DAT1 line is driven high. If SD_SYSTEST.DDIR bit = 1 (input mode direction), no effect.
401 */
402 #define SDMMC_SYSTEST_D1D 0x00000020U
403 #define SDMMC_SYSTEST_D1D_M 0x00000020U
404 #define SDMMC_SYSTEST_D1D_S 5U
405 #define SDMMC_SYSTEST_D1D_LOW 0x00000000U
406 #define SDMMC_SYSTEST_D1D_HIGH 0x00000020U
407 /*
408 
409  Field: D2D
410  From..to bits: 6...6
411  DefaultValue: 0x0
412  Access type: read-write
413  Description: DAT2 input/output signal data value
414 
415  ENUMs:
416  LOW: If SD_SYSTEST.DDIR bit = 0 (output mode direction), the DAT2 line is driven low. If SD_SYSTEST.DDIR bit = 1 (input mode direction), no effect.
417  HIGH: If SD_SYSTEST.DDIR bit = 0 (output mode direction), the DAT2 line is driven high. If SD_SYSTEST.DDIR bit = 1 (input mode direction), no effect.
418 */
419 #define SDMMC_SYSTEST_D2D 0x00000040U
420 #define SDMMC_SYSTEST_D2D_M 0x00000040U
421 #define SDMMC_SYSTEST_D2D_S 6U
422 #define SDMMC_SYSTEST_D2D_LOW 0x00000000U
423 #define SDMMC_SYSTEST_D2D_HIGH 0x00000040U
424 /*
425 
426  Field: D3D
427  From..to bits: 7...7
428  DefaultValue: 0x0
429  Access type: read-write
430  Description: DAT3 input/output signal data value
431 
432  ENUMs:
433  LOW: If SD_SYSTEST.DDIR bit = 0 (output mode direction), the DAT3 line is driven low. If SD_SYSTEST.DDIR bit = 1 (input mode direction), no effect.
434  HIGH: If SD_SYSTEST.DDIR bit = 0 (output mode direction), the DAT3 line is driven high. If SD_SYSTEST.DDIR bit = 1 (input mode direction), no effect.
435 */
436 #define SDMMC_SYSTEST_D3D 0x00000080U
437 #define SDMMC_SYSTEST_D3D_M 0x00000080U
438 #define SDMMC_SYSTEST_D3D_S 7U
439 #define SDMMC_SYSTEST_D3D_LOW 0x00000000U
440 #define SDMMC_SYSTEST_D3D_HIGH 0x00000080U
441 /*
442 
443  Field: D4D
444  From..to bits: 8...8
445  DefaultValue: 0x0
446  Access type: read-write
447  Description: DAT4 input/output signal data value
448 
449  ENUMs:
450  LOW: If SD_SYSTEST.DDIR bit = 0 (output mode direction), the DAT4 line is driven low. If SD_SYSTEST.DDIR bit = 1 (input mode direction), no effect.
451  HIGH: If SD_SYSTEST.DDIR bit = 0 (output mode direction), the DAT4 line is driven high. If SD_SYSTEST.DDIR bit = 1 (input mode direction), no effect.
452 */
453 #define SDMMC_SYSTEST_D4D 0x00000100U
454 #define SDMMC_SYSTEST_D4D_M 0x00000100U
455 #define SDMMC_SYSTEST_D4D_S 8U
456 #define SDMMC_SYSTEST_D4D_LOW 0x00000000U
457 #define SDMMC_SYSTEST_D4D_HIGH 0x00000100U
458 /*
459 
460  Field: D5D
461  From..to bits: 9...9
462  DefaultValue: 0x0
463  Access type: read-write
464  Description: DAT5 input/output signal data value
465 
466  ENUMs:
467  LOW: If SD_SYSTEST.DDIR bit = 0 (output mode direction), the DAT5 line is driven low. If SD_SYSTEST.DDIR bit = 1 (input mode direction), no effect.
468  HIGH: If SD_SYSTEST.DDIR bit = 0 (output mode direction), the DAT5 line is driven high. If SD_SYSTEST.DDIR bit = 1 (input mode direction), no effect.
469 */
470 #define SDMMC_SYSTEST_D5D 0x00000200U
471 #define SDMMC_SYSTEST_D5D_M 0x00000200U
472 #define SDMMC_SYSTEST_D5D_S 9U
473 #define SDMMC_SYSTEST_D5D_LOW 0x00000000U
474 #define SDMMC_SYSTEST_D5D_HIGH 0x00000200U
475 /*
476 
477  Field: D6D
478  From..to bits: 10...10
479  DefaultValue: 0x0
480  Access type: read-write
481  Description: DAT6 input/output signal data value
482 
483  ENUMs:
484  LOW: If SD_SYSTEST.DDIR bit = 0 (output mode direction), the DAT6 line is driven low. If SD_SYSTEST.DDIR bit = 1 (input mode direction), no effect.
485  HIGH: If SD_SYSTEST.DDIR bit = 0 (output mode direction), the DAT6 line is driven high. If SD_SYSTEST.DDIR bit = 1 (input mode direction), no effect.
486 */
487 #define SDMMC_SYSTEST_D6D 0x00000400U
488 #define SDMMC_SYSTEST_D6D_M 0x00000400U
489 #define SDMMC_SYSTEST_D6D_S 10U
490 #define SDMMC_SYSTEST_D6D_LOW 0x00000000U
491 #define SDMMC_SYSTEST_D6D_HIGH 0x00000400U
492 /*
493 
494  Field: D7D
495  From..to bits: 11...11
496  DefaultValue: 0x0
497  Access type: read-write
498  Description: DAT7 input/output signal data value
499 
500  ENUMs:
501  LOW: If SD_SYSTEST.DDIR bit = 0 (output mode direction), the DAT7 line is driven low. If SD_SYSTEST.DDIR bit = 1 (input mode direction), no effect.
502  HIGH: If SD_SYSTEST.DDIR bit = 0 (output mode direction), the DAT7 line is driven high. If SD_SYSTEST.DDIR bit = 1 (input mode direction), no effect.
503 */
504 #define SDMMC_SYSTEST_D7D 0x00000800U
505 #define SDMMC_SYSTEST_D7D_M 0x00000800U
506 #define SDMMC_SYSTEST_D7D_S 11U
507 #define SDMMC_SYSTEST_D7D_LOW 0x00000000U
508 #define SDMMC_SYSTEST_D7D_HIGH 0x00000800U
509 /*
510 
511  Field: SSB
512  From..to bits: 12...12
513  DefaultValue: 0x0
514  Access type: read-write
515  Description: Set status bit
516  This bit must be cleared prior attempting to clear a status bit of the interrupt status register (SD_STAT).
517 
518  ENUMs:
519  LOW: Clears this SSB bit field.
520  Writing 0 does not clear already set status bits
521  HIGH: Force to 1 all status bits of the interrupt status register (SD_STAT) only if the corresponding bit field in the Interrupt signal enable register (SD_ISE) is set.
522 */
523 #define SDMMC_SYSTEST_SSB 0x00001000U
524 #define SDMMC_SYSTEST_SSB_M 0x00001000U
525 #define SDMMC_SYSTEST_SSB_S 12U
526 #define SDMMC_SYSTEST_SSB_LOW 0x00000000U
527 #define SDMMC_SYSTEST_SSB_HIGH 0x00001000U
528 /*
529 
530  Field: WAKD
531  From..to bits: 13...13
532  DefaultValue: 0x0
533  Access type: read-write
534  Description: Wake request output signal data value
535 
536  ENUMs:
537  LOW: The pin SWAKEUP is driven low
538  HIGH: The pin SWAKEUP is driven high
539 */
540 #define SDMMC_SYSTEST_WAKD 0x00002000U
541 #define SDMMC_SYSTEST_WAKD_M 0x00002000U
542 #define SDMMC_SYSTEST_WAKD_S 13U
543 #define SDMMC_SYSTEST_WAKD_LOW 0x00000000U
544 #define SDMMC_SYSTEST_WAKD_HIGH 0x00002000U
545 /*
546 
547  Field: SDWP
548  From..to bits: 14...14
549  DefaultValue: 0x0
550  Access type: read-only
551  Description: Write protect input signal (SDWP) data value
552 
553  ENUMs:
554  LOW: The write protect pin SDWP is driven low
555  HIGH: The write protect pin SDWP is driven high
556 */
557 #define SDMMC_SYSTEST_SDWP 0x00004000U
558 #define SDMMC_SYSTEST_SDWP_M 0x00004000U
559 #define SDMMC_SYSTEST_SDWP_S 14U
560 #define SDMMC_SYSTEST_SDWP_LOW 0x00000000U
561 #define SDMMC_SYSTEST_SDWP_HIGH 0x00004000U
562 /*
563 
564  Field: SDCD
565  From..to bits: 15...15
566  DefaultValue: 0x0
567  Access type: read-only
568  Description: Card detect input signal (SDCD) data value
569 
570  ENUMs:
571  LOW: The card detect pin is driven low
572  HIGH: The card detect pin is driven high
573 */
574 #define SDMMC_SYSTEST_SDCD 0x00008000U
575 #define SDMMC_SYSTEST_SDCD_M 0x00008000U
576 #define SDMMC_SYSTEST_SDCD_S 15U
577 #define SDMMC_SYSTEST_SDCD_LOW 0x00000000U
578 #define SDMMC_SYSTEST_SDCD_HIGH 0x00008000U
579 /*
580 
581  Field: OBI
582  From..to bits: 16...16
583  DefaultValue: 0x0
584  Access type: read-only
585  Description: Out-Of-Band Interrupt (OBI) data value
586  Note: Out-Of-Band Interrupt (OBI) is not supported.
587 
588 */
589 #define SDMMC_SYSTEST_OBI 0x00010000U
590 #define SDMMC_SYSTEST_OBI_M 0x00010000U
591 #define SDMMC_SYSTEST_OBI_S 16U
592 
593 
594 /*-----------------------------------REGISTER------------------------------------
595  Register name: CON
596  Offset name: SDMMC_O_CON
597  Relative address: 0x12C
598  Description: SDMMC Configuration Register.
599  This register is used:
600  - to select the functional mode or the SYSTEST mode for any card.
601  - to send an initialization sequence to any card.
602  - to enable the detection on DAT[1] of a card interrupt for SDIO cards only.
603  and also to configure :
604  - specific data and command transfers for MMC cards only.
605  - the parameters related to the card detect and write protect input signals.
606 
607  Default Value: 0x00000600
608 
609  Field: OD
610  From..to bits: 0...0
611  DefaultValue: 0x0
612  Access type: read-write
613  Description: Card open drain mode
614  This bit must be set to 1 for MMC card commands 1, 2, 3 and 40, and if the MMC card bus is operating in open-drain mode during the response phase to the command sent. Typically, during card identification mode when the card is either in idle, ready or ident state.
615  It is also necessary to set this bit to 1, for a broadcast host response (see Broadcast host response register SD_CON.HR).
616 
617 
618  ENUMs:
619  OFF: No Open Drain
620  ON: Open Drain or Broadcast host response
621 */
622 #define SDMMC_CON_OD 0x00000001U
623 #define SDMMC_CON_OD_M 0x00000001U
624 #define SDMMC_CON_OD_S 0U
625 #define SDMMC_CON_OD_OFF 0x00000000U
626 #define SDMMC_CON_OD_ON 0x00000001U
627 /*
628 
629  Field: INIT
630  From..to bits: 1...1
631  DefaultValue: 0x0
632  Access type: read-write
633  Description: Send initialization stream (all cards)
634  When this bit is set to 1, and the card is idle, an initialization sequence is sent to the card.
635  An initialization sequence consists of setting the mmc_cmd line to 1 during 80 clock cycles.
636  The initialization sequence is mandatory - but it is not required to do it through this bit - this bit makes it easier.
637  Clock divider should be set to ensure that 80 clock periods are greater than 1ms.
638 
639  Note: In this mode, there is no command sent to the card and no response is expected.
640 
641  A command complete interrupt will be generated once the initialization sequence is completed.
642 
643  ENUMs:
644  OFF: The host does not send an initialization sequence
645  ON: The host sends an initialization sequence
646 */
647 #define SDMMC_CON_INIT 0x00000002U
648 #define SDMMC_CON_INIT_M 0x00000002U
649 #define SDMMC_CON_INIT_S 1U
650 #define SDMMC_CON_INIT_OFF 0x00000000U
651 #define SDMMC_CON_INIT_ON 0x00000002U
652 /*
653 
654  Field: HR
655  From..to bits: 2...2
656  DefaultValue: 0x0
657  Access type: read-write
658  Description: Broadcast host response (MMC cards only)
659  This register is used to force the host to generate a 48-bit response for bc command type.
660  It can be used to terminate the interrupt mode by generating a CMD40 response by the core.
661  In order to have the host response to be generated in open drain mode, the IO must be configured accordingly in EXT_IOMUX.
662  When SD_CON.CEATA bit is set to 1 and SD_ARG cleared to 0, when writing the value of 0 into SD_CMD register, the host controller performs a 'command completion signal disable' token (i.e., mmc_cmd line held to 0 during 47 cycles followed by a 1).
663 
664  ENUMs:
665  OFF: The host does not generate a 48-bit response instead of a command
666  ON: The host generates a 48-bit response instead of a command or a command completion signal disable token
667 */
668 #define SDMMC_CON_HR 0x00000004U
669 #define SDMMC_CON_HR_M 0x00000004U
670 #define SDMMC_CON_HR_S 2U
671 #define SDMMC_CON_HR_OFF 0x00000000U
672 #define SDMMC_CON_HR_ON 0x00000004U
673 /*
674 
675  Field: STR
676  From..to bits: 3...3
677  DefaultValue: 0x0
678  Access type: read-write
679  Description: Stream command (MMC cards only)
680  This bit must be set to 1 only for the stream data transfers (read or write) of the adtc commands.
681  Stream read is a class 1 command (CMD11READ_DAT_UNTIL_STOP).
682  Stream write is a class 3 command (CMD20WRITE_DAT_UNTIL_STOP).
683 
684  ENUMs:
685  BLOCK: Block oriented data transfer
686  STREAM: Stream oriented data transfer
687 */
688 #define SDMMC_CON_STR 0x00000008U
689 #define SDMMC_CON_STR_M 0x00000008U
690 #define SDMMC_CON_STR_S 3U
691 #define SDMMC_CON_STR_BLOCK 0x00000000U
692 #define SDMMC_CON_STR_STREAM 0x00000008U
693 /*
694 
695  Field: MODE
696  From..to bits: 4...4
697  DefaultValue: 0x0
698  Access type: read-write
699  Description: Mode select (all cards)
700  This bit selects the functional mode.
701 
702  ENUMs:
703  FUNC: Functional mode.
704  Transfers to the MMC/SD/SDIO cards follow the card protocol. The MMC clock is enabled. MMC/SD transfers are operated under the control of the SD_CMD register.
705  SYSTST: SYSTEST mode.
706  The signal pins are configured as general-purpose input/output and the 1024-byte buffer is configured as a stack memory accessible only by the local host or system DMA. The pins retain their default type (input, output or inout).
707  SYSTEST mode is operated under the control of the SD_SYSTEST register.
708 */
709 #define SDMMC_CON_MODE 0x00000010U
710 #define SDMMC_CON_MODE_M 0x00000010U
711 #define SDMMC_CON_MODE_S 4U
712 #define SDMMC_CON_MODE_FUNC 0x00000000U
713 #define SDMMC_CON_MODE_SYSTST 0x00000010U
714 /*
715 
716  Field: DW8
717  From..to bits: 5...5
718  DefaultValue: 0x0
719  Access type: read-write
720  Description: 8-bit mode MMC select (MMC cards only)
721  For SD/SDIO cards, this bit must be cleared to 0.
722  For MMC card, this bit must be set following a valid SWITCH command (CMD6) with the correct value and extend CSD index written in the argument.
723  Prior to this command, the MMC card configuration register (CSD and EXT_CSD) must be verified for compliancy with MMC standard specification.
724 
725  ENUMs:
726  _1OR4BIT: 1-bit or 4-bit data width
727  _8BIT: Open drain or broadcast host response
728 */
729 #define SDMMC_CON_DW8 0x00000020U
730 #define SDMMC_CON_DW8_M 0x00000020U
731 #define SDMMC_CON_DW8_S 5U
732 #define SDMMC_CON_DW8__1OR4BIT 0x00000000U
733 #define SDMMC_CON_DW8__8BIT 0x00000020U
734 /*
735 
736  Field: MIT
737  From..to bits: 6...6
738  DefaultValue: 0x0
739  Access type: read-write
740  Description: MMC interrupt command (MMC cards only).
741  This bit must be set to 1, when the next write access to the command register (SD_CMD) is for writing a MMC interrupt command (CMD40) requiring the command timeout detection to be disabled for the command response.
742 
743  ENUMs:
744  OFF: MMC interrupt command not possible, command timeout enabled
745  ON: MMC interrupt command possible, Command timeout disabled
746 */
747 #define SDMMC_CON_MIT 0x00000040U
748 #define SDMMC_CON_MIT_M 0x00000040U
749 #define SDMMC_CON_MIT_S 6U
750 #define SDMMC_CON_MIT_OFF 0x00000000U
751 #define SDMMC_CON_MIT_ON 0x00000040U
752 /*
753 
754  Field: CDP
755  From..to bits: 7...7
756  DefaultValue: 0x0
757  Access type: read-write
758  Description: Card detect polarity
759  All cards
760 
761  This bit selects the active level of the card detect input signal (SDCD).
762  The usage of the card detect input signal (SDCD) is optional and depends on the system integration and the type of the connector housing that accommodates the card.
763 
764 
765  ENUMs:
766  LOW: Active low level
767  HIGH: Active high level
768 */
769 #define SDMMC_CON_CDP 0x00000080U
770 #define SDMMC_CON_CDP_M 0x00000080U
771 #define SDMMC_CON_CDP_S 7U
772 #define SDMMC_CON_CDP_LOW 0x00000000U
773 #define SDMMC_CON_CDP_HIGH 0x00000080U
774 /*
775 
776  Field: WPP
777  From..to bits: 8...8
778  DefaultValue: 0x0
779  Access type: read-write
780  Description: Write protect polarity
781  For SD and SDIO cards only
782 
783  This bit selects the active level of the write protect input signal (SDWP).
784  The usage of the write protect input signal (SDWP) is optional and depends on the system integration and the type of the connector housing that accommodates the card.
785 
786 
787  ENUMs:
788  LOW: Active low level
789  HIGH: Active high level
790 */
791 #define SDMMC_CON_WPP 0x00000100U
792 #define SDMMC_CON_WPP_M 0x00000100U
793 #define SDMMC_CON_WPP_S 8U
794 #define SDMMC_CON_WPP_LOW 0x00000000U
795 #define SDMMC_CON_WPP_HIGH 0x00000100U
796 /*
797 
798  Field: DVAL
799  From..to bits: 9...10
800  DefaultValue: 0x3
801  Access type: read-write
802  Description: Debounce filter value (all cards)
803  This register is used to define a debounce period to filter the card detect input signal (SDCD).
804  The usage of the card detect input signal (SDCD) is optional and depends on the system integration and the type of the connector housing that accommodates the card.
805 
806  ENUMs:
807  DEB0: 33 us debounce period
808  DEB1: 231 us debounce period
809  DEB2: 1 ms debounce period
810  DEB3: 8.4 ms debounce period
811 */
812 #define SDMMC_CON_DVAL_W 2U
813 #define SDMMC_CON_DVAL_M 0x00000600U
814 #define SDMMC_CON_DVAL_S 9U
815 #define SDMMC_CON_DVAL_DEB0 0x00000000U
816 #define SDMMC_CON_DVAL_DEB1 0x00000200U
817 #define SDMMC_CON_DVAL_DEB2 0x00000400U
818 #define SDMMC_CON_DVAL_DEB3 0x00000600U
819 /*
820 
821  Field: CTPL
822  From..to bits: 11...11
823  DefaultValue: 0x0
824  Access type: read-write
825  Description: Control Power for DAT[1] line
826 
827  MMC and SD cards:
828  By default, this bit is set to 0 and the host controller automatically disables all the input buffers outside of a transaction to minimize the leakage current.
829 
830  SDIO cards:
831  When this bit is set to 1, the host controller automatically disables all the input buffers except the buffer of DAT[1] outside of a transaction in order to detect asynchronous card interrupt on DAT[1] line and minimize the leakage current of the buffers.
832 
833 
834  ENUMs:
835  ALL: Disable all the input buffers outside of a transaction
836  NOTDAT1: Disable all the input buffers except the buffer of DAT[1] outside of a transaction
837 
838 */
839 #define SDMMC_CON_CTPL 0x00000800U
840 #define SDMMC_CON_CTPL_M 0x00000800U
841 #define SDMMC_CON_CTPL_S 11U
842 #define SDMMC_CON_CTPL_ALL 0x00000000U
843 #define SDMMC_CON_CTPL_NOTDAT1 0x00000800U
844 /*
845 
846  Field: CEATA
847  From..to bits: 12...12
848  DefaultValue: 0x0
849  Access type: read-write
850  Description: CE-ATA control mode (MMC cards compliant with CE-ATA)
851  This bit is used to indicate that next commands are considered as specific CE-ATA commands that potentially use 'command completion' features.
852 
853  ENUMs:
854  STANDARD: Standard MMC/SD/SDIO mode
855  CEATA: CE-ATA mode. Next commands are considered as CE-ATA commands.
856 */
857 #define SDMMC_CON_CEATA 0x00001000U
858 #define SDMMC_CON_CEATA_M 0x00001000U
859 #define SDMMC_CON_CEATA_S 12U
860 #define SDMMC_CON_CEATA_STANDARD 0x00000000U
861 #define SDMMC_CON_CEATA_CEATA 0x00001000U
862 /*
863 
864  Field: OBIP
865  From..to bits: 13...13
866  DefaultValue: 0x0
867  Access type: read-write
868  Description: Out-of-Band Interrupt Polarity
869  Note: The Out-of-Band (OBI) interrupt is not supported.
870 
871  ENUMs:
872  MIN: Minimum value
873  MAX: Maximum value
874 */
875 #define SDMMC_CON_OBIP 0x00002000U
876 #define SDMMC_CON_OBIP_M 0x00002000U
877 #define SDMMC_CON_OBIP_S 13U
878 #define SDMMC_CON_OBIP_MIN 0x00000000U
879 #define SDMMC_CON_OBIP_MAX 0x00002000U
880 /*
881 
882  Field: OBIE
883  From..to bits: 14...14
884  DefaultValue: 0x0
885  Access type: read-write
886  Description: Out-of-Band Interrupt Enable.
887  Note: The Out-of-Band (OBI) interrupt is not supported.
888 
889  ENUMs:
890  MIN: Minimum value
891  MAX: Maximum value
892 */
893 #define SDMMC_CON_OBIE 0x00004000U
894 #define SDMMC_CON_OBIE_M 0x00004000U
895 #define SDMMC_CON_OBIE_S 14U
896 #define SDMMC_CON_OBIE_MIN 0x00000000U
897 #define SDMMC_CON_OBIE_MAX 0x00004000U
898 /*
899 
900  Field: PADEN
901  From..to bits: 15...15
902  DefaultValue: 0x0
903  Access type: read-write
904  Description: Control Power for MMC Lines.
905  Note: Power control is not supported using this bit.
906 
907  ENUMs:
908  MIN: Minimum value
909  MAX: Maximum value
910 */
911 #define SDMMC_CON_PADEN 0x00008000U
912 #define SDMMC_CON_PADEN_M 0x00008000U
913 #define SDMMC_CON_PADEN_S 15U
914 #define SDMMC_CON_PADEN_MIN 0x00000000U
915 #define SDMMC_CON_PADEN_MAX 0x00008000U
916 /*
917 
918  Field: CLKEXTFREE
919  From..to bits: 16...16
920  DefaultValue: 0x0
921  Access type: read-write
922  Description: External clock free running
923  This register is used to maintain card clock out of transfer transaction to enable peripheral module (for example to generate a synchronous interrupt on mmc_dat[1] ).
924  The Clock will be maintained only if SD_SYSCTL.CEN bit is set.
925 
926  ENUMs:
927  OFF: External card clock is cut off outside active transaction period
928  ON: External card clock is maintained even out of active transaction period only if SD_SYSCTL.CEN bit is set.
929 */
930 #define SDMMC_CON_CLKEXTFREE 0x00010000U
931 #define SDMMC_CON_CLKEXTFREE_M 0x00010000U
932 #define SDMMC_CON_CLKEXTFREE_S 16U
933 #define SDMMC_CON_CLKEXTFREE_OFF 0x00000000U
934 #define SDMMC_CON_CLKEXTFREE_ON 0x00010000U
935 /*
936 
937  Field: REVERVED
938  From..to bits: 20...20
939  DefaultValue: 0x0
940  Access type: read-write
941  Description: DMA Master or Slave selection
942  Note: these bit fields are *not used*, since the IP not support MDMA.
943 
944 */
945 #define SDMMC_CON_REVERVED 0x00100000U
946 #define SDMMC_CON_REVERVED_M 0x00100000U
947 #define SDMMC_CON_REVERVED_S 20U
948 /*
949 
950  Field: SDMALNE
951  From..to bits: 21...21
952  DefaultValue: 0x0
953  Access type: read-write
954  Description: Peripheral DMA Level/Edge Request
955  The waveform of the DMA request can be configured either edge sensitive with early de-assertion on first access to SD_DATA register or late de-assertion, request remains active until last allowed data written into SD_DATA.
956 
957  ENUMs:
958  EDGE: peripheral DMA edge sensitive
959  LEVEL: peripheral DMA level sensitive
960 */
961 #define SDMMC_CON_SDMALNE 0x00200000U
962 #define SDMMC_CON_SDMALNE_M 0x00200000U
963 #define SDMMC_CON_SDMALNE_S 21U
964 #define SDMMC_CON_SDMALNE_EDGE 0x00000000U
965 #define SDMMC_CON_SDMALNE_LEVEL 0x00200000U
966 
967 
968 /*-----------------------------------REGISTER------------------------------------
969  Register name: PWCNT
970  Offset name: SDMMC_O_PWCNT
971  Relative address: 0x130
972  Description: SDMMC Power counter register
973  This register is used to program a MMC counter to delay command transfers after activating the PAD power, this value depends on PAD characteristics and voltage.
974  Default Value: 0x00000000
975 
976  Field: NUMDEL
977  From..to bits: 0...15
978  DefaultValue: 0x0
979  Access type: read-write
980  Description: Power counter
981  This register is used to introduce a delay between the PAD ACTIVE pin assertion and the command issued.
982  0h = No additional delay added
983  1h = TCF delay (card clock period)
984  2h = TCF x 2 delay (card clock period)
985  FFFEh = TCF x 65534 delay (card clock period)
986  FFFFh = TCF x 65535 delay (card clock period)
987 
988  ENUMs:
989  MINIMUM: Minimum value of PWCNT
990  MAXIMUM: Maximum value of PWCNT
991 */
992 #define SDMMC_PWCNT_NUMDEL_W 16U
993 #define SDMMC_PWCNT_NUMDEL_M 0x0000FFFFU
994 #define SDMMC_PWCNT_NUMDEL_S 0U
995 #define SDMMC_PWCNT_NUMDEL_MINIMUM 0x00000000U
996 #define SDMMC_PWCNT_NUMDEL_MAXIMUM 0x0000FFFFU
997 
998 
999 /*-----------------------------------REGISTER------------------------------------
1000  Register name: SDMASA
1001  Offset name: SDMMC_O_SDMASA
1002  Relative address: 0x200
1003  Description: DMA System Address
1004  This register contains the system memory address for a SDMA transfer.
1005  When the Host Controller stops a SDMA transfer, this register shall point to the system address of the next contiguous data position. It can be accessed only if no transaction is executing (i.e., after a transaction has stopped).
1006  Read operations during transfers may return an invalid value.
1007  The Host Driver shall initialize this register before starting a SDMA transaction.
1008  After SDMA has stopped, the next system address of the next contiguous data position can be read from this register.
1009  The SDMA transfer waits at the every boundary specified by the Host SDMA Buffer Boundary in the Block Size register.
1010  The Host Controller generates DMA Interrupt to request the Host Driver to update this register.
1011  The Host Driver sets the next system address of the next data position to this register.
1012  When the most upper byte of this register (003h) is written, the Host Controller restarts the SDMA transfer.
1013  When restarting SDMA by the Resume command or by setting Continue Request in the Block Gap Control register, the Host Controller shall start at the next contiguous address stored here in the SDMA System Address register.
1014 
1015  Default Value: 0x00000000
1016 
1017  Field: ADDR
1018  From..to bits: 0...31
1019  DefaultValue: 0x0
1020  Access type: read-write
1021  Description: SDMA System Address register
1022 
1023  ENUMs:
1024  MINIMUM: Minimum value
1025  MAXIMUM: Maximum value
1026 */
1027 #define SDMMC_SDMASA_ADDR_W 32U
1028 #define SDMMC_SDMASA_ADDR_M 0xFFFFFFFFU
1029 #define SDMMC_SDMASA_ADDR_S 0U
1030 #define SDMMC_SDMASA_ADDR_MINIMUM 0x00000000U
1031 #define SDMMC_SDMASA_ADDR_MAXIMUM 0xFFFFFFFFU
1032 
1033 
1034 /*-----------------------------------REGISTER------------------------------------
1035  Register name: BLK
1036  Offset name: SDMMC_O_BLK
1037  Relative address: 0x204
1038  Description: Transfer Length Configuration Register
1039 
1040  BLEN is the block size register.
1041  NBLK is the block count register.
1042 
1043  This register shall be used for any card.
1044 
1045  Default Value: 0x00000000
1046 
1047  Field: BLEN
1048  From..to bits: 0...10
1049  DefaultValue: 0x0
1050  Access type: read-write
1051  Description: Transfer block size
1052  This register is enabled when Block Count Enable (SD_CMD.BCE) is set to 1 and is valid only for multiple block transfers. It specifies the block size for block data transfers.
1053  Read operations during transfers may return an invalid value, and write operations are ignored.
1054  0h = No data transfer
1055  1h = 1 byte block length
1056  2h = 2 bytes block length
1057  3h = 3 bytes block length
1058  1FFh = 511 bytes block length
1059  200h = 512 bytes block length
1060  3FFh = 1023 bytes block length
1061  400h = 1024 bytes block length
1062 
1063 
1064  ENUMs:
1065  MINIMUM: Minimum value
1066  MAXIMUM: Maximum value
1067 */
1068 #define SDMMC_BLK_BLEN_W 11U
1069 #define SDMMC_BLK_BLEN_M 0x000007FFU
1070 #define SDMMC_BLK_BLEN_S 0U
1071 #define SDMMC_BLK_BLEN_MINIMUM 0x00000000U
1072 #define SDMMC_BLK_BLEN_MAXIMUM 0x000007FFU
1073 /*
1074 
1075  Field: NBLK
1076  From..to bits: 16...31
1077  DefaultValue: 0x0
1078  Access type: read-write
1079  Description: Block count for current transfer
1080  This register is enabled when Block count Enable (SD_CMD.BCE bit) is set to 1 and is valid only for multiple block transfers.
1081  Setting the block count to 0 results no data blocks being transferred.
1082  Note: The host controller decrements the block count after each block transfer and stops when the count reaches zero.
1083  This register can be accessed only if no transaction is executing (i.e., after a transaction has stopped). Read operations during transfers may return an invalid value and write operation will be ignored.
1084  0h = Stop count
1085  1h = 1 block
1086  2h = 2 blocks
1087  FFFFh = 65535 blocks
1088 
1089  ENUMs:
1090  MINIMUM: Minimum value
1091  MAXIMUM: Maximum value
1092 */
1093 #define SDMMC_BLK_NBLK_W 16U
1094 #define SDMMC_BLK_NBLK_M 0xFFFF0000U
1095 #define SDMMC_BLK_NBLK_S 16U
1096 #define SDMMC_BLK_NBLK_MINIMUM 0x00000000U
1097 #define SDMMC_BLK_NBLK_MAXIMUM 0xFFFF0000U
1098 
1099 
1100 /*-----------------------------------REGISTER------------------------------------
1101  Register name: ARG
1102  Offset name: SDMMC_O_ARG
1103  Relative address: 0x208
1104  Description: Command argument register
1105  This register contains command argument specified as bit 39-8 of Command-Format. These registers must be initialized prior to sending the command itself to the card (write action into the register SD_CMD register). Only exception is for a command index specifying stuff bits in arguments, making a write unnecessary.
1106  Default Value: 0x00000000
1107 
1108  Field: CMDARG
1109  From..to bits: 0...31
1110  DefaultValue: 0x0
1111  Access type: read-write
1112  Description: Command argument
1113 
1114  ENUMs:
1115  MINIMUM: Minimum value
1116  MAXIMUM: Maximum value
1117 */
1118 #define SDMMC_ARG_CMDARG_W 32U
1119 #define SDMMC_ARG_CMDARG_M 0xFFFFFFFFU
1120 #define SDMMC_ARG_CMDARG_S 0U
1121 #define SDMMC_ARG_CMDARG_MINIMUM 0x00000000U
1122 #define SDMMC_ARG_CMDARG_MAXIMUM 0xFFFFFFFFU
1123 
1124 
1125 /*-----------------------------------REGISTER------------------------------------
1126  Register name: CMD
1127  Offset name: SDMMC_O_CMD
1128  Relative address: 0x20C
1129  Description: Command and data transfer register
1130  This register configures the data and command transfers. A write into the most significant byte send the command. A write into SD_CMD[15:0] during data transfer has no effect. This register can be used for any card. In SYSTEST mode, a write to the SD_CMD register will not start a transfer.
1131  Default Value: 0x00000000
1132 
1133  Field: DE
1134  From..to bits: 0...0
1135  DefaultValue: 0x0
1136  Access type: read-write
1137  Description: DMA enable
1138  DMA can be enabled only if DMA Support bit in the Capabilities register is set. If this bit is set to 1, a DMA operation starts when the host writes to the upper byte of Command register (00Fh).
1139 
1140  ENUMs:
1141  ENABLE: DMA mode enable
1142  DISABLE: DMA mode disable
1143 */
1144 #define SDMMC_CMD_DE 0x00000001U
1145 #define SDMMC_CMD_DE_M 0x00000001U
1146 #define SDMMC_CMD_DE_S 0U
1147 #define SDMMC_CMD_DE_ENABLE 0x00000001U
1148 #define SDMMC_CMD_DE_DISABLE 0x00000000U
1149 /*
1150 
1151  Field: BCE
1152  From..to bits: 1...1
1153  DefaultValue: 0x0
1154  Access type: read-write
1155  Description: Block Count Enable
1156  This bit is used to enable the Block count register, which is only relevant for multiple block transfers.
1157  When this bit is 0, the Block Count register is disabled, which is useful in executing an infinite transfer.
1158 
1159  ENUMs:
1160  ENABLE: Block count enabled for multiple block transfer with known number of blocks
1161  DISABLE: Block count disabled for infinite transfer
1162 */
1163 #define SDMMC_CMD_BCE 0x00000002U
1164 #define SDMMC_CMD_BCE_M 0x00000002U
1165 #define SDMMC_CMD_BCE_S 1U
1166 #define SDMMC_CMD_BCE_ENABLE 0x00000002U
1167 #define SDMMC_CMD_BCE_DISABLE 0x00000000U
1168 /*
1169 
1170  Field: ACEN
1171  From..to bits: 2...3
1172  DefaultValue: 0x0
1173  Access type: read-write
1174  Description: Auto CMD Enable
1175  This field determines use of auto command functions.
1176  There are two methods to stop Multiple-block read and write operation
1177 
1178  (1) Auto CMD12 Enable
1179  When this field is set to 01b, the Host Controller issues CMD12 automatically when last block transfer is completed. Auto CMD12 error is indicated to the Auto CMD Error Status register. The Host Driver shall not set this bit if the command does not require CMD12. In particular, secure commands defined in the Part 3 File Security specification do not require CMD12.
1180 
1181  (2) Auto CMD23 Enable
1182  When this bit field is set to 10b, the Host Controller issues a CMD23 automatically before issuing a command specified in the Command Register. The Host Controller Version 3.00 and later shall support this function. The following conditions are required to use the Auto CMD23.
1183  - Auto CMD23 Supported (Host Controller Version is 3.00 or later)
1184  - A memory card that supports CMD23 (SCR[33]=1)
1185  - If DMA is used, it shall be ADMA.
1186  - Only when CMD18 or CMD25 is issued
1187  (Note, the Host Controller does not check command index.)
1188 
1189  Auto CMD23 can be used with or without ADMA. By writing the Command register, the Host Controller issues a CMD23 first and then issues a command specified by the Command Index in Command register. If response errors of CMD23 are detected, the second command is not issued. A CMD23 error is indicated in the Auto CMD Error Status register. 32-bit block count value for CMD23 is set to SDMA System Address / Argument 2 register.
1190 
1191 
1192  ENUMs:
1193  ENA12: Auto CMD12 enable or CCS detection enabled
1194  DISABLE: Auto CMD12 disable
1195  ENA23: Auto CMD23 enable
1196 */
1197 #define SDMMC_CMD_ACEN_W 2U
1198 #define SDMMC_CMD_ACEN_M 0x0000000CU
1199 #define SDMMC_CMD_ACEN_S 2U
1200 #define SDMMC_CMD_ACEN_ENA12 0x00000004U
1201 #define SDMMC_CMD_ACEN_DISABLE 0x00000000U
1202 #define SDMMC_CMD_ACEN_ENA23 0x00000008U
1203 /*
1204 
1205  Field: DDIR
1206  From..to bits: 4...4
1207  DefaultValue: 0x0
1208  Access type: read-write
1209  Description: Data transfer Direction Select
1210  This bit defines the data transfer direction
1211 
1212  ENUMs:
1213  READ: Data Read (card to host)
1214  WRITE: Data Write (host to card)
1215 */
1216 #define SDMMC_CMD_DDIR 0x00000010U
1217 #define SDMMC_CMD_DDIR_M 0x00000010U
1218 #define SDMMC_CMD_DDIR_S 4U
1219 #define SDMMC_CMD_DDIR_READ 0x00000010U
1220 #define SDMMC_CMD_DDIR_WRITE 0x00000000U
1221 /*
1222 
1223  Field: MSBS
1224  From..to bits: 5...5
1225  DefaultValue: 0x0
1226  Access type: read-write
1227  Description: Multi/Single block select
1228  This bit must be set to 1 for data transfer in case of multi block command.
1229  For any others command this bit must be cleared to 0.
1230 
1231  ENUMs:
1232  BLOCK: Multiple block
1233  SINGLE: Single block
1234 */
1235 #define SDMMC_CMD_MSBS 0x00000020U
1236 #define SDMMC_CMD_MSBS_M 0x00000020U
1237 #define SDMMC_CMD_MSBS_S 5U
1238 #define SDMMC_CMD_MSBS_BLOCK 0x00000020U
1239 #define SDMMC_CMD_MSBS_SINGLE 0x00000000U
1240 /*
1241 
1242  Field: RSPTYPE
1243  From..to bits: 16...17
1244  DefaultValue: 0x0
1245  Access type: read-write
1246  Description: Response type
1247  This bits defines the response type of the command.
1248 
1249  ENUMs:
1250  LEN136: Response Length 136 bits
1251  NORESP: No response
1252  LEN48: Response Length 48 bits
1253  LEN48BUSY: Response Length 48 bits with busy after response
1254 */
1255 #define SDMMC_CMD_RSPTYPE_W 2U
1256 #define SDMMC_CMD_RSPTYPE_M 0x00030000U
1257 #define SDMMC_CMD_RSPTYPE_S 16U
1258 #define SDMMC_CMD_RSPTYPE_LEN136 0x00010000U
1259 #define SDMMC_CMD_RSPTYPE_NORESP 0x00000000U
1260 #define SDMMC_CMD_RSPTYPE_LEN48 0x00020000U
1261 #define SDMMC_CMD_RSPTYPE_LEN48BUSY 0x00030000U
1262 /*
1263 
1264  Field: CCCE
1265  From..to bits: 19...19
1266  DefaultValue: 0x0
1267  Access type: read-write
1268  Description: Command CRC check enable
1269  If this bit is set to 1, the host checks the CRC field in the response. If an error is detected, it is reported as a Command CRC Error.
1270  If this bit is set to 0, the CRC field is not checked.
1271 
1272  ENUMs:
1273  ENABLE: CRC field check enable
1274  DISABLE: CRC field check disable
1275 */
1276 #define SDMMC_CMD_CCCE 0x00080000U
1277 #define SDMMC_CMD_CCCE_M 0x00080000U
1278 #define SDMMC_CMD_CCCE_S 19U
1279 #define SDMMC_CMD_CCCE_ENABLE 0x00080000U
1280 #define SDMMC_CMD_CCCE_DISABLE 0x00000000U
1281 /*
1282 
1283  Field: CICE
1284  From..to bits: 20...20
1285  DefaultValue: 0x0
1286  Access type: read-write
1287  Description: Command Index check enable
1288  If this bit is set to 1, the host checks the index field in the response to see if it has the same value as the command index. If it is not, it is reported as a Command Index Error.
1289  If this bit is set to 0, the Index field is not checked.
1290 
1291  ENUMs:
1292  ENABLE: Index check enable
1293  DISABLE: Index check disable
1294 */
1295 #define SDMMC_CMD_CICE 0x00100000U
1296 #define SDMMC_CMD_CICE_M 0x00100000U
1297 #define SDMMC_CMD_CICE_S 20U
1298 #define SDMMC_CMD_CICE_ENABLE 0x00100000U
1299 #define SDMMC_CMD_CICE_DISABLE 0x00000000U
1300 /*
1301 
1302  Field: DP
1303  From..to bits: 21...21
1304  DefaultValue: 0x0
1305  Access type: read-write
1306  Description: Data present select
1307  This register indicates that data is present and DAT line(s) shall be used.
1308  It must be cleared to 0 in the following conditions:
1309  - Command using only CMD line
1310  - Command with no data transfer but using busy signal on DAT[0] line
1311  - Resume command
1312 
1313  ENUMs:
1314  DAT: Command with data transfer
1315  NODAT: Command with no data transfer
1316 */
1317 #define SDMMC_CMD_DP 0x00200000U
1318 #define SDMMC_CMD_DP_M 0x00200000U
1319 #define SDMMC_CMD_DP_S 21U
1320 #define SDMMC_CMD_DP_DAT 0x00200000U
1321 #define SDMMC_CMD_DP_NODAT 0x00000000U
1322 /*
1323 
1324  Field: CMDTYP
1325  From..to bits: 22...23
1326  DefaultValue: 0x0
1327  Access type: read-write
1328  Description: Command type
1329  This bitfield specifies three types of special commands:
1330  - Suspend
1331  - Resume
1332  - Abort
1333  The bitfield is cleared to 0 for all other commands.
1334 
1335  ENUMs:
1336  SUSPEND: Upon CMD52 "Bus Suspend" operation
1337  OTHER: Others commands
1338  RESUME: Upon CMD52 "Function Select" operation
1339  ABORT: Upon CMD12 or CMD52 "I/O Abort" command
1340 */
1341 #define SDMMC_CMD_CMDTYP_W 2U
1342 #define SDMMC_CMD_CMDTYP_M 0x00C00000U
1343 #define SDMMC_CMD_CMDTYP_S 22U
1344 #define SDMMC_CMD_CMDTYP_SUSPEND 0x00400000U
1345 #define SDMMC_CMD_CMDTYP_OTHER 0x00000000U
1346 #define SDMMC_CMD_CMDTYP_RESUME 0x00800000U
1347 #define SDMMC_CMD_CMDTYP_ABORT 0x00C00000U
1348 /*
1349 
1350  Field: IDX
1351  From..to bits: 24...29
1352  DefaultValue: 0x0
1353  Access type: read-write
1354  Description: Command index
1355  Binary encoded value from 0 to 63 specifying the command number to send to card.
1356  Examples:
1357  - INDEX = 7h, sends CMD7 to the card
1358  - INDEX = 29h, sends CMD41 to the card
1359 
1360  ENUMs:
1361  MINIMUM: Minimum value
1362  MAXIMUM: Maximum value
1363 */
1364 #define SDMMC_CMD_IDX_W 6U
1365 #define SDMMC_CMD_IDX_M 0x3F000000U
1366 #define SDMMC_CMD_IDX_S 24U
1367 #define SDMMC_CMD_IDX_MINIMUM 0x00000000U
1368 #define SDMMC_CMD_IDX_MAXIMUM 0x3F000000U
1369 
1370 
1371 /*-----------------------------------REGISTER------------------------------------
1372  Register name: RSP10
1373  Offset name: SDMMC_O_RSP10
1374  Relative address: 0x210
1375  Description: Response register 10
1376  This 32-bit register holds bits positions [31:0] of command response type R1, R1b, R2, R3, R4, R5, R5b or R6.
1377  Default Value: 0x00000000
1378 
1379  Field: RSP0
1380  From..to bits: 0...15
1381  DefaultValue: 0x0
1382  Access type: read-only
1383  Description: Command Response [15:0]
1384 
1385  ENUMs:
1386  MINIMUM: Minimum value
1387  MAXIMUM: Maximum value
1388 */
1389 #define SDMMC_RSP10_RSP0_W 16U
1390 #define SDMMC_RSP10_RSP0_M 0x0000FFFFU
1391 #define SDMMC_RSP10_RSP0_S 0U
1392 #define SDMMC_RSP10_RSP0_MINIMUM 0x00000000U
1393 #define SDMMC_RSP10_RSP0_MAXIMUM 0x0000FFFFU
1394 /*
1395 
1396  Field: RSP1
1397  From..to bits: 16...31
1398  DefaultValue: 0x0
1399  Access type: read-only
1400  Description: Command Response [31:16]
1401 
1402  ENUMs:
1403  MINIMUM: Minimum value
1404  MAXIMUM: Maximum value
1405 */
1406 #define SDMMC_RSP10_RSP1_W 16U
1407 #define SDMMC_RSP10_RSP1_M 0xFFFF0000U
1408 #define SDMMC_RSP10_RSP1_S 16U
1409 #define SDMMC_RSP10_RSP1_MINIMUM 0x00000000U
1410 #define SDMMC_RSP10_RSP1_MAXIMUM 0xFFFF0000U
1411 
1412 
1413 /*-----------------------------------REGISTER------------------------------------
1414  Register name: RSP32
1415  Offset name: SDMMC_O_RSP32
1416  Relative address: 0x214
1417  Description: Response register 32
1418  This 32-bit register holds bits positions [63:32] of command response type R2.
1419  Default Value: 0x00000000
1420 
1421  Field: RSP2
1422  From..to bits: 0...15
1423  DefaultValue: 0x0
1424  Access type: read-only
1425  Description: Command Response [47:32]
1426 
1427  ENUMs:
1428  MINIMUM: Minimum value
1429  MAXIMUM: Maximum value
1430 */
1431 #define SDMMC_RSP32_RSP2_W 16U
1432 #define SDMMC_RSP32_RSP2_M 0x0000FFFFU
1433 #define SDMMC_RSP32_RSP2_S 0U
1434 #define SDMMC_RSP32_RSP2_MINIMUM 0x00000000U
1435 #define SDMMC_RSP32_RSP2_MAXIMUM 0x0000FFFFU
1436 /*
1437 
1438  Field: RSP3
1439  From..to bits: 16...31
1440  DefaultValue: 0x0
1441  Access type: read-only
1442  Description: Command Response [63:48]
1443 
1444  ENUMs:
1445  MINIMUM: Minimum value
1446  MAXIMUM: Maximum value
1447 */
1448 #define SDMMC_RSP32_RSP3_W 16U
1449 #define SDMMC_RSP32_RSP3_M 0xFFFF0000U
1450 #define SDMMC_RSP32_RSP3_S 16U
1451 #define SDMMC_RSP32_RSP3_MINIMUM 0x00000000U
1452 #define SDMMC_RSP32_RSP3_MAXIMUM 0xFFFF0000U
1453 
1454 
1455 /*-----------------------------------REGISTER------------------------------------
1456  Register name: RSP54
1457  Offset name: SDMMC_O_RSP54
1458  Relative address: 0x218
1459  Description: Response register 54
1460  This 32-bit register holds bits positions [95:64] of command response type R2.
1461  Default Value: 0x00000000
1462 
1463  Field: RSP4
1464  From..to bits: 0...15
1465  DefaultValue: 0x0
1466  Access type: read-only
1467  Description: Command Response [79:64]
1468 
1469  ENUMs:
1470  MINIMUM: Minimum value
1471  MAXIMUM: Maximum value
1472 */
1473 #define SDMMC_RSP54_RSP4_W 16U
1474 #define SDMMC_RSP54_RSP4_M 0x0000FFFFU
1475 #define SDMMC_RSP54_RSP4_S 0U
1476 #define SDMMC_RSP54_RSP4_MINIMUM 0x00000000U
1477 #define SDMMC_RSP54_RSP4_MAXIMUM 0x0000FFFFU
1478 /*
1479 
1480  Field: RSP5
1481  From..to bits: 16...31
1482  DefaultValue: 0x0
1483  Access type: read-only
1484  Description: Command Response [95:80]
1485 
1486  ENUMs:
1487  MINIMUM: Minimum value
1488  MAXIMUM: Maximum value
1489 */
1490 #define SDMMC_RSP54_RSP5_W 16U
1491 #define SDMMC_RSP54_RSP5_M 0xFFFF0000U
1492 #define SDMMC_RSP54_RSP5_S 16U
1493 #define SDMMC_RSP54_RSP5_MINIMUM 0x00000000U
1494 #define SDMMC_RSP54_RSP5_MAXIMUM 0xFFFF0000U
1495 
1496 
1497 /*-----------------------------------REGISTER------------------------------------
1498  Register name: RSP76
1499  Offset name: SDMMC_O_RSP76
1500  Relative address: 0x21C
1501  Description: Response register 76
1502  This 32-bit register holds bits positions [127:96] of command response type R2.
1503  Default Value: 0x00000000
1504 
1505  Field: RSP6
1506  From..to bits: 0...15
1507  DefaultValue: 0x0
1508  Access type: read-only
1509  Description: Command Response [111:96]
1510 
1511  ENUMs:
1512  MINIMUM: Minimum value
1513  MAXIMUM: Maximum value
1514 */
1515 #define SDMMC_RSP76_RSP6_W 16U
1516 #define SDMMC_RSP76_RSP6_M 0x0000FFFFU
1517 #define SDMMC_RSP76_RSP6_S 0U
1518 #define SDMMC_RSP76_RSP6_MINIMUM 0x00000000U
1519 #define SDMMC_RSP76_RSP6_MAXIMUM 0x0000FFFFU
1520 /*
1521 
1522  Field: RSP7
1523  From..to bits: 16...31
1524  DefaultValue: 0x0
1525  Access type: read-only
1526  Description: Command Response [127:112]
1527 
1528  ENUMs:
1529  MINIMUM: Minimum value
1530  MAXIMUM: Maximum value
1531 */
1532 #define SDMMC_RSP76_RSP7_W 16U
1533 #define SDMMC_RSP76_RSP7_M 0xFFFF0000U
1534 #define SDMMC_RSP76_RSP7_S 16U
1535 #define SDMMC_RSP76_RSP7_MINIMUM 0x00000000U
1536 #define SDMMC_RSP76_RSP7_MAXIMUM 0xFFFF0000U
1537 
1538 
1539 /*-----------------------------------REGISTER------------------------------------
1540  Register name: DATA
1541  Offset name: SDMMC_O_DATA
1542  Relative address: 0x220
1543  Description: Data register
1544  This register is the 32-bit entry point of the buffer for read or write data transfers.
1545  The buffer size is 32bits x 256 (1024 bytes). Bytes within a word are stored and read in little endian format. This buffer can be used as two 512 byte buffers to transfer data efficiently without reducing the throughput. Sequential and contiguous access is necessary to increment the pointer correctly. Random or skipped access is not allowed.
1546  If the local host accesses this register byte-wise or 16bit-wise, the least significant byte (bits [7:0]) must always be written/read first. The update of the buffer address is done on the most significant byte write.
1547  Default Value: 0x00000000
1548 
1549  Field: VAL
1550  From..to bits: 0...31
1551  DefaultValue: 0x0
1552  Access type: read-write
1553  Description: Buffer data register
1554  In functional mode (SD_CON.MODE = FUNC):
1555  - a read access to this register is allowed only when the buffer read enable status is set to 1 (SD_PSTATE.BREN), otherwise a bad access (SD_STAT.BADA) is signaled.
1556  - a write access to this register is allowed only when the buffer write enable status is set to 1 (SD_PSTATE.BWEN), otherwise a bad access (SD_STAT.BADA) is signaled and the data is not written.
1557 
1558  ENUMs:
1559  MINIMUM: Minimum value
1560  MAXIMUM: Maximum value
1561 */
1562 #define SDMMC_DATA_VAL_W 32U
1563 #define SDMMC_DATA_VAL_M 0xFFFFFFFFU
1564 #define SDMMC_DATA_VAL_S 0U
1565 #define SDMMC_DATA_VAL_MINIMUM 0x00000000U
1566 #define SDMMC_DATA_VAL_MAXIMUM 0xFFFFFFFFU
1567 
1568 
1569 /*-----------------------------------REGISTER------------------------------------
1570  Register name: PSTATE
1571  Offset name: SDMMC_O_PSTATE
1572  Relative address: 0x224
1573  Description: SDMMC controller status register
1574  The host can get the status of the SDMMC controller from this 32-bit read only register.
1575  Default Value: 0x00000000
1576 
1577  Field: CMDI
1578  From..to bits: 0...0
1579  DefaultValue: 0x0
1580  Access type: read-only
1581  Description: Command Inhibit (CMD) (SD Mode Only)
1582  If this bit is 0, it indicates the CMD line is not in use and the host can issue a SD command using the CMD line. This bit is set immediately after the Command register (00Fh) is written. This bit is cleared when the command response is received. Even if the Command Inhibit (DAT) is set to 1, Commands using only the CMD line can be issued if this bit is 0. Changing from 1 to 0 generates a Command complete interrupt. If the host cannot issue the command because of a command conflict error or because of Command Not Issued By Auto CMD12 Error, this bit shall remain 1 and the Command Complete is not set. Status issuing Auto CMD12 is not read from this bit.
1583  Auto CMD12 and Auto CMD23 consist of two responses. In this case, this bit is not cleared by the response of CMD12 or CMD23 but cleared by the response of a read/write command. Status issuing Auto CMD12 is not read from this bit. So if a command is issued during Auto CMD12 operation, Host Controller shall manage to issue two commands: CMD12 and a command set by Command register.
1584 
1585  ENUMs:
1586  NOTALLOWED: Issuing of command using mmc_cmd line is not allowed
1587  ALLOWED: Issuing of command using mmc_cmd line is allowed
1588 */
1589 #define SDMMC_PSTATE_CMDI 0x00000001U
1590 #define SDMMC_PSTATE_CMDI_M 0x00000001U
1591 #define SDMMC_PSTATE_CMDI_S 0U
1592 #define SDMMC_PSTATE_CMDI_NOTALLOWED 0x00000001U
1593 #define SDMMC_PSTATE_CMDI_ALLOWED 0x00000000U
1594 /*
1595 
1596  Field: DATI
1597  From..to bits: 1...1
1598  DefaultValue: 0x0
1599  Access type: read-only
1600  Description: Command Inhibit (DAT) (SD Mode Only)
1601  This status bit is generated if either the DAT Line Active or the Read transfer Active is set to 1. If this bit is 0, it indicates the host can issue the next SD command. Commands with busy signal belong to Command Inhibit (DAT) (ex. R1b, R5b type).
1602  Changing from 1 to 0 generates a Transfer Complete interrupt.
1603  Note: The SD Host Driver can save registers in the range of 000-00Dh for a suspend transaction after this bit has changed from 1 to 0.
1604 
1605  ENUMs:
1606  NOTALLOWED: Issuing of command using DAT lines is not allowed
1607  ALLOWED: Issuing of command using the DAT lines is allowed
1608 */
1609 #define SDMMC_PSTATE_DATI 0x00000002U
1610 #define SDMMC_PSTATE_DATI_M 0x00000002U
1611 #define SDMMC_PSTATE_DATI_S 1U
1612 #define SDMMC_PSTATE_DATI_NOTALLOWED 0x00000002U
1613 #define SDMMC_PSTATE_DATI_ALLOWED 0x00000000U
1614 /*
1615 
1616  Field: DLA
1617  From..to bits: 2...2
1618  DefaultValue: 0x0
1619  Access type: read-only
1620  Description: DATA Line Active (SD Mode only)
1621  This bit indicates whether one of the DATA lines on SD bus is in use.
1622 
1623  ENUMs:
1624  ACTIVE: mmc_data line active
1625  INACTIVE: mmc_data line inactive
1626 */
1627 #define SDMMC_PSTATE_DLA 0x00000004U
1628 #define SDMMC_PSTATE_DLA_M 0x00000004U
1629 #define SDMMC_PSTATE_DLA_S 2U
1630 #define SDMMC_PSTATE_DLA_ACTIVE 0x00000004U
1631 #define SDMMC_PSTATE_DLA_INACTIVE 0x00000000U
1632 /*
1633 
1634  Field: WTA
1635  From..to bits: 8...8
1636  DefaultValue: 0x0
1637  Access type: read-only
1638  Description: Write transfer active
1639  This status indicates a write transfer active. If this bit is 0, it means no valid write data exists.
1640  This bit is set in either of the following cases:
1641  - After the end bit of the write command.
1642  - When writing a 1 to Continue Request in the Block Gap Control register to restart a write transfer.
1643  This bit is cleared in either of the following cases:
1644  - After getting the CRC status of the last data block as specified by the transfer count (Single or Multiple)
1645  - After getting a CRC status of any block where data transmission is about to be stopped by a Stop At Block Gap Request. During a write transaction, a Block Gap Event interrupt is generated when this bit is changed to 0, as a result of the Stop At Block Gap Request being set. This status is useful for the host to determine when to issue commands during write busy.
1646 
1647  ENUMs:
1648  ACTIVE: Write data transfer on going
1649  NODATA: No valid data
1650 
1651 */
1652 #define SDMMC_PSTATE_WTA 0x00000100U
1653 #define SDMMC_PSTATE_WTA_M 0x00000100U
1654 #define SDMMC_PSTATE_WTA_S 8U
1655 #define SDMMC_PSTATE_WTA_ACTIVE 0x00000100U
1656 #define SDMMC_PSTATE_WTA_NODATA 0x00000000U
1657 /*
1658 
1659  Field: RTA
1660  From..to bits: 9...9
1661  DefaultValue: 0x0
1662  Access type: read-only
1663  Description: Read transfer active (SD mode only)
1664  This status is used for detecting completion of a read transfer.
1665  This bit is set to 1 for either of the following conditions:
1666  - After the end bit of the read command
1667  - When writing a 1 to continue Request in the Block Gap Control register to restart a read transfer
1668  This bit is cleared to 0 for either of the following conditions:
1669  - When the last data block as specified by block length is transferred to the system.
1670  - When all valid data blocks have been transferred to the system and no current block transfers are being sent as a result of the Stop At Block Gap Request set to 1. A transfer complete interrupt is generated when this bit changes to 0.
1671 
1672  ENUMs:
1673  ACTIVE: Read data transfer on going
1674  NODATA: No valid data
1675 */
1676 #define SDMMC_PSTATE_RTA 0x00000200U
1677 #define SDMMC_PSTATE_RTA_M 0x00000200U
1678 #define SDMMC_PSTATE_RTA_S 9U
1679 #define SDMMC_PSTATE_RTA_ACTIVE 0x00000200U
1680 #define SDMMC_PSTATE_RTA_NODATA 0x00000000U
1681 /*
1682 
1683  Field: BWE
1684  From..to bits: 10...10
1685  DefaultValue: 0x0
1686  Access type: read-only
1687  Description: Buffer write enable
1688  This status is used for non-DMA write transfers.
1689  This read only flag indicates if space is available for write data. If this bit is 1, data can be written to the buffer.
1690  A change of this bit from 1 to 0 occurs when all the block data is written to the buffer.
1691  A change of this bit from 0 to 1 occurs when top of block data can be written to the buffer and generates the Buffer Write Ready Interrupt.
1692 
1693  ENUMs:
1694  SPACE: There is enough space in the buffer to write BLEN bytes of data
1695  NOSPACE: There is no room left in the buffer to write BLEN bytes of data.
1696 */
1697 #define SDMMC_PSTATE_BWE 0x00000400U
1698 #define SDMMC_PSTATE_BWE_M 0x00000400U
1699 #define SDMMC_PSTATE_BWE_S 10U
1700 #define SDMMC_PSTATE_BWE_SPACE 0x00000400U
1701 #define SDMMC_PSTATE_BWE_NOSPACE 0x00000000U
1702 /*
1703 
1704  Field: BRE
1705  From..to bits: 11...11
1706  DefaultValue: 0x0
1707  Access type: read-only
1708  Description: Buffer read enable
1709  This bit is used for non-DMA read transfers.
1710  This read only flag indicates that valid data exists in the host side buffer status. If this bit is 1, readable data exists in the buffer.
1711  A change of this bit from 1 to 0 occurs when all the block data is read from the buffer.
1712  A change of this bit from 0 to 1 occurs when all the block data is ready in the buffer and generates the Buffer Read Ready Interrupt.
1713 
1714  ENUMs:
1715  ENABLE: Read BLEN bytes enable. Readable data exists in the buffer.
1716  DISABLE: Read BLEN bytes disable
1717 */
1718 #define SDMMC_PSTATE_BRE 0x00000800U
1719 #define SDMMC_PSTATE_BRE_M 0x00000800U
1720 #define SDMMC_PSTATE_BRE_S 11U
1721 #define SDMMC_PSTATE_BRE_ENABLE 0x00000800U
1722 #define SDMMC_PSTATE_BRE_DISABLE 0x00000000U
1723 /*
1724 
1725  Field: CINS
1726  From..to bits: 16...16
1727  DefaultValue: 0x0
1728  Access type: read-only
1729  Description: Card inserted
1730  This bit is the debounced value of the card detect input pin (SDCD).
1731  An inactive to active transition of the card detect input pin (SDCD) will generate a card insertion interrupt (SD_STAT.CINS).
1732  An active to inactive transition of the card detect input pin (SDCD) will generate a card removal interrupt (SD_STAT.REM).
1733  This bit is not affected by a software reset.
1734 
1735  ENUMs:
1736  CARD: Card is detected
1737  Note: SD_CON.CDP need to reflect the correct active level of the write protect input signal (SDCD).
1738  NOCARD: No card is detected
1739  Note: SD_CON.CDP need to reflect the correct active level of the write protect input signal (SDCD).
1740 */
1741 #define SDMMC_PSTATE_CINS 0x00010000U
1742 #define SDMMC_PSTATE_CINS_M 0x00010000U
1743 #define SDMMC_PSTATE_CINS_S 16U
1744 #define SDMMC_PSTATE_CINS_CARD 0x00010000U
1745 #define SDMMC_PSTATE_CINS_NOCARD 0x00000000U
1746 /*
1747 
1748  Field: CSS
1749  From..to bits: 17...17
1750  DefaultValue: 0x0
1751  Access type: read-only
1752  Description: Card State Stable
1753  This bit is used for testing.
1754  It is set to 1 only when Card Detect Pin Level is stable (SD_PSTATE.CPDL).
1755  Debouncing is performed on the card detect input pin (SDCD) to detect card stability.
1756  This bit is not affected by software reset.
1757 
1758  ENUMs:
1759  STABLE: Card detect pin level is stable
1760  DEBOUNCE: Card detect pin level is debouncing
1761 */
1762 #define SDMMC_PSTATE_CSS 0x00020000U
1763 #define SDMMC_PSTATE_CSS_M 0x00020000U
1764 #define SDMMC_PSTATE_CSS_S 17U
1765 #define SDMMC_PSTATE_CSS_STABLE 0x00020000U
1766 #define SDMMC_PSTATE_CSS_DEBOUNCE 0x00000000U
1767 /*
1768 
1769  Field: CDPL
1770  From..to bits: 18...18
1771  DefaultValue: 0x0
1772  Access type: read-only
1773  Description: Card Detect Pin Level
1774  This bit reflects the inverse value of the card detect input pin (SDCD).
1775 
1776  ENUMs:
1777  LOW: The value of the card detect input pin (SDCD) is 0
1778  HIGH: The value of the card detect input pin (SDCD) is 1
1779 */
1780 #define SDMMC_PSTATE_CDPL 0x00040000U
1781 #define SDMMC_PSTATE_CDPL_M 0x00040000U
1782 #define SDMMC_PSTATE_CDPL_S 18U
1783 #define SDMMC_PSTATE_CDPL_LOW 0x00040000U
1784 #define SDMMC_PSTATE_CDPL_HIGH 0x00000000U
1785 /*
1786 
1787  Field: WP
1788  From..to bits: 19...19
1789  DefaultValue: 0x0
1790  Access type: read-only
1791  Description: Write Protect
1792  This bit reflects the write protect input pin (SDWP) level.
1793 
1794  ENUMs:
1795  NOPROTECT: The card is not write protected
1796  Note: SD_CON.WPP need to reflect the correct active setting of the write protect input signal (SDWP).
1797  PROTECT: The card is write protected.
1798  Note: SD_CON.WPP need to reflect the correct active setting of the write protect input signal (SDWP).
1799 */
1800 #define SDMMC_PSTATE_WP 0x00080000U
1801 #define SDMMC_PSTATE_WP_M 0x00080000U
1802 #define SDMMC_PSTATE_WP_S 19U
1803 #define SDMMC_PSTATE_WP_NOPROTECT 0x00080000U
1804 #define SDMMC_PSTATE_WP_PROTECT 0x00000000U
1805 /*
1806 
1807  Field: DLEV
1808  From..to bits: 20...23
1809  DefaultValue: 0x0
1810  Access type: read-only
1811  Description: DATA line 0 to 3 signal level
1812  Bit 3 reflects DATA[3] signal level.
1813  Bit 2 reflects DATA[2] signal level.
1814  Bit 1 reflects DATA[1] signal level.
1815  Bit 0 reflects DATA[0] signal level.
1816  This status is used to check DAT line level to recover from errors, and for debugging.
1817  This is especially useful in detecting the busy signal level from DAT[0].
1818 
1819  ENUMs:
1820  MINIMUM: Minimum value
1821  MAXIMUM: Maximum value
1822 */
1823 #define SDMMC_PSTATE_DLEV_W 4U
1824 #define SDMMC_PSTATE_DLEV_M 0x00F00000U
1825 #define SDMMC_PSTATE_DLEV_S 20U
1826 #define SDMMC_PSTATE_DLEV_MINIMUM 0x00000000U
1827 #define SDMMC_PSTATE_DLEV_MAXIMUM 0x00F00000U
1828 /*
1829 
1830  Field: CLEV
1831  From..to bits: 24...24
1832  DefaultValue: 0x0
1833  Access type: read-only
1834  Description: Command line signal level
1835  This status is used to check the CMD line level to recover from errors, and for debugging.
1836 
1837  ENUMs:
1838  LOW: The mmc_cmd line level is 0
1839  HIGH: The mmc_cmd line level is 1
1840 */
1841 #define SDMMC_PSTATE_CLEV 0x01000000U
1842 #define SDMMC_PSTATE_CLEV_M 0x01000000U
1843 #define SDMMC_PSTATE_CLEV_S 24U
1844 #define SDMMC_PSTATE_CLEV_LOW 0x00000000U
1845 #define SDMMC_PSTATE_CLEV_HIGH 0x01000000U
1846 
1847 
1848 /*-----------------------------------REGISTER------------------------------------
1849  Register name: HCTL
1850  Offset name: SDMMC_O_HCTL
1851  Relative address: 0x228
1852  Description: Host Control Register
1853 
1854  This register defines the host controls to set power, wakeup and transfer parameters.
1855 
1856  SD_HCTL[31:24] = Wakeup control
1857  SD_HCTL[23:16] = Block gap control
1858  SD_HCTL[15:8] = Power control
1859  SD_HCTL[7:0] = Host control
1860 
1861  Default Value: 0x00000000
1862 
1863  Field: DTW
1864  From..to bits: 1...1
1865  DefaultValue: 0x0
1866  Access type: read-write
1867  Description: Data transfer width
1868  This bit must be set following a valid SET_BUS_WIDTH command (ACMD6) with the value written in bit 1 of the argument.
1869  Prior to this command, the SD card configuration register (SCR) must be verified for the supported bus width by the SD card.
1870 
1871  ENUMs:
1872  WIDTH_1: 1-bit Data width (mmc_dat0 used)
1873  WIDTH_4: 4-bit Data width (mmc_dat[3:0] used)
1874 */
1875 #define SDMMC_HCTL_DTW 0x00000002U
1876 #define SDMMC_HCTL_DTW_M 0x00000002U
1877 #define SDMMC_HCTL_DTW_S 1U
1878 #define SDMMC_HCTL_DTW_WIDTH_1 0x00000000U
1879 #define SDMMC_HCTL_DTW_WIDTH_4 0x00000002U
1880 /*
1881 
1882  Field: HSPE
1883  From..to bits: 2...2
1884  DefaultValue: 0x0
1885  Access type: read-write
1886  Description: High Speed Enable
1887  Before setting this bit, the Host Driver shall check the High Speed Support in the Capabilities register.
1888  If this bit is cleared to 0 (default), the Host Controller outputs CMD line and DAT lines at the falling edge of the SD Clock.
1889  If this bit is set to 1, the Host Controller outputs CMD line and DAT lines at the rising edge of the SD Clock.
1890 
1891  ENUMs:
1892  NOMAL: Normal speed mode
1893  HIGH: High speed mode
1894 */
1895 #define SDMMC_HCTL_HSPE 0x00000004U
1896 #define SDMMC_HCTL_HSPE_M 0x00000004U
1897 #define SDMMC_HCTL_HSPE_S 2U
1898 #define SDMMC_HCTL_HSPE_NOMAL 0x00000000U
1899 #define SDMMC_HCTL_HSPE_HIGH 0x00000004U
1900 /*
1901 
1902  Field: DMAS
1903  From..to bits: 3...4
1904  DefaultValue: 0x0
1905  Access type: read-write
1906  Description: DMA Select Mode
1907  Note: This functionality is not is not supported, since MADMA_EN = 0 by design.
1908 
1909  ENUMs:
1910  MINIMUM: Minimum value
1911  MAX: Maximum value
1912 */
1913 #define SDMMC_HCTL_DMAS_W 2U
1914 #define SDMMC_HCTL_DMAS_M 0x00000018U
1915 #define SDMMC_HCTL_DMAS_S 3U
1916 #define SDMMC_HCTL_DMAS_MINIMUM 0x00000000U
1917 #define SDMMC_HCTL_DMAS_MAX 0x00000018U
1918 /*
1919 
1920  Field: CDTL
1921  From..to bits: 6...6
1922  DefaultValue: 0x0
1923  Access type: read-write
1924  Description: Card Detect Test Level
1925  This bit is only functional when the Card Detect Signal Selection selects the Card Detect Test Level mode (SD_HCTL.CDSS = 1).
1926 
1927  ENUMs:
1928  NOCARD: No card
1929  CARD: Card inserted
1930 */
1931 #define SDMMC_HCTL_CDTL 0x00000040U
1932 #define SDMMC_HCTL_CDTL_M 0x00000040U
1933 #define SDMMC_HCTL_CDTL_S 6U
1934 #define SDMMC_HCTL_CDTL_NOCARD 0x00000000U
1935 #define SDMMC_HCTL_CDTL_CARD 0x00000040U
1936 /*
1937 
1938  Field: CDSS
1939  From..to bits: 7...7
1940  DefaultValue: 0x0
1941  Access type: read-write
1942  Description: Card Detect Signal Selection
1943  This bit selects the source for the card detection.
1944  When the source for the card detection is switched, the Card insertion and removal interrupts should be disabled to avoid unexpected interrupts.
1945  In Card Detect Test Level mode, the card insertion and removal signal can be controlled by SD_HCTL.CDTL.
1946 
1947  ENUMs:
1948  SDCD: SDCD signal is selected (for normal use)
1949  TEST: The Card Detect Test Level is selected (for test purposes)
1950 */
1951 #define SDMMC_HCTL_CDSS 0x00000080U
1952 #define SDMMC_HCTL_CDSS_M 0x00000080U
1953 #define SDMMC_HCTL_CDSS_S 7U
1954 #define SDMMC_HCTL_CDSS_SDCD 0x00000000U
1955 #define SDMMC_HCTL_CDSS_TEST 0x00000080U
1956 /*
1957 
1958  Field: SDBP
1959  From..to bits: 8...8
1960  DefaultValue: 0x0
1961  Access type: read-write
1962  Description: SD bus power.
1963  Before setting this bit, the host driver shall select the SD bus voltage (SD_HCTL[11:9] SDVS bits).
1964  If the host controller detects the No card state, this bit is automatically cleared to 0.
1965  If the module is power off, a write in the command register (SD_CMD) will not start the transfer.
1966  A write to this bit has no effect if the selected SD bus voltage is not supported according to capability register (SD_CAPA[26] VS18 bit, SD_CAPA[25] VS30 bit or SD_CAPA[24] VS33 bit).
1967 
1968  ENUMs:
1969  OFF: Power off
1970  ON: Power on
1971 */
1972 #define SDMMC_HCTL_SDBP 0x00000100U
1973 #define SDMMC_HCTL_SDBP_M 0x00000100U
1974 #define SDMMC_HCTL_SDBP_S 8U
1975 #define SDMMC_HCTL_SDBP_OFF 0x00000000U
1976 #define SDMMC_HCTL_SDBP_ON 0x00000100U
1977 /*
1978 
1979  Field: SDVS
1980  From..to bits: 9...11
1981  DefaultValue: 0x0
1982  Access type: read-write
1983  Description: SD bus voltage select (All cards).
1984  The host driver should set these bits to select the voltage level for the card according to the voltage supported by the system (SD_CAPA[26] VS18 bit, SD_CAPA[25] VS30 bit, SD_CAPA[24] VS33 bit) before starting a transfer.
1985 
1986  ENUMs:
1987  MID: 3.0V (Typical)
1988  LOW: 1.8V (Typical)
1989  HIGH: 3.3V (Typical)
1990 */
1991 #define SDMMC_HCTL_SDVS_W 3U
1992 #define SDMMC_HCTL_SDVS_M 0x00000E00U
1993 #define SDMMC_HCTL_SDVS_S 9U
1994 #define SDMMC_HCTL_SDVS_MID 0x00000C00U
1995 #define SDMMC_HCTL_SDVS_LOW 0x00000A00U
1996 #define SDMMC_HCTL_SDVS_HIGH 0x00000E00U
1997 /*
1998 
1999  Field: SBGR
2000  From..to bits: 16...16
2001  DefaultValue: 0x0
2002  Access type: read-write
2003  Description: Stop at block gap request
2004  This bit is used to stop executing a transaction at the next block gap.
2005  The transfer can restart with a continue request (SD_HCTL.CR) or during a suspend/resume sequence.
2006  In case of read transfer, the card must support read wait control.
2007  In case of write transfer, the host driver must set this bit after all block data written.
2008  Until the transfer completion (SD_STAT.TC bit set to 1), the host driver must leave this bit set to 1. If this bit is set, the local host may not write to the data register (DATA).
2009 
2010  ENUMs:
2011  TRANS: Transfer mode
2012  STOP: Stop at block gap
2013 */
2014 #define SDMMC_HCTL_SBGR 0x00010000U
2015 #define SDMMC_HCTL_SBGR_M 0x00010000U
2016 #define SDMMC_HCTL_SBGR_S 16U
2017 #define SDMMC_HCTL_SBGR_TRANS 0x00000000U
2018 #define SDMMC_HCTL_SBGR_STOP 0x00010000U
2019 /*
2020 
2021  Field: CR
2022  From..to bits: 17...17
2023  DefaultValue: 0x0
2024  Access type: read-write
2025  Description: Continue request
2026  This bit is used to restart a transaction that was stopped by requesting a stop at block gap (SD_HCTL[16] SBGR bit).
2027  Set this bit to 1 restarts the transfer.
2028  The bit is automatically cleared to 0 by the host controller when transfer has restarted, that is, mmc_dat line is active (SD_PSTATE.DLA) or transferring data (SD_PSTATE.WTA).
2029  The Stop at block gap request must be disabled (SD_HCTL[16]
2030  SBGR bit =0) before setting this bit.
2031 
2032  ENUMs:
2033  NOEFFECT: No effect
2034  RESTART: Transfer restart
2035 */
2036 #define SDMMC_HCTL_CR 0x00020000U
2037 #define SDMMC_HCTL_CR_M 0x00020000U
2038 #define SDMMC_HCTL_CR_S 17U
2039 #define SDMMC_HCTL_CR_NOEFFECT 0x00000000U
2040 #define SDMMC_HCTL_CR_RESTART 0x00020000U
2041 /*
2042 
2043  Field: RWC
2044  From..to bits: 18...18
2045  DefaultValue: 0x0
2046  Access type: read-write
2047  Description: Read wait control
2048  The read wait function is optional only for SDIO cards.
2049  If the card supports read wait, this bit must be enabled, then requesting a stop at block gap (SD_HCTL.SBGR) generates a read wait period after the current end of block.
2050  Note: If read wait is not supported it may cause a conflict on mmc_dat line.
2051 
2052  ENUMs:
2053  DISABLE: Disable read wait control. Suspend/resume cannot be supported
2054  ENABLE: Enable read wait control
2055 */
2056 #define SDMMC_HCTL_RWC 0x00040000U
2057 #define SDMMC_HCTL_RWC_M 0x00040000U
2058 #define SDMMC_HCTL_RWC_S 18U
2059 #define SDMMC_HCTL_RWC_DISABLE 0x00000000U
2060 #define SDMMC_HCTL_RWC_ENABLE 0x00040000U
2061 /*
2062 
2063  Field: IBG
2064  From..to bits: 19...19
2065  DefaultValue: 0x0
2066  Access type: read-write
2067  Description: Interrupt block at gap
2068  This bit is valid only in 4-bit mode of SDIO card to enable interrupt detection in the interrupt cycle at block gap for a multiple block transfer.
2069  For MMC cards and for SD card this bit should be cleared to 0.
2070 
2071  ENUMs:
2072  DISABLE: Disable interrupt detection at the block gap in 4-bit mode
2073  ENABLE: Enable interrupt detection at the block gap in 4-bit mode
2074 */
2075 #define SDMMC_HCTL_IBG 0x00080000U
2076 #define SDMMC_HCTL_IBG_M 0x00080000U
2077 #define SDMMC_HCTL_IBG_S 19U
2078 #define SDMMC_HCTL_IBG_DISABLE 0x00000000U
2079 #define SDMMC_HCTL_IBG_ENABLE 0x00080000U
2080 /*
2081 
2082  Field: IWE
2083  From..to bits: 24...24
2084  DefaultValue: 0x0
2085  Access type: read-write
2086  Description: Wakeup event enable on SD card interrupt
2087  Note: This bit has no effect since the wakeup output is unconnected
2088 
2089  ENUMs:
2090  MIN: Minimum value
2091  MAX: Maximum value
2092 */
2093 #define SDMMC_HCTL_IWE 0x01000000U
2094 #define SDMMC_HCTL_IWE_M 0x01000000U
2095 #define SDMMC_HCTL_IWE_S 24U
2096 #define SDMMC_HCTL_IWE_MIN 0x00000000U
2097 #define SDMMC_HCTL_IWE_MAX 0x01000000U
2098 /*
2099 
2100  Field: INS
2101  From..to bits: 25...25
2102  DefaultValue: 0x0
2103  Access type: read-write
2104  Description: Wakeup event enable on SD card insertion
2105  Note: This bit has no effect since the wakeup output is unconnected
2106 
2107  ENUMs:
2108  MIN: Minimum value
2109  MAX: Maximum value
2110 */
2111 #define SDMMC_HCTL_INS 0x02000000U
2112 #define SDMMC_HCTL_INS_M 0x02000000U
2113 #define SDMMC_HCTL_INS_S 25U
2114 #define SDMMC_HCTL_INS_MIN 0x00000000U
2115 #define SDMMC_HCTL_INS_MAX 0x02000000U
2116 /*
2117 
2118  Field: REM
2119  From..to bits: 26...26
2120  DefaultValue: 0x0
2121  Access type: read-write
2122  Description: Wakeup event enable on SD card removal
2123  Note: This bit has no effect since the wakeup output is unconnected
2124 
2125  ENUMs:
2126  MIN: Minimum value
2127  MAX: Maximum value
2128 */
2129 #define SDMMC_HCTL_REM 0x04000000U
2130 #define SDMMC_HCTL_REM_M 0x04000000U
2131 #define SDMMC_HCTL_REM_S 26U
2132 #define SDMMC_HCTL_REM_MIN 0x00000000U
2133 #define SDMMC_HCTL_REM_MAX 0x04000000U
2134 /*
2135 
2136  Field: OBWE
2137  From..to bits: 27...27
2138  DefaultValue: 0x0
2139  Access type: read-write
2140  Description: Wakeup event enable for 'Out-of-Band' Interrupt
2141  Note: This bit has no effect since the wakeup output is unconnected
2142  Note: Out-of-Band Interrupt (OBI) is not supported
2143 
2144  ENUMs:
2145  MIN: Minimum value
2146  MAX: Maximum value
2147 */
2148 #define SDMMC_HCTL_OBWE 0x08000000U
2149 #define SDMMC_HCTL_OBWE_M 0x08000000U
2150 #define SDMMC_HCTL_OBWE_S 27U
2151 #define SDMMC_HCTL_OBWE_MIN 0x00000000U
2152 #define SDMMC_HCTL_OBWE_MAX 0x08000000U
2153 
2154 
2155 /*-----------------------------------REGISTER------------------------------------
2156  Register name: SYSCTL
2157  Offset name: SDMMC_O_SYSCTL
2158  Relative address: 0x22C
2159  Description: SD System Control Register
2160 
2161  This register defines the system controls clock frequency management and data timeout.
2162 
2163  SD_SYSCTL[23:16] = Timeout control
2164  SD_SYSCTL[15:0] = Clock control
2165 
2166  Default Value: 0x00000000
2167 
2168  Field: ICE
2169  From..to bits: 0...0
2170  DefaultValue: 0x0
2171  Access type: read-write
2172  Description: Internal clock enable
2173  This bit controls the internal clock activity. In very low power state, the internal clock is stopped.
2174  Note: The activity of the debounce clock (used for wake-up events) and the interface clock (used for reads and writes to the module register map) are not affected by this register.
2175 
2176  ENUMs:
2177  STOP: The internal clock is stopped (very low power state).
2178  RUN: The internal clock oscillates and can be automatically gated when SD_SYSCONFIG.AUTOIDLE bit is set to 1 (default value).
2179 */
2180 #define SDMMC_SYSCTL_ICE 0x00000001U
2181 #define SDMMC_SYSCTL_ICE_M 0x00000001U
2182 #define SDMMC_SYSCTL_ICE_S 0U
2183 #define SDMMC_SYSCTL_ICE_STOP 0x00000000U
2184 #define SDMMC_SYSCTL_ICE_RUN 0x00000001U
2185 /*
2186 
2187  Field: ICS
2188  From..to bits: 1...1
2189  DefaultValue: 0x0
2190  Access type: read-only
2191  Description: Internal clock stable (status)
2192  This bit indicates that the internal clock is stable
2193 
2194  ENUMs:
2195  NOSTAB: The internal clock is not stable
2196  STAB: The internal clock is stable after enabling the clock (SD_SYSCTL.ICEN) or after changing the clock ratio (SD_SYSCTL.CLKD).
2197 */
2198 #define SDMMC_SYSCTL_ICS 0x00000002U
2199 #define SDMMC_SYSCTL_ICS_M 0x00000002U
2200 #define SDMMC_SYSCTL_ICS_S 1U
2201 #define SDMMC_SYSCTL_ICS_NOSTAB 0x00000000U
2202 #define SDMMC_SYSCTL_ICS_STAB 0x00000002U
2203 /*
2204 
2205  Field: CEN
2206  From..to bits: 2...2
2207  DefaultValue: 0x0
2208  Access type: read-write
2209  Description: Card clock enable
2210  This bit controls the clock to the card.
2211 
2212  ENUMs:
2213  OFF: The clock is not provided to the card . Clock frequency can be changed.
2214  ON: The clock is provided to the card and can be automatically gated when SD_SYSCONFIG.AUTOIDLE bit is set to 1 (default value). The host driver must wait to set this bit to 1 until the internal clock is stable (SYSSTAT.ICS).
2215 */
2216 #define SDMMC_SYSCTL_CEN 0x00000004U
2217 #define SDMMC_SYSCTL_CEN_M 0x00000004U
2218 #define SDMMC_SYSCTL_CEN_S 2U
2219 #define SDMMC_SYSCTL_CEN_OFF 0x00000000U
2220 #define SDMMC_SYSCTL_CEN_ON 0x00000004U
2221 /*
2222 
2223  Field: CLKD
2224  From..to bits: 6...15
2225  DefaultValue: 0x0
2226  Access type: read-write
2227  Description: Clock frequency select
2228  This bitfield defines the ratio between a reference clock frequency (system dependent) and the output clock frequency on the mmc_clk pin of the memory card (MMC, SD, or SDIO).
2229  0h = Clock Ref bypass
2230  1h = Clock Ref bypass
2231  2h = Clock Ref / 2
2232  3h = Clock Ref / 3
2233  3FFh = Clock Ref / 1023
2234 
2235  ENUMs:
2236  MINIMUM: Minimum value
2237  MAXIMUM: Maximum value
2238 */
2239 #define SDMMC_SYSCTL_CLKD_W 10U
2240 #define SDMMC_SYSCTL_CLKD_M 0x0000FFC0U
2241 #define SDMMC_SYSCTL_CLKD_S 6U
2242 #define SDMMC_SYSCTL_CLKD_MINIMUM 0x00000000U
2243 #define SDMMC_SYSCTL_CLKD_MAXIMUM 0x0000FFC0U
2244 /*
2245 
2246  Field: DTO
2247  From..to bits: 16...19
2248  DefaultValue: 0x0
2249  Access type: read-write
2250  Description: Data timeout counter value and busy timeout
2251  This value determines the interval to detect mmc_dat lines timeouts.
2252  The host driver needs to set this bitfield based on:
2253  - the maximum read access time (NAC) (Refer to the SD Specification Part1 Physical Layer)
2254  - the data read access time values (TAAC and NSAC) in the card specific data register (CSD) of the card
2255  - the timeout clock base frequency (SD_CAPA.TCF)
2256  If the card does not respond within the specified number of cycles, a data timeout error occurs (SD_STAT.DTO).
2257  The Data timeout counter can also be used to check busy duration, to generate busy timeout for commands with busy response or for busy programming during a write command.
2258  Timeout on CRC status is generated if no CRC token is present after a block write.
2259  0h = TCF x 2^13
2260  1h = TCF x 2^14
2261  Eh = TCF x 2^27
2262  Fh = Reserved
2263 
2264  ENUMs:
2265  MINIMUM: Minimum value
2266  MAXIMUM: Maximum value
2267 */
2268 #define SDMMC_SYSCTL_DTO_W 4U
2269 #define SDMMC_SYSCTL_DTO_M 0x000F0000U
2270 #define SDMMC_SYSCTL_DTO_S 16U
2271 #define SDMMC_SYSCTL_DTO_MINIMUM 0x00000000U
2272 #define SDMMC_SYSCTL_DTO_MAXIMUM 0x000E0000U
2273 /*
2274 
2275  Field: SRA
2276  From..to bits: 24...24
2277  DefaultValue: 0x0
2278  Access type: read-write
2279  Description: Software reset for all
2280  This bit is set to 1 for reset, and released to 0 when completed.
2281  Note: This subreset should not to be used by software, as it can lead to unexpected side-effects. Reset of the SDMMC module should always be through GPRCM.RSTCTL.RESETASSERT
2282 
2283  ENUMs:
2284  COMPL: Reset completed
2285  ASSERT: Reset asserted
2286 */
2287 #define SDMMC_SYSCTL_SRA 0x01000000U
2288 #define SDMMC_SYSCTL_SRA_M 0x01000000U
2289 #define SDMMC_SYSCTL_SRA_S 24U
2290 #define SDMMC_SYSCTL_SRA_COMPL 0x00000000U
2291 #define SDMMC_SYSCTL_SRA_ASSERT 0x01000000U
2292 /*
2293 
2294  Field: SRC
2295  From..to bits: 25...25
2296  DefaultValue: 0x0
2297  Access type: read-write
2298  Description: Software reset for mmc_cmd line
2299  This bit is set to 1 for reset and released to 0 when completed.
2300  Note: This subreset should not to be used by software, as it can lead to unexpected side-effects. Reset of the SDMMC module should always be through GPRCM.RSTCTL.RESETASSERT
2301 
2302  ENUMs:
2303  COMPL: Reset completed
2304  ASSERT: Reset asserted
2305 */
2306 #define SDMMC_SYSCTL_SRC 0x02000000U
2307 #define SDMMC_SYSCTL_SRC_M 0x02000000U
2308 #define SDMMC_SYSCTL_SRC_S 25U
2309 #define SDMMC_SYSCTL_SRC_COMPL 0x00000000U
2310 #define SDMMC_SYSCTL_SRC_ASSERT 0x02000000U
2311 /*
2312 
2313  Field: SRD
2314  From..to bits: 26...26
2315  DefaultValue: 0x0
2316  Access type: read-write
2317  Description: Software reset for mmc_dat line
2318  This bit is set to 1 for reset and released to 0 when completed.
2319  Note: This subreset should not to be used by software, as it can lead to unexpected side-effects. Reset of the SDMMC module should always be through GPRCM.RSTCTL.RESETASSERT
2320 
2321  ENUMs:
2322  COMPL: Reset completed
2323  ASSERT: Reset asserted
2324 */
2325 #define SDMMC_SYSCTL_SRD 0x04000000U
2326 #define SDMMC_SYSCTL_SRD_M 0x04000000U
2327 #define SDMMC_SYSCTL_SRD_S 26U
2328 #define SDMMC_SYSCTL_SRD_COMPL 0x00000000U
2329 #define SDMMC_SYSCTL_SRD_ASSERT 0x04000000U
2330 
2331 
2332 /*-----------------------------------REGISTER------------------------------------
2333  Register name: STAT
2334  Offset name: SDMMC_O_STAT
2335  Relative address: 0x230
2336  Description: The interrupt status regroups all the status of the module internal events that can generate an interrupt.
2337  SD_STAT[31:16] = Error Interrupt Status
2338  SD_STAT[15:0] = Normal Interrupt Status
2339 
2340  The error bits are located in the upper 16 bits of the SD_STAT register. All bits are cleared by writing a 1 to them.
2341  Additionally, bits 15 and 8 serve as special error bits. These cannot be cleared by writing a 1 to them. Bit 15 (ERRI) is automatically cleared when the error causing to ERRI to be set is handled. (that is, when bits 31:16 are cleared, bit 15 will be automatically cleared). Bit 8 (CIRQ) is cleared by writing a 0 to SD_IE[8] (masking the interrupt) and servicing the interrupt.
2342  Default Value: 0x00000000
2343 
2344  Field: CC
2345  From..to bits: 0...0
2346  DefaultValue: 0x0
2347  Access type: read-write
2348  Description: Command complete.
2349  This bit is set when a 1-to-0 transition occurs in the register command inhibit (SD_PSTATE[0] CMDI bit)
2350  0h (W) = Status bit unchanged
2351  0h (R) = No command complete
2352  1h (W) = Status is cleared
2353  1h (R) = Command complete
2354 
2355  ENUMs:
2356  NOINT: No interrupt occured
2357  INT: Interrupt occured
2358 */
2359 #define SDMMC_STAT_CC 0x00000001U
2360 #define SDMMC_STAT_CC_M 0x00000001U
2361 #define SDMMC_STAT_CC_S 0U
2362 #define SDMMC_STAT_CC_NOINT 0x00000000U
2363 #define SDMMC_STAT_CC_INT 0x00000001U
2364 /*
2365 
2366  Field: TC
2367  From..to bits: 1...1
2368  DefaultValue: 0x0
2369  Access type: read-write
2370  Description: Transfer completed.
2371  This bit is always set when a read/write transfer is completed or between two blocks when the transfer is stopped due to a stop at block gap request (SD_HCTL[16] SBGR bit).
2372  0h (W) = Status bit unchanged
2373  0h (R) = No transfer complete
2374  1h (W) = Status is cleared
2375  1h (R) = Data transfer complete
2376 
2377  ENUMs:
2378  NOINT: No interrupt occured
2379  INT: Interrupt occured
2380 */
2381 #define SDMMC_STAT_TC 0x00000002U
2382 #define SDMMC_STAT_TC_M 0x00000002U
2383 #define SDMMC_STAT_TC_S 1U
2384 #define SDMMC_STAT_TC_NOINT 0x00000000U
2385 #define SDMMC_STAT_TC_INT 0x00000002U
2386 /*
2387 
2388  Field: BGE
2389  From..to bits: 2...2
2390  DefaultValue: 0x0
2391  Access type: read-write
2392  Description: Block gap event.
2393  When a stop at block gap is requested (SD_HCTL[16] SBGR bit), this bit is automatically set when transaction is stopped at the block gap during a read or write operation.
2394  0h (W) = Status bit unchanged
2395  0h (R) = No block gap event
2396  1h (W) = Status is cleared
2397  1h (R) = Transaction stopped at block gap
2398 
2399  ENUMs:
2400  NOINT: No interrupt occured
2401  INT: Interrupt occured
2402 */
2403 #define SDMMC_STAT_BGE 0x00000004U
2404 #define SDMMC_STAT_BGE_M 0x00000004U
2405 #define SDMMC_STAT_BGE_S 2U
2406 #define SDMMC_STAT_BGE_NOINT 0x00000000U
2407 #define SDMMC_STAT_BGE_INT 0x00000004U
2408 /*
2409 
2410  Field: DMA
2411  From..to bits: 3...3
2412  DefaultValue: 0x0
2413  Access type: read-write
2414  Description: DMA Interrupt
2415  This status is set when an interrupt is required after the data transfer is complete.
2416 
2417  ENUMs:
2418  NOINT: No interrupt occured
2419  INT: Interrupt occured
2420 */
2421 #define SDMMC_STAT_DMA 0x00000008U
2422 #define SDMMC_STAT_DMA_M 0x00000008U
2423 #define SDMMC_STAT_DMA_S 3U
2424 #define SDMMC_STAT_DMA_NOINT 0x00000000U
2425 #define SDMMC_STAT_DMA_INT 0x00000008U
2426 /*
2427 
2428  Field: BWR
2429  From..to bits: 4...4
2430  DefaultValue: 0x0
2431  Access type: read-write
2432  Description: Buffer write ready.
2433  This bit is set automatically during a write operation to the card (see class 4 - block oriented write command) when the host can write a complete block as specified by SD_BLK [10:0] BLEN.
2434  It indicates that the memory card has emptied one block from the buffer and that the local host is able to write one block of data into the buffer.
2435  Note: If the DMA transmit mode is enabled, this bit is never set instead, a DMA transmit request to the main DMA controller of the system is generated.
2436  0h (W) = Status bit unchanged
2437  0h (R) = Not ready to write buffer
2438  1h (W) = Status is cleared.
2439  1h (R) = Ready to write buffer
2440 
2441  ENUMs:
2442  NOINT: No interrupt occured
2443  INT: Interrupt occured
2444 */
2445 #define SDMMC_STAT_BWR 0x00000010U
2446 #define SDMMC_STAT_BWR_M 0x00000010U
2447 #define SDMMC_STAT_BWR_S 4U
2448 #define SDMMC_STAT_BWR_NOINT 0x00000000U
2449 #define SDMMC_STAT_BWR_INT 0x00000010U
2450 /*
2451 
2452  Field: BRR
2453  From..to bits: 5...5
2454  DefaultValue: 0x0
2455  Access type: read-write
2456  Description: Buffer read ready.
2457  This bit is set automatically during a read operation to the card (see class 2 - block oriented read commands) when one block specified by the SD_BLK [10:0] BLEN bit field is completely written in the buffer.
2458  It indicates that the memory card has filled out the buffer and that the local host needs to empty the buffer by reading it.
2459  Note: If the DMA receive-mode is enabled, this bit is never set instead a DMA receive request to the main DMA controller of the system is generated.
2460  0h (W) = Status bit unchanged
2461  0h (R) = Not ready to read buffer
2462  1h (W) = Status is cleared.
2463  1h (R) = Ready to read buffer
2464 
2465  ENUMs:
2466  NOINT: No interrupt occured
2467  INT: Interrupt occured
2468 */
2469 #define SDMMC_STAT_BRR 0x00000020U
2470 #define SDMMC_STAT_BRR_M 0x00000020U
2471 #define SDMMC_STAT_BRR_S 5U
2472 #define SDMMC_STAT_BRR_NOINT 0x00000000U
2473 #define SDMMC_STAT_BRR_INT 0x00000020U
2474 /*
2475 
2476  Field: CINS
2477  From..to bits: 6...6
2478  DefaultValue: 0x0
2479  Access type: read-write
2480  Description: Card Insertion.
2481  This bit is set automatically when SD_PSTATE[CINS] changes from 0 to 1.
2482  A clear of this bit doesn't affect Card inserted present state (SD_PSTATE[CINS]).
2483  0h (W) = Status bit unchanged
2484  0h (R) = Card State stable or debouncing
2485  1h (W) = Status is cleared.
2486  1h (R) = Card inserted
2487 
2488  ENUMs:
2489  NOINT: No interrupt occured
2490  INT: Interrupt occured
2491 */
2492 #define SDMMC_STAT_CINS 0x00000040U
2493 #define SDMMC_STAT_CINS_M 0x00000040U
2494 #define SDMMC_STAT_CINS_S 6U
2495 #define SDMMC_STAT_CINS_NOINT 0x00000000U
2496 #define SDMMC_STAT_CINS_INT 0x00000040U
2497 /*
2498 
2499  Field: CREM
2500  From..to bits: 7...7
2501  DefaultValue: 0x0
2502  Access type: read-write
2503  Description: Card Removal.
2504  This bit is set automatically when SD_PSTATE[CINS] changes from 1 to 0.
2505  A clear of this bit doesn't affect Card inserted present state (SD_PSTATE[CINS]).
2506  0h (W) = Status bit unchanged
2507  0h (R) = Card State stable or debouncing
2508  1h (W) = Status is cleared
2509  1h (R) = Card Removed
2510 
2511  ENUMs:
2512  NOINT: No interrupt occured
2513  INT: Interrupt occured
2514 */
2515 #define SDMMC_STAT_CREM 0x00000080U
2516 #define SDMMC_STAT_CREM_M 0x00000080U
2517 #define SDMMC_STAT_CREM_S 7U
2518 #define SDMMC_STAT_CREM_NOINT 0x00000000U
2519 #define SDMMC_STAT_CREM_INT 0x00000080U
2520 /*
2521 
2522  Field: CIRQ
2523  From..to bits: 8...8
2524  DefaultValue: 0x0
2525  Access type: read-only
2526  Description: Card interrupt.
2527  This bit is only used for SD and SDIO cards.
2528  In 1-bit mode, interrupt source is asynchronous (can be a source of asynchronous wake-up).
2529  In 4-bit mode, interrupt source is sampled during the interrupt cycle.
2530  In CE-ATA mode, interrupt source is detected when the card drives mmc_cmd line to zero during one cycle after data transmission end.
2531  All modes above are fully exclusive.
2532  The controller interrupt must be clear by setting SD_IE[8] CIRQ_ENABLE to 0, then the host driver must start the interrupt service with card (clearing card interrupt status) to remove card interrupt source.
2533  Otherwise the Controller interrupt will be reasserted as soon as SD_IE[8] CIRQ_ENABLE is set to 1.
2534  Writes to this bit are ignored.
2535  0h (R) = No card interrupt
2536  1h (R) = Generate card interrupt
2537 
2538  ENUMs:
2539  NOINT: No interrupt occured
2540  INT: Interrupt occured
2541 */
2542 #define SDMMC_STAT_CIRQ 0x00000100U
2543 #define SDMMC_STAT_CIRQ_M 0x00000100U
2544 #define SDMMC_STAT_CIRQ_S 8U
2545 #define SDMMC_STAT_CIRQ_NOINT 0x00000000U
2546 #define SDMMC_STAT_CIRQ_INT 0x00000100U
2547 /*
2548 
2549  Field: OBI
2550  From..to bits: 9...9
2551  DefaultValue: 0x0
2552  Access type: read-write
2553  Description: Out-of-band interrupt (This interrupt is only useful for MMC card).
2554  Note: Out-of-band interrupt (OBI) is not supported.
2555 
2556 
2557  ENUMs:
2558  NOINT: No interrupt occured
2559  INT: Interrupt occured
2560 */
2561 #define SDMMC_STAT_OBI 0x00000200U
2562 #define SDMMC_STAT_OBI_M 0x00000200U
2563 #define SDMMC_STAT_OBI_S 9U
2564 #define SDMMC_STAT_OBI_NOINT 0x00000000U
2565 #define SDMMC_STAT_OBI_INT 0x00000200U
2566 /*
2567 
2568  Field: ERRI
2569  From..to bits: 15...15
2570  DefaultValue: 0x0
2571  Access type: read-only
2572  Description: Error interrupt.
2573  If any of the bits in the Error Interrupt Status register (SD_STAT [31:16]) are set, then this bit is set to 1.
2574  Therefore the host driver can efficiently test for an error by checking this bit first.
2575  Writes to this bit are ignored.
2576  0h (R) = No interrupt
2577  1h (R) = Error interrupt event(s) occurred
2578 
2579  ENUMs:
2580  NOINT: No interrupt occured
2581  INT: Interrupt occured
2582 */
2583 #define SDMMC_STAT_ERRI 0x00008000U
2584 #define SDMMC_STAT_ERRI_M 0x00008000U
2585 #define SDMMC_STAT_ERRI_S 15U
2586 #define SDMMC_STAT_ERRI_NOINT 0x00000000U
2587 #define SDMMC_STAT_ERRI_INT 0x00008000U
2588 /*
2589 
2590  Field: CTO
2591  From..to bits: 16...16
2592  DefaultValue: 0x0
2593  Access type: read-write
2594  Description: Command timeout error.
2595  This bit is set automatically when no response is received within 64 clock cycles from the end bit of the command.
2596  For commands that reply within 5 clock cycles - the timeout is still detected at 64 clock cycles.
2597  0h (W) = Status bit unchanged
2598  0h (R) = No error
2599  1h (W) = Status is cleared.
2600  1h (R) = Time Out
2601 
2602  ENUMs:
2603  NOINT: No interrupt occured
2604  INT: Interrupt occured
2605 */
2606 #define SDMMC_STAT_CTO 0x00010000U
2607 #define SDMMC_STAT_CTO_M 0x00010000U
2608 #define SDMMC_STAT_CTO_S 16U
2609 #define SDMMC_STAT_CTO_NOINT 0x00000000U
2610 #define SDMMC_STAT_CTO_INT 0x00010000U
2611 /*
2612 
2613  Field: CCRC
2614  From..to bits: 17...17
2615  DefaultValue: 0x0
2616  Access type: read-write
2617  Description: Command CRC error.
2618  This bit is set automatically when there is a CRC7 error in the command response depending on the enable bit (SD_CMD[19] CCCE).
2619  0h (W) = Status bit unchanged
2620  0h (R) = No error
2621  1h (W) = Status is cleared.
2622  1h (R) = Command CRC error
2623 
2624  ENUMs:
2625  NOINT: No interrupt occured
2626  INT: Interrupt occured
2627 */
2628 #define SDMMC_STAT_CCRC 0x00020000U
2629 #define SDMMC_STAT_CCRC_M 0x00020000U
2630 #define SDMMC_STAT_CCRC_S 17U
2631 #define SDMMC_STAT_CCRC_NOINT 0x00000000U
2632 #define SDMMC_STAT_CCRC_INT 0x00020000U
2633 /*
2634 
2635  Field: CEB
2636  From..to bits: 18...18
2637  DefaultValue: 0x0
2638  Access type: read-write
2639  Description: Command end bit error.
2640  This bit is set automatically when detecting a 0 at the end bit position of a command response.
2641  0h (W) = Status bit unchanged
2642  0h (R) = No error
2643  1h (W) = Status is cleared.
2644  1h (R) = Command end bit error
2645 
2646  ENUMs:
2647  NOINT: No interrupt occured
2648  INT: Interrupt occured
2649 */
2650 #define SDMMC_STAT_CEB 0x00040000U
2651 #define SDMMC_STAT_CEB_M 0x00040000U
2652 #define SDMMC_STAT_CEB_S 18U
2653 #define SDMMC_STAT_CEB_NOINT 0x00000000U
2654 #define SDMMC_STAT_CEB_INT 0x00040000U
2655 /*
2656 
2657  Field: CIE
2658  From..to bits: 19...19
2659  DefaultValue: 0x0
2660  Access type: read-write
2661  Description: Command index error.
2662  This bit is set automatically when response index differs from corresponding command index previously emitted.
2663  It depends on the enable bit (SD_CMD[20] CICE).
2664  0h (W) = Status bit unchanged
2665  0h (R) = No error
2666  1h (W) = Status is cleared.
2667  1h (R) = Command index error
2668 
2669  ENUMs:
2670  NOINT: No interrupt occured
2671  INT: Interrupt occured
2672 */
2673 #define SDMMC_STAT_CIE 0x00080000U
2674 #define SDMMC_STAT_CIE_M 0x00080000U
2675 #define SDMMC_STAT_CIE_S 19U
2676 #define SDMMC_STAT_CIE_NOINT 0x00000000U
2677 #define SDMMC_STAT_CIE_INT 0x00080000U
2678 /*
2679 
2680  Field: DTO
2681  From..to bits: 20...20
2682  DefaultValue: 0x0
2683  Access type: read-write
2684  Description: Data timeout error.
2685  This bit is set automatically according to the following conditions:
2686  Busy timeout for R1b, R5b response type.
2687  Busy timeout after write CRC status.
2688  Write CRC status timeout.
2689  Read data timeout.
2690  0h (W) = Status bit unchanged
2691  0h (R) = No error
2692  1h (W) = Status is cleared.
2693  1h (R) = Time out
2694 
2695  ENUMs:
2696  NOINT: No interrupt occured
2697  INT: Interrupt occured
2698 */
2699 #define SDMMC_STAT_DTO 0x00100000U
2700 #define SDMMC_STAT_DTO_M 0x00100000U
2701 #define SDMMC_STAT_DTO_S 20U
2702 #define SDMMC_STAT_DTO_NOINT 0x00000000U
2703 #define SDMMC_STAT_DTO_INT 0x00100000U
2704 /*
2705 
2706  Field: DCRC
2707  From..to bits: 21...21
2708  DefaultValue: 0x0
2709  Access type: read-write
2710  Description: Data CRC Error.
2711  This bit is set automatically when there is a CRC16 error in the data phase response following a block read command or if there is a 3-bit CRC status different of a position "010" token during a block write command.
2712  0h (W) = Status bit unchanged
2713  0h (R) = No error
2714  1h (W) = Status is cleared.
2715  1h (R) = Data CRC error
2716 
2717  ENUMs:
2718  NOINT: No interrupt occured
2719  INT: Interrupt occured
2720 */
2721 #define SDMMC_STAT_DCRC 0x00200000U
2722 #define SDMMC_STAT_DCRC_M 0x00200000U
2723 #define SDMMC_STAT_DCRC_S 21U
2724 #define SDMMC_STAT_DCRC_NOINT 0x00000000U
2725 #define SDMMC_STAT_DCRC_INT 0x00200000U
2726 /*
2727 
2728  Field: DEB
2729  From..to bits: 22...22
2730  DefaultValue: 0x0
2731  Access type: read-write
2732  Description: Data End Bit error.
2733  This bit is set automatically when detecting a 0 at the end bit position of read data on mmc_dat line or at the end position of the CRC status in write mode.
2734  0h (W) = Status bit unchanged
2735  0h (R) = No error
2736  1h (W) = Status is cleared.
2737  1h (R) = Data end bit error
2738 
2739  ENUMs:
2740  NOINT: No interrupt occured
2741  INT: Interrupt occured
2742 */
2743 #define SDMMC_STAT_DEB 0x00400000U
2744 #define SDMMC_STAT_DEB_M 0x00400000U
2745 #define SDMMC_STAT_DEB_S 22U
2746 #define SDMMC_STAT_DEB_NOINT 0x00000000U
2747 #define SDMMC_STAT_DEB_INT 0x00400000U
2748 /*
2749 
2750  Field: ACE
2751  From..to bits: 24...24
2752  DefaultValue: 0x0
2753  Access type: read-write
2754  Description: Auto CMD12 error.
2755  This bit is set automatically when one of the bits in Auto CMD12 Error status register has changed from 0 to 1.
2756  0h (W) = Status bit unchanged
2757  0h (R) = No error
2758  1h (W) = Status is cleared.
2759  1h (R) = AutoCMD12 error
2760 
2761  ENUMs:
2762  NOINT: No interrupt occured
2763  INT: Interrupt occured
2764 */
2765 #define SDMMC_STAT_ACE 0x01000000U
2766 #define SDMMC_STAT_ACE_M 0x01000000U
2767 #define SDMMC_STAT_ACE_S 24U
2768 #define SDMMC_STAT_ACE_NOINT 0x00000000U
2769 #define SDMMC_STAT_ACE_INT 0x01000000U
2770 /*
2771 
2772  Field: CERR
2773  From..to bits: 28...28
2774  DefaultValue: 0x0
2775  Access type: read-write
2776  Description: Card error.
2777  This bit is set automatically when there is at least one error in a response of type R1, R1b, R6, R5 or R5b.
2778  Only bits referenced as type E (error) in status field in the response can set a card status error.
2779  An error bit in the response is flagged only if corresponding bit in card status response error SD_CSRE in set.
2780  There is no card error detection for autoCMD12 command.
2781  The host driver shall read SD_RSP76 register to detect error bits in the command response.
2782  0h (W) = Status bit unchanged
2783  0h (R) = No error
2784  1h (W) = Status is cleared.
2785  1h (R) = Card error
2786 
2787  ENUMs:
2788  NOINT: No interrupt occured
2789  INT: Interrupt occured
2790 */
2791 #define SDMMC_STAT_CERR 0x10000000U
2792 #define SDMMC_STAT_CERR_M 0x10000000U
2793 #define SDMMC_STAT_CERR_S 28U
2794 #define SDMMC_STAT_CERR_NOINT 0x00000000U
2795 #define SDMMC_STAT_CERR_INT 0x10000000U
2796 /*
2797 
2798  Field: BADA
2799  From..to bits: 29...29
2800  DefaultValue: 0x0
2801  Access type: read-write
2802  Description: Bad access to data space.
2803  This bit is set automatically to indicate a bad access to buffer when not allowed: During a read access to the data register (SD_DATA) while buffer reads are not allowed (SD_PSTATE[11] BRE bit =0).
2804  During a write access to the data register (SD_DATA) while buffer writes are not allowed (SD_PSTATE[10] BWE bit=0).
2805  0h (W) = Status bit unchanged
2806  0h (R) = No interrupt
2807  1h (W) = Status is cleared.
2808  1h (R) = Bad access
2809 
2810  ENUMs:
2811  NOINT: No interrupt occured
2812  INT: Interrupt occured
2813 */
2814 #define SDMMC_STAT_BADA 0x20000000U
2815 #define SDMMC_STAT_BADA_M 0x20000000U
2816 #define SDMMC_STAT_BADA_S 29U
2817 #define SDMMC_STAT_BADA_NOINT 0x00000000U
2818 #define SDMMC_STAT_BADA_INT 0x20000000U
2819 
2820 
2821 /*-----------------------------------REGISTER------------------------------------
2822  Register name: IE
2823  Offset name: SDMMC_O_IE
2824  Relative address: 0x234
2825  Description: This register allows to enable/disable the module to set status bits on an event-by-event basis.
2826  SD_IE[31:16] = Error Interrupt Status Enable
2827  SD_IE[15:0] = Normal Interrupt Status Enable
2828  Default Value: 0x00000000
2829 
2830  Field: CCEN
2831  From..to bits: 0...0
2832  DefaultValue: 0x0
2833  Access type: read-write
2834  Description: Command completed interrupt enable
2835 
2836  ENUMs:
2837  MSK: Interrupt masked
2838  ENABLE: Interrupt enabled
2839 */
2840 #define SDMMC_IE_CCEN 0x00000001U
2841 #define SDMMC_IE_CCEN_M 0x00000001U
2842 #define SDMMC_IE_CCEN_S 0U
2843 #define SDMMC_IE_CCEN_MSK 0x00000000U
2844 #define SDMMC_IE_CCEN_ENABLE 0x00000001U
2845 /*
2846 
2847  Field: TCEN
2848  From..to bits: 1...1
2849  DefaultValue: 0x0
2850  Access type: read-write
2851  Description: Transfer completed interrupt enable
2852 
2853  ENUMs:
2854  ENABLE: Interrupt enabled
2855  MSK: Interrupt masked
2856 */
2857 #define SDMMC_IE_TCEN 0x00000002U
2858 #define SDMMC_IE_TCEN_M 0x00000002U
2859 #define SDMMC_IE_TCEN_S 1U
2860 #define SDMMC_IE_TCEN_ENABLE 0x00000002U
2861 #define SDMMC_IE_TCEN_MSK 0x00000000U
2862 /*
2863 
2864  Field: BGEEN
2865  From..to bits: 2...2
2866  DefaultValue: 0x0
2867  Access type: read-write
2868  Description: Block gap event interrupt enable
2869 
2870  ENUMs:
2871  ENABLE: Interrupt enabled
2872  MSK: Interrupt masked
2873 */
2874 #define SDMMC_IE_BGEEN 0x00000004U
2875 #define SDMMC_IE_BGEEN_M 0x00000004U
2876 #define SDMMC_IE_BGEEN_S 2U
2877 #define SDMMC_IE_BGEEN_ENABLE 0x00000004U
2878 #define SDMMC_IE_BGEEN_MSK 0x00000000U
2879 /*
2880 
2881  Field: DMAEN
2882  From..to bits: 3...3
2883  DefaultValue: 0x0
2884  Access type: read-write
2885  Description: DMA interrupt enable
2886 
2887  ENUMs:
2888  ENABLE: Interrupt enabled
2889  MSK: Interrupt masked
2890 */
2891 #define SDMMC_IE_DMAEN 0x00000008U
2892 #define SDMMC_IE_DMAEN_M 0x00000008U
2893 #define SDMMC_IE_DMAEN_S 3U
2894 #define SDMMC_IE_DMAEN_ENABLE 0x00000008U
2895 #define SDMMC_IE_DMAEN_MSK 0x00000000U
2896 /*
2897 
2898  Field: BWREN
2899  From..to bits: 4...4
2900  DefaultValue: 0x0
2901  Access type: read-write
2902  Description: Buffer write ready interrupt enable
2903 
2904  ENUMs:
2905  ENABLE: Interrupt enabled
2906  MSK: Interrupt masked
2907 */
2908 #define SDMMC_IE_BWREN 0x00000010U
2909 #define SDMMC_IE_BWREN_M 0x00000010U
2910 #define SDMMC_IE_BWREN_S 4U
2911 #define SDMMC_IE_BWREN_ENABLE 0x00000010U
2912 #define SDMMC_IE_BWREN_MSK 0x00000000U
2913 /*
2914 
2915  Field: BRREN
2916  From..to bits: 5...5
2917  DefaultValue: 0x0
2918  Access type: read-write
2919  Description: Buffer read ready interrupt enable
2920 
2921  ENUMs:
2922  ENABLE: Interrupt enabled
2923  MSK: Interrupt masked
2924 */
2925 #define SDMMC_IE_BRREN 0x00000020U
2926 #define SDMMC_IE_BRREN_M 0x00000020U
2927 #define SDMMC_IE_BRREN_S 5U
2928 #define SDMMC_IE_BRREN_ENABLE 0x00000020U
2929 #define SDMMC_IE_BRREN_MSK 0x00000000U
2930 /*
2931 
2932  Field: CINSEN
2933  From..to bits: 6...6
2934  DefaultValue: 0x0
2935  Access type: read-write
2936  Description: Card Insertion interrupt Enable
2937 
2938  ENUMs:
2939  ENABLE: Interrupt enabled
2940  MSK: Interrupt masked
2941 */
2942 #define SDMMC_IE_CINSEN 0x00000040U
2943 #define SDMMC_IE_CINSEN_M 0x00000040U
2944 #define SDMMC_IE_CINSEN_S 6U
2945 #define SDMMC_IE_CINSEN_ENABLE 0x00000040U
2946 #define SDMMC_IE_CINSEN_MSK 0x00000000U
2947 /*
2948 
2949  Field: CREMEN
2950  From..to bits: 7...7
2951  DefaultValue: 0x0
2952  Access type: read-write
2953  Description: Card Removal interrupt Enable
2954 
2955  ENUMs:
2956  ENABLE: Interrupt enabled
2957  MSK: Interrupt masked
2958 */
2959 #define SDMMC_IE_CREMEN 0x00000080U
2960 #define SDMMC_IE_CREMEN_M 0x00000080U
2961 #define SDMMC_IE_CREMEN_S 7U
2962 #define SDMMC_IE_CREMEN_ENABLE 0x00000080U
2963 #define SDMMC_IE_CREMEN_MSK 0x00000000U
2964 /*
2965 
2966  Field: CIRQEN
2967  From..to bits: 8...8
2968  DefaultValue: 0x0
2969  Access type: read-write
2970  Description: Card interrupt enable.
2971  A clear of this bit also clears the corresponding status bit.
2972  During 1-bit mode, if the interrupt routine does not remove the source of a card interrupt in the SDIO card, the status bit is reasserted when this bit is set to 1.
2973 
2974  ENUMs:
2975  ENABLE: Interrupt enabled
2976  MSK: Interrupt masked
2977 */
2978 #define SDMMC_IE_CIRQEN 0x00000100U
2979 #define SDMMC_IE_CIRQEN_M 0x00000100U
2980 #define SDMMC_IE_CIRQEN_S 8U
2981 #define SDMMC_IE_CIRQEN_ENABLE 0x00000100U
2982 #define SDMMC_IE_CIRQEN_MSK 0x00000000U
2983 /*
2984 
2985  Field: OBIEN
2986  From..to bits: 9...9
2987  DefaultValue: 0x0
2988  Access type: read-write
2989  Description: Out-of-band interrupt enable
2990  A write to this register when SD_CON[14] OBIE is cleared to 0 is ignored.
2991  Note: The OBI functionallity is not supported!
2992 
2993  ENUMs:
2994  ENABLE: Interrupt enabled
2995  MSK: Interrupt masked
2996 */
2997 #define SDMMC_IE_OBIEN 0x00000200U
2998 #define SDMMC_IE_OBIEN_M 0x00000200U
2999 #define SDMMC_IE_OBIEN_S 9U
3000 #define SDMMC_IE_OBIEN_ENABLE 0x00000200U
3001 #define SDMMC_IE_OBIEN_MSK 0x00000000U
3002 /*
3003 
3004  Field: NOUSE0
3005  From..to bits: 10...10
3006  DefaultValue: 0x0
3007  Access type: read-write
3008  Description: No use
3009  Note: Writing values other than 0 might produce undesired results.
3010  Always set this bits to 0.
3011 
3012  ENUMs:
3013  MIN: Minimum value
3014  MAX: Maximum value
3015 */
3016 #define SDMMC_IE_NOUSE0 0x00000400U
3017 #define SDMMC_IE_NOUSE0_M 0x00000400U
3018 #define SDMMC_IE_NOUSE0_S 10U
3019 #define SDMMC_IE_NOUSE0_MIN 0x00000000U
3020 #define SDMMC_IE_NOUSE0_MAX 0x00000400U
3021 /*
3022 
3023  Field: NULL
3024  From..to bits: 15...15
3025  DefaultValue: 0x0
3026  Access type: read-only
3027  Description: Fixed to 0.
3028  The host driver shall control error interrupts using the Error Interrupt Signal Enable register.
3029  Writes to this bit are ignored.
3030 
3031  ENUMs:
3032  ENABLE: Interrupt enabled
3033  MSK: Interrupt masked
3034 */
3035 #define SDMMC_IE_NULL 0x00008000U
3036 #define SDMMC_IE_NULL_M 0x00008000U
3037 #define SDMMC_IE_NULL_S 15U
3038 #define SDMMC_IE_NULL_ENABLE 0x00008000U
3039 #define SDMMC_IE_NULL_MSK 0x00000000U
3040 /*
3041 
3042  Field: CTOEN
3043  From..to bits: 16...16
3044  DefaultValue: 0x0
3045  Access type: read-write
3046  Description: Command timeout error interrupt enable
3047 
3048  ENUMs:
3049  ENABLE: Interrupt enabled
3050  MSK: Interrupt masked
3051 */
3052 #define SDMMC_IE_CTOEN 0x00010000U
3053 #define SDMMC_IE_CTOEN_M 0x00010000U
3054 #define SDMMC_IE_CTOEN_S 16U
3055 #define SDMMC_IE_CTOEN_ENABLE 0x00010000U
3056 #define SDMMC_IE_CTOEN_MSK 0x00000000U
3057 /*
3058 
3059  Field: CCRCEN
3060  From..to bits: 17...17
3061  DefaultValue: 0x0
3062  Access type: read-write
3063  Description: Command CRC error interrupt enable
3064 
3065  ENUMs:
3066  ENABLE: Interrupt enabled
3067  MSK: Interrupt masked
3068 */
3069 #define SDMMC_IE_CCRCEN 0x00020000U
3070 #define SDMMC_IE_CCRCEN_M 0x00020000U
3071 #define SDMMC_IE_CCRCEN_S 17U
3072 #define SDMMC_IE_CCRCEN_ENABLE 0x00020000U
3073 #define SDMMC_IE_CCRCEN_MSK 0x00000000U
3074 /*
3075 
3076  Field: CEBEN
3077  From..to bits: 18...18
3078  DefaultValue: 0x0
3079  Access type: read-write
3080  Description: Command end bit error interrupt enable
3081 
3082  ENUMs:
3083  ENABLE: Interrupt enabled
3084  MSK: Interrupt masked
3085 */
3086 #define SDMMC_IE_CEBEN 0x00040000U
3087 #define SDMMC_IE_CEBEN_M 0x00040000U
3088 #define SDMMC_IE_CEBEN_S 18U
3089 #define SDMMC_IE_CEBEN_ENABLE 0x00040000U
3090 #define SDMMC_IE_CEBEN_MSK 0x00000000U
3091 /*
3092 
3093  Field: CIEEN
3094  From..to bits: 19...19
3095  DefaultValue: 0x0
3096  Access type: read-write
3097  Description: Command index error interrupt enable
3098 
3099  ENUMs:
3100  ENABLE: Interrupt enabled
3101  MSK: Interrupt masked
3102 */
3103 #define SDMMC_IE_CIEEN 0x00080000U
3104 #define SDMMC_IE_CIEEN_M 0x00080000U
3105 #define SDMMC_IE_CIEEN_S 19U
3106 #define SDMMC_IE_CIEEN_ENABLE 0x00080000U
3107 #define SDMMC_IE_CIEEN_MSK 0x00000000U
3108 /*
3109 
3110  Field: DTOEN
3111  From..to bits: 20...20
3112  DefaultValue: 0x0
3113  Access type: read-write
3114  Description: Data timeout error interrupt enable
3115 
3116  ENUMs:
3117  ENABLE: Interrupt enabled
3118  MSK: Interrupt masked
3119 */
3120 #define SDMMC_IE_DTOEN 0x00100000U
3121 #define SDMMC_IE_DTOEN_M 0x00100000U
3122 #define SDMMC_IE_DTOEN_S 20U
3123 #define SDMMC_IE_DTOEN_ENABLE 0x00100000U
3124 #define SDMMC_IE_DTOEN_MSK 0x00000000U
3125 /*
3126 
3127  Field: DCRCEN
3128  From..to bits: 21...21
3129  DefaultValue: 0x0
3130  Access type: read-write
3131  Description: Data CRC error interrupt enable
3132 
3133  ENUMs:
3134  ENABLE: Interrupt enabled
3135  MSK: Interrupt masked
3136 */
3137 #define SDMMC_IE_DCRCEN 0x00200000U
3138 #define SDMMC_IE_DCRCEN_M 0x00200000U
3139 #define SDMMC_IE_DCRCEN_S 21U
3140 #define SDMMC_IE_DCRCEN_ENABLE 0x00200000U
3141 #define SDMMC_IE_DCRCEN_MSK 0x00000000U
3142 /*
3143 
3144  Field: DEBEN
3145  From..to bits: 22...22
3146  DefaultValue: 0x0
3147  Access type: read-write
3148  Description: Data end bit error interrupt enable
3149 
3150  ENUMs:
3151  ENABLE: Interrupt enabled
3152  MSK: Interrupt masked
3153 */
3154 #define SDMMC_IE_DEBEN 0x00400000U
3155 #define SDMMC_IE_DEBEN_M 0x00400000U
3156 #define SDMMC_IE_DEBEN_S 22U
3157 #define SDMMC_IE_DEBEN_ENABLE 0x00400000U
3158 #define SDMMC_IE_DEBEN_MSK 0x00000000U
3159 /*
3160 
3161  Field: ACEEN
3162  From..to bits: 24...24
3163  DefaultValue: 0x0
3164  Access type: read-write
3165  Description: Auto CMD12 error interrupt enable
3166 
3167  ENUMs:
3168  ENABLE: Interrupt enabled
3169  MSK: Interrupt masked
3170 */
3171 #define SDMMC_IE_ACEEN 0x01000000U
3172 #define SDMMC_IE_ACEEN_M 0x01000000U
3173 #define SDMMC_IE_ACEEN_S 24U
3174 #define SDMMC_IE_ACEEN_ENABLE 0x01000000U
3175 #define SDMMC_IE_ACEEN_MSK 0x00000000U
3176 /*
3177 
3178  Field: ADMAEEN
3179  From..to bits: 25...25
3180  DefaultValue: 0x0
3181  Access type: read-write
3182  Description: ADMA Error Status Enable
3183  Note: This functionality is not supported, since MADMA_EN is set to 0 in the design.
3184 
3185  ENUMs:
3186  ENABLE: Interrupt enabled
3187  MSK: Interrupt masked
3188 */
3189 #define SDMMC_IE_ADMAEEN 0x02000000U
3190 #define SDMMC_IE_ADMAEEN_M 0x02000000U
3191 #define SDMMC_IE_ADMAEEN_S 25U
3192 #define SDMMC_IE_ADMAEEN_ENABLE 0x02000000U
3193 #define SDMMC_IE_ADMAEEN_MSK 0x00000000U
3194 /*
3195 
3196  Field: NOUSE1
3197  From..to bits: 26...26
3198  DefaultValue: 0x0
3199  Access type: read-write
3200  Description: No use
3201  Note: Writing values other than 0 might produce undesired results.
3202  Always set this bits to 0.
3203 
3204  ENUMs:
3205  MIN: Minimum value
3206  MAX: Maximum value
3207 */
3208 #define SDMMC_IE_NOUSE1 0x04000000U
3209 #define SDMMC_IE_NOUSE1_M 0x04000000U
3210 #define SDMMC_IE_NOUSE1_S 26U
3211 #define SDMMC_IE_NOUSE1_MIN 0x00000000U
3212 #define SDMMC_IE_NOUSE1_MAX 0x04000000U
3213 /*
3214 
3215  Field: CERREN
3216  From..to bits: 28...28
3217  DefaultValue: 0x0
3218  Access type: read-write
3219  Description: Card error interrupt enable
3220 
3221  ENUMs:
3222  ENABLE: Interrupt enabled
3223  MSK: Interrupt masked
3224 */
3225 #define SDMMC_IE_CERREN 0x10000000U
3226 #define SDMMC_IE_CERREN_M 0x10000000U
3227 #define SDMMC_IE_CERREN_S 28U
3228 #define SDMMC_IE_CERREN_ENABLE 0x10000000U
3229 #define SDMMC_IE_CERREN_MSK 0x00000000U
3230 /*
3231 
3232  Field: BADAEN
3233  From..to bits: 29...29
3234  DefaultValue: 0x0
3235  Access type: read-write
3236  Description: Bad access to data space interrupt enable
3237 
3238  ENUMs:
3239  ENABLE: Interrupt enabled
3240  MSK: Interrupt masked
3241 */
3242 #define SDMMC_IE_BADAEN 0x20000000U
3243 #define SDMMC_IE_BADAEN_M 0x20000000U
3244 #define SDMMC_IE_BADAEN_S 29U
3245 #define SDMMC_IE_BADAEN_ENABLE 0x20000000U
3246 #define SDMMC_IE_BADAEN_MSK 0x00000000U
3247 
3248 
3249 /*-----------------------------------REGISTER------------------------------------
3250  Register name: ISE
3251  Offset name: SDMMC_O_ISE
3252  Relative address: 0x238
3253  Description: This register allows to enable/disable the module internal interrupt signaling on an event-by-event basis.
3254  SD_ISE[31:16] = Error Interrupt Signal Enable
3255  SD_ISE[15:0] = Normal Interrupt Signal Enable
3256  Default Value: 0x00000000
3257 
3258  Field: CCSEN
3259  From..to bits: 0...0
3260  DefaultValue: 0x0
3261  Access type: read-write
3262  Description: Command completed signal status enable
3263 
3264  ENUMs:
3265  DISABLE: Status Interrupt signaling disabled
3266  ENABLE: Status Interrupt signaling enabled
3267 */
3268 #define SDMMC_ISE_CCSEN 0x00000001U
3269 #define SDMMC_ISE_CCSEN_M 0x00000001U
3270 #define SDMMC_ISE_CCSEN_S 0U
3271 #define SDMMC_ISE_CCSEN_DISABLE 0x00000000U
3272 #define SDMMC_ISE_CCSEN_ENABLE 0x00000001U
3273 /*
3274 
3275  Field: TCSEN
3276  From..to bits: 1...1
3277  DefaultValue: 0x0
3278  Access type: read-write
3279  Description: Transfer completed signal status enable
3280 
3281  ENUMs:
3282  DISABLE: Status Interrupt signaling disabled
3283  ENABLE: Status Interrupt signaling enabled
3284 */
3285 #define SDMMC_ISE_TCSEN 0x00000002U
3286 #define SDMMC_ISE_TCSEN_M 0x00000002U
3287 #define SDMMC_ISE_TCSEN_S 1U
3288 #define SDMMC_ISE_TCSEN_DISABLE 0x00000000U
3289 #define SDMMC_ISE_TCSEN_ENABLE 0x00000002U
3290 /*
3291 
3292  Field: BGESEN
3293  From..to bits: 2...2
3294  DefaultValue: 0x0
3295  Access type: read-write
3296  Description: Block gap event signal status enable
3297 
3298  ENUMs:
3299  DISABLE: Status Interrupt signaling disabled
3300  ENABLE: Status Interrupt signaling enabled
3301 */
3302 #define SDMMC_ISE_BGESEN 0x00000004U
3303 #define SDMMC_ISE_BGESEN_M 0x00000004U
3304 #define SDMMC_ISE_BGESEN_S 2U
3305 #define SDMMC_ISE_BGESEN_DISABLE 0x00000000U
3306 #define SDMMC_ISE_BGESEN_ENABLE 0x00000004U
3307 /*
3308 
3309  Field: DMASEN
3310  From..to bits: 3...3
3311  DefaultValue: 0x0
3312  Access type: read-write
3313  Description: DMA signal status enable
3314 
3315  ENUMs:
3316  DISABLE: Status Interrupt signaling disabled
3317  ENABLE: Status Interrupt signaling enabled
3318 */
3319 #define SDMMC_ISE_DMASEN 0x00000008U
3320 #define SDMMC_ISE_DMASEN_M 0x00000008U
3321 #define SDMMC_ISE_DMASEN_S 3U
3322 #define SDMMC_ISE_DMASEN_DISABLE 0x00000000U
3323 #define SDMMC_ISE_DMASEN_ENABLE 0x00000008U
3324 /*
3325 
3326  Field: BWRSEN
3327  From..to bits: 4...4
3328  DefaultValue: 0x0
3329  Access type: read-write
3330  Description: Buffer write ready signal status enable
3331 
3332  ENUMs:
3333  DISABLE: Status Interrupt signaling disabled
3334  ENABLE: Status Interrupt signaling enabled
3335 */
3336 #define SDMMC_ISE_BWRSEN 0x00000010U
3337 #define SDMMC_ISE_BWRSEN_M 0x00000010U
3338 #define SDMMC_ISE_BWRSEN_S 4U
3339 #define SDMMC_ISE_BWRSEN_DISABLE 0x00000000U
3340 #define SDMMC_ISE_BWRSEN_ENABLE 0x00000010U
3341 /*
3342 
3343  Field: BRRSEN
3344  From..to bits: 5...5
3345  DefaultValue: 0x0
3346  Access type: read-write
3347  Description: Buffer read ready signal status enable
3348 
3349  ENUMs:
3350  DISABLE: Status Interrupt signaling disabled
3351  ENABLE: Status Interrupt signaling enabled
3352 */
3353 #define SDMMC_ISE_BRRSEN 0x00000020U
3354 #define SDMMC_ISE_BRRSEN_M 0x00000020U
3355 #define SDMMC_ISE_BRRSEN_S 5U
3356 #define SDMMC_ISE_BRRSEN_DISABLE 0x00000000U
3357 #define SDMMC_ISE_BRRSEN_ENABLE 0x00000020U
3358 /*
3359 
3360  Field: CINSSEN
3361  From..to bits: 6...6
3362  DefaultValue: 0x0
3363  Access type: read-write
3364  Description: Card Insertion signal status enable.
3365 
3366  ENUMs:
3367  DISABLE: Status Interrupt signaling disabled
3368  ENABLE: Status Interrupt signaling enabled
3369 */
3370 #define SDMMC_ISE_CINSSEN 0x00000040U
3371 #define SDMMC_ISE_CINSSEN_M 0x00000040U
3372 #define SDMMC_ISE_CINSSEN_S 6U
3373 #define SDMMC_ISE_CINSSEN_DISABLE 0x00000000U
3374 #define SDMMC_ISE_CINSSEN_ENABLE 0x00000040U
3375 /*
3376 
3377  Field: CREMSEN
3378  From..to bits: 7...7
3379  DefaultValue: 0x0
3380  Access type: read-write
3381  Description: Card Removal signal status enable
3382 
3383  ENUMs:
3384  DISABLE: Status Interrupt signaling disabled
3385  ENABLE: Status Interrupt signaling enabled
3386 */
3387 #define SDMMC_ISE_CREMSEN 0x00000080U
3388 #define SDMMC_ISE_CREMSEN_M 0x00000080U
3389 #define SDMMC_ISE_CREMSEN_S 7U
3390 #define SDMMC_ISE_CREMSEN_DISABLE 0x00000000U
3391 #define SDMMC_ISE_CREMSEN_ENABLE 0x00000080U
3392 /*
3393 
3394  Field: CIRQSEN
3395  From..to bits: 8...8
3396  DefaultValue: 0x0
3397  Access type: read-write
3398  Description: Card interrupt signal status enable.
3399  A clear of this bit also clears the corresponding status bit.
3400  During 1-bit mode, if the interrupt routine does not remove the source of a card interrupt in the SDIO card, the status bit is reasserted when this bit is set to 1.
3401 
3402  ENUMs:
3403  ENABLE: Status Interrupt signaling enabled
3404  DISABLE: Status Interrupt signaling disabled
3405 */
3406 #define SDMMC_ISE_CIRQSEN 0x00000100U
3407 #define SDMMC_ISE_CIRQSEN_M 0x00000100U
3408 #define SDMMC_ISE_CIRQSEN_S 8U
3409 #define SDMMC_ISE_CIRQSEN_ENABLE 0x00000100U
3410 #define SDMMC_ISE_CIRQSEN_DISABLE 0x00000000U
3411 /*
3412 
3413  Field: OBISEN
3414  From..to bits: 9...9
3415  DefaultValue: 0x0
3416  Access type: read-write
3417  Description: Out-of-band interrupt signal status enable.
3418  A write to this register when SD_CON[14] OBIE is cleared to 0 is ignored.
3419  Note: The OBI functionallity is not supported!
3420 
3421  ENUMs:
3422  DISABLE: Status Interrupt signaling disabled
3423  ENABLE: Status Interrupt signaling enabled
3424 */
3425 #define SDMMC_ISE_OBISEN 0x00000200U
3426 #define SDMMC_ISE_OBISEN_M 0x00000200U
3427 #define SDMMC_ISE_OBISEN_S 9U
3428 #define SDMMC_ISE_OBISEN_DISABLE 0x00000000U
3429 #define SDMMC_ISE_OBISEN_ENABLE 0x00000200U
3430 /*
3431 
3432  Field: NOUSE0
3433  From..to bits: 10...10
3434  DefaultValue: 0x0
3435  Access type: read-write
3436  Description: No use
3437  Note: Writing values other than 0 might produce undesired results.
3438  Always set this bit to 0.
3439 
3440  ENUMs:
3441  LOW: Always set this bit to 0
3442  HIGH: Do not set this bit
3443 */
3444 #define SDMMC_ISE_NOUSE0 0x00000400U
3445 #define SDMMC_ISE_NOUSE0_M 0x00000400U
3446 #define SDMMC_ISE_NOUSE0_S 10U
3447 #define SDMMC_ISE_NOUSE0_LOW 0x00000000U
3448 #define SDMMC_ISE_NOUSE0_HIGH 0x00000400U
3449 /*
3450 
3451  Field: NULL
3452  From..to bits: 15...15
3453  DefaultValue: 0x0
3454  Access type: read-only
3455  Description: Fixed to 0.
3456  The host driver shall control error interrupts using the Error Interrupt Signal Enable register.
3457  Writes to this bit are ignored.
3458 
3459  ENUMs:
3460  ENABLE: Interrupt enabled
3461  MSK: Interrupt masked
3462 */
3463 #define SDMMC_ISE_NULL 0x00008000U
3464 #define SDMMC_ISE_NULL_M 0x00008000U
3465 #define SDMMC_ISE_NULL_S 15U
3466 #define SDMMC_ISE_NULL_ENABLE 0x00008000U
3467 #define SDMMC_ISE_NULL_MSK 0x00000000U
3468 /*
3469 
3470  Field: CTOSEN
3471  From..to bits: 16...16
3472  DefaultValue: 0x0
3473  Access type: read-write
3474  Description: Command timeout error signal status enable
3475 
3476  ENUMs:
3477  ENABLE: Status Interrupt signaling enabled
3478  DISABLE: Status Interrupt signaling disabled
3479 */
3480 #define SDMMC_ISE_CTOSEN 0x00010000U
3481 #define SDMMC_ISE_CTOSEN_M 0x00010000U
3482 #define SDMMC_ISE_CTOSEN_S 16U
3483 #define SDMMC_ISE_CTOSEN_ENABLE 0x00010000U
3484 #define SDMMC_ISE_CTOSEN_DISABLE 0x00000000U
3485 /*
3486 
3487  Field: CCRCSEN
3488  From..to bits: 17...17
3489  DefaultValue: 0x0
3490  Access type: read-write
3491  Description: Command CRC error signal status enable
3492 
3493  ENUMs:
3494  DISABLE: Status Interrupt signaling disabled
3495  ENABLE: Status Interrupt signaling enabled
3496 */
3497 #define SDMMC_ISE_CCRCSEN 0x00020000U
3498 #define SDMMC_ISE_CCRCSEN_M 0x00020000U
3499 #define SDMMC_ISE_CCRCSEN_S 17U
3500 #define SDMMC_ISE_CCRCSEN_DISABLE 0x00000000U
3501 #define SDMMC_ISE_CCRCSEN_ENABLE 0x00020000U
3502 /*
3503 
3504  Field: CEBSEN
3505  From..to bits: 18...18
3506  DefaultValue: 0x0
3507  Access type: read-write
3508  Description: Command end bit error signal status enable
3509 
3510  ENUMs:
3511  DISABLE: Status Interrupt signaling disabled
3512  ENABLE: Status Interrupt signaling enabled
3513 */
3514 #define SDMMC_ISE_CEBSEN 0x00040000U
3515 #define SDMMC_ISE_CEBSEN_M 0x00040000U
3516 #define SDMMC_ISE_CEBSEN_S 18U
3517 #define SDMMC_ISE_CEBSEN_DISABLE 0x00000000U
3518 #define SDMMC_ISE_CEBSEN_ENABLE 0x00040000U
3519 /*
3520 
3521  Field: CIESEN
3522  From..to bits: 19...19
3523  DefaultValue: 0x0
3524  Access type: read-write
3525  Description: Command index error signal status enable
3526 
3527  ENUMs:
3528  DISABLE: Status Interrupt signaling disabled
3529  ENABLE: Status Interrupt signaling enabled
3530 */
3531 #define SDMMC_ISE_CIESEN 0x00080000U
3532 #define SDMMC_ISE_CIESEN_M 0x00080000U
3533 #define SDMMC_ISE_CIESEN_S 19U
3534 #define SDMMC_ISE_CIESEN_DISABLE 0x00000000U
3535 #define SDMMC_ISE_CIESEN_ENABLE 0x00080000U
3536 /*
3537 
3538  Field: DTOSEN
3539  From..to bits: 20...20
3540  DefaultValue: 0x0
3541  Access type: read-write
3542  Description: Data timeout error signal status enable
3543 
3544  ENUMs:
3545  DISABLE: Status Interrupt signaling disabled
3546  ENABLE: Status Interrupt signaling enabled
3547 */
3548 #define SDMMC_ISE_DTOSEN 0x00100000U
3549 #define SDMMC_ISE_DTOSEN_M 0x00100000U
3550 #define SDMMC_ISE_DTOSEN_S 20U
3551 #define SDMMC_ISE_DTOSEN_DISABLE 0x00000000U
3552 #define SDMMC_ISE_DTOSEN_ENABLE 0x00100000U
3553 /*
3554 
3555  Field: DCRCSEN
3556  From..to bits: 21...21
3557  DefaultValue: 0x0
3558  Access type: read-write
3559  Description: Data CRC error signal status enable
3560 
3561  ENUMs:
3562  DISABLE: Status Interrupt signaling disabled
3563  ENABLE: Status Interrupt signaling enabled
3564 */
3565 #define SDMMC_ISE_DCRCSEN 0x00200000U
3566 #define SDMMC_ISE_DCRCSEN_M 0x00200000U
3567 #define SDMMC_ISE_DCRCSEN_S 21U
3568 #define SDMMC_ISE_DCRCSEN_DISABLE 0x00000000U
3569 #define SDMMC_ISE_DCRCSEN_ENABLE 0x00200000U
3570 /*
3571 
3572  Field: DEBSEN
3573  From..to bits: 22...22
3574  DefaultValue: 0x0
3575  Access type: read-write
3576  Description: Data end bit error signal status enable
3577 
3578  ENUMs:
3579  DISABLE: Status Interrupt signaling disabled
3580  ENABLE: Status Interrupt signaling enabled
3581 */
3582 #define SDMMC_ISE_DEBSEN 0x00400000U
3583 #define SDMMC_ISE_DEBSEN_M 0x00400000U
3584 #define SDMMC_ISE_DEBSEN_S 22U
3585 #define SDMMC_ISE_DEBSEN_DISABLE 0x00000000U
3586 #define SDMMC_ISE_DEBSEN_ENABLE 0x00400000U
3587 /*
3588 
3589  Field: ACESEN
3590  From..to bits: 24...24
3591  DefaultValue: 0x0
3592  Access type: read-write
3593  Description: Auto CMD12 error signal status enable
3594 
3595  ENUMs:
3596  DISABLE: Status Interrupt signaling disabled
3597  ENABLE: Status Interrupt signaling enabled
3598 */
3599 #define SDMMC_ISE_ACESEN 0x01000000U
3600 #define SDMMC_ISE_ACESEN_M 0x01000000U
3601 #define SDMMC_ISE_ACESEN_S 24U
3602 #define SDMMC_ISE_ACESEN_DISABLE 0x00000000U
3603 #define SDMMC_ISE_ACESEN_ENABLE 0x01000000U
3604 /*
3605 
3606  Field: ADMAESEN
3607  From..to bits: 25...25
3608  DefaultValue: 0x0
3609  Access type: read-write
3610  Description: ADMA Error Signal Enable
3611  Note: This functionality is not supported, since MADMA_EN is set to 0 in the design.
3612 
3613  ENUMs:
3614  DISABLE: Status Interrupt signaling disabled
3615  ENABLE: Status Interrupt signaling enabled
3616 */
3617 #define SDMMC_ISE_ADMAESEN 0x02000000U
3618 #define SDMMC_ISE_ADMAESEN_M 0x02000000U
3619 #define SDMMC_ISE_ADMAESEN_S 25U
3620 #define SDMMC_ISE_ADMAESEN_DISABLE 0x00000000U
3621 #define SDMMC_ISE_ADMAESEN_ENABLE 0x02000000U
3622 /*
3623 
3624  Field: NOUSE1
3625  From..to bits: 26...26
3626  DefaultValue: 0x0
3627  Access type: read-write
3628  Description: No use
3629  Note: Writing values other than 0 might produce undesired results.
3630  Always set this bit to 0.
3631 
3632  ENUMs:
3633  LOW: Always set this bit to 0
3634  HIGH: Do not set this bit
3635 */
3636 #define SDMMC_ISE_NOUSE1 0x04000000U
3637 #define SDMMC_ISE_NOUSE1_M 0x04000000U
3638 #define SDMMC_ISE_NOUSE1_S 26U
3639 #define SDMMC_ISE_NOUSE1_LOW 0x00000000U
3640 #define SDMMC_ISE_NOUSE1_HIGH 0x04000000U
3641 /*
3642 
3643  Field: CERRSEN
3644  From..to bits: 28...28
3645  DefaultValue: 0x0
3646  Access type: read-write
3647  Description: Card error interrupt signal status enable
3648 
3649  ENUMs:
3650  DISABLE: Status Interrupt signaling disabled
3651  ENABLE: Status Interrupt signaling enabled
3652 */
3653 #define SDMMC_ISE_CERRSEN 0x10000000U
3654 #define SDMMC_ISE_CERRSEN_M 0x10000000U
3655 #define SDMMC_ISE_CERRSEN_S 28U
3656 #define SDMMC_ISE_CERRSEN_DISABLE 0x00000000U
3657 #define SDMMC_ISE_CERRSEN_ENABLE 0x10000000U
3658 /*
3659 
3660  Field: BADASEN
3661  From..to bits: 29...29
3662  DefaultValue: 0x0
3663  Access type: read-write
3664  Description: Bad access to data space interrupt enable
3665 
3666  ENUMs:
3667  DISABLE: Status Interrupt signaling disabled
3668  ENABLE: Status Interrupt signaling enabled
3669 */
3670 #define SDMMC_ISE_BADASEN 0x20000000U
3671 #define SDMMC_ISE_BADASEN_M 0x20000000U
3672 #define SDMMC_ISE_BADASEN_S 29U
3673 #define SDMMC_ISE_BADASEN_DISABLE 0x00000000U
3674 #define SDMMC_ISE_BADASEN_ENABLE 0x20000000U
3675 
3676 
3677 /*-----------------------------------REGISTER------------------------------------
3678  Register name: AC12
3679  Offset name: SDMMC_O_AC12
3680  Relative address: 0x23C
3681  Description: SD_AC12 Error register
3682  The host driver may determine which of the errors cases related to Auto CMD12 has occurred by checking this SD_AC12 register when an auto CMD12 error interrupt occurs. This register is valid only when auto CMD12 is enabled (SD_CMD.ACEN) and auto CMD12Error (SD_STAT.ACE) is set to 1.
3683  These bits are automatically reset when starting a new adtc command with data.
3684  Default Value: 0x00000000
3685 
3686  Field: ACNE
3687  From..to bits: 0...0
3688  DefaultValue: 0x0
3689  Access type: read-only
3690  Description: Auto CMD12 not executed.
3691  This bit is set to 1 if multiple block data transfer command has started and if an error occurs in command before auto CMD12 starts.
3692 
3693  ENUMs:
3694  NOERR: Auto CMD12 executed
3695  ERR: Auto CMD12 not executed
3696 */
3697 #define SDMMC_AC12_ACNE 0x00000001U
3698 #define SDMMC_AC12_ACNE_M 0x00000001U
3699 #define SDMMC_AC12_ACNE_S 0U
3700 #define SDMMC_AC12_ACNE_NOERR 0x00000000U
3701 #define SDMMC_AC12_ACNE_ERR 0x00000001U
3702 /*
3703 
3704  Field: ACTO
3705  From..to bits: 1...1
3706  DefaultValue: 0x0
3707  Access type: read-only
3708  Description: Auto CMD12 timeout error.
3709  This bit is set to 1 if no response is received within 64 clock cycles from the end bit of the auto CMD12 command.
3710 
3711  ENUMs:
3712  NOERR: No error
3713  ERR: Error occurred
3714 */
3715 #define SDMMC_AC12_ACTO 0x00000002U
3716 #define SDMMC_AC12_ACTO_M 0x00000002U
3717 #define SDMMC_AC12_ACTO_S 1U
3718 #define SDMMC_AC12_ACTO_NOERR 0x00000000U
3719 #define SDMMC_AC12_ACTO_ERR 0x00000002U
3720 /*
3721 
3722  Field: ACCE
3723  From..to bits: 2...2
3724  DefaultValue: 0x0
3725  Access type: read-only
3726  Description: Auto CMD12 CRC error.
3727  This bit is set to 1 when a CRC7 error is detected in the auto CMD12 command response.
3728 
3729  ENUMs:
3730  NOERR: No error
3731  ERR: Error occurred
3732 */
3733 #define SDMMC_AC12_ACCE 0x00000004U
3734 #define SDMMC_AC12_ACCE_M 0x00000004U
3735 #define SDMMC_AC12_ACCE_S 2U
3736 #define SDMMC_AC12_ACCE_NOERR 0x00000000U
3737 #define SDMMC_AC12_ACCE_ERR 0x00000004U
3738 /*
3739 
3740  Field: ACEB
3741  From..to bits: 3...3
3742  DefaultValue: 0x0
3743  Access type: read-only
3744  Description: Auto CMD12 end bit error.
3745  This bit is set to 1 when detecting a 0 at the end bit position of auto CMD12 command response.
3746 
3747  ENUMs:
3748  NOERR: No error
3749  ERR: Error occurred
3750 */
3751 #define SDMMC_AC12_ACEB 0x00000008U
3752 #define SDMMC_AC12_ACEB_M 0x00000008U
3753 #define SDMMC_AC12_ACEB_S 3U
3754 #define SDMMC_AC12_ACEB_NOERR 0x00000000U
3755 #define SDMMC_AC12_ACEB_ERR 0x00000008U
3756 /*
3757 
3758  Field: ACIE
3759  From..to bits: 4...4
3760  DefaultValue: 0x0
3761  Access type: read-only
3762  Description: Auto CMD12 index error
3763  This bit is a set to 1 when response index differs from corresponding command auto CMD12 index previously emitted.
3764  This bit depends on the command index check enable (SD_CMD.CICEN).
3765 
3766  ENUMs:
3767  NOERR: No error
3768  ERR: Error occurred
3769 */
3770 #define SDMMC_AC12_ACIE 0x00000010U
3771 #define SDMMC_AC12_ACIE_M 0x00000010U
3772 #define SDMMC_AC12_ACIE_S 4U
3773 #define SDMMC_AC12_ACIE_NOERR 0x00000000U
3774 #define SDMMC_AC12_ACIE_ERR 0x00000010U
3775 /*
3776 
3777  Field: CNI
3778  From..to bits: 7...7
3779  DefaultValue: 0x0
3780  Access type: read-only
3781  Description: Command not issue by auto CMD12 error
3782  If this bit is set to 1, a pending command is not executed due to auto CMD12 error ACEB, ACCE, ACTO, or ACNE.
3783 
3784  ENUMs:
3785  NOERR: No error
3786  ERR: Error occurred
3787 */
3788 #define SDMMC_AC12_CNI 0x00000080U
3789 #define SDMMC_AC12_CNI_M 0x00000080U
3790 #define SDMMC_AC12_CNI_S 7U
3791 #define SDMMC_AC12_CNI_NOERR 0x00000000U
3792 #define SDMMC_AC12_CNI_ERR 0x00000080U
3793 /*
3794 
3795  Field: UHSMS
3796  From..to bits: 16...18
3797  DefaultValue: 0x0
3798  Access type: read-write
3799  Description: UHS Mode Select
3800  This field is used to select one of UHS-I modes or e.MMC HS200 mode and effective when 1.8V Signaling Enable is set to 1.
3801 
3802  Note: Dragon does not support 1.8V signaling and UHS modes.
3803  Always set this bitfield to 0.
3804 
3805  ENUMs:
3806  SDR12: SDR12
3807  SDR25: SDR25
3808  SDR50: SDR50
3809  SDR104: SDR104 / HS200
3810  DDR50: DDR50
3811 */
3812 #define SDMMC_AC12_UHSMS_W 3U
3813 #define SDMMC_AC12_UHSMS_M 0x00070000U
3814 #define SDMMC_AC12_UHSMS_S 16U
3815 #define SDMMC_AC12_UHSMS_SDR12 0x00000000U
3816 #define SDMMC_AC12_UHSMS_SDR25 0x00010000U
3817 #define SDMMC_AC12_UHSMS_SDR50 0x00020000U
3818 #define SDMMC_AC12_UHSMS_SDR104 0x00030000U
3819 #define SDMMC_AC12_UHSMS_DDR50 0x00040000U
3820 /*
3821 
3822  Field: V1P8SEN
3823  From..to bits: 19...19
3824  DefaultValue: 0x0
3825  Access type: read-write
3826  Description: 1.8V Signaling Enable
3827 
3828  This bit controls voltage regulator for I/O cell. 3.3V is supplied to the card regardless of signaling voltage.
3829  Setting this bit from 0 to 1 starts changing signal voltage from 3.3V to 1.8V. 1.8V regulator output shall be stable within 5ms. Host Controller clears this bit if switching to 1.8V signaling fails.
3830  Clearing this bit from 1 to 0 starts changing signal voltage from 1.8V to 3.3V. 3.3V regulator output shall be stable within 5ms.
3831 
3832  Host Driver can set this bit to 1 when Host Controller supports 1.8V signaling (One of support bits is set to 1: SDR50, SDR104 or DDR50 in the Capabilities register) and the card or device supports UHS-I (S18A=1. Refer to Bus Signal Voltage Switch Sequence in the Physical Layer Specification Version 3.0x).
3833 
3834  Note: Dragon supports only 3.3V.
3835  Always set this bit to 0.
3836 
3837  ENUMs:
3838  DISABLE: 3.3V Signaling
3839  ENABLE: 1.8V Signaling
3840 */
3841 #define SDMMC_AC12_V1P8SEN 0x00080000U
3842 #define SDMMC_AC12_V1P8SEN_M 0x00080000U
3843 #define SDMMC_AC12_V1P8SEN_S 19U
3844 #define SDMMC_AC12_V1P8SEN_DISABLE 0x00000000U
3845 #define SDMMC_AC12_V1P8SEN_ENABLE 0x00080000U
3846 /*
3847 
3848  Field: DSSEL
3849  From..to bits: 20...21
3850  DefaultValue: 0x0
3851  Access type: read-write
3852  Description: Driver Strength Select
3853 
3854  Host Controller output driver in 1.8V signaling is selected by this bit. In 3.3V signaling, this field is not effective. This field can be set depends on Driver Type A, C and D support bits in the Capabilities register.
3855 
3856 
3857 
3858  ENUMs:
3859  TYPE_B: Driver Type B is selected
3860  TYPE_A: Driver Type A is selected
3861  TYPE_C: Driver Type C is selected
3862  TYPE_D: Driver Type D is selected
3863 */
3864 #define SDMMC_AC12_DSSEL_W 2U
3865 #define SDMMC_AC12_DSSEL_M 0x00300000U
3866 #define SDMMC_AC12_DSSEL_S 20U
3867 #define SDMMC_AC12_DSSEL_TYPE_B 0x00000000U
3868 #define SDMMC_AC12_DSSEL_TYPE_A 0x00100000U
3869 #define SDMMC_AC12_DSSEL_TYPE_C 0x00200000U
3870 #define SDMMC_AC12_DSSEL_TYPE_D 0x00300000U
3871 /*
3872 
3873  Field: NOUSE0
3874  From..to bits: 22...23
3875  DefaultValue: 0x0
3876  Access type: read-write
3877  Description: No use
3878  Note: Writing values other than 0 might produce undesired results.
3879  Always set this bit to 0.
3880 
3881  ENUMs:
3882  LOW: Always set this bit to 0
3883  HIGH: Do not set this bit
3884 */
3885 #define SDMMC_AC12_NOUSE0_W 2U
3886 #define SDMMC_AC12_NOUSE0_M 0x00C00000U
3887 #define SDMMC_AC12_NOUSE0_S 22U
3888 #define SDMMC_AC12_NOUSE0_LOW 0x00000000U
3889 #define SDMMC_AC12_NOUSE0_HIGH 0x00400000U
3890 /*
3891 
3892  Field: AIEN
3893  From..to bits: 30...30
3894  DefaultValue: 0x0
3895  Access type: read-write
3896  Description: Asynchronous Interrupt Enable
3897 
3898  This bit can be set to 1 if a card supports asynchronous interrupts and Asynchronous Interrupt Support is set to 1 in the Capabilities register. Asynchronous interrupt is effective when DAT[1] interrupt is used in 4-bit SD mode (and zero is set to Interrupt Pin Select in the Shared Bus Control register). If this bit is set to 1, the Host Driver can stop the SDCLK during asynchronous interrupt period to save power. During this period, the Host Controller continues to deliver the Card Interrupt to the host when it is asserted by the Card.
3899 
3900 
3901  ENUMs:
3902  DISABLE: Asynchronous Interrupt disabled
3903  ENABLE: Asynchronous Interrupt enabled
3904 */
3905 #define SDMMC_AC12_AIEN 0x40000000U
3906 #define SDMMC_AC12_AIEN_M 0x40000000U
3907 #define SDMMC_AC12_AIEN_S 30U
3908 #define SDMMC_AC12_AIEN_DISABLE 0x00000000U
3909 #define SDMMC_AC12_AIEN_ENABLE 0x40000000U
3910 /*
3911 
3912  Field: NOUSE1
3913  From..to bits: 31...31
3914  DefaultValue: 0x0
3915  Access type: read-write
3916  Description: No use
3917  Note: Writing values other than 0 might produce undesired results.
3918  Always set this bit to 0.
3919 
3920  ENUMs:
3921  LOW: Always set this bit to 0
3922  HIGH: Do not set this bit
3923 */
3924 #define SDMMC_AC12_NOUSE1 0x80000000U
3925 #define SDMMC_AC12_NOUSE1_M 0x80000000U
3926 #define SDMMC_AC12_NOUSE1_S 31U
3927 #define SDMMC_AC12_NOUSE1_LOW 0x00000000U
3928 #define SDMMC_AC12_NOUSE1_HIGH 0x80000000U
3929 
3930 
3931 /*-----------------------------------REGISTER------------------------------------
3932  Register name: CAPA
3933  Offset name: SDMMC_O_CAPA
3934  Relative address: 0x240
3935  Description: Capability register
3936  This register lists the capabilities of the MMC/SD/SDIO host controller.
3937  Default Value: 0x20E10080
3938 
3939  Field: TCF
3940  From..to bits: 0...5
3941  DefaultValue: 0x0
3942  Access type: read-only
3943  Description: Timeout clock frequency
3944  The timeout clock frequency is used to detect Data Timeout Error (DTO interrupt).
3945  The timeout clock frequency depends on the frequency of the clock provided to the card. The value of the timeout clock frequency is not available in this register.
3946 
3947  ENUMs:
3948  MINIMUM: Minimum value
3949  MAXIMUM: Maximum value
3950 */
3951 #define SDMMC_CAPA_TCF_W 6U
3952 #define SDMMC_CAPA_TCF_M 0x0000003FU
3953 #define SDMMC_CAPA_TCF_S 0U
3954 #define SDMMC_CAPA_TCF_MINIMUM 0x00000000U
3955 #define SDMMC_CAPA_TCF_MAXIMUM 0x0000003FU
3956 /*
3957 
3958  Field: TCU
3959  From..to bits: 7...7
3960  DefaultValue: 0x1
3961  Access type: read-only
3962  Description: Timeout clock unit
3963  This bit shows the unit of base clock frequency used to detect Data Timeout Error.
3964 
3965  ENUMs:
3966  KHZ: kHz
3967  MHZ: MHz
3968 */
3969 #define SDMMC_CAPA_TCU 0x00000080U
3970 #define SDMMC_CAPA_TCU_M 0x00000080U
3971 #define SDMMC_CAPA_TCU_S 7U
3972 #define SDMMC_CAPA_TCU_KHZ 0x00000000U
3973 #define SDMMC_CAPA_TCU_MHZ 0x00000080U
3974 /*
3975 
3976  Field: BCF
3977  From..to bits: 8...13
3978  DefaultValue: 0x0
3979  Access type: read-only
3980  Description: Base clock frequency for clock provided to the card.
3981  ARRAY(0x1bfe1b0)
3982 
3983  ENUMs:
3984  MINIMUM: Minimum value
3985  MAXIMUM: Maximum value
3986 */
3987 #define SDMMC_CAPA_BCF_W 6U
3988 #define SDMMC_CAPA_BCF_M 0x00003F00U
3989 #define SDMMC_CAPA_BCF_S 8U
3990 #define SDMMC_CAPA_BCF_MINIMUM 0x00000000U
3991 #define SDMMC_CAPA_BCF_MAXIMUM 0x00003F00U
3992 /*
3993 
3994  Field: MBL
3995  From..to bits: 16...17
3996  DefaultValue: 0x1
3997  Access type: read-only
3998  Description: Maximum block length
3999  This value indicates the maximum block size that the host driver can read and write to the buffer in the host controller.
4000  The host controller supports 512 bytes and 1024 bytes block transfers.
4001  0h = 512 bytes
4002  1h = 1024 bytes
4003  2h = 2048 bytes
4004 
4005  ENUMs:
4006  MINIMUM: Minimum value
4007  MAXIMUM: Maximum value
4008 */
4009 #define SDMMC_CAPA_MBL_W 2U
4010 #define SDMMC_CAPA_MBL_M 0x00030000U
4011 #define SDMMC_CAPA_MBL_S 16U
4012 #define SDMMC_CAPA_MBL_MINIMUM 0x00000000U
4013 #define SDMMC_CAPA_MBL_MAXIMUM 0x00030000U
4014 /*
4015 
4016  Field: AD2S
4017  From..to bits: 19...19
4018  DefaultValue: 0x0
4019  Access type: read-only
4020  Description: This bit indicates whether the Host Controller is capable of using ADMA2.
4021 
4022  ENUMs:
4023  SUPPORT: Supported
4024  NOSUPPORT: Not supported
4025 */
4026 #define SDMMC_CAPA_AD2S 0x00080000U
4027 #define SDMMC_CAPA_AD2S_M 0x00080000U
4028 #define SDMMC_CAPA_AD2S_S 19U
4029 #define SDMMC_CAPA_AD2S_SUPPORT 0x00080000U
4030 #define SDMMC_CAPA_AD2S_NOSUPPORT 0x00000000U
4031 /*
4032 
4033  Field: HSS
4034  From..to bits: 21...21
4035  DefaultValue: 0x1
4036  Access type: read-only
4037  Description: High-speed support
4038  This bit indicates that the host controller supports high speed operations and can supply an up-to-52 MHz clock to the card.
4039 
4040  ENUMs:
4041  NOSUPPORT: Not supported
4042  SUPPORT: Supported
4043 */
4044 #define SDMMC_CAPA_HSS 0x00200000U
4045 #define SDMMC_CAPA_HSS_M 0x00200000U
4046 #define SDMMC_CAPA_HSS_S 21U
4047 #define SDMMC_CAPA_HSS_NOSUPPORT 0x00000000U
4048 #define SDMMC_CAPA_HSS_SUPPORT 0x00200000U
4049 /*
4050 
4051  Field: DS
4052  From..to bits: 22...22
4053  DefaultValue: 0x1
4054  Access type: read-only
4055  Description: DMA support
4056  This bit indicates that the Host controller is able to use DMA to transfer data between system memory and the Host controller directly.
4057 
4058  ENUMs:
4059  NOSUPPORT: Not supported
4060  SUPPORT: Supported
4061 */
4062 #define SDMMC_CAPA_DS 0x00400000U
4063 #define SDMMC_CAPA_DS_M 0x00400000U
4064 #define SDMMC_CAPA_DS_S 22U
4065 #define SDMMC_CAPA_DS_NOSUPPORT 0x00000000U
4066 #define SDMMC_CAPA_DS_SUPPORT 0x00400000U
4067 /*
4068 
4069  Field: SRS
4070  From..to bits: 23...23
4071  DefaultValue: 0x1
4072  Access type: read-only
4073  Description: Suspend/resume support (SDIO cards only).
4074  This bit indicates whether the host controller supports suspend/resume functionality.
4075 
4076  ENUMs:
4077  NOSUPPORT: Not supported
4078  SUPPORT: Supported
4079 */
4080 #define SDMMC_CAPA_SRS 0x00800000U
4081 #define SDMMC_CAPA_SRS_M 0x00800000U
4082 #define SDMMC_CAPA_SRS_S 23U
4083 #define SDMMC_CAPA_SRS_NOSUPPORT 0x00000000U
4084 #define SDMMC_CAPA_SRS_SUPPORT 0x00800000U
4085 /*
4086 
4087  Field: VS33
4088  From..to bits: 24...24
4089  DefaultValue: 0x0
4090  Access type: read-write
4091  Description: Voltage support 3.3V
4092  Initialization of this register (via a write access to this register) depends on the system capabilities.
4093  The host driver shall not modify this register after the initialization.
4094  This register is only reinitialized by a hard reset (via mmc_RESET signal).
4095  0h (W) = 3.3 V not supported
4096  0h (R) = 3.3 V not supported
4097  1h (W) = 3.3 V supported
4098  1h (R) = 3.3 V supported
4099 
4100  ENUMs:
4101  NOSUPPORT: Not supported
4102  SUPPORT: Supported
4103 */
4104 #define SDMMC_CAPA_VS33 0x01000000U
4105 #define SDMMC_CAPA_VS33_M 0x01000000U
4106 #define SDMMC_CAPA_VS33_S 24U
4107 #define SDMMC_CAPA_VS33_NOSUPPORT 0x00000000U
4108 #define SDMMC_CAPA_VS33_SUPPORT 0x01000000U
4109 /*
4110 
4111  Field: VS30
4112  From..to bits: 25...25
4113  DefaultValue: 0x0
4114  Access type: read-write
4115  Description: Voltage support 3.0V
4116  Initialization of this register (via a write access to this register) depends on the system capabilities.
4117  The host driver shall not modify this register after the initialization.
4118  This register is only reinitialized by a hard reset (via mmc_RESET signal).
4119  0h (W) = 3.0 V not supported
4120  0h (R) = 3.0 V not supported
4121  1h (W) = 3.0 V supported
4122  1h (R) = 3.0 V supported
4123 
4124  ENUMs:
4125  NOSUPPORT: Not supported
4126  SUPPORT: Supported
4127 */
4128 #define SDMMC_CAPA_VS30 0x02000000U
4129 #define SDMMC_CAPA_VS30_M 0x02000000U
4130 #define SDMMC_CAPA_VS30_S 25U
4131 #define SDMMC_CAPA_VS30_NOSUPPORT 0x00000000U
4132 #define SDMMC_CAPA_VS30_SUPPORT 0x02000000U
4133 /*
4134 
4135  Field: VS18
4136  From..to bits: 26...26
4137  DefaultValue: 0x0
4138  Access type: read-write
4139  Description: Voltage support 1.8 V
4140  Initialization of this register (via a write access to this register) depends on the system capabilities.
4141  The host driver shall not modify this register after the initialization.
4142  This register is only reinitialized by a hard reset (via mmc_RESET signal).
4143  0h (W) = 1.8 V not supported
4144  0h (R) = 1.8 V not supported
4145  1h (W) = 1.8 V supported
4146  1h (R) = 1.8 V supported
4147 
4148  ENUMs:
4149  NOSUPPORT: Not supported
4150  SUPPORT: Supported
4151 */
4152 #define SDMMC_CAPA_VS18 0x04000000U
4153 #define SDMMC_CAPA_VS18_M 0x04000000U
4154 #define SDMMC_CAPA_VS18_S 26U
4155 #define SDMMC_CAPA_VS18_NOSUPPORT 0x00000000U
4156 #define SDMMC_CAPA_VS18_SUPPORT 0x04000000U
4157 /*
4158 
4159  Field: BUS64BIT
4160  From..to bits: 28...28
4161  DefaultValue: 0x0
4162  Access type: read-only
4163  Description: 64 Bit System Bus Support
4164  Setting 1 to this bit indicates that the Host Controller supports 64-bit address descriptor mode and is connected to 64-bit address system bus.
4165  0h (R) = 32-bit System bus address
4166  1h (R) = 64-bit System bus address
4167 
4168  ENUMs:
4169  NOSUPPORT: Not supported
4170  SUPPORT: Supported
4171 */
4172 #define SDMMC_CAPA_BUS64BIT 0x10000000U
4173 #define SDMMC_CAPA_BUS64BIT_M 0x10000000U
4174 #define SDMMC_CAPA_BUS64BIT_S 28U
4175 #define SDMMC_CAPA_BUS64BIT_NOSUPPORT 0x00000000U
4176 #define SDMMC_CAPA_BUS64BIT_SUPPORT 0x10000000U
4177 /*
4178 
4179  Field: AIS
4180  From..to bits: 29...29
4181  DefaultValue: 0x1
4182  Access type: read-only
4183  Description: Asynchronous Interrupt Support
4184  Refer to SDIO Specification Version 3.00 about asynchronous interrupt.
4185 
4186  ENUMs:
4187  NOSUPPORT: Not supported
4188  SUPPORT: Supported
4189 */
4190 #define SDMMC_CAPA_AIS 0x20000000U
4191 #define SDMMC_CAPA_AIS_M 0x20000000U
4192 #define SDMMC_CAPA_AIS_S 29U
4193 #define SDMMC_CAPA_AIS_NOSUPPORT 0x00000000U
4194 #define SDMMC_CAPA_AIS_SUPPORT 0x20000000U
4195 
4196 
4197 /*-----------------------------------REGISTER------------------------------------
4198  Register name: CURCAPA
4199  Offset name: SDMMC_O_CURCAPA
4200  Relative address: 0x248
4201  Description: Current capability register
4202  This register indicates the maximum current capability for each voltage.
4203  Default Value: 0x00000000
4204 
4205  Field: CUR33
4206  From..to bits: 0...7
4207  DefaultValue: 0x0
4208  Access type: read-write
4209  Description: Maximum current for 3.3V
4210  The maximum current capability for this voltage is not available. Feature not implemented.
4211 
4212  ENUMs:
4213  MINIMUM: Minimum value
4214  MAXIMUM: Maximum value
4215 */
4216 #define SDMMC_CURCAPA_CUR33_W 8U
4217 #define SDMMC_CURCAPA_CUR33_M 0x000000FFU
4218 #define SDMMC_CURCAPA_CUR33_S 0U
4219 #define SDMMC_CURCAPA_CUR33_MINIMUM 0x00000000U
4220 #define SDMMC_CURCAPA_CUR33_MAXIMUM 0x000000FFU
4221 /*
4222 
4223  Field: CUR30
4224  From..to bits: 8...15
4225  DefaultValue: 0x0
4226  Access type: read-write
4227  Description: Maximum current for 3.0V
4228  The maximum current capability for this voltage is not available. Feature not implemented.
4229 
4230  ENUMs:
4231  MINIMUM: Minimum value
4232  MAXIMUM: Maximum value
4233 */
4234 #define SDMMC_CURCAPA_CUR30_W 8U
4235 #define SDMMC_CURCAPA_CUR30_M 0x0000FF00U
4236 #define SDMMC_CURCAPA_CUR30_S 8U
4237 #define SDMMC_CURCAPA_CUR30_MINIMUM 0x00000000U
4238 #define SDMMC_CURCAPA_CUR30_MAXIMUM 0x0000FF00U
4239 /*
4240 
4241  Field: CUR18
4242  From..to bits: 16...23
4243  DefaultValue: 0x0
4244  Access type: read-write
4245  Description: Maximum current for 1.8V
4246  The maximum current capability for this voltage is not available. Feature not implemented.
4247 
4248  ENUMs:
4249  MINIMUM: Minimum value
4250  MAXIMUM: Maximum value
4251 */
4252 #define SDMMC_CURCAPA_CUR18_W 8U
4253 #define SDMMC_CURCAPA_CUR18_M 0x00FF0000U
4254 #define SDMMC_CURCAPA_CUR18_S 16U
4255 #define SDMMC_CURCAPA_CUR18_MINIMUM 0x00000000U
4256 #define SDMMC_CURCAPA_CUR18_MAXIMUM 0x00FF0000U
4257 
4258 
4259 /*-----------------------------------REGISTER------------------------------------
4260  Register name: REV
4261  Offset name: SDMMC_O_REV
4262  Relative address: 0x2FC
4263  Description: Revision register
4264  This register contains the hard coded RTL vendor revision number, the version number of SD specification compliancy.
4265  Default Value: 0x33020000
4266 
4267  Field: SIS
4268  From..to bits: 0...0
4269  DefaultValue: 0x0
4270  Access type: read-only
4271  Description: Slot Interrupt Status
4272  This status bit indicates the inverted state of interrupt signal for the module.
4273  By a power on reset or by setting a software reset for all, the interrupt signal shall be deasserted and this status shall read 0.
4274 
4275  ENUMs:
4276  NOINT: No interrupt is asserted
4277  INT: Interrupt is asserted
4278 */
4279 #define SDMMC_REV_SIS 0x00000001U
4280 #define SDMMC_REV_SIS_M 0x00000001U
4281 #define SDMMC_REV_SIS_S 0U
4282 #define SDMMC_REV_SIS_NOINT 0x00000000U
4283 #define SDMMC_REV_SIS_INT 0x00000001U
4284 /*
4285 
4286  Field: SREV
4287  From..to bits: 16...23
4288  DefaultValue: 0x2
4289  Access type: read-only
4290  Description: Specification Version Number
4291  This status indicates the Standard SD Host Controller Specification Version.
4292  The upper and lower 4 bits indicate the version.
4293  0h: SD Host Specification Version 1.00.
4294  1h: SD Host Specification Version 2.00.
4295  2h: SD Host Specification Version 3.00.
4296  3h: Reserved
4297 
4298 
4299  ENUMs:
4300  MINIMUM: Minimum value
4301  MAXIMUM: Maximum value
4302 */
4303 #define SDMMC_REV_SREV_W 8U
4304 #define SDMMC_REV_SREV_M 0x00FF0000U
4305 #define SDMMC_REV_SREV_S 16U
4306 #define SDMMC_REV_SREV_MINIMUM 0x00000000U
4307 #define SDMMC_REV_SREV_MAXIMUM 0x00FF0000U
4308 /*
4309 
4310  Field: VREV
4311  From..to bits: 24...31
4312  DefaultValue: 0x33
4313  Access type: read-only
4314  Description: Vendor Version Number
4315  Bits 7 to 4 are the major revision, bits 3 to 0 are the minor revision.
4316  Examples: 0x10 for 1.0 and 0x21 for 2.1.
4317  Reset value is 0x31.
4318 
4319  ENUMs:
4320  MINIMUM: Minimum value
4321  MAXIMUM: Maximum value
4322 */
4323 #define SDMMC_REV_VREV_W 8U
4324 #define SDMMC_REV_VREV_M 0xFF000000U
4325 #define SDMMC_REV_VREV_S 24U
4326 #define SDMMC_REV_VREV_MINIMUM 0x00000000U
4327 #define SDMMC_REV_VREV_MAXIMUM 0xFF000000U
4328 
4329 
4330 /*-----------------------------------REGISTER------------------------------------
4331  Register name: FE
4332  Offset name: SDMMC_O_FE
4333  Relative address: 0x250
4334  Description: The Force Event register is not a physically implemented register. Rather, it is an address at which the Error Interrupt Status register can be written. The effect of a write to this address will be reflected in the Error Interrupt Status Register, if corresponding bit of the Error Interrupt Status Enable Register is set.
4335  Default Value: 0x00000000
4336 
4337  Field: ACNE
4338  From..to bits: 0...0
4339  DefaultValue: 0x0
4340  Access type: write-only
4341  Description: Force Event Auto CMD12 not executed.
4342 
4343  ENUMs:
4344  NOINT: No interrupt
4345  INT: Interrupt forced
4346 */
4347 #define SDMMC_FE_ACNE 0x00000001U
4348 #define SDMMC_FE_ACNE_M 0x00000001U
4349 #define SDMMC_FE_ACNE_S 0U
4350 #define SDMMC_FE_ACNE_NOINT 0x00000000U
4351 #define SDMMC_FE_ACNE_INT 0x00000001U
4352 /*
4353 
4354  Field: ACTO
4355  From..to bits: 1...1
4356  DefaultValue: 0x0
4357  Access type: write-only
4358  Description: Force Event Auto CMD12 timeout error
4359 
4360  ENUMs:
4361  NOINT: No interrupt
4362  INT: Interrupt forced
4363 */
4364 #define SDMMC_FE_ACTO 0x00000002U
4365 #define SDMMC_FE_ACTO_M 0x00000002U
4366 #define SDMMC_FE_ACTO_S 1U
4367 #define SDMMC_FE_ACTO_NOINT 0x00000000U
4368 #define SDMMC_FE_ACTO_INT 0x00000002U
4369 /*
4370 
4371  Field: ACCE
4372  From..to bits: 2...2
4373  DefaultValue: 0x0
4374  Access type: write-only
4375  Description: Force Event Auto CMD12 CRC error
4376 
4377  ENUMs:
4378  NOINT: No interrupt
4379  INT: Interrupt forced
4380 */
4381 #define SDMMC_FE_ACCE 0x00000004U
4382 #define SDMMC_FE_ACCE_M 0x00000004U
4383 #define SDMMC_FE_ACCE_S 2U
4384 #define SDMMC_FE_ACCE_NOINT 0x00000000U
4385 #define SDMMC_FE_ACCE_INT 0x00000004U
4386 /*
4387 
4388  Field: ACEB
4389  From..to bits: 3...3
4390  DefaultValue: 0x0
4391  Access type: write-only
4392  Description: Force Event Auto CMD12 end bit error
4393 
4394  ENUMs:
4395  NOINT: No interrupt
4396  INT: Interrupt forced
4397 */
4398 #define SDMMC_FE_ACEB 0x00000008U
4399 #define SDMMC_FE_ACEB_M 0x00000008U
4400 #define SDMMC_FE_ACEB_S 3U
4401 #define SDMMC_FE_ACEB_NOINT 0x00000000U
4402 #define SDMMC_FE_ACEB_INT 0x00000008U
4403 /*
4404 
4405  Field: ACIE
4406  From..to bits: 4...4
4407  DefaultValue: 0x0
4408  Access type: write-only
4409  Description: Force Event Auto CMD12 index error
4410 
4411  ENUMs:
4412  NOINT: No interrupt
4413  INT: Interrupt forced
4414 */
4415 #define SDMMC_FE_ACIE 0x00000010U
4416 #define SDMMC_FE_ACIE_M 0x00000010U
4417 #define SDMMC_FE_ACIE_S 4U
4418 #define SDMMC_FE_ACIE_NOINT 0x00000000U
4419 #define SDMMC_FE_ACIE_INT 0x00000010U
4420 /*
4421 
4422  Field: CNI
4423  From..to bits: 7...7
4424  DefaultValue: 0x0
4425  Access type: write-only
4426  Description: Force Event Command not issue by Auto CMD12 error
4427 
4428  ENUMs:
4429  NOINT: No interrupt
4430  INT: Interrupt forced
4431 */
4432 #define SDMMC_FE_CNI 0x00000080U
4433 #define SDMMC_FE_CNI_M 0x00000080U
4434 #define SDMMC_FE_CNI_S 7U
4435 #define SDMMC_FE_CNI_NOINT 0x00000000U
4436 #define SDMMC_FE_CNI_INT 0x00000080U
4437 /*
4438 
4439  Field: CTO
4440  From..to bits: 16...16
4441  DefaultValue: 0x0
4442  Access type: write-only
4443  Description: Force Event Command Timeout error
4444 
4445  ENUMs:
4446  NOINT: No interrupt
4447  INT: Interrupt forced
4448 */
4449 #define SDMMC_FE_CTO 0x00010000U
4450 #define SDMMC_FE_CTO_M 0x00010000U
4451 #define SDMMC_FE_CTO_S 16U
4452 #define SDMMC_FE_CTO_NOINT 0x00000000U
4453 #define SDMMC_FE_CTO_INT 0x00010000U
4454 /*
4455 
4456  Field: CCRC
4457  From..to bits: 17...17
4458  DefaultValue: 0x0
4459  Access type: write-only
4460  Description: Force Event Comemand CRC error
4461 
4462  ENUMs:
4463  NOINT: No interrupt
4464  INT: Interrupt forced
4465 */
4466 #define SDMMC_FE_CCRC 0x00020000U
4467 #define SDMMC_FE_CCRC_M 0x00020000U
4468 #define SDMMC_FE_CCRC_S 17U
4469 #define SDMMC_FE_CCRC_NOINT 0x00000000U
4470 #define SDMMC_FE_CCRC_INT 0x00020000U
4471 /*
4472 
4473  Field: CEB
4474  From..to bits: 18...18
4475  DefaultValue: 0x0
4476  Access type: write-only
4477  Description: Force Event Command end bit error
4478 
4479  ENUMs:
4480  NOINT: No interrupt
4481  INT: Interrupt forced
4482 */
4483 #define SDMMC_FE_CEB 0x00040000U
4484 #define SDMMC_FE_CEB_M 0x00040000U
4485 #define SDMMC_FE_CEB_S 18U
4486 #define SDMMC_FE_CEB_NOINT 0x00000000U
4487 #define SDMMC_FE_CEB_INT 0x00040000U
4488 /*
4489 
4490  Field: CIE
4491  From..to bits: 19...19
4492  DefaultValue: 0x0
4493  Access type: write-only
4494  Description: Force Event Command index error
4495 
4496  ENUMs:
4497  NOINT: No interrupt
4498  INT: Interrupt forced
4499 */
4500 #define SDMMC_FE_CIE 0x00080000U
4501 #define SDMMC_FE_CIE_M 0x00080000U
4502 #define SDMMC_FE_CIE_S 19U
4503 #define SDMMC_FE_CIE_NOINT 0x00000000U
4504 #define SDMMC_FE_CIE_INT 0x00080000U
4505 /*
4506 
4507  Field: DTO
4508  From..to bits: 20...20
4509  DefaultValue: 0x0
4510  Access type: write-only
4511  Description: Force Event Data timeout error
4512 
4513  ENUMs:
4514  NOINT: No interrupt
4515  INT: Interrupt forced
4516 */
4517 #define SDMMC_FE_DTO 0x00100000U
4518 #define SDMMC_FE_DTO_M 0x00100000U
4519 #define SDMMC_FE_DTO_S 20U
4520 #define SDMMC_FE_DTO_NOINT 0x00000000U
4521 #define SDMMC_FE_DTO_INT 0x00100000U
4522 /*
4523 
4524  Field: DCRC
4525  From..to bits: 21...21
4526  DefaultValue: 0x0
4527  Access type: write-only
4528  Description: Force Event Data CRC error
4529 
4530  ENUMs:
4531  NOINT: No interrupt
4532  INT: Interrupt forced
4533 */
4534 #define SDMMC_FE_DCRC 0x00200000U
4535 #define SDMMC_FE_DCRC_M 0x00200000U
4536 #define SDMMC_FE_DCRC_S 21U
4537 #define SDMMC_FE_DCRC_NOINT 0x00000000U
4538 #define SDMMC_FE_DCRC_INT 0x00200000U
4539 /*
4540 
4541  Field: DEB
4542  From..to bits: 22...22
4543  DefaultValue: 0x0
4544  Access type: write-only
4545  Description: Force Event Data End Bit error
4546 
4547  ENUMs:
4548  NOINT: No interrupt
4549  INT: Interrupt forced
4550 */
4551 #define SDMMC_FE_DEB 0x00400000U
4552 #define SDMMC_FE_DEB_M 0x00400000U
4553 #define SDMMC_FE_DEB_S 22U
4554 #define SDMMC_FE_DEB_NOINT 0x00000000U
4555 #define SDMMC_FE_DEB_INT 0x00400000U
4556 /*
4557 
4558  Field: ACE
4559  From..to bits: 24...24
4560  DefaultValue: 0x0
4561  Access type: write-only
4562  Description: Force Event Auto CMD12 error
4563 
4564  ENUMs:
4565  NOINT: No interrupt
4566  INT: Interrupt forced
4567 */
4568 #define SDMMC_FE_ACE 0x01000000U
4569 #define SDMMC_FE_ACE_M 0x01000000U
4570 #define SDMMC_FE_ACE_S 24U
4571 #define SDMMC_FE_ACE_NOINT 0x00000000U
4572 #define SDMMC_FE_ACE_INT 0x01000000U
4573 /*
4574 
4575  Field: CERR
4576  From..to bits: 28...28
4577  DefaultValue: 0x0
4578  Access type: write-only
4579  Description: Force Event Card error
4580 
4581  ENUMs:
4582  NOINT: No interrupt
4583  INT: Interrupt forced
4584 */
4585 #define SDMMC_FE_CERR 0x10000000U
4586 #define SDMMC_FE_CERR_M 0x10000000U
4587 #define SDMMC_FE_CERR_S 28U
4588 #define SDMMC_FE_CERR_NOINT 0x00000000U
4589 #define SDMMC_FE_CERR_INT 0x10000000U
4590 /*
4591 
4592  Field: BADA
4593  From..to bits: 29...29
4594  DefaultValue: 0x0
4595  Access type: write-only
4596  Description: Force Event Bad access to data space
4597 
4598  ENUMs:
4599  NOINT: No interrupt
4600  INT: Interrupt forced
4601 */
4602 #define SDMMC_FE_BADA 0x20000000U
4603 #define SDMMC_FE_BADA_M 0x20000000U
4604 #define SDMMC_FE_BADA_S 29U
4605 #define SDMMC_FE_BADA_NOINT 0x00000000U
4606 #define SDMMC_FE_BADA_INT 0x20000000U
4607 
4608 
4609 /*-----------------------------------REGISTER------------------------------------
4610  Register name: TPSEL
4611  Offset name: SDMMC_O_TPSEL
4612  Relative address: 0x1040
4613  Description: Test-Port select.
4614  Default Value: 0x00000000
4615 
4616  Field: VAL
4617  From..to bits: 0...0
4618  DefaultValue: 0x0
4619  Access type: read-write
4620  Description: Test port 0 or 1
4621 
4622  ENUMs:
4623  TEST_PORT1:
4624  TEST_PORT2:
4625 */
4626 #define SDMMC_TPSEL_VAL 0x00000001U
4627 #define SDMMC_TPSEL_VAL_M 0x00000001U
4628 #define SDMMC_TPSEL_VAL_S 0U
4629 #define SDMMC_TPSEL_VAL_TEST_PORT1 0x00000000U
4630 #define SDMMC_TPSEL_VAL_TEST_PORT2 0x00000001U
4631 
4632 
4633 /*-----------------------------------REGISTER------------------------------------
4634  Register name: DMAMODE
4635  Offset name: SDMMC_O_DMAMODE
4636  Relative address: 0x1048
4637  Description: DMA mode select:
4638  This register define the behavior of DMA request signal that allow tranmission of data.
4639 
4640  Default Value: 0x00000001
4641 
4642  Field: VAL
4643  From..to bits: 0...0
4644  DefaultValue: 0x1
4645  Access type: read-write
4646  Description: 0h = In this case, DMA required to read/write data from SD_DATA register,
4647  the value of DMA_INDICATION_SELECT register is d'ont care
4648  and the trigger to transmit data from the internal FIFO defined by SD_BLK.BLEN register as a threshold.
4649 
4650  1h = DMA required to read/write data from BUFIF register
4651  the value of DMA_INDICATION_SELECT define the trigger of the internal FIFO.
4652 
4653  ENUMs:
4654  DISABLE: Disable to trig the internal FIFO with threshold, using DMA indication instead
4655  ENABLE: Enable to trig the internal FIFO with threshold
4656 */
4657 #define SDMMC_DMAMODE_VAL 0x00000001U
4658 #define SDMMC_DMAMODE_VAL_M 0x00000001U
4659 #define SDMMC_DMAMODE_VAL_S 0U
4660 #define SDMMC_DMAMODE_VAL_DISABLE 0x00000000U
4661 #define SDMMC_DMAMODE_VAL_ENABLE 0x00000001U
4662 
4663 
4664 /*-----------------------------------REGISTER------------------------------------
4665  Register name: DMAIND
4666  Offset name: SDMMC_O_DMAIND
4667  Relative address: 0x1050
4668  Description: DMA indication select:
4669  This register define the behavior of transmitting data from/to the card using DMA
4670  If DMA_MODE_SELECT =1, then the value of of this register is d'ont care,
4671  else it define the trigger of the internal FIFO
4672 
4673 
4674 
4675  Default Value: 0x00000001
4676 
4677  Field: VAL
4678  From..to bits: 0...0
4679  DefaultValue: 0x1
4680  Access type: read-write
4681  Description: 0h = IP transmit the data to/from the card after each DMA 'BLOCK' transmitted.
4682  In this case SDMMC.SD_BLK.BLEN shoud be equal to HOST_DMA.JOB_CTRL_CH7.MEM_JOB_CTRL_CHAN_7_BLOCK_SIZE
4683 
4684  1h = IP transmit the data to the card after each DMA 'JOB' transmitted.
4685  In this case SDMMC.SD_BLK.BLEN shoud be equal to HOST_DMA.TRANS_CTRL_CH7.MEM_TRANS_CTRL_CHAN_7_TRANS_NUM_B
4686 
4687 
4688  ENUMs:
4689  DMA_BLK: The IP transmit the data to/from the card, after each DMA transmitted block.
4690  DMA_JOB: The IP transmit the data to/from the card, only in the end of the DMA job.
4691 */
4692 #define SDMMC_DMAIND_VAL 0x00000001U
4693 #define SDMMC_DMAIND_VAL_M 0x00000001U
4694 #define SDMMC_DMAIND_VAL_S 0U
4695 #define SDMMC_DMAIND_VAL_DMA_BLK 0x00000000U
4696 #define SDMMC_DMAIND_VAL_DMA_JOB 0x00000001U
4697 
4698 
4699 /*-----------------------------------REGISTER------------------------------------
4700  Register name: CLKSEL
4701  Offset name: SDMMC_O_CLKSEL
4702  Relative address: 0x1054
4703  Description: This register define the functional clock frequency, and whether the clock is synchronized to main clock.
4704 
4705  Default Value: 0x00000000
4706 
4707  Field: VAL
4708  From..to bits: 0...0
4709  DefaultValue: 0x0
4710  Access type: read-write
4711  Description: 0h = 40MHz post-swallowing
4712 
4713  1h = 80MHz pro-swallowing
4714 
4715  ENUMs:
4716  SYNC: post-swallowing 40MHz clock to main clock
4717  ASYNC: pre-swallowing 80MHz clock
4718 */
4719 #define SDMMC_CLKSEL_VAL 0x00000001U
4720 #define SDMMC_CLKSEL_VAL_M 0x00000001U
4721 #define SDMMC_CLKSEL_VAL_S 0U
4722 #define SDMMC_CLKSEL_VAL_SYNC 0x00000000U
4723 #define SDMMC_CLKSEL_VAL_ASYNC 0x00000001U
4724 
4725 
4726 /*-----------------------------------REGISTER------------------------------------
4727  Register name: EVTMODE
4728  Offset name: SDMMC_O_EVTMODE
4729  Relative address: 0x10E0
4730  Description: Event mode register. It is used to select whether each line is disabled, in software mode (software clears the RIS) or in hardware mode (hardware clears the RIS)
4731  Default Value: 0x00000001
4732 
4733  Field: INT0CFG
4734  From..to bits: 0...1
4735  DefaultValue: 0x1
4736  Access type: read-write
4737  Description: Event line mode select for event corresponding to [IPSTANDARD.INT_EVENT0]
4738 
4739  ENUMs:
4740  DISABLE: The interrupt or event line is disabled.
4741  SOFTWARE: The interrupt or event line is in software mode. Software must clear the RIS.
4742  HARDWARE: The interrupt or event line is in hardware mode. The hardware (another module) clears automatically the associated RIS flag.
4743 */
4744 #define SDMMC_EVTMODE_INT0CFG_W 2U
4745 #define SDMMC_EVTMODE_INT0CFG_M 0x00000003U
4746 #define SDMMC_EVTMODE_INT0CFG_S 0U
4747 #define SDMMC_EVTMODE_INT0CFG_DISABLE 0x00000000U
4748 #define SDMMC_EVTMODE_INT0CFG_SOFTWARE 0x00000001U
4749 #define SDMMC_EVTMODE_INT0CFG_HARDWARE 0x00000002U
4750 
4751 
4752 /*-----------------------------------REGISTER------------------------------------
4753  Register name: DESC
4754  Offset name: SDMMC_O_DESC
4755  Relative address: 0x10FC
4756  Description: This register identifies the peripheral and its exact version.
4757  Default Value: 0x02111000
4758 
4759  Field: MINREV
4760  From..to bits: 0...3
4761  DefaultValue: 0x0
4762  Access type: read-only
4763  Description: Minor rev of the IP
4764 
4765  ENUMs:
4766  MINIMUM: Smallest value
4767  MAXIMUM: Highest possible value
4768 */
4769 #define SDMMC_DESC_MINREV_W 4U
4770 #define SDMMC_DESC_MINREV_M 0x0000000FU
4771 #define SDMMC_DESC_MINREV_S 0U
4772 #define SDMMC_DESC_MINREV_MINIMUM 0x00000000U
4773 #define SDMMC_DESC_MINREV_MAXIMUM 0x0000000FU
4774 /*
4775 
4776  Field: MAJREV
4777  From..to bits: 4...7
4778  DefaultValue: 0x0
4779  Access type: read-only
4780  Description: Major rev of the IP
4781 
4782  ENUMs:
4783  MINIMUM: Smallest value
4784  MAXIMUM: Highest possible value
4785 */
4786 #define SDMMC_DESC_MAJREV_W 4U
4787 #define SDMMC_DESC_MAJREV_M 0x000000F0U
4788 #define SDMMC_DESC_MAJREV_S 4U
4789 #define SDMMC_DESC_MAJREV_MINIMUM 0x00000000U
4790 #define SDMMC_DESC_MAJREV_MAXIMUM 0x000000F0U
4791 /*
4792 
4793  Field: INSTNUM
4794  From..to bits: 8...11
4795  DefaultValue: 0x0
4796  Access type: read-only
4797  Description: Instance Number within the device. This will be a parameter to the RTL for modules that can have multiple instances
4798 
4799  ENUMs:
4800  MINIMUM: Smallest value
4801  MAXIMUM: Highest possible value
4802 */
4803 #define SDMMC_DESC_INSTNUM_W 4U
4804 #define SDMMC_DESC_INSTNUM_M 0x00000F00U
4805 #define SDMMC_DESC_INSTNUM_S 8U
4806 #define SDMMC_DESC_INSTNUM_MINIMUM 0x00000000U
4807 #define SDMMC_DESC_INSTNUM_MAXIMUM 0x00000F00U
4808 /*
4809 
4810  Field: FEATURST
4811  From..to bits: 12...15
4812  DefaultValue: 0x1
4813  Access type: read-only
4814  Description: Feature Set for the module *instance*
4815 
4816  ENUMs:
4817  MINIMUM: Smallest value
4818  MAXIMUM: Highest possible value
4819 */
4820 #define SDMMC_DESC_FEATURST_W 4U
4821 #define SDMMC_DESC_FEATURST_M 0x0000F000U
4822 #define SDMMC_DESC_FEATURST_S 12U
4823 #define SDMMC_DESC_FEATURST_MINIMUM 0x00000000U
4824 #define SDMMC_DESC_FEATURST_MAXIMUM 0x0000F000U
4825 /*
4826 
4827  Field: MODULEID
4828  From..to bits: 16...31
4829  DefaultValue: 0x211
4830  Access type: read-only
4831  Description: Module identification contains a unique peripheral identification number. The assignments are maintained in a central database for all of the platform modules to ensure uniqueness.
4832 
4833  ENUMs:
4834  MINIMUM: Smallest value
4835  MAXIMUM: Highest possible value
4836 */
4837 #define SDMMC_DESC_MODULEID_W 16U
4838 #define SDMMC_DESC_MODULEID_M 0xFFFF0000U
4839 #define SDMMC_DESC_MODULEID_S 16U
4840 #define SDMMC_DESC_MODULEID_MINIMUM 0x00000000U
4841 #define SDMMC_DESC_MODULEID_MAXIMUM 0xFFFF0000U
4842 
4843 
4844 /*-----------------------------------REGISTER------------------------------------
4845  Register name: SDMMCSTAT
4846  Offset name: SDMMC_O_SDMMCSTAT
4847  Relative address: 0x1100
4848  Description: SDMMC Status register
4849 
4850  Default Value: 0x00000000
4851 
4852  Field: STATE
4853  From..to bits: 0...0
4854  DefaultValue: 0x0
4855  Access type: read-only
4856  Description: SDMMC state indication
4857 
4858  ENUMs:
4859  NORMAL: IP is active but is not transmitting
4860  ACTIVE: IP is active and transmitting
4861 */
4862 #define SDMMC_SDMMCSTAT_STATE 0x00000001U
4863 #define SDMMC_SDMMCSTAT_STATE_M 0x00000001U
4864 #define SDMMC_SDMMCSTAT_STATE_S 0U
4865 #define SDMMC_SDMMCSTAT_STATE_NORMAL 0x00000000U
4866 #define SDMMC_SDMMCSTAT_STATE_ACTIVE 0x00000001U
4867 
4868 
4869 /*-----------------------------------REGISTER------------------------------------
4870  Register name: BUFIF
4871  Offset name: SDMMC_O_BUFIF
4872  Relative address: 0x1110
4873  Description: SRAM Data Access Registers
4874  These registers are the 32-bit entry point of the SRAM buffer for read or write data transfers to and from the SDMMC card.
4875  Data[1] register is an alias for the SD_BUFIF register and needs to be used for normal (non safety, non burst) buffer accesses.
4876  Data[1..4] registers need to be used for non safety, incremental VBUSP burst accesses.
4877  For safety accesses (write with readback and double read), DataS[1..4] registers need to be used.
4878 
4879  The SRAM buffer size is 32bits x 256 (1024 bytes). Bytes within a word are stored and read in little endian format. This buffer can be used as two 512 byte buffers to transfer data efficiently without reducing the throughput. Sequential and contiguous access is necessary to increment the pointer correctly. Random or skipped access is not allowed.
4880  If the local host accesses this register byte-wise or 16bit-wise, the least significant byte (bits [7:0]) must always be written/read first. The update of the buffer address is done on the most significant byte write.
4881 
4882  Default Value: 0x00000000
4883 
4884  Field: DATA
4885  From..to bits: 0...31
4886  DefaultValue: 0x0
4887  Access type: read-write
4888  Description: Buffer data register
4889  In functional mode (SD_CON.MODE = FUNC):
4890  - a read access to this register is allowed only when the buffer read enable status is set to 1 (SD_PSTATE.BREN), otherwise a bad access (SD_STAT.BADA) is signaled.
4891  - a write access to this register is allowed only when the buffer write enable status is set to 1 (SD_PSTATE.BWEN), otherwise a bad access (SD_STAT.BADA) is signaled and the data is not written.
4892 
4893  ENUMs:
4894  MINIMUM: Minimum value
4895  MAXIMUM: Maximum value
4896 */
4897 #define SDMMC_BUFIF_DATA_W 32U
4898 #define SDMMC_BUFIF_DATA_M 0xFFFFFFFFU
4899 #define SDMMC_BUFIF_DATA_S 0U
4900 #define SDMMC_BUFIF_DATA_MINIMUM 0x00000000U
4901 #define SDMMC_BUFIF_DATA_MAXIMUM 0xFFFFFFFFU
4902 
4903 
4904 /*-----------------------------------REGISTER------------------------------------
4905  Register name: CLKCFG
4906  Offset name: SDMMC_O_CLKCFG
4907  Relative address: 0x4000
4908  Description: Clock Enable Register
4909  Default Value: 0x00000000
4910 
4911  Field: EN
4912  From..to bits: 0...0
4913  DefaultValue: 0x0
4914  Access type: read-write
4915  Description: Clock Disable / Enable for:
4916  * bus_clk (main clock) - 80MHz ;
4917  * card_clk (pll_clk) - 40MHz ;
4918  * lf_clk (slow_clk) - 32KHz ;
4919 
4920 */
4921 #define SDMMC_CLKCFG_EN 0x00000001U
4922 #define SDMMC_CLKCFG_EN_M 0x00000001U
4923 #define SDMMC_CLKCFG_EN_S 0U
4924 
4925 #endif /* __HW_SDMMC_H__*/