coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
sd_mmc_ctrlr.h File Reference
#include <stdint.h>
Include dependency graph for sd_mmc_ctrlr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mmc_command
 
struct  mmc_data
 
struct  sd_mmc_ctrlr
 

Macros

#define CARD_UNUSABLE_ERR   -17 /* Unusable Card */
 
#define CARD_COMM_ERR   -18 /* Communications Error */
 
#define CARD_TIMEOUT   -19
 
#define CARD_IN_PROGRESS   -20 /* operation is in progress */
 
#define MMC_CMD_GO_IDLE_STATE   0
 
#define MMC_CMD_SEND_OP_COND   1
 
#define MMC_CMD_ALL_SEND_CID   2
 
#define MMC_CMD_SET_DSR   4
 
#define MMC_CMD_SELECT_CARD   7
 
#define MMC_CMD_SEND_CSD   9
 
#define MMC_CMD_SEND_CID   10
 
#define MMC_CMD_STOP_TRANSMISSION   12
 
#define MMC_CMD_SEND_STATUS   13
 
#define MMC_CMD_SET_BLOCKLEN   16
 
#define MMC_CMD_READ_SINGLE_BLOCK   17
 
#define MMC_CMD_READ_MULTIPLE_BLOCK   18
 
#define MMC_CMD_WRITE_SINGLE_BLOCK   24
 
#define MMC_CMD_WRITE_MULTIPLE_BLOCK   25
 
#define MMC_CMD_APP_CMD   55
 
#define MMC_CMD_SET_RELATIVE_ADDR   3
 
#define MMC_CMD_SWITCH   6
 
#define MMC_CMD_SEND_EXT_CSD   8
 
#define MMC_CMD_AUTO_TUNING_SEQUENCE   21
 
#define MMC_CMD_ERASE_GROUP_START   35
 
#define MMC_CMD_ERASE_GROUP_END   36
 
#define MMC_CMD_ERASE   38
 
#define MMC_CMD_SPI_READ_OCR   58
 
#define MMC_CMD_SPI_CRC_ON_OFF   59
 
#define SD_CMD_SEND_RELATIVE_ADDR   3
 
#define SD_CMD_SWITCH_FUNC   6
 
#define SD_CMD_SEND_IF_COND   8
 
#define SD_CMD_ERASE_WR_BLK_START   32
 
#define SD_CMD_ERASE_WR_BLK_END   33
 
#define SD_CMD_APP_SET_BUS_WIDTH   6
 
#define SD_CMD_APP_SEND_OP_COND   41
 
#define SD_CMD_APP_SEND_SCR   51
 
#define CARD_RSP_PRESENT   (1 << 0)
 
#define CARD_RSP_136   (1 << 1) /* 136 bit response */
 
#define CARD_RSP_CRC   (1 << 2) /* expect valid crc */
 
#define CARD_RSP_BUSY   (1 << 3) /* card may send busy */
 
#define CARD_RSP_OPCODE   (1 << 4) /* response contains opcode */
 
#define CARD_RSP_NONE   (0)
 
#define CARD_RSP_R1   (CARD_RSP_PRESENT|CARD_RSP_CRC|CARD_RSP_OPCODE)
 
#define CARD_RSP_R1b
 
#define CARD_RSP_R2   (CARD_RSP_PRESENT|CARD_RSP_136|CARD_RSP_CRC)
 
#define CARD_RSP_R3   (CARD_RSP_PRESENT)
 
#define CARD_RSP_R4   (CARD_RSP_PRESENT)
 
#define CARD_RSP_R5   (CARD_RSP_PRESENT|CARD_RSP_CRC|CARD_RSP_OPCODE)
 
#define CARD_RSP_R6   (CARD_RSP_PRESENT|CARD_RSP_CRC|CARD_RSP_OPCODE)
 
#define CARD_RSP_R7   (CARD_RSP_PRESENT|CARD_RSP_CRC|CARD_RSP_OPCODE)
 
#define MMC_TRIM_ARG   0x1
 
#define MMC_SECURE_ERASE_ARG   0x80000000
 
#define CMD_FLAG_IGNORE_INHIBIT   1
 
