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 /* useful in cases where SoC has MMCSD IP but no device attached to peripheral */
77 #define MMCSD_CARD_TYPE_NO_DEVICE (3U)
78 
79 /*
80 * \brief Macros that can be used for selecting the bus/data width
81 */
82 #define MMCSD_BUS_WIDTH_4BIT (0x4U)
83 #define MMCSD_BUS_WIDTH_8BIT (0x8U)
84 #define MMCSD_BUS_WIDTH_1BIT (0x1U)
85 
86 
87 /*
88 * \brief Macros that can be used for selecting the media transfer speed
89 */
90 #define MMCSD_TRANSPEED_25MBPS (0x32U)
91 #define MMCSD_TRANSPEED_50MBPS (0x5AU)
92 #define MMCSD_TRANSPEED_DEFAULT (0x32U)
93 #define MMCSD_TRANSPEED_HS (0x5AU)
94 #define MMCSD_TRANSPEED_SDR12 (0x32U)
95 #define MMCSD_TRANSPEED_SDR25 (0x5AU)
96 #define MMCSD_TRANSPEED_SDR50 (0xBU)
97 #define MMCSD_TRANSPEED_SDR104 (0x2BU)
98 #define MMCSD_TRANSPEED_DDR50 (0x3BU)
99 #define MMCSD_TRANSPEED_HS200 (0x2BU)
100 #define MMCSD_TRANSPEED_HS400 (0x4BU)
101 /*
102 * \brief Macros that can be used for selecting the bus voltage
103 */
104 #define MMCSD_BUS_VOLT_1_8V (0x5U) /* Embedded */
105 #define MMCSD_BUS_VOLT_3_0V (0x6U) /* Typical */
106 #define MMCSD_BUS_VOLT_3_3V (0x7U) /* Flattop */
107 
108 /*
109 * \brief Macros that can be used for selecting command types
110 */
111 #define MMCSD_CMD_TYPE_NORMAL (0U)
112 #define MMCSD_CMD_TYPE_BUS_SUSPEND (1U)
113 #define MMCSD_CMD_TYPE_FUNC_SEL (2U)
114 #define MMCSD_CMD_TYPE_IO_ABORT (3U)
115 
116 /*
117 * \brief Macros that can be used for selecting command response types
118 */
119 #define MMCSD_CMD_RSP_TYPE_NORSP (0U)
120 #define MMCSD_CMD_RSP_TYPE_L136 (1U)
121 #define MMCSD_CMD_RSP_TYPE_L48 (2U)
122 #define MMCSD_CMD_RSP_TYPE_L48_BUSY (3U)
123 
124 /*
125 * \brief Macros that can be used for selecting transfer types
126 */
127 #define MMCSD_CMD_XFER_TYPE_WRITE (0U)
128 #define MMCSD_CMD_XFER_TYPE_READ (1U)
129 
130 /*
131 * \brief Macros that can be used for selecting supported MMC modes
132 */
133 #define MMCSD_SUPPORT_MMC_DS (0x01U) /* DS (Up to 26Mhz) */
134 #define MMCSD_SUPPORT_MMC_HS_SDR (0x02U) /* HS (Up to 52Mhz) */
135 #define MMCSD_SUPPORT_MMC_HS_DDR (0x04U) /* HS (Up to 52Mhz) */
136 #define MMCSD_SUPPORT_MMC_HS200 (0x08U) /* HS200 (Up to 200Mhz) */
137 #define MMCSD_SUPPORT_MMC_HS400 (0x10U) /* HS400 (Up to 400Mhz) */
138 #define MMCSD_SUPPORT_MMC_HS400_ES (0x20U) /* HS400 Enhanced Strobe (Up to 400Mhz) */
139 #define MMCSD_SUPPORT_MMC_ALL (0xFFU) /* All modes */
140 
141 /*
142 * \brief Macros that can be used for selecting supported SD modes
143 */
144 #define MMCSD_SUPPORT_SD_DS (0x01U)
145 #define MMCSD_SUPPORT_SD_HS (0x02U)
146 #define MMCSD_SUPPORT_SD_SDR50 (0x04U)
147 #define MMCSD_SUPPORT_SD_SDR104 (0x08U)
148 #define MMCSD_SUPPORT_SD_DDR50 (0x10U)
149 #define MMCSD_SUPPORT_SD_ALL (0xFFU) /* All modes */
150 
151 /*
152 * \brief Macros that can be used for selecting PHY types
153 */
154 #define MMCSD_PHY_TYPE_HW_PHY (0U)
155 #define MMCSD_PHY_TYPE_SW_PHY (1U)
156 #define MMCSD_PHY_TYPE_NO_PHY (2U)
157 
158 /*
159 * \brief Macros that can be used for selecting PHY tuning type
160 */
161 #define MMCSD_PHY_TUNING_TYPE_AUTO (0U)
162 #define MMCSD_PHY_TUNING_TYPE_MANUAL (1U)
163 
164 /*
165 * \brief Macros that can be used for selecting PHY modes
166 */
167 #define MMCSD_PHY_MODE_HS400 (1U)
168 #define MMCSD_PHY_MODE_HS200 (2U)
169 #define MMCSD_PHY_MODE_HSSDR50 (3U)
170 #define MMCSD_PHY_MODE_HSDDR50 (4U)
171 #define MMCSD_PHY_MODE_ENHANCED_STROBE (5U)
172 #define MMCSD_PHY_MODE_SDR104 (6U)
173 #define MMCSD_PHY_MODE_SDR50 (7U)
174 #define MMCSD_PHY_MODE_DDR50 (8U)
175 #define MMCSD_PHY_MODE_SDR25 (9U)
176 #define MMCSD_PHY_MODE_SDR12 (10U)
177 #define MMCSD_PHY_MODE_HS (11U)
178 #define MMCSD_PHY_MODE_DS (12U)
179 
180 /*
181 * \brief Macros that can be used for selecting UHS 1 modes
182 */
183 #define MMCSD_UHS_MODE_SDR12 (0U)
184 #define MMCSD_UHS_MODE_SDR25 (1U)
185 #define MMCSD_UHS_MODE_SDR50 (2U)
186 #define MMCSD_UHS_MODE_SDR104 (3U)
187 #define MMCSD_UHS_MODE_DDR50 (4U)
188 #define MMCSD_UHS_MODE_HS400 (5U)
189 #define MMCSD_UHS_MODE_UHS2 (7U)
190 
191 typedef void* MMCSD_Handle;
192 
193 /* ========================================================================== */
194 /* Structure Declarations */
195 /* ========================================================================== */
201 typedef struct
202 {
203  void* deviceData;
204  /* Pointer to eMMC/SD device data structure. Memory for this structure has to be allocated in application */
205 
206  uint8_t *dataBuf;
207  /* Pointer to a 512 byte dataBuffer used for temporary data transactions internal to driver like ECSD read, tuning etc. To be allocated by application */
208 
209 } MMCSD_Params;
210 
214 typedef struct
215 {
216  uint32_t ocr;
217  /* Operating conditions register */
218 
219  uint32_t rca;
220  /* Relative card address register */
221 
222  uint16_t maxReadBlockLen;
223  /* Maximum supported block length for read */
224 
226  /* Maximum supported block length for read */
227 
228  char manuDate[9];
229  /* ASCII string with the date of manufacture */
230 
231  uint8_t manuID;
232  /* Card manufacturer ID */
233 
234  char productName[7];
235  /* Product name */
236 
237  /* From CSD */
238  uint8_t specVersion;
239  /* eMMC specification version */
240 
241  uint32_t blockCount;
242  /* Number of blocks in the eMMC */
243 
244  uint8_t transferSpeed;
245  /* Transfer speed in code - Freq Unit x Mult Factor */
246 
247  uint8_t supportedModes;
248  /* Supported speed modes by the device - HS200, HS400 etc */
249 
250  uint8_t eStrobeSupport;
251  /* Support of enhanced strobe */
252 
253  uint8_t driveStrength;
254  /* Drive strength of the device */
255 
257 
261 typedef struct
262 {
263  uint32_t ocr;
264  /* Operating conditions register */
265 
266  uint32_t rca;
267  /* Relative card address register */
268 
269  uint16_t maxReadBlockLen;
270  /* Maximum supported block length for read */
271 
273  /* Maximum supported block length for read */
274 
275  char manuDate[9];
276  /* ASCII string with the date of manufacture */
277 
278  uint8_t manuID;
279  /* Card manufacturer ID */
280 
281  char productName[6];
282  /* Product name */
283 
284  /* From CSD */
285  uint8_t specVersion;
286  /* SD card specification version */
287 
288  uint32_t blockCount;
289  /* Number of blocks in the SD */
290 
291  uint8_t transferSpeed;
292  /* Transfer speed in code - Freq Unit x Mult Factor */
293 
294  uint32_t isCmd23;
295  /* CMD23 support */
296 
298  /* Supported data widths by the device */
299 
301 
309 typedef struct
310 {
311  uint32_t cmd;
314  uint32_t dir;
317  uint32_t arg;
320  void *dataBuf;
323  uint32_t blockSize;
326  uint32_t blockCount;
329  uint32_t autoCmdEn;
330  /* AutoCMD12 or AutoCMD23 or no AutoCMD */
331 
332  uint32_t enableDma;
333  /* Is DMA enabled for the command*/
334 
335  uint32_t isTuning;
336  /* Is transaction used for tuning */
337 
338  uint32_t response[4];
342 
347 typedef struct
348 {
349  uint32_t ctrlBaseAddr;
352  uint32_t ssBaseAddr;
355  uint32_t inputClkFreq;
358  uint32_t outputClkFreq;
361  uint32_t enableDma;
364  uint32_t intrEnable;
367  uint32_t intrNum;
370  uint32_t eventId;
373  uint32_t cardType;
376  uint32_t busWidth;
379  uint32_t supportedModes;
382  uint32_t busVoltage;
385  uint32_t isHS;
388  uint32_t phyType;
391  uint32_t tuningType;
394 } MMCSD_Attrs;
395 
400 typedef struct
401 {
405  uint32_t cardType;
408  uint8_t *tempDataBuf;
409  /* Temporary data buf for receiving tuning data, ecsd, scr etc. To be allocated in app and passed as MMCSD params to MMCSD_open */
410 
412  /* EMMC device data structure. This has to be allocated in the app. Probably using sysconfig */
413 
415  /* SD device data structure. This has to be allocated in the app. Probably using sysconfig */
416 
417  uint8_t sdVer;
420  uint32_t busWidth;
423  uint32_t transferSpeed;
426  uint32_t isHC;
429  uint32_t isUHS;
432  uint32_t isCmd23;
435  uint32_t is1_8V;
438  uint32_t isSwitch1_8V;
441  uint32_t blockSize;
444  uint64_t blockCount;
447  uint64_t mediaSize;
450  uint32_t enableDma;
453  uint32_t intrEnable;
456  volatile uint32_t cmdComp;
459  volatile uint32_t cmdTimeout;
460  /*< Command timeout flag */
461 
462  volatile uint32_t cmdCRCError;
463  /*< Command CRC error flag */
464 
465  volatile uint32_t cmdEBError;
466  /*< Command CRC error flag */
467 
468  volatile uint32_t cmdIndexError;
469  /*< Command Index error flag */
470 
471  volatile uint32_t dataCRCError;
472  /*< Data CRC error flag */
473 
474  volatile uint32_t dataEBError;
475  /*< Data end bit error */
476 
477  volatile uint32_t cmdError;
478  /*< Any error in processing of the command */
479 
480  volatile uint32_t xferInProgress;
481  /*< Command completion flag */
482 
483  volatile uint32_t xferComp;
484  /*< Transfer completion flag */
485 
486  volatile uint32_t xferTimeout;
487  /*< Transfer timeout flag */
488 
489  uint8_t *dataBufIdx;
490  uint32_t dataBlockCount;
491  uint32_t dataBlockSize;
492 
493  uint8_t *readBufIdx;
494  uint32_t readBlockCount;
495 
496  uint8_t *writeBufIdx;
497  uint32_t writeBlockCount;
498 
499  uint32_t isManualTuning;
502  uint32_t isOpen;
523 } MMCSD_Object;
524 
525 typedef struct
526 {
531 } MMCSD_Config;
532 
533 /* ========================================================================== */
534 /* Externs */
535 /* ========================================================================== */
536 
538 extern MMCSD_Config gMmcsdConfig[];
540 extern uint32_t gMmcsdConfigNum;
541 
542 /* ========================================================================== */
543 /* Internal/Private Structure Declarations */
544 /* ========================================================================== */
545 
546 /* ========================================================================== */
547 /* Function Declarations */
548 /* ========================================================================== */
549 
553 void MMCSD_init(void);
554 
558 void MMCSD_deinit(void);
559 
565 void MMCSD_Params_init(MMCSD_Params *mmcsdParams);
566 
581 MMCSD_Handle MMCSD_open(uint32_t index, const MMCSD_Params *openParams);
582 
593 
607 
621 int32_t MMCSD_read(MMCSD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks);
622 
636 int32_t MMCSD_write(MMCSD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks);
637 
651 
665 
678 uint32_t MMCSD_isHC(MMCSD_Handle handle);
679 
693 int32_t MMCSD_enableBootPartition(MMCSD_Handle handle, uint32_t partitionNum);
694 
708 
711 #ifdef __cplusplus
712 }
713 #endif
714 
715 #endif /* MMCSD_H_ */
MMCSD_Attrs::intrEnable
uint32_t intrEnable
Definition: mmcsd/v0/mmcsd.h:364
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:411
MMCSD_Attrs::eventId
uint32_t eventId
Definition: mmcsd/v0/mmcsd.h:370
MMCSD_SdDeviceData::ocr
uint32_t ocr
Definition: mmcsd/v0/mmcsd.h:263
MMCSD_SdDeviceData::manuID
uint8_t manuID
Definition: mmcsd/v0/mmcsd.h:278
MMCSD_Object::isHC
uint32_t isHC
Definition: mmcsd/v0/mmcsd.h:426
MMCSD_Object::dataCopyCompleteSemObj
SemaphoreP_Object dataCopyCompleteSemObj
Definition: mmcsd/v0/mmcsd.h:514
MMCSD_SdDeviceData::transferSpeed
uint8_t transferSpeed
Definition: mmcsd/v0/mmcsd.h:291
MMCSD_EmmcDeviceData::blockCount
uint32_t blockCount
Definition: mmcsd/v0/mmcsd.h:241
MMCSD_SdDeviceData
SD device properties.
Definition: mmcsd/v0/mmcsd.h:262
MMCSD_Object::dataBlockSize
uint32_t dataBlockSize
Definition: mmcsd/v0/mmcsd.h:491
MMCSD_Object::cmdEBError
volatile uint32_t cmdEBError
Definition: mmcsd/v0/mmcsd.h:465
MMCSD_Attrs::busVoltage
uint32_t busVoltage
Definition: mmcsd/v0/mmcsd.h:382
MMCSD_Object::isCmd23
uint32_t isCmd23
Definition: mmcsd/v0/mmcsd.h:432
MMCSD_Transaction::cmd
uint32_t cmd
Definition: mmcsd/v0/mmcsd.h:311
MMCSD_EmmcDeviceData::rca
uint32_t rca
Definition: mmcsd/v0/mmcsd.h:219
index
uint16_t index
Definition: tisci_rm_proxy.h:3
MMCSD_Object::cmdTimeout
volatile uint32_t cmdTimeout
Definition: mmcsd/v0/mmcsd.h:459
MMCSD_Transaction::blockSize
uint32_t blockSize
Definition: mmcsd/v0/mmcsd.h:323
SystemP.h
MMCSD_Object::xferMutex
SemaphoreP_Object xferMutex
Definition: mmcsd/v0/mmcsd.h:508
MMCSD_Object::cmdCompleteSemObj
SemaphoreP_Object cmdCompleteSemObj
Definition: mmcsd/v0/mmcsd.h:511
MMCSD_Object::writeBufIdx
uint8_t * writeBufIdx
Definition: mmcsd/v0/mmcsd.h:496
MMCSD_SdDeviceData::specVersion
uint8_t specVersion
Definition: mmcsd/v0/mmcsd.h:285
MMCSD_Transaction::isTuning
uint32_t isTuning
Definition: mmcsd/v0/mmcsd.h:335
MMCSD_Object::blockCount
uint64_t blockCount
Definition: mmcsd/v0/mmcsd.h:444
MMCSD_Object::isSwitch1_8V
uint32_t isSwitch1_8V
Definition: mmcsd/v0/mmcsd.h:438
MMCSD_Object::isManualTuning
uint32_t isManualTuning
Definition: mmcsd/v0/mmcsd.h:499
MMCSD_Object::dataEBError
volatile uint32_t dataEBError
Definition: mmcsd/v0/mmcsd.h:474
MMCSD_Object::tempDataBuf
uint8_t * tempDataBuf
Definition: mmcsd/v0/mmcsd.h:408
MMCSD_Object::busWidth
uint32_t busWidth
Definition: mmcsd/v0/mmcsd.h:420
MMCSD_Object::xferCompleteSemObj
SemaphoreP_Object xferCompleteSemObj
Definition: mmcsd/v0/mmcsd.h:517
MMCSD_Object::mediaSize
uint64_t mediaSize
Definition: mmcsd/v0/mmcsd.h:447
MMCSD_Attrs::ssBaseAddr
uint32_t ssBaseAddr
Definition: mmcsd/v0/mmcsd.h:352
SemaphoreP.h
MMCSD_Attrs::inputClkFreq
uint32_t inputClkFreq
Definition: mmcsd/v0/mmcsd.h:355
MMCSD_SdDeviceData::maxReadBlockLen
uint16_t maxReadBlockLen
Definition: mmcsd/v0/mmcsd.h:269
MMCSD_Object::isOpen
uint32_t isOpen
Definition: mmcsd/v0/mmcsd.h:502
MMCSD_Config::object
MMCSD_Object * object
Definition: mmcsd/v0/mmcsd.h:529
MMCSD_Object::cardType
uint32_t cardType
Definition: mmcsd/v0/mmcsd.h:405
MMCSD_init
void MMCSD_init(void)
This function initializes the MMCSD module.
MMCSD_Transaction::dir
uint32_t dir
Definition: mmcsd/v0/mmcsd.h:314
MMCSD_Attrs::busWidth
uint32_t busWidth
Definition: mmcsd/v0/mmcsd.h:376
MMCSD_Object::sdData
MMCSD_SdDeviceData * sdData
Definition: mmcsd/v0/mmcsd.h:414
MMCSD_Transaction
MMCSD transaction.
Definition: mmcsd/v0/mmcsd.h:310
MMCSD_EmmcDeviceData::eStrobeSupport
uint8_t eStrobeSupport
Definition: mmcsd/v0/mmcsd.h:250
MMCSD_Config::attrs
const MMCSD_Attrs * attrs
Definition: mmcsd/v0/mmcsd.h:527
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:231
MMCSD_Attrs::cardType
uint32_t cardType
Definition: mmcsd/v0/mmcsd.h:373
MMCSD_SdDeviceData::isCmd23
uint32_t isCmd23
Definition: mmcsd/v0/mmcsd.h:294
MMCSD_EmmcDeviceData::specVersion
uint8_t specVersion
Definition: mmcsd/v0/mmcsd.h:238
MMCSD_EmmcDeviceData::ocr
uint32_t ocr
Definition: mmcsd/v0/mmcsd.h:216
MMCSD_Object::cmdCRCError
volatile uint32_t cmdCRCError
Definition: mmcsd/v0/mmcsd.h:462
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:367
MMCSD_Object::isUHS
uint32_t isUHS
Definition: mmcsd/v0/mmcsd.h:429
MMCSD_Attrs::supportedModes
uint32_t supportedModes
Definition: mmcsd/v0/mmcsd.h:379
MMCSD_Object::hwiObj
HwiP_Object hwiObj
Definition: mmcsd/v0/mmcsd.h:520
MMCSD_Object::cmdError
volatile uint32_t cmdError
Definition: mmcsd/v0/mmcsd.h:477
MMCSD_Object::enableDma
uint32_t enableDma
Definition: mmcsd/v0/mmcsd.h:450
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:266
MMCSD_Object::is1_8V
uint32_t is1_8V
Definition: mmcsd/v0/mmcsd.h:435
MMCSD_Attrs::phyType
uint32_t phyType
Definition: mmcsd/v0/mmcsd.h:388
MMCSD_Attrs::ctrlBaseAddr
uint32_t ctrlBaseAddr
Definition: mmcsd/v0/mmcsd.h:349
MMCSD_EmmcDeviceData::supportedModes
uint8_t supportedModes
Definition: mmcsd/v0/mmcsd.h:247
MMCSD_Params::dataBuf
uint8_t * dataBuf
Definition: mmcsd/v0/mmcsd.h:206
MMCSD_Object::readBufIdx
uint8_t * readBufIdx
Definition: mmcsd/v0/mmcsd.h:493
MMCSD_Handle
void * MMCSD_Handle
Definition: mmcsd/v0/mmcsd.h:191
MMCSD_Object::xferInProgress
volatile uint32_t xferInProgress
Definition: mmcsd/v0/mmcsd.h:480
MMCSD_Params
MMCSD instance attributes - used during init time.
Definition: mmcsd/v0/mmcsd.h:202
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:490
MMCSD_EmmcDeviceData
eMMC device properties
Definition: mmcsd/v0/mmcsd.h:215
MMCSD_deinit
void MMCSD_deinit(void)
This function de-initializes the MMCSD module.
MMCSD_EmmcDeviceData::maxReadBlockLen
uint16_t maxReadBlockLen
Definition: mmcsd/v0/mmcsd.h:222
MMCSD_Object
MMCSD driver object.
Definition: mmcsd/v0/mmcsd.h:401
MMCSD_Object::xferComp
volatile uint32_t xferComp
Definition: mmcsd/v0/mmcsd.h:483
MMCSD_EmmcDeviceData::transferSpeed
uint8_t transferSpeed
Definition: mmcsd/v0/mmcsd.h:244
MMCSD_SdDeviceData::supportedDataWidths
uint32_t supportedDataWidths
Definition: mmcsd/v0/mmcsd.h:297
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:320
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:402
MMCSD_Transaction::enableDma
uint32_t enableDma
Definition: mmcsd/v0/mmcsd.h:332
MMCSD_Params::deviceData
void * deviceData
Definition: mmcsd/v0/mmcsd.h:203
MMCSD_Object::dataCRCError
volatile uint32_t dataCRCError
Definition: mmcsd/v0/mmcsd.h:471
MMCSD_EmmcDeviceData::maxWriteBlockLen
uint16_t maxWriteBlockLen
Definition: mmcsd/v0/mmcsd.h:225
MMCSD_Attrs::outputClkFreq
uint32_t outputClkFreq
Definition: mmcsd/v0/mmcsd.h:358
MMCSD_Object::cmdIndexError
volatile uint32_t cmdIndexError
Definition: mmcsd/v0/mmcsd.h:468
MMCSD_Transaction::arg
uint32_t arg
Definition: mmcsd/v0/mmcsd.h:317
MMCSD_Object::sdVer
uint8_t sdVer
Definition: mmcsd/v0/mmcsd.h:417
MMCSD_Object::transferSpeed
uint32_t transferSpeed
Definition: mmcsd/v0/mmcsd.h:423
MMCSD_Config
Definition: mmcsd/v0/mmcsd.h:526
MMCSD_Transaction::blockCount
uint32_t blockCount
Definition: mmcsd/v0/mmcsd.h:326
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:385
gMmcsdConfig
MMCSD_Config gMmcsdConfig[]
Externally defined driver configuration array.
MMCSD_Attrs::enableDma
uint32_t enableDma
Definition: mmcsd/v0/mmcsd.h:361
MMCSD_Attrs
MMCSD instance attributes - used during init time.
Definition: mmcsd/v0/mmcsd.h:348
MMCSD_SdDeviceData::blockCount
uint32_t blockCount
Definition: mmcsd/v0/mmcsd.h:288
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:329
MMCSD_Object::cmdMutex
SemaphoreP_Object cmdMutex
Definition: mmcsd/v0/mmcsd.h:505
MMCSD_Object::xferTimeout
volatile uint32_t xferTimeout
Definition: mmcsd/v0/mmcsd.h:486
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:453
MMCSD_Object::readBlockCount
uint32_t readBlockCount
Definition: mmcsd/v0/mmcsd.h:494
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:456
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:253
MMCSD_Object::dataBufIdx
uint8_t * dataBufIdx
Definition: mmcsd/v0/mmcsd.h:489
MMCSD_Object::writeBlockCount
uint32_t writeBlockCount
Definition: mmcsd/v0/mmcsd.h:497
MMCSD_Attrs::tuningType
uint32_t tuningType
Definition: mmcsd/v0/mmcsd.h:391
MMCSD_Object::blockSize
uint32_t blockSize
Definition: mmcsd/v0/mmcsd.h:441
MMCSD_SdDeviceData::maxWriteBlockLen
uint16_t maxWriteBlockLen
Definition: mmcsd/v0/mmcsd.h:272