Go to the source code of this file.
|
| struct mmc_device * | sdrv_mmc_alloc_dev (void) |
| |
| status_t | sdrv_mmc_sdrv_sdhci_init (struct mmc_device *dev) |
| |
| status_t | sdrv_mmc_platform_init (struct mmc_device *dev, void *priv_data) |
| |
| status_t | sdrv_mmc_sdhci_read (struct mmc_device *dev, void *dest, uint32_t blk_addr, uint32_t num_blocks) |
| |
| status_t | sdrv_mmc_sdhci_write (struct mmc_device *dev, void *src, uint32_t blk_addr, uint32_t num_blocks) |
| |
| status_t | sdrv_mmc_sdhci_erase (struct mmc_device *dev, uint32_t blk_addr, uint64_t len) |
| |
| status_t | sdrv_mmc_sdhci_read_part (struct mmc_device *dev, void *dest, uint32_t blk_addr, uint32_t num_blocks, uint32_t type) |
| |
| status_t | sdrv_mmc_sdhci_write_part (struct mmc_device *dev, void *src, uint32_t blk_addr, uint32_t num_blocks, uint32_t type) |
| |
| status_t | sdrv_mmc_sdhci_erase_part (struct mmc_device *dev, uint32_t blk_addr, uint32_t num_blocks, uint32_t type) |
| |
| status_t | sdrv_mmc_sdhci_cancel (struct mmc_device *dev) |
| |
| status_t | sdrv_mmc_set_clr_power_on_wp_user (struct mmc_device *dev, uint32_t addr, uint64_t len, uint8_t set_clr) |
| |
| status_t | sdrv_mmc_get_wp_status (struct mmc_device *dev, uint32_t addr, uint8_t *wp_status) |
| |
| void | sdrv_mmc_put_card_to_sleep (struct mmc_device *dev) |
| |
| status_t | sdrv_mmc_power_off_notification (struct mmc_device *dev, uint32_t pon_type) |
| |
| bool | sdrv_mmc_set_drv_type (struct sdhci_host *host, struct mmc_card *card, uint8_t drv_type) |
| |
| status_t | sdrv_mmc_sdhci_switch_part (struct mmc_device *dev, uint32_t type) |
| |
| status_t | sdrv_mmc_sdhci_rpmb_send (struct mmc_device *dev, struct mmc_command *cmd) |
| |
| uint64_t | sdrv_mmc_get_size (struct mmc_device *dev, uint32_t type) |
| |
| uint32_t | sdrv_mmc_get_erase_group_size (struct mmc_device *dev) |
| |
| uint32_t | sdrv_mmc_get_block_size (struct mmc_device *dev) |
| |
| status_t | sdrv_mmc_send_tuning (struct mmc_device *dev, uint32_t opcode, uint32_t bus_width) |
| |
| uint32_t | sdrv_mmc_get_data_after_erase (struct mmc_device *dev) |
| |
- Copyright
- Copyright (c) 2020 Semidrive Semiconductor. All rights reserved.
◆ ACMD13_SEND_SD_STATUS
| #define ACMD13_SEND_SD_STATUS 13 |
◆ ACMD41_SEND_OP_COND
| #define ACMD41_SEND_OP_COND 41 |
◆ ACMD51_READ_CARD_SCR
| #define ACMD51_READ_CARD_SCR 51 |
◆ ACMD6_SET_BUS_WIDTH
| #define ACMD6_SET_BUS_WIDTH 6 |
◆ BOOT_PART_MIN_SIZE
| #define BOOT_PART_MIN_SIZE (128u * 1024u) |
◆ BOOT_SIZE_MULT
| #define BOOT_SIZE_MULT 226 |
◆ CMD0_GO_IDLE_STATE
| #define CMD0_GO_IDLE_STATE 0 |
◆ CMD10_SEND_CID
| #define CMD10_SEND_CID 10 |
◆ CMD11_SWITCH_VOLTAGE
| #define CMD11_SWITCH_VOLTAGE 11 |
◆ CMD12_STOP_TRANSMISSION
| #define CMD12_STOP_TRANSMISSION 12 |
◆ CMD13_SEND_STATUS
| #define CMD13_SEND_STATUS 13 |
◆ CMD15_GO_INACTIVE_STATUS
| #define CMD15_GO_INACTIVE_STATUS 15 |
◆ CMD16_SET_BLOCKLEN
| #define CMD16_SET_BLOCKLEN 16 |
◆ CMD17_READ_SINGLE_BLOCK
| #define CMD17_READ_SINGLE_BLOCK 17 |
◆ CMD18_READ_MULTIPLE_BLOCK
| #define CMD18_READ_MULTIPLE_BLOCK 18 |
◆ CMD1_SEND_OP_COND
| #define CMD1_SEND_OP_COND 1 |
◆ CMD21_SEND_TUNING_BLOCK
| #define CMD21_SEND_TUNING_BLOCK 21 |
◆ CMD23_SET_BLOCK_COUNT
| #define CMD23_SET_BLOCK_COUNT 23 |
◆ CMD24_WRITE_SINGLE_BLOCK
| #define CMD24_WRITE_SINGLE_BLOCK 24 |
◆ CMD25_WRITE_MULTIPLE_BLOCK
| #define CMD25_WRITE_MULTIPLE_BLOCK 25 |
◆ CMD28_SET_WRITE_PROTECT
| #define CMD28_SET_WRITE_PROTECT 28 |
◆ CMD29_CLEAR_WRITE_PROTECT
| #define CMD29_CLEAR_WRITE_PROTECT 29 |
◆ CMD2_ALL_SEND_CID
| #define CMD2_ALL_SEND_CID 2 |
◆ CMD31_SEND_WRITE_PROT_TYPE
| #define CMD31_SEND_WRITE_PROT_TYPE 31 |
◆ CMD32_ERASE_WR_BLK_START
| #define CMD32_ERASE_WR_BLK_START 32 |
◆ CMD33_ERASE_WR_BLK_END
| #define CMD33_ERASE_WR_BLK_END 33 |
◆ CMD35_ERASE_GROUP_START
| #define CMD35_ERASE_GROUP_START 35 |
◆ CMD36_ERASE_GROUP_END
| #define CMD36_ERASE_GROUP_END 36 |
◆ CMD38_ERASE
◆ CMD3_SEND_RELATIVE_ADDR
| #define CMD3_SEND_RELATIVE_ADDR 3 |
◆ CMD4_SET_DSR
◆ CMD52_SDIO_STOP_TRANSMISSION
| #define CMD52_SDIO_STOP_TRANSMISSION 52 |
◆ CMD55_APP_CMD
◆ CMD5_SLEEP_AWAKE
| #define CMD5_SLEEP_AWAKE 5 |
◆ CMD6_SWITCH_FUNC
| #define CMD6_SWITCH_FUNC 6 |
◆ CMD7_SELECT_DESELECT_CARD
| #define CMD7_SELECT_DESELECT_CARD 7 |
◆ CMD8_SEND_EXT_CSD
| #define CMD8_SEND_EXT_CSD 8 |
◆ CMD8_SEND_IF_COND
| #define CMD8_SEND_IF_COND 8 |
◆ CMD9_SEND_CSD
◆ CONFIG_ARCH_CACHE_LINE
| #define CONFIG_ARCH_CACHE_LINE 32 |
◆ EXT_CSD_BUF_SIZE
◆ MAX_RPMB_CMDS
| #define MAX_RPMB_CMDS 0x3 |
◆ MMC_ACCESS_WRITE
| #define MMC_ACCESS_WRITE 0x3 |
◆ MMC_ADDR_OUT_OF_RANGE
| #define MMC_ADDR_OUT_OF_RANGE |
( |
|
resp | ) |
((resp >> 31) & 0x01) |
◆ MMC_BLK_SZ
◆ MMC_BLOCK_COUNT_MASK
| #define MMC_BLOCK_COUNT_MASK 0x0000ffff |
◆ MMC_CARD_MMC
◆ MMC_CARD_RCA_BIT
| #define MMC_CARD_RCA_BIT 16 |
◆ MMC_CARD_SD
◆ MMC_CARD_SDIO
◆ MMC_CARD_SLEEP
| #define MMC_CARD_SLEEP (1 << 15) |
◆ MMC_CARD_STATUS
| #define MMC_CARD_STATUS |
( |
|
x | ) |
((x >> 9) & 0x0F) |
◆ MMC_CARD_TYPE_SDHC
| #define MMC_CARD_TYPE_SDHC 0x1 |
◆ MMC_CARD_TYPE_STD_SD
| #define MMC_CARD_TYPE_STD_SD 0x0 |
◆ MMC_CARD_TYPE_UHS
| #define MMC_CARD_TYPE_UHS 0x2 |
◆ MMC_CLK_100MHZ
| #define MMC_CLK_100MHZ 100000000 |
◆ MMC_CLK_200MHZ
| #define MMC_CLK_200MHZ 200000000 |
◆ MMC_CLK_25MHZ
| #define MMC_CLK_25MHZ 25000000 |
◆ MMC_CLK_400KHZ
| #define MMC_CLK_400KHZ 400000 |
◆ MMC_CLK_400MHZ
| #define MMC_CLK_400MHZ 400000000 |
◆ MMC_CLK_50MHZ
| #define MMC_CLK_50MHZ 50000000 |
◆ MMC_CMD_READ
◆ MMC_CMD_WRITE
◆ MMC_DEVICE_TYPE
| #define MMC_DEVICE_TYPE 196 |
◆ MMC_ERASE_GRP_DEF
| #define MMC_ERASE_GRP_DEF 175 |
◆ MMC_ERASE_TIMEOUT_MULT
| #define MMC_ERASE_TIMEOUT_MULT 223 |
◆ MMC_EXT_CSD_REV
| #define MMC_EXT_CSD_REV 192 |
◆ MMC_EXT_CSD_RST_N_FUNC
| #define MMC_EXT_CSD_RST_N_FUNC 162 |
◆ MMC_EXT_HC_WP_GRP_SIZE
| #define MMC_EXT_HC_WP_GRP_SIZE 221 |
◆ MMC_EXT_MMC_BUS_WIDTH
| #define MMC_EXT_MMC_BUS_WIDTH 183 |
◆ MMC_EXT_MMC_DRV_STRENGTH
| #define MMC_EXT_MMC_DRV_STRENGTH 197 |
◆ MMC_EXT_MMC_HS_TIMING
| #define MMC_EXT_MMC_HS_TIMING 185 |
◆ MMC_HC_ERASE_GRP_SIZE
| #define MMC_HC_ERASE_GRP_SIZE 224 |
◆ MMC_HC_ERASE_MULT
| #define MMC_HC_ERASE_MULT (512 * 1024) |
◆ MMC_HS200_TIMING
| #define MMC_HS200_TIMING 0x2 |
◆ MMC_HS400_TIMING
| #define MMC_HS400_TIMING 0x3 |
◆ MMC_HS_DDR_MODE
| #define MMC_HS_DDR_MODE (BIT(2) | BIT(3)) |
◆ MMC_HS_HS200_MODE
| #define MMC_HS_HS200_MODE (BIT(4) | BIT(5)) |
◆ MMC_HS_HS400_MODE
| #define MMC_HS_HS400_MODE (BIT(6) | BIT(7)) |
◆ MMC_HS_TIMING
| #define MMC_HS_TIMING 0x1 |
◆ MMC_MAX_CARD_STAT_RETRY
| #define MMC_MAX_CARD_STAT_RETRY 10000 |
◆ MMC_MAX_COMMAND_RETRY
| #define MMC_MAX_COMMAND_RETRY 1000 |
◆ MMC_NO_POWER_NOTIFICATION
| #define MMC_NO_POWER_NOTIFICATION 0x0 |
◆ MMC_OCR_17_19
| #define MMC_OCR_17_19 (1U << 7) |
◆ MMC_OCR_27_36
| #define MMC_OCR_27_36 (0x1FF << 15) |
◆ MMC_OCR_BUSY
| #define MMC_OCR_BUSY (1U << 31) |
◆ MMC_OCR_SEC_MODE
| #define MMC_OCR_SEC_MODE (2U << 29) |
◆ MMC_PART_CONFIG
| #define MMC_PART_CONFIG 179 |
◆ MMC_PARTITION_CONFIG
| #define MMC_PARTITION_CONFIG 179 |
◆ MMC_POWER_OFF_LONG
| #define MMC_POWER_OFF_LONG 0x3 |
◆ MMC_POWER_OFF_NOTIFICATION
| #define MMC_POWER_OFF_NOTIFICATION 34 |
◆ MMC_POWER_OFF_SHORT
| #define MMC_POWER_OFF_SHORT 0x2 |
◆ MMC_POWER_ON
◆ MMC_PROG_STATE
◆ MMC_R1_ADDR_ERR
| #define MMC_R1_ADDR_ERR (1U << 30) |
◆ MMC_R1_ADDR_OUT_OF_RANGE
| #define MMC_R1_ADDR_OUT_OF_RANGE (1U << 31) |
◆ MMC_R1_BLOCK_LEN_ERR
| #define MMC_R1_BLOCK_LEN_ERR (1U << 29) |
◆ MMC_R1_CC_ERROR
| #define MMC_R1_CC_ERROR (1U << 20) |
◆ MMC_R1_GENERIC_ERR
| #define MMC_R1_GENERIC_ERR (1U << 19) |
◆ MMC_R1_WP_ERASE_SKIP
| #define MMC_R1_WP_ERASE_SKIP BIT(15) |
◆ MMC_R1_WP_VIOLATION
| #define MMC_R1_WP_VIOLATION (1U << 26) |
◆ MMC_RCA
◆ MMC_RD_BLOCK_LEN
| #define MMC_RD_BLOCK_LEN 512 |
◆ MMC_READY_FOR_DATA
| #define MMC_READY_FOR_DATA (1 << 8) |
◆ MMC_SAVE_TIMING
| #define MMC_SAVE_TIMING |
( |
|
host, |
|
|
|
TIMING |
|
) |
| host->timing = TIMING |
◆ MMC_SD_AU_SIZE_BIT
| #define MMC_SD_AU_SIZE_BIT 428 |
◆ MMC_SD_AU_SIZE_LEN
| #define MMC_SD_AU_SIZE_LEN 4 |
◆ MMC_SD_DEV_READY
| #define MMC_SD_DEV_READY 0x80000000 |
◆ MMC_SD_ERASE_OFFSET_BIT
| #define MMC_SD_ERASE_OFFSET_BIT 400 |
◆ MMC_SD_ERASE_OFFSET_LEN
| #define MMC_SD_ERASE_OFFSET_LEN 2 |
◆ MMC_SD_ERASE_SIZE_BIT
| #define MMC_SD_ERASE_SIZE_BIT 408 |
◆ MMC_SD_ERASE_SIZE_LEN
| #define MMC_SD_ERASE_SIZE_LEN 16 |
◆ MMC_SD_ERASE_TOUT_BIT
| #define MMC_SD_ERASE_TOUT_BIT 402 |
◆ MMC_SD_ERASE_TOUT_LEN
| #define MMC_SD_ERASE_TOUT_LEN 6 |
◆ MMC_SD_HC_HCS
| #define MMC_SD_HC_HCS 0x40000000 |
◆ MMC_SD_HC_VOLT_SUPPLIED
| #define MMC_SD_HC_VOLT_SUPPLIED 0x000001AA |
◆ MMC_SD_OCR
| #define MMC_SD_OCR 0x00FF8000 |
◆ MMC_SD_S18R
| #define MMC_SD_S18R 0x1000000 |
◆ MMC_SD_SWITCH_HS
| #define MMC_SD_SWITCH_HS 0x80FFFFF1 |
◆ MMC_SD_UHS_HCS
| #define MMC_SD_UHS_HCS 0x40000000 |
◆ MMC_SEC_COUNT1
| #define MMC_SEC_COUNT1 212 |
◆ MMC_SEC_COUNT2
| #define MMC_SEC_COUNT2 213 |
◆ MMC_SEC_COUNT2_SHIFT
| #define MMC_SEC_COUNT2_SHIFT 8 |
◆ MMC_SEC_COUNT3
| #define MMC_SEC_COUNT3 214 |
◆ MMC_SEC_COUNT3_SHIFT
| #define MMC_SEC_COUNT3_SHIFT 16 |
◆ MMC_SEC_COUNT4
| #define MMC_SEC_COUNT4 215 |
◆ MMC_SEC_COUNT4_SHIFT
| #define MMC_SEC_COUNT4_SHIFT 24 |
◆ MMC_SET_BIT
◆ MMC_SLEEP_NOTIFICATION
| #define MMC_SLEEP_NOTIFICATION 0x4 |
◆ MMC_STATUS_ACTIVE
| #define MMC_STATUS_ACTIVE 1 |
◆ MMC_STATUS_INACTIVE
| #define MMC_STATUS_INACTIVE 0 |
◆ MMC_SWITCH_FUNC_ERR_FLAG
| #define MMC_SWITCH_FUNC_ERR_FLAG (1 << 7) |
◆ MMC_TRAN_STATE
◆ MMC_TYPE_MMCHC
◆ MMC_TYPE_SDHC
◆ MMC_TYPE_SDIO
◆ MMC_TYPE_STD_MMC
| #define MMC_TYPE_STD_MMC 4 |
◆ MMC_TYPE_STD_SD
| #define MMC_TYPE_STD_SD 0 |
◆ MMC_US_PERM_WP_DIS
| #define MMC_US_PERM_WP_DIS BIT(4) |
◆ MMC_US_PERM_WP_EN
| #define MMC_US_PERM_WP_EN BIT(2) |
◆ MMC_US_PWR_WP_DIS
| #define MMC_US_PWR_WP_DIS BIT(3) |
◆ MMC_US_PWR_WP_EN
| #define MMC_US_PWR_WP_EN BIT(0) |
◆ MMC_USR_WP
◆ MMC_WR_BLOCK_LEN
| #define MMC_WR_BLOCK_LEN 512 |
◆ PARTITION_ACCESS_MASK
| #define PARTITION_ACCESS_MASK 0x7 |
◆ REL_WR_SEC_C
◆ RPMB_PART_MIN_SIZE
| #define RPMB_PART_MIN_SIZE (128u * 1024u) |
◆ RPMB_SIZE_MULT
| #define RPMB_SIZE_MULT 168 |
◆ RST_N_FUNC_ENABLE
| #define RST_N_FUNC_ENABLE BIT(0) |
◆ SD_ACMD41_MAX_RETRY
| #define SD_ACMD41_MAX_RETRY 100 |
◆ SD_CARD_RCA
◆ SD_CMD8_MAX_RETRY
| #define SD_CMD8_MAX_RETRY 0x3 |
◆ SD_SCR_BUS_WIDTH
| #define SD_SCR_BUS_WIDTH 16 |
◆ SD_SCR_BUS_WIDTH_MASK
| #define SD_SCR_BUS_WIDTH_MASK 0xf0000 |
◆ SD_SCR_CMD23_SUPPORT
| #define SD_SCR_CMD23_SUPPORT BIT(1) |
◆ SD_SCR_SD_SPEC
| #define SD_SCR_SD_SPEC 24 |
◆ SD_SCR_SD_SPEC3
| #define SD_SCR_SD_SPEC3 15 |
◆ SD_SCR_SD_SPEC3_MASK
| #define SD_SCR_SD_SPEC3_MASK 0x8000 |
◆ SD_SCR_SD_SPEC_MASK
| #define SD_SCR_SD_SPEC_MASK 0x0f000000 |
◆ SD_SCR_SD_STAT_AFTER_ERASE
| #define SD_SCR_SD_STAT_AFTER_ERASE 23 |
◆ SD_SCR_STAT_AFTER_ERASE_MASK
| #define SD_SCR_STAT_AFTER_ERASE_MASK 0x800000 |
◆ SD_SCR_WIDTH_4BIT
| #define SD_SCR_WIDTH_4BIT BIT(2) |
◆ swap_endian32
| #define swap_endian32 |
( |
|
x | ) |
|
Value: ((uint32_t)((((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
(((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
(((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \
(((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24)))
◆ UNPACK_BITS
| #define UNPACK_BITS |
( |
|
array, |
|
|
|
start, |
|
|
|
len, |
|
|
|
size_of |
|
) |
| |
Value: ({ \
uint32_t indx = (start) / (size_of); \
uint32_t offset = (start) % (size_of); \
uint32_t mask = (((len) < (size_of)) ? 1ULL << (len) : 0) - 1; \
uint32_t unpck = array[indx] >> offset; \
uint32_t indx2 = ((start) + (len)-1) / (size_of); \
if (indx2 > indx) \
unpck |= array[indx2] << ((size_of)-offset); \
unpck &mask; \
})
Can be used to unpack array of upto 32 bits data.
◆ mmc_notification
mmc event handle callback function.
◆ anonymous enum
MMC status return code.
| Enumerator |
|---|
| SDRV_STATUS_MMC_CMD_ERR | |
| SDRV_STATUS_MMC_DAT_ERR | |
| SDRV_STATUS_MMC_MISC_ERR | |
| SDRV_STATUS_MMC_CMD_ABORT | |
| SDRV_STATUS_MMC_DAT_ABORT | |
| SDRV_STATUS_MMC_TUNING_FAIL | |
| SDRV_STATUS_MMC_CARD_STATUS_ERR | |
| SDRV_STATUS_MMC_SWITCH_FUNC_ERR | |
| SDRV_STATUS_MMC_CMD_RSP_ERR | |
| SDRV_STATUS_MMC_DEV_TYPE_ERR | |
◆ mmc_opt
mmc read write erase operation
| Enumerator |
|---|
| MMC_OPT_READ | |
| MMC_OPT_WRITE | |
| MMC_OPT_ERASE | |
| MMC_OPT_MAX | |
◆ mmc_opt_result
mmc operation return result
| Enumerator |
|---|
| MMC_OPT_COMPLETE | |
| MMC_OPT_FAILED | |
| MMC_OPT_PENDING | |
| MMC_OPT_INCONSISTENT | |
| MMC_OPT_INVALID | |
| MMC_OPT_RESULET_MAX | |
◆ part_access_type
mmc partition
| Enumerator |
|---|
| PART_ACCESS_DEFAULT | |
| PART_ACCESS_BOOT1 | |
| PART_ACCESS_BOOT2 | |
| PART_ACCESS_RPMB | |
| PART_ACCESS_GP1 | |
| PART_ACCESS_GP2 | |
| PART_ACCESS_GP3 | |
| PART_ACCESS_GP4 | |
◆ sdrv_mmc_alloc_dev()
alloc the mmc device memory.
- Returns
- pointer to mmc device
- Return values
-
| alloc | mmc device memory ptr |
| null | failed |
◆ sdrv_mmc_get_block_size()
| uint32_t sdrv_mmc_get_block_size |
( |
struct mmc_device * |
dev | ) |
|
mmc Get card block size
- Parameters
-
| [in] | dev | mmc device structure |
- Returns
- uint32_t
- Return values
-
◆ sdrv_mmc_get_data_after_erase()
| uint32_t sdrv_mmc_get_data_after_erase |
( |
struct mmc_device * |
dev | ) |
|
mmc Get card data after erase
- Parameters
-
| [in] | dev | mmc device structure |
- Returns
- uint32_t
- Return values
-
| get | card data after erase; |
◆ sdrv_mmc_get_erase_group_size()
| uint32_t sdrv_mmc_get_erase_group_size |
( |
struct mmc_device * |
dev | ) |
|
mmc get erase group size
- Parameters
-
| [in] | dev | mmc device structure |
- Returns
- uint32_t
- Return values
-
◆ sdrv_mmc_get_size()
| uint64_t sdrv_mmc_get_size |
( |
struct mmc_device * |
dev, |
|
|
uint32_t |
type |
|
) |
| |
sdhci rpmb send
Send the read & write command sequence to rpmb
- Parameters
-
| [in] | dev | mmc device structure |
| [in] | type | type of partition |
- Returns
- uint64_t
- Return values
-
| 0 | failed |
| other | size of partition |
◆ sdrv_mmc_get_wp_status()
| status_t sdrv_mmc_get_wp_status |
( |
struct mmc_device * |
dev, |
|
|
uint32_t |
addr, |
|
|
uint8_t * |
wp_status |
|
) |
| |
mmc get wp status
get the wp status of write protect groups starting at addr
- Parameters
-
| [in] | dev | mmc device structure |
| [in] | addr | mmc device block address |
| [in] | wp_status | wp group status |
- Returns
- uint32_t
- Return values
-
◆ sdrv_mmc_platform_init()
Initialize the mmc platform driver.
- Parameters
-
| [in] | dev | mmc device structure @priv_data[in] specific host info |
- Returns
- int
- Return values
-
◆ sdrv_mmc_power_off_notification()
mmc power off notification
- Parameters
-
| [in] | dev | mmc device structure |
| [in] | power | off notification type |
- Return values
-
◆ sdrv_mmc_put_card_to_sleep()
| void sdrv_mmc_put_card_to_sleep |
( |
struct mmc_device * |
dev | ) |
|
put the mmc card to sleep
- Parameters
-
| [in] | dev | mmc device structure |
◆ sdrv_mmc_sdhci_cancel()
cancel the previous operation read/write/erase
- Parameters
-
| [in] | dev | mmc device structure |
- Returns
- uint32_t
- Return values
-
◆ sdrv_mmc_sdhci_erase()
| status_t sdrv_mmc_sdhci_erase |
( |
struct mmc_device * |
dev, |
|
|
uint32_t |
blk_addr, |
|
|
uint64_t |
len |
|
) |
| |
mmc sdhci erase
write requried number of blocks from source to card
- Parameters
-
| [in] | dev | mmc device structure |
| [in] | blk_addr | mmc device block address |
| [in] | len | erase length |
- Returns
- uint32_t
- Return values
-
◆ sdrv_mmc_sdhci_erase_part()
| status_t sdrv_mmc_sdhci_erase_part |
( |
struct mmc_device * |
dev, |
|
|
uint32_t |
blk_addr, |
|
|
uint32_t |
num_blocks, |
|
|
uint32_t |
type |
|
) |
| |
mmc sdhci Erase part
Erase len bytes (after converting to number of erase groups), from specified address
- Parameters
-
| [in] | dev | mmc device structure |
| [in] | blk_addr | mmc device block address |
| [in] | len | erase length |
| [in] | type | type of the card |
- Returns
- uint32_t
- Return values
-
◆ sdrv_mmc_sdhci_read()
| status_t sdrv_mmc_sdhci_read |
( |
struct mmc_device * |
dev, |
|
|
void * |
dest, |
|
|
uint32_t |
blk_addr, |
|
|
uint32_t |
num_blocks |
|
) |
| |
mmc sdhci read
Read required number of blocks from card into destination
- Parameters
-
| [in] | dev | mmc device structure |
| [in] | dest | destination address |
| [in] | blk_addr | mmc device block address |
| [in] | num_blocks | number of blocks |
- Returns
- uint32_t
- Return values
-
◆ sdrv_mmc_sdhci_read_part()
| status_t sdrv_mmc_sdhci_read_part |
( |
struct mmc_device * |
dev, |
|
|
void * |
dest, |
|
|
uint32_t |
blk_addr, |
|
|
uint32_t |
num_blocks, |
|
|
uint32_t |
type |
|
) |
| |
mmc sdhci read part
Read required number of blocks from card part into destination
- Parameters
-
| [in] | dev | mmc device structure |
| [in] | dest | destination address |
| [in] | blk_addr | mmc device block address |
| [in] | num_blocks | number of blocks |
| [in] | type | type of the card |
- Returns
- uint32_t
- Return values
-
◆ sdrv_mmc_sdhci_rpmb_send()
sdhci rpmb send
Send the read & write command sequence to rpmb
- Parameters
-
| [in] | dev | mmc device structure |
| [in] | cmd | mmc command structure |
- Returns
- uint32_t
- Return values
-
◆ sdrv_mmc_sdhci_switch_part()
switch the partition
switch emmc partition: boot1/2, rpmb, gp1/2/3/4
- Parameters
-
| [in] | dev | mmc device structure |
| [in] | type | mmc partition type |
- Returns
- uint32_t
- Return values
-
◆ sdrv_mmc_sdhci_write()
| status_t sdrv_mmc_sdhci_write |
( |
struct mmc_device * |
dev, |
|
|
void * |
src, |
|
|
uint32_t |
blk_addr, |
|
|
uint32_t |
num_blocks |
|
) |
| |
mmc sdhci write
write requried number of blocks from source to card
- Parameters
-
| [in] | dev | mmc device structure |
| [in] | src | source address |
| [in] | blk_addr | mmc device block address |
| [in] | num_blocks | number of blocks |
- Returns
- uint32_t
- Return values
-
◆ sdrv_mmc_sdhci_write_part()
| status_t sdrv_mmc_sdhci_write_part |
( |
struct mmc_device * |
dev, |
|
|
void * |
src, |
|
|
uint32_t |
blk_addr, |
|
|
uint32_t |
num_blocks, |
|
|
uint32_t |
type |
|
) |
| |
mmc sdhci Write part
Write requried number of blocks from source to card part
- Parameters
-
| [in] | dev | mmc device structure |
| [in] | src | source address |
| [in] | blk_addr | mmc device block address |
| [in] | num_blocks | number of blocks |
| [in] | type | type of the card |
- Returns
- uint32_t
- Return values
-
◆ sdrv_mmc_sdrv_sdhci_init()
initialize the mmc card
- Parameters
-
| [in] | dev | mmc device structure |
entry point to mmc boot process initialize the sd host controller initialize the mmc card set the clock & high speed mode
- Returns
- int
- Return values
-
◆ sdrv_mmc_send_tuning()
| status_t sdrv_mmc_send_tuning |
( |
struct mmc_device * |
dev, |
|
|
uint32_t |
opcode, |
|
|
uint32_t |
bus_width |
|
) |
| |
mmc send tuning
- Parameters
-
| [in] | dev | mmc device structure |
| [in] | opcode | mmc send cmd |
| [in] | bus_width | data bus width |
- Return values
-
◆ sdrv_mmc_set_clr_power_on_wp_user()
| status_t sdrv_mmc_set_clr_power_on_wp_user |
( |
struct mmc_device * |
dev, |
|
|
uint32_t |
addr, |
|
|
uint64_t |
len, |
|
|
uint8_t |
set_clr |
|
) |
| |
mmc set/clear wp on user area
write protect or release len bytes (after converting to number of write protect groups) from specified start address
- Parameters
-
| [in] | dev | mmc device structure |
| [in] | addr | mmc device block address |
| [in] | len | length |
| [in] | set_clr | write protect flag |
- Returns
- uint32_t
- Return values
-
◆ sdrv_mmc_set_drv_type()
| bool sdrv_mmc_set_drv_type |
( |
struct sdhci_host * |
host, |
|
|
struct mmc_card * |
card, |
|
|
uint8_t |
drv_type |
|
) |
| |
change the driver type of the card
get the wp status of write protect groups starting at addr
- Parameters
-
| [in] | host | sdhci host structure |
| [in] | card | mmc card register |
| [in] | drv_type | mmc switch type |
- Returns
- bool
- Return values
-