#define SD_SWITCH_CHECK   0
 
#define SD_SWITCH_SWITCH   1
 
#define SD_DATA_4BIT   0x00040000
 
#define SD_HIGHSPEED_BUSY   0x00020000
 
#define SD_HIGHSPEED_SUPPORTED   0x00020000
 
#define DATA_FLAG_READ   1
 
#define DATA_FLAG_WRITE   2
 
#define MMC_VDD_165_195   0x00000080 /* VDD voltage 1.65 - 1.95 */
 
#define MMC_VDD_20_21   0x00000100 /* VDD voltage 2.0 ~ 2.1 */
 
#define MMC_VDD_21_22   0x00000200 /* VDD voltage 2.1 ~ 2.2 */
 
#define MMC_VDD_22_23   0x00000400 /* VDD voltage 2.2 ~ 2.3 */
 
#define MMC_VDD_23_24   0x00000800 /* VDD voltage 2.3 ~ 2.4 */
 
#define MMC_VDD_24_25   0x00001000 /* VDD voltage 2.4 ~ 2.5 */
 
#define MMC_VDD_25_26   0x00002000 /* VDD voltage 2.5 ~ 2.6 */
 
#define MMC_VDD_26_27   0x00004000 /* VDD voltage 2.6 ~ 2.7 */
 
#define MMC_VDD_27_28   0x00008000 /* VDD voltage 2.7 ~ 2.8 */
 
#define MMC_VDD_28_29   0x00010000 /* VDD voltage 2.8 ~ 2.9 */
 
#define MMC_VDD_29_30   0x00020000 /* VDD voltage 2.9 ~ 3.0 */
 
#define MMC_VDD_30_31   0x00040000 /* VDD voltage 3.0 ~ 3.1 */
 
#define MMC_VDD_31_32   0x00080000 /* VDD voltage 3.1 ~ 3.2 */
 
#define MMC_VDD_32_33   0x00100000 /* VDD voltage 3.2 ~ 3.3 */
 
#define MMC_VDD_33_34   0x00200000 /* VDD voltage 3.3 ~ 3.4 */
 
#define MMC_VDD_34_35   0x00400000 /* VDD voltage 3.4 ~ 3.5 */
 
#define MMC_VDD_35_36   0x00800000 /* VDD voltage 3.5 ~ 3.6 */
 
#define MMC_VDD_165_195_SHIFT   7
 
#define CLOCK_KHZ   1000
 
#define CLOCK_MHZ   (1000 * CLOCK_KHZ)
 
#define CLOCK_20MHZ   (20 * CLOCK_MHZ)
 
#define CLOCK_25MHZ   (25 * CLOCK_MHZ)
 
#define CLOCK_26MHZ   (26 * CLOCK_MHZ)
 
#define CLOCK_50MHZ   (50 * CLOCK_MHZ)
 
#define CLOCK_52MHZ   (52 * CLOCK_MHZ)
 
#define CLOCK_200MHZ   (200 * CLOCK_MHZ)
 
#define DRVR_CAP_4BIT   0x00000001
 
#define DRVR_CAP_8BIT   0x00000002
 
#define DRVR_CAP_AUTO_CMD12   0x00000004
 
#define DRVR_CAP_HC   0x00000008
 
#define DRVR_CAP_HS   0x00000010
 
#define DRVR_CAP_HS52   0x00000020
 
#define DRVR_CAP_HS200   0x00000040
 
#define DRVR_CAP_HS400   0x00000080
 
#define DRVR_CAP_ENHANCED_STROBE   0x00000100
 
#define DRVR_CAP_REMOVABLE   0x00000200
 
#define DRVR_CAP_DMA_64BIT   0x00000400
 
#define DRVR_CAP_HS200_TUNING   0x00000800
 
#define BUS_TIMING_LEGACY   0
 
#define BUS_TIMING_MMC_HS   1
 
#define BUS_TIMING_SD_HS   2
 
#define BUS_TIMING_UHS_SDR12   3
 
#define BUS_TIMING_UHS_SDR25   4
 
#define BUS_TIMING_UHS_SDR50   5
 
#define BUS_TIMING_UHS_SDR104   6
 
