AM64x MCU+ SDK  08.02.00
mmcsd/v0/mmcsd.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
50 #ifndef MMCSD_H_
51 #define MMCSD_H_
52 
53 /* ========================================================================== */
54 /* Include Files */
55 /* ========================================================================== */
56 
57 #include <stdint.h>
58 #include <kernel/dpl/SystemP.h>
59 #include <kernel/dpl/SemaphoreP.h>
60 #include <kernel/dpl/HwiP.h>
61 #include <drivers/hw_include/csl_types.h>
62 #include <drivers/hw_include/cslr_mmcsd.h>
63 
64 #ifdef __cplusplus
65 extern "C" {
66 #endif
67 
68 /* ========================================================================== */
69 /* Macros & Typedefs */
70 /* ========================================================================== */
71 
72 #define MMCSD_CARD_TYPE_SD (0U)
73 #define MMCSD_CARD_TYPE_EMMC (1U)
74 #define MMCSD_CARD_TYPE_MMC (2U)
75 
76 /*
77 * \brief Macros that can be used for selecting the bus/data width
78 */
79 #define MMCSD_BUS_WIDTH_4BIT (0x4U)
80 #define MMCSD_BUS_WIDTH_8BIT (0x8U)
81 #define MMCSD_BUS_WIDTH_1BIT (0x1U)
82 
83 
84 /*
85 * \brief Macros that can be used for selecting the media transfer speed
86 */
87 #define MMCSD_TRANSPEED_25MBPS (0x32U)
88 #define MMCSD_TRANSPEED_50MBPS (0x5AU)
89 #define MMCSD_TRANSPEED_DEFAULT (0x32U)
90 #define MMCSD_TRANSPEED_HS (0x5AU)
91 #define MMCSD_TRANSPEED_SDR12 (0x32U)
92 #define MMCSD_TRANSPEED_SDR25 (0x5AU)
93 #define MMCSD_TRANSPEED_SDR50 (0xBU)
94 #define MMCSD_TRANSPEED_SDR104 (0x2BU)
95 #define MMCSD_TRANSPEED_DDR50 (0x3BU)
96 #define MMCSD_TRANSPEED_HS200 (0x2BU)
97 #define MMCSD_TRANSPEED_HS400 (0x4BU)
98 /*
99 * \brief Macros that can be used for selecting the bus voltage
100 */
101 #define MMCSD_BUS_VOLT_1_8V (0x5U) /* Embedded */
102 #define MMCSD_BUS_VOLT_3_0V (0x6U) /* Typical */
103 #define MMCSD_BUS_VOLT_3_3V (0x7U) /* Flattop */
104 
105 /*
106 * \brief Macros that can be used for selecting command types
107 */
108 #define MMCSD_CMD_TYPE_NORMAL (0U)
109 #define MMCSD_CMD_TYPE_BUS_SUSPEND (1U)
110 #define MMCSD_CMD_TYPE_FUNC_SEL (2U)
111 #define MMCSD_CMD_TYPE_IO_ABORT (3U)
112 
113 /*
114 * \brief Macros that can be used for selecting command response types
115 */
116 #define MMCSD_CMD_RSP_TYPE_NORSP (0U)
117 #define MMCSD_CMD_RSP_TYPE_L136 (1U)
118 #define MMCSD_CMD_RSP_TYPE_L48 (2U)
119 #define MMCSD_CMD_RSP_TYPE_L48_BUSY (3U)
120 
121 /*
122 * \brief Macros that can be used for selecting transfer types
123 */
124 #define MMCSD_CMD_XFER_TYPE_WRITE (0U)
125 #define MMCSD_CMD_XFER_TYPE_READ (1U)
126 
127 /*
128 * \brief Macros that can be used for selecting supported MMC modes
129 */
130 #define MMCSD_SUPPORT_MMC_DS (0x01U) /* DS (Up to 26Mhz) */
131 #define MMCSD_SUPPORT_MMC_HS_SDR (0x02U) /* HS (Up to 52Mhz) */
132 #define MMCSD_SUPPORT_MMC_HS_DDR (0x04U) /* HS (Up to 52Mhz) */
133 #define MMCSD_SUPPORT_MMC_HS200 (0x08U) /* HS200 (Up to 200Mhz) */
134 #define MMCSD_SUPPORT_MMC_HS400 (0x10U) /* HS400 (Up to 400Mhz) */
135 #define MMCSD_SUPPORT_MMC_HS400_ES (0x20U) /* HS400 Enhanced Strobe (Up to 400Mhz) */
136 #define MMCSD_SUPPORT_MMC_ALL (0xFFU) /* All modes */
137 
138 /*
139 * \brief Macros that can be used for selecting supported SD modes
140 */
141 #define MMCSD_SUPPORT_SD_DS (0x01U)
142 #define MMCSD_SUPPORT_SD_HS (0x02U)
143 #define MMCSD_SUPPORT_SD_SDR50 (0x04U)
144 #define MMCSD_SUPPORT_SD_SDR104 (0x08U)
145 #define MMCSD_SUPPORT_SD_DDR50 (0x10U)
146 #define MMCSD_SUPPORT_SD_ALL (0xFFU) /* All modes */
147 
148 /*
149 * \brief Macros that can be used for selecting PHY types
150 */
151 #define MMCSD_PHY_TYPE_HW_PHY (0U)
152 #define MMCSD_PHY_TYPE_SW_PHY (1U)
153 #define MMCSD_PHY_TYPE_NO_PHY (2U)
154 
155 /*
156 * \brief Macros that can be used for selecting PHY tuning type
157 */
158 #define MMCSD_PHY_TUNING_TYPE_AUTO (0U)
159 #define MMCSD_PHY_TUNING_TYPE_MANUAL (1U)
160 
161 /*
162 * \brief Macros that can be used for selecting PHY modes
163 */
164 #define MMCSD_PHY_MODE_HS400 (1U)
165 #define MMCSD_PHY_MODE_HS200 (2U)
166 #define MMCSD_PHY_MODE_HSSDR50 (3U)
167 #define MMCSD_PHY_MODE_HSDDR50 (4U)
168 #define MMCSD_PHY_MODE_ENHANCED_STROBE (5U)
169 #define MMCSD_PHY_MODE_SDR104 (6U)
170 #define MMCSD_PHY_MODE_SDR50 (7U)
171 #define MMCSD_PHY_MODE_DDR50 (8U)
172 #define MMCSD_PHY_MODE_SDR25 (9U)
173 #define MMCSD_PHY_MODE_SDR12 (10U)
174 #define MMCSD_PHY_MODE_HS (11U)
175 #define MMCSD_PHY_MODE_DS (12U)
176 
177 /*
178 * \brief Macros that can be used for selecting UHS 1 modes
179 */
180 #define MMCSD_UHS_MODE_SDR12 (0U)
181 #define MMCSD_UHS_MODE_SDR25 (1U)
182 #define MMCSD_UHS_MODE_SDR50 (2U)
183 #define MMCSD_UHS_MODE_SDR104 (3U)
184 #define MMCSD_UHS_MODE_DDR50 (4U)
185 #define MMCSD_UHS_MODE_HS400 (5U)
186 #define MMCSD_UHS_MODE_UHS2 (7U)
187 
188 typedef void* MMCSD_Handle;
189 
190 /* ========================================================================== */
191 /* Structure Declarations */
192 /* ========================================================================== */
198 typedef struct
199 {
200  void* deviceData;
201  /* Pointer to eMMC/SD device data structure. Memory for this structure has to be allocated in application */
202 
203  uint8_t *dataBuf;
204  /* Pointer to a 512 byte dataBuffer used for temporary data transactions internal to driver like ECSD read, tuning etc. To be allocated by application */
205 
206 } MMCSD_Params;
207 
211 typedef struct
212 {
213  uint32_t ocr;
214  /* Operating conditions register */
215 
216  uint32_t rca;
217  /* Relative card address register */
218 
219  uint16_t maxReadBlockLen;
220  /* Maximum supported block length for read */
221 
223  /* Maximum supported block length for read */
224 
225  char manuDate[9];
226  /* ASCII string with the date of manufacture */
227 
228  uint8_t manuID;
229  /* Card manufacturer ID */
230 
231  char productName[7];
232  /* Product name */
233 
234  /* From CSD */
235  uint8_t specVersion;
236  /* eMMC specification version */
237 
238  uint32_t blockCount;
239  /* Number of blocks in the eMMC */
240 
241  uint8_t transferSpeed;
242  /* Transfer speed in code - Freq Unit x Mult Factor */
243 
244  uint8_t supportedModes;
245  /* Supported speed modes by the device - HS200, HS400 etc */
246 
247  uint8_t eStrobeSupport;
248  /* Support of enhanced strobe */
249 
250  uint8_t driveStrength;
251  /* Drive strength of the device */
252 
254 
258 typedef struct
259 {
260  uint32_t ocr;
261  /* Operating conditions register */
262 
263  uint32_t rca;
264  /* Relative card address register */
265 
266  uint16_t maxReadBlockLen;
267  /* Maximum supported block length for read */
268 
270  /* Maximum supported block length for read */
271 
272  char manuDate[9];
273  /* ASCII string with the date of manufacture */
274 
275  uint8_t manuID;
276  /* Card manufacturer ID */
277 
278  char productName[6];
279  /* Product name */
280 
281  /* From CSD */
282  uint8_t specVersion;
283  /* SD card specification version */
284 
285  uint32_t blockCount;
286  /* Number of blocks in the SD */
287 
288  uint8_t transferSpeed;
289  /* Transfer speed in code - Freq Unit x Mult Factor */
290 
291  uint32_t isCmd23;
292  /* CMD23 support */
293 
295  /* Supported data widths by the device */
296 
298 
306 typedef struct
307 {
308  uint32_t cmd;
311  uint32_t dir;
314  uint32_t arg;
317  void *dataBuf;
320  uint32_t blockSize;
323  uint32_t blockCount;
326  uint32_t autoCmdEn;
327  /* AutoCMD12 or AutoCMD23 or no AutoCMD */
328 
329  uint32_t enableDma;
330  /* Is DMA enabled for the command*/
331 
332  uint32_t isTuning;
333  /* Is transaction used for tuning */
334 
335  uint32_t response[4];
339 
344 typedef struct
345 {
346  uint32_t ctrlBaseAddr;
349  uint32_t ssBaseAddr;
352  uint32_t inputClkFreq;
355  uint32_t outputClkFreq;
358  uint32_t enableDma;
361  uint32_t intrEnable;
364  uint32_t intrNum;
367  uint32_t eventId;
370  uint32_t cardType;
373  uint32_t busWidth;
376  uint32_t supportedModes;
379  uint32_t busVoltage;
382  uint32_t isHS;
385  uint32_t phyType;
388  uint32_t tuningType;
391 } MMCSD_Attrs;
392 
397 typedef struct
398 {
402  uint32_t cardType;
405  uint8_t *tempDataBuf;
406  /* Temporary data buf for receiving tuning data, ecsd, scr etc. To be allocated in app and passed as MMCSD params to MMCSD_open */
407 
409  /* EMMC device data structure. This has to be allocated in the app. Probably using sysconfig */
410 
412  /* SD device data structure. This has to be allocated in the app. Probably using sysconfig */
413 
414  uint8_t sdVer;
417  uint32_t busWidth;
420  uint32_t transferSpeed;
423  uint32_t isHC;
426  uint32_t isUHS;
429  uint32_t isCmd23;
432  uint32_t is1_8V;
435  uint32_t isSwitch1_8V;
438  uint32_t blockSize;
441  uint64_t blockCount;
444  uint64_t mediaSize;
447  uint32_t enableDma;
450  uint32_t intrEnable;
453  volatile uint32_t cmdComp;
456  volatile uint32_t cmdTimeout;
457  /*< Command timeout flag */
458 
459  volatile uint32_t cmdCRCError;
460  /*< Command CRC error flag */
461 
462  volatile uint32_t cmdEBError;
463  /*< Command CRC error flag */
464 
465  volatile uint32_t cmdIndexError;
466  /*< Command Index error flag */
467 
468  volatile uint32_t dataCRCError;
469  /*< Data CRC error flag */
470 
471  volatile uint32_t dataEBError;
472  /*< Data end bit error */
473 
474  volatile uint32_t cmdError;
475  /*< Any error in processing of the command */
476 
477  volatile uint32_t xferInProgress;
478  /*< Command completion flag */
479 
480  volatile uint32_t xferComp;
481  /*< Transfer completion flag */
482 
483  volatile uint32_t xferTimeout;
484  /*< Transfer timeout flag */
485 
486  uint8_t *dataBufIdx;
487  uint32_t dataBlockCount;
488  uint32_t dataBlockSize;
489 
490  uint8_t *readBufIdx;
491  uint32_t readBlockCount;
492 
493  uint8_t *writeBufIdx;
494  uint32_t writeBlockCount;
495 
496  uint32_t isManualTuning;
499  uint32_t isOpen;
520 } MMCSD_Object;
521 
522 typedef struct
523 {
528 } MMCSD_Config;
529 
530 /* ========================================================================== */
531 /* Externs */
532 /* ========================================================================== */
533 
535 extern MMCSD_Config gMmcsdConfig[];
537 extern uint32_t gMmcsdConfigNum;
538 
539 /* ========================================================================== */
540 /* Internal/Private Structure Declarations */
541 /* ========================================================================== */
542 
543 /* ========================================================================== */
544 /* Function Declarations */
545 /* ========================================================================== */
546 
550 void MMCSD_init(void);
551 
555 void MMCSD_deinit(void);
556 
562 void MMCSD_Params_init(MMCSD_Params *mmcsdParams);
563 
578 MMCSD_Handle MMCSD_open(uint32_t index, const MMCSD_Params *openParams);
579 
590 
604 
618 int32_t MMCSD_read(MMCSD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks);
619 
633 int32_t MMCSD_write(MMCSD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks);
634 
648 
662 
675 uint32_t MMCSD_isHC(MMCSD_Handle handle);
676 
690 int32_t MMCSD_enableBootPartition(MMCSD_Handle handle, uint32_t partitionNum);
691 
705 
708 #ifdef __cplusplus
709 }
710 #endif
711 
712 #endif /* MMCSD_H_ */
MMCSD_Attrs::intrEnable
uint32_t intrEnable
Definition: mmcsd/v0/mmcsd.h:361
MMCSD_open
MMCSD_Handle MMCSD_open(uint32_t index, const MMCSD_Params *openParams)
This function opens a given MMCSD peripheral.
MMCSD_Object::emmcData
MMCSD_EmmcDeviceData * emmcData
Definition: mmcsd/v0/mmcsd.h:408
MMCSD_Attrs::eventId
uint32_t eventId
Definition: mmcsd/v0/mmcsd.h:367
MMCSD_SdDeviceData::ocr
uint32_t ocr
Definition: mmcsd/v0/mmcsd.h:260
MMCSD_SdDeviceData::manuID
uint8_t manuID
Definition: mmcsd/v0/mmcsd.h:275
MMCSD_Object::isHC
uint32_t isHC
Definition: mmcsd/v0/mmcsd.h:423
MMCSD_Object::dataCopyCompleteSemObj
SemaphoreP_Object dataCopyCompleteSemObj
Definition: mmcsd/v0/mmcsd.h:511
MMCSD_SdDeviceData::transferSpeed
uint8_t transferSpeed
Definition: mmcsd/v0/mmcsd.h:288
MMCSD_EmmcDeviceData::blockCount
uint32_t blockCount
Definition: mmcsd/v0/mmcsd.h:238
MMCSD_SdDeviceData
SD device properties.
Definition: mmcsd/v0/mmcsd.h:259
MMCSD_Object::dataBlockSize
uint32_t dataBlockSize
Definition: mmcsd/v0/mmcsd.h:488
MMCSD_Object::cmdEBError
volatile uint32_t cmdEBError
Definition: mmcsd/v0/mmcsd.h:462
MMCSD_Attrs::busVoltage
uint32_t busVoltage
Definition: mmcsd/v0/mmcsd.h:379
MMCSD_Object::isCmd23
uint32_t isCmd23
Definition: mmcsd/v0/mmcsd.h:429
MMCSD_Transaction::cmd
uint32_t cmd
Definition: mmcsd/v0/mmcsd.h:308
MMCSD_EmmcDeviceData::rca
uint32_t rca
Definition: mmcsd/v0/mmcsd.h:216
index
uint16_t index
Definition: tisci_rm_proxy.h:3
MMCSD_Object::cmdTimeout
volatile uint32_t cmdTimeout
Definition: mmcsd/v0/mmcsd.h:456
MMCSD_Transaction::blockSize
uint32_t blockSize
Definition: mmcsd/v0/mmcsd.h:320
SystemP.h
MMCSD_Object::xferMutex
SemaphoreP_Object xferMutex
Definition: mmcsd/v0/mmcsd.h:505
MMCSD_Object::cmdCompleteSemObj
SemaphoreP_Object cmdCompleteSemObj
Definition: mmcsd/v0/mmcsd.h:508
MMCSD_Object::writeBufIdx
uint8_t * writeBufIdx
Definition: mmcsd/v0/mmcsd.h:493
MMCSD_SdDeviceData::specVersion
uint8_t specVersion
Definition: mmcsd/v0/mmcsd.h:282
MMCSD_Transaction::isTuning
uint32_t isTuning
Definition: mmcsd/v0/mmcsd.h:332
MMCSD_Object::blockCount
uint64_t blockCount
Definition: mmcsd/v0/mmcsd.h:441
MMCSD_Object::isSwitch1_8V
uint32_t isSwitch1_8V
Definition: mmcsd/v0/mmcsd.h:435
MMCSD_Object::isManualTuning
uint32_t isManualTuning
Definition: mmcsd/v0/mmcsd.h:496
MMCSD_Object::dataEBError
volatile uint32_t dataEBError
Definition: mmcsd/v0/mmcsd.h:471
MMCSD_Object::tempDataBuf
uint8_t * tempDataBuf
Definition: mmcsd/v0/mmcsd.h:405
MMCSD_Object::busWidth
uint32_t busWidth
Definition: mmcsd/v0/mmcsd.h:417
MMCSD_Object::xferCompleteSemObj
SemaphoreP_Object xferCompleteSemObj
Definition: mmcsd/v0/mmcsd.h:514
MMCSD_Object::mediaSize
uint64_t mediaSize
Definition: mmcsd/v0/mmcsd.h:444
MMCSD_Attrs::ssBaseAddr
uint32_t ssBaseAddr
Definition: mmcsd/v0/mmcsd.h:349
SemaphoreP.h
MMCSD_Attrs::inputClkFreq
uint32_t inputClkFreq
Definition: mmcsd/v0/mmcsd.h:352
MMCSD_SdDeviceData::maxReadBlockLen
uint16_t maxReadBlockLen
Definition: mmcsd/v0/mmcsd.h:266
MMCSD_Object::isOpen
uint32_t isOpen
Definition: mmcsd/v0/mmcsd.h:499
MMCSD_Config::object
MMCSD_Object * object
Definition: mmcsd/v0/mmcsd.h:526
MMCSD_Object::cardType
uint32_t cardType
Definition: mmcsd/v0/mmcsd.h:402
MMCSD_init
void MMCSD_init(void)
This function initializes the MMCSD module.
MMCSD_Transaction::dir
uint32_t dir
Definition: mmcsd/v0/mmcsd.h:311
MMCSD_Attrs::busWidth
uint32_t busWidth
Definition: mmcsd/v0/mmcsd.h:373
MMCSD_Object::sdData
MMCSD_SdDeviceData * sdData
Definition: mmcsd/v0/mmcsd.h:411
MMCSD_Transaction
MMCSD transaction.
Definition: mmcsd/v0/mmcsd.h:307
MMCSD_EmmcDeviceData::eStrobeSupport
uint8_t eStrobeSupport
Definition: mmcsd/v0/mmcsd.h:247
MMCSD_Config::attrs
const MMCSD_Attrs * attrs
Definition: mmcsd/v0/mmcsd.h:524
MMCSD_enableBootPartition
int32_t MMCSD_enableBootPartition(MMCSD_Handle handle, uint32_t partitionNum)
This function enables the boot partition if the connected media is eMMC.
MMCSD_EmmcDeviceData::manuID
uint8_t manuID
Definition: mmcsd/v0/mmcsd.h:228
MMCSD_Attrs::cardType
uint32_t cardType
Definition: mmcsd/v0/mmcsd.h:370
MMCSD_SdDeviceData::isCmd23
uint32_t isCmd23
Definition: mmcsd/v0/mmcsd.h:291
MMCSD_EmmcDeviceData::specVersion
uint8_t specVersion
Definition: mmcsd/v0/mmcsd.h:235
MMCSD_EmmcDeviceData::ocr
uint32_t ocr
Definition: mmcsd/v0/mmcsd.h:213
MMCSD_Object::cmdCRCError
volatile uint32_t cmdCRCError
Definition: mmcsd/v0/mmcsd.h:459
MMCSD_read
int32_t MMCSD_read(MMCSD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
Function to perform block reads from the MMC/SD media.
gMmcsdConfigNum
uint32_t gMmcsdConfigNum
Externally defined driver configuration array size.
MMCSD_isHC
uint32_t MMCSD_isHC(MMCSD_Handle handle)
This function returns if the media connected is High Capacity (> 2GB in size) or not.
HwiP.h
MMCSD_Attrs::intrNum
uint32_t intrNum
Definition: mmcsd/v0/mmcsd.h:364
MMCSD_Object::isUHS
uint32_t isUHS
Definition: mmcsd/v0/mmcsd.h:426
MMCSD_Attrs::supportedModes
uint32_t supportedModes
Definition: mmcsd/v0/mmcsd.h:376
MMCSD_Object::hwiObj
HwiP_Object hwiObj
Definition: mmcsd/v0/mmcsd.h:517
MMCSD_Object::cmdError
volatile uint32_t cmdError
Definition: mmcsd/v0/mmcsd.h:474
MMCSD_Object::enableDma
uint32_t enableDma
Definition: mmcsd/v0/mmcsd.h:447
MMCSD_getBlockCount
uint32_t MMCSD_getBlockCount(MMCSD_Handle handle)
This function returns the block count of User Data Area of the MMC/SD media connected to the MMCSD co...
MMCSD_SdDeviceData::rca
uint32_t rca
Definition: mmcsd/v0/mmcsd.h:263
MMCSD_Object::is1_8V
uint32_t is1_8V
Definition: mmcsd/v0/mmcsd.h:432
MMCSD_Attrs::phyType
uint32_t phyType
Definition: mmcsd/v0/mmcsd.h:385
MMCSD_Attrs::ctrlBaseAddr
uint32_t ctrlBaseAddr
Definition: mmcsd/v0/mmcsd.h:346
MMCSD_EmmcDeviceData::supportedModes
uint8_t supportedModes
Definition: mmcsd/v0/mmcsd.h:244
MMCSD_Params::dataBuf
uint8_t * dataBuf
Definition: mmcsd/v0/mmcsd.h:203
MMCSD_Object::readBufIdx
uint8_t * readBufIdx
Definition: mmcsd/v0/mmcsd.h:490
MMCSD_Handle
void * MMCSD_Handle
Definition: mmcsd/v0/mmcsd.h:188
MMCSD_Object::xferInProgress
volatile uint32_t xferInProgress
Definition: mmcsd/v0/mmcsd.h:477
MMCSD_Params
MMCSD instance attributes - used during init time.
Definition: mmcsd/v0/mmcsd.h:199
MMCSD_getBlockSize
uint32_t MMCSD_getBlockSize(MMCSD_Handle handle)
This function returns the block size of the MMC/SD media connected to the MMCSD controller.
MMCSD_Object::dataBlockCount
uint32_t dataBlockCount
Definition: mmcsd/v0/mmcsd.h:487
MMCSD_EmmcDeviceData
eMMC device properties
Definition: mmcsd/v0/mmcsd.h:212
MMCSD_deinit
void MMCSD_deinit(void)
This function de-initializes the MMCSD module.
MMCSD_EmmcDeviceData::maxReadBlockLen
uint16_t maxReadBlockLen
Definition: mmcsd/v0/mmcsd.h:219
MMCSD_Object
MMCSD driver object.
Definition: mmcsd/v0/mmcsd.h:398
MMCSD_Object::xferComp
volatile uint32_t xferComp
Definition: mmcsd/v0/mmcsd.h:480
MMCSD_EmmcDeviceData::transferSpeed
uint8_t transferSpeed
Definition: mmcsd/v0/mmcsd.h:241
MMCSD_SdDeviceData::supportedDataWidths
uint32_t supportedDataWidths
Definition: mmcsd/v0/mmcsd.h:294
MMCSD_Params_init
void MMCSD_Params_init(MMCSD_Params *mmcsdParams)
Initialize data structure with defaults.
MMCSD_Transaction::dataBuf
void * dataBuf
Definition: mmcsd/v0/mmcsd.h:317
HwiP_Object
Opaque Hwi object used with the Hwi APIs.
Definition: HwiP.h:91
MMCSD_Object::handle
MMCSD_Handle handle
Definition: mmcsd/v0/mmcsd.h:399
MMCSD_Transaction::enableDma
uint32_t enableDma
Definition: mmcsd/v0/mmcsd.h:329
MMCSD_Params::deviceData
void * deviceData
Definition: mmcsd/v0/mmcsd.h:200
MMCSD_Object::dataCRCError
volatile uint32_t dataCRCError
Definition: mmcsd/v0/mmcsd.h:468
MMCSD_EmmcDeviceData::maxWriteBlockLen
uint16_t maxWriteBlockLen
Definition: mmcsd/v0/mmcsd.h:222
MMCSD_Attrs::outputClkFreq
uint32_t outputClkFreq
Definition: mmcsd/v0/mmcsd.h:355
MMCSD_Object::cmdIndexError
volatile uint32_t cmdIndexError
Definition: mmcsd/v0/mmcsd.h:465
MMCSD_Transaction::arg
uint32_t arg
Definition: mmcsd/v0/mmcsd.h:314
MMCSD_Object::sdVer
uint8_t sdVer
Definition: mmcsd/v0/mmcsd.h:414
MMCSD_Object::transferSpeed
uint32_t transferSpeed
Definition: mmcsd/v0/mmcsd.h:420
MMCSD_Config
Definition: mmcsd/v0/mmcsd.h:523
MMCSD_Transaction::blockCount
uint32_t blockCount
Definition: mmcsd/v0/mmcsd.h:323
SemaphoreP_Object
Opaque semaphore object used with the semaphore APIs.
Definition: SemaphoreP.h:59
MMCSD_Attrs::isHS
uint32_t isHS
Definition: mmcsd/v0/mmcsd.h:382
gMmcsdConfig
MMCSD_Config gMmcsdConfig[]
Externally defined driver configuration array.
MMCSD_Attrs::enableDma
uint32_t enableDma
Definition: mmcsd/v0/mmcsd.h:358
MMCSD_Attrs
MMCSD instance attributes - used during init time.
Definition: mmcsd/v0/mmcsd.h:345
MMCSD_SdDeviceData::blockCount
uint32_t blockCount
Definition: mmcsd/v0/mmcsd.h:285
MMCSD_close
void MMCSD_close(MMCSD_Handle handle)
Function to close a MMCSD peripheral specified by the MMCSD handle.
MMCSD_Transaction::autoCmdEn
uint32_t autoCmdEn
Definition: mmcsd/v0/mmcsd.h:326
MMCSD_Object::cmdMutex
SemaphoreP_Object cmdMutex
Definition: mmcsd/v0/mmcsd.h:502
MMCSD_Object::xferTimeout
volatile uint32_t xferTimeout
Definition: mmcsd/v0/mmcsd.h:483
MMCSD_disableBootPartition
int32_t MMCSD_disableBootPartition(MMCSD_Handle handle)
This function disables the boot partition if the connected media is eMMC.
MMCSD_Object::intrEnable
uint32_t intrEnable
Definition: mmcsd/v0/mmcsd.h:450
MMCSD_Object::readBlockCount
uint32_t readBlockCount
Definition: mmcsd/v0/mmcsd.h:491
MMCSD_write
int32_t MMCSD_write(MMCSD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
Function to perform block writes to the MMC/SD media.
MMCSD_Object::cmdComp
volatile uint32_t cmdComp
Definition: mmcsd/v0/mmcsd.h:453
MMCSD_getHandle
MMCSD_Handle MMCSD_getHandle(uint32_t index)
This function returns the handle of an open MMCSD Instance from the instance index.
MMCSD_EmmcDeviceData::driveStrength
uint8_t driveStrength
Definition: mmcsd/v0/mmcsd.h:250
MMCSD_Object::dataBufIdx
uint8_t * dataBufIdx
Definition: mmcsd/v0/mmcsd.h:486
MMCSD_Object::writeBlockCount
uint32_t writeBlockCount
Definition: mmcsd/v0/mmcsd.h:494
MMCSD_Attrs::tuningType
uint32_t tuningType
Definition: mmcsd/v0/mmcsd.h:388
MMCSD_Object::blockSize
uint32_t blockSize
Definition: mmcsd/v0/mmcsd.h:438
MMCSD_SdDeviceData::maxWriteBlockLen
uint16_t maxWriteBlockLen
Definition: mmcsd/v0/mmcsd.h:269