#define BUS_TIMING_UHS_DDR50   7
 
#define BUS_TIMING_MMC_DDR52   8
 
#define BUS_TIMING_MMC_HS200   9
 
#define BUS_TIMING_MMC_HS400   10
 
#define BUS_TIMING_MMC_HS400ES   11
 

Enumerations

enum  { MMC_STATUS_NEED_RESET = 0 , MMC_STATUS_CMD1_READY_OR_IN_PROGRESS , MMC_STATUS_CMD1_READY , MMC_STATUS_CMD1_IN_PROGRESS }
 

Functions

void soc_sd_mmc_controller_quirks (struct sd_mmc_ctrlr *ctrlr)
 
void sdhc_log_command (struct mmc_command *cmd)
 
void sdhc_log_command_issued (void)
 
void sdhc_log_response (uint32_t entries, uint32_t *response)
 
void sdhc_log_ret (int ret)
 

Macro Definition Documentation

◆ BUS_TIMING_LEGACY

#define BUS_TIMING_LEGACY   0

Definition at line 188 of file sd_mmc_ctrlr.h.

◆ BUS_TIMING_MMC_DDR52

#define BUS_TIMING_MMC_DDR52   8

Definition at line 196 of file sd_mmc_ctrlr.h.

◆ BUS_TIMING_MMC_HS

#define BUS_TIMING_MMC_HS   1

Definition at line 189 of file sd_mmc_ctrlr.h.

◆ BUS_TIMING_MMC_HS200

#define BUS_TIMING_MMC_HS200   9

Definition at line 197 of file sd_mmc_ctrlr.h.

◆ BUS_TIMING_MMC_HS400

#define BUS_TIMING_MMC_HS400   10

Definition at line 198 of file sd_mmc_ctrlr.h.

◆ BUS_TIMING_MMC_HS400ES

#define BUS_TIMING_MMC_HS400ES   11

Definition at line 199 of file sd_mmc_ctrlr.h.

◆ BUS_TIMING_SD_HS

#define BUS_TIMING_SD_HS   2

Definition at line 190 of file sd_mmc_ctrlr.h.

◆ BUS_TIMING_UHS_DDR50

#define BUS_TIMING_UHS_DDR50   7

Definition at line 195 of file sd_mmc_ctrlr.h.

◆ BUS_TIMING_UHS_SDR104

#define BUS_TIMING_UHS_SDR104   6

Definition at line 194 of file sd_mmc_ctrlr.h.

◆ BUS_TIMING_UHS_SDR12

#define BUS_TIMING_UHS_SDR12   3

Definition at line 191 of file sd_mmc_ctrlr.h.

◆ BUS_TIMING_UHS_SDR25

#define BUS_TIMING_UHS_SDR25   4

Definition at line 192 of file sd_mmc_ctrlr.h.

◆ BUS_TIMING_UHS_SDR50

#define BUS_TIMING_UHS_SDR50   5

Definition at line 193 of file sd_mmc_ctrlr.h.

◆ CARD_COMM_ERR

#define CARD_COMM_ERR   -18 /* Communications Error */

Definition at line 12 of file sd_mmc_ctrlr.h.

◆ CARD_IN_PROGRESS

#define CARD_IN_PROGRESS   -20 /* operation is in progress */

Definition at line 14 of file sd_mmc_ctrlr.h.

◆ CARD_RSP_136

#define CARD_RSP_136   (1 << 1) /* 136 bit response */

Definition at line 70 of file sd_mmc_ctrlr.h.

◆ CARD_RSP_BUSY

#define CARD_RSP_BUSY   (1 << 3) /* card may send busy */

Definition at line 72 of file sd_mmc_ctrlr.h.

◆ CARD_RSP_CRC

#define CARD_RSP_CRC   (1 << 2) /* expect valid crc */

Definition at line 71 of file sd_mmc_ctrlr.h.

◆ CARD_RSP_NONE

#define CARD_RSP_NONE   (0)

Definition at line 75 of file sd_mmc_ctrlr.h.

◆ CARD_RSP_OPCODE

#define CARD_RSP_OPCODE   (1 << 4) /* response contains opcode */

Definition at line 73 of file sd_mmc_ctrlr.h.

◆ CARD_RSP_PRESENT

#define CARD_RSP_PRESENT   (1 << 0)

Definition at line 69 of file sd_mmc_ctrlr.h.

◆ CARD_RSP_R1

#define CARD_RSP_R1   (CARD_RSP_PRESENT|CARD_RSP_CRC|CARD_RSP_OPCODE)

Definition at line 76 of file sd_mmc_ctrlr.h.

◆ CARD_RSP_R1b

#define CARD_RSP_R1b
Value:
CARD_RSP_BUSY)
#define CARD_RSP_PRESENT
Definition: sd_mmc_ctrlr.h:69
#define CARD_RSP_CRC
Definition: sd_mmc_ctrlr.h:71
#define CARD_RSP_OPCODE
Definition: sd_mmc_ctrlr.h:73

Definition at line 77 of file sd_mmc_ctrlr.h.

◆ CARD_RSP_R2

#define CARD_RSP_R2   (CARD_RSP_PRESENT|CARD_RSP_136|CARD_RSP_CRC)

Definition at line 79 of file sd_mmc_ctrlr.h.

◆ CARD_RSP_R3

#define CARD_RSP_R3   (CARD_RSP_PRESENT)

Definition at line 80 of file sd_mmc_ctrlr.h.

◆ CARD_RSP_R4

#define CARD_RSP_R4   (CARD_RSP_PRESENT)

Definition at line 81 of file sd_mmc_ctrlr.h.

◆ CARD_RSP_R5

#define CARD_RSP_R5   (CARD_RSP_PRESENT|CARD_RSP_CRC|CARD_RSP_OPCODE)

Definition at line 82 of file sd_mmc_ctrlr.h.

◆ CARD_RSP_R6

#define CARD_RSP_R6   (CARD_RSP_PRESENT|CARD_RSP_CRC|CARD_RSP_OPCODE)

Definition at line 83 of file sd_mmc_ctrlr.h.

◆ CARD_RSP_R7

#define CARD_RSP_R7   (CARD_RSP_PRESENT|CARD_RSP_CRC|CARD_RSP_OPCODE)

Definition at line 84 of file sd_mmc_ctrlr.h.

◆ CARD_TIMEOUT

#define CARD_TIMEOUT   -19

Definition at line 13 of file sd_mmc_ctrlr.h.

◆ CARD_UNUSABLE_ERR

#define CARD_UNUSABLE_ERR   -17 /* Unusable Card */

Definition at line 11 of file sd_mmc_ctrlr.h.

◆ CLOCK_200MHZ

#define CLOCK_200MHZ   (200 * CLOCK_MHZ)

Definition at line 164 of file sd_mmc_ctrlr.h.

◆ CLOCK_20MHZ

#define CLOCK_20MHZ   (20 * CLOCK_MHZ)

Definition at line 159 of file sd_mmc_ctrlr.h.

◆ CLOCK_25MHZ

#define CLOCK_25MHZ   (25 * CLOCK_MHZ)

Definition at line 160 of file sd_mmc_ctrlr.h.

◆ CLOCK_26MHZ

#define CLOCK_26MHZ   (26 * CLOCK_MHZ)

Definition at line 161 of file sd_mmc_ctrlr.h.

◆ CLOCK_50MHZ

#define CLOCK_50MHZ   (50 * CLOCK_MHZ)

Definition at line 162 of file sd_mmc_ctrlr.h.

◆ CLOCK_52MHZ

#define CLOCK_52MHZ   (52 * CLOCK_MHZ)

Definition at line 163 of file sd_mmc_ctrlr.h.

◆ CLOCK_KHZ

#define CLOCK_KHZ   1000

Definition at line 157 of file sd_mmc_ctrlr.h.

◆ CLOCK_MHZ

#define CLOCK_MHZ   (1000 * CLOCK_KHZ)

Definition at line 158 of file sd_mmc_ctrlr.h.

◆ CMD_FLAG_IGNORE_INHIBIT

#define CMD_FLAG_IGNORE_INHIBIT   1

Definition at line 94 of file sd_mmc_ctrlr.h.

◆ DATA_FLAG_READ

#define DATA_FLAG_READ   1

Definition at line 113 of file sd_mmc_ctrlr.h.

◆ DATA_FLAG_WRITE

#define DATA_FLAG_WRITE   2

Definition at line 114 of file sd_mmc_ctrlr.h.

◆ DRVR_CAP_4BIT

#define DRVR_CAP_4BIT   0x00000001

Definition at line 172 of file sd_mmc_ctrlr.h.

◆ DRVR_CAP_8BIT

#define DRVR_CAP_8BIT   0x00000002

Definition at line 173 of file sd_mmc_ctrlr.h.

◆ DRVR_CAP_AUTO_CMD12

#define DRVR_CAP_AUTO_CMD12   0x00000004

Definition at line 174 of file sd_mmc_ctrlr.h.

◆ DRVR_CAP_DMA_64BIT

#define DRVR_CAP_DMA_64BIT   0x00000400

Definition at line 182 of file sd_mmc_ctrlr.h.

◆ DRVR_CAP_ENHANCED_STROBE

#define DRVR_CAP_ENHANCED_STROBE   0x00000100

Definition at line 180 of file sd_mmc_ctrlr.h.

◆ DRVR_CAP_HC

#define DRVR_CAP_HC   0x00000008

Definition at line 175 of file sd_mmc_ctrlr.h.

◆ DRVR_CAP_HS

#define DRVR_CAP_HS   0x00000010

Definition at line 176 of file sd_mmc_ctrlr.h.

◆ DRVR_CAP_HS200

#define DRVR_CAP_HS200   0x00000040

Definition at line 178 of file sd_mmc_ctrlr.h.

◆ DRVR_CAP_HS200_TUNING

#define DRVR_CAP_HS200_TUNING   0x00000800

Definition at line 183 of file sd_mmc_ctrlr.h.

◆ DRVR_CAP_HS400

#define DRVR_CAP_HS400   0x00000080

Definition at line 179 of file sd_mmc_ctrlr.h.

◆ DRVR_CAP_HS52

#define DRVR_CAP_HS52   0x00000020

Definition at line 177 of file sd_mmc_ctrlr.h.

◆ DRVR_CAP_REMOVABLE

#define DRVR_CAP_REMOVABLE   0x00000200

Definition at line 181 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_ALL_SEND_CID

#define MMC_CMD_ALL_SEND_CID   2

Definition at line 30 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_APP_CMD

#define MMC_CMD_APP_CMD   55

Definition at line 42 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_AUTO_TUNING_SEQUENCE

#define MMC_CMD_AUTO_TUNING_SEQUENCE   21

Definition at line 48 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_ERASE

#define MMC_CMD_ERASE   38

Definition at line 51 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_ERASE_GROUP_END

#define MMC_CMD_ERASE_GROUP_END   36

Definition at line 50 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_ERASE_GROUP_START

#define MMC_CMD_ERASE_GROUP_START   35

Definition at line 49 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_GO_IDLE_STATE

#define MMC_CMD_GO_IDLE_STATE   0

Definition at line 28 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_READ_MULTIPLE_BLOCK

#define MMC_CMD_READ_MULTIPLE_BLOCK   18

Definition at line 39 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_READ_SINGLE_BLOCK

#define MMC_CMD_READ_SINGLE_BLOCK   17

Definition at line 38 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_SELECT_CARD

#define MMC_CMD_SELECT_CARD   7

Definition at line 32 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_SEND_CID

#define MMC_CMD_SEND_CID   10

Definition at line 34 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_SEND_CSD

#define MMC_CMD_SEND_CSD   9

Definition at line 33 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_SEND_EXT_CSD

#define MMC_CMD_SEND_EXT_CSD   8

Definition at line 47 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_SEND_OP_COND

#define MMC_CMD_SEND_OP_COND   1

Definition at line 29 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_SEND_STATUS

#define MMC_CMD_SEND_STATUS   13

Definition at line 36 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_SET_BLOCKLEN

#define MMC_CMD_SET_BLOCKLEN   16

Definition at line 37 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_SET_DSR

#define MMC_CMD_SET_DSR   4

Definition at line 31 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_SET_RELATIVE_ADDR

#define MMC_CMD_SET_RELATIVE_ADDR   3

Definition at line 45 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_SPI_CRC_ON_OFF

#define MMC_CMD_SPI_CRC_ON_OFF   59

Definition at line 53 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_SPI_READ_OCR

#define MMC_CMD_SPI_READ_OCR   58

Definition at line 52 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_STOP_TRANSMISSION

#define MMC_CMD_STOP_TRANSMISSION   12

Definition at line 35 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_SWITCH

#define MMC_CMD_SWITCH   6

Definition at line 46 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_WRITE_MULTIPLE_BLOCK

#define MMC_CMD_WRITE_MULTIPLE_BLOCK   25

Definition at line 41 of file sd_mmc_ctrlr.h.

◆ MMC_CMD_WRITE_SINGLE_BLOCK

#define MMC_CMD_WRITE_SINGLE_BLOCK   24

Definition at line 40 of file sd_mmc_ctrlr.h.

◆ MMC_SECURE_ERASE_ARG

#define MMC_SECURE_ERASE_ARG   0x80000000

Definition at line 89 of file sd_mmc_ctrlr.h.

◆ MMC_TRIM_ARG

#define MMC_TRIM_ARG   0x1

Definition at line 88 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_165_195

#define MMC_VDD_165_195   0x00000080 /* VDD voltage 1.65 - 1.95 */

Definition at line 131 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_165_195_SHIFT

#define MMC_VDD_165_195_SHIFT   7

Definition at line 149 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_20_21

#define MMC_VDD_20_21   0x00000100 /* VDD voltage 2.0 ~ 2.1 */

Definition at line 132 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_21_22

#define MMC_VDD_21_22   0x00000200 /* VDD voltage 2.1 ~ 2.2 */

Definition at line 133 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_22_23

#define MMC_VDD_22_23   0x00000400 /* VDD voltage 2.2 ~ 2.3 */

Definition at line 134 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_23_24

#define MMC_VDD_23_24   0x00000800 /* VDD voltage 2.3 ~ 2.4 */

Definition at line 135 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_24_25

#define MMC_VDD_24_25   0x00001000 /* VDD voltage 2.4 ~ 2.5 */

Definition at line 136 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_25_26

#define MMC_VDD_25_26   0x00002000 /* VDD voltage 2.5 ~ 2.6 */

Definition at line 137 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_26_27

#define MMC_VDD_26_27   0x00004000 /* VDD voltage 2.6 ~ 2.7 */

Definition at line 138 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_27_28

#define MMC_VDD_27_28   0x00008000 /* VDD voltage 2.7 ~ 2.8 */

Definition at line 139 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_28_29

#define MMC_VDD_28_29   0x00010000 /* VDD voltage 2.8 ~ 2.9 */

Definition at line 140 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_29_30

#define MMC_VDD_29_30   0x00020000 /* VDD voltage 2.9 ~ 3.0 */

Definition at line 141 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_30_31

#define MMC_VDD_30_31   0x00040000 /* VDD voltage 3.0 ~ 3.1 */

Definition at line 142 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_31_32

#define MMC_VDD_31_32   0x00080000 /* VDD voltage 3.1 ~ 3.2 */

Definition at line 143 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_32_33

#define MMC_VDD_32_33   0x00100000 /* VDD voltage 3.2 ~ 3.3 */

Definition at line 144 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_33_34

#define MMC_VDD_33_34   0x00200000 /* VDD voltage 3.3 ~ 3.4 */

Definition at line 145 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_34_35

#define MMC_VDD_34_35   0x00400000 /* VDD voltage 3.4 ~ 3.5 */

Definition at line 146 of file sd_mmc_ctrlr.h.

◆ MMC_VDD_35_36

#define MMC_VDD_35_36   0x00800000 /* VDD voltage 3.5 ~ 3.6 */

Definition at line 147 of file sd_mmc_ctrlr.h.

◆ SD_CMD_APP_SEND_OP_COND

#define SD_CMD_APP_SEND_OP_COND   41

Definition at line 64 of file sd_mmc_ctrlr.h.

◆ SD_CMD_APP_SEND_SCR

#define SD_CMD_APP_SEND_SCR   51

Definition at line 65 of file sd_mmc_ctrlr.h.

◆ SD_CMD_APP_SET_BUS_WIDTH

#define SD_CMD_APP_SET_BUS_WIDTH   6

Definition at line 63 of file sd_mmc_ctrlr.h.

◆ SD_CMD_ERASE_WR_BLK_END

#define SD_CMD_ERASE_WR_BLK_END   33

Definition at line 60 of file sd_mmc_ctrlr.h.

◆ SD_CMD_ERASE_WR_BLK_START

#define SD_CMD_ERASE_WR_BLK_START   32

Definition at line 59 of file sd_mmc_ctrlr.h.

◆ SD_CMD_SEND_IF_COND

#define SD_CMD_SEND_IF_COND   8

Definition at line 58 of file sd_mmc_ctrlr.h.

◆ SD_CMD_SEND_RELATIVE_ADDR

#define SD_CMD_SEND_RELATIVE_ADDR   3

Definition at line 56 of file sd_mmc_ctrlr.h.

◆ SD_CMD_SWITCH_FUNC

#define SD_CMD_SWITCH_FUNC   6

Definition at line 57 of file sd_mmc_ctrlr.h.

◆ SD_DATA_4BIT

#define SD_DATA_4BIT   0x00040000

Definition at line 100 of file sd_mmc_ctrlr.h.

◆ SD_HIGHSPEED_BUSY

#define SD_HIGHSPEED_BUSY   0x00020000

Definition at line 103 of file sd_mmc_ctrlr.h.

◆ SD_HIGHSPEED_SUPPORTED

#define SD_HIGHSPEED_SUPPORTED   0x00020000

Definition at line 104 of file sd_mmc_ctrlr.h.

◆ SD_SWITCH_CHECK

#define SD_SWITCH_CHECK   0

Definition at line 97 of file sd_mmc_ctrlr.h.

◆ SD_SWITCH_SWITCH

#define SD_SWITCH_SWITCH   1

Definition at line 98 of file sd_mmc_ctrlr.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MMC_STATUS_NEED_RESET 
MMC_STATUS_CMD1_READY_OR_IN_PROGRESS 
MMC_STATUS_CMD1_READY 
MMC_STATUS_CMD1_IN_PROGRESS 

Definition at line 17 of file sd_mmc_ctrlr.h.

Function Documentation

◆ sdhc_log_command()

void sdhc_log_command ( struct mmc_command cmd)

Definition at line 264 of file sdhci.c.

References log_entry::cmd, CONFIG, log_entry::time, and timer_monotonic_get().

Referenced by sdhci_send_command().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdhc_log_command_issued()

void sdhc_log_command_issued ( void  )

Definition at line 268 of file sdhci.c.

References CONFIG.

Referenced by sdhci_send_command_bounced().

Here is the caller graph for this function:

◆ sdhc_log_response()

void sdhc_log_response ( uint32_t  entries,
uint32_t response 
)

Definition at line 272 of file sdhci.c.

References CONFIG, and log_entry::response.

Referenced by sdhci_cmd_done().

Here is the caller graph for this function:

◆ sdhc_log_ret()

void sdhc_log_ret ( int  ret)

Definition at line 277 of file sdhci.c.

References CONFIG, and log_entry::ret.

Referenced by sdhci_send_command().

Here is the caller graph for this function:

◆ soc_sd_mmc_controller_quirks()

void soc_sd_mmc_controller_quirks ( struct sd_mmc_ctrlr ctrlr)

Definition at line 671 of file sdhci.c.

References BIOS_ERR, sd_mmc_ctrlr::caps, CLOCK_KHZ, DRVR_CAP_AUTO_CMD12, DRVR_CAP_REMOVABLE, sd_mmc_ctrlr::f_max, sd_mmc_ctrlr::f_min, sd_mmc_ctrlr::mdelay_after_cmd0, sd_mmc_ctrlr::mdelay_before_cmd0, printk, and soc_get_mmc_frequencies().

Referenced by sdhci_pre_init().

Here is the call graph for this function:
Here is the caller graph for this function: