Linux Kernel
3.7.1
|
Go to the source code of this file.
Data Structures | |
struct | mmc_command |
struct | mmc_data |
struct | mmc_request |
#define mmc_resp_type | ( | cmd | ) | ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE)) |
#define MMC_RSP_R1 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) |
#define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) |
#define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) |
#define MMC_RSP_R3 (MMC_RSP_PRESENT) |
#define MMC_RSP_R4 (MMC_RSP_PRESENT) |
#define MMC_RSP_R5 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) |
#define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) |
#define MMC_RSP_R7 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) |
#define MMC_RSP_SPI_R1 (MMC_RSP_SPI_S1) |
#define MMC_RSP_SPI_R1B (MMC_RSP_SPI_S1|MMC_RSP_SPI_BUSY) |
#define MMC_RSP_SPI_R2 (MMC_RSP_SPI_S1|MMC_RSP_SPI_S2) |
#define MMC_RSP_SPI_R3 (MMC_RSP_SPI_S1|MMC_RSP_SPI_B4) |
#define MMC_RSP_SPI_R4 (MMC_RSP_SPI_S1|MMC_RSP_SPI_B4) |
#define MMC_RSP_SPI_R5 (MMC_RSP_SPI_S1|MMC_RSP_SPI_S2) |
#define MMC_RSP_SPI_R7 (MMC_RSP_SPI_S1|MMC_RSP_SPI_B4) |
#define mmc_spi_resp_type | ( | cmd | ) |
__mmc_claim_host - exclusively claim a host : mmc host to claim : whether or not the operation should be aborted
Claim a host for a set of operations. If is non null and dereference a non-zero value then this will return prematurely with that non-zero value without acquiring the lock. Returns zero with the lock held otherwise.
int __mmc_switch | ( | struct mmc_card * | card, |
u8 | set, | ||
u8 | index, | ||
u8 | value, | ||
unsigned int | timeout_ms, | ||
bool | use_busy_signal | ||
) |
__mmc_switch - modify EXT_CSD register : the MMC card associated with the data transfer : cmd set values : EXT_CSD register index : value to program into EXT_CSD register : timeout (ms) for operation performed by register write, timeout of zero implies maximum possible timeout : use the busy signal as response type
Modifies the EXT_CSD register for selected card.
mmc_align_data_size - pads a transfer size to a more optimal value : the MMC card associated with the data transfer : original transfer size
Pads the original data size with a number of extra bytes in order to avoid controller bugs and/or performance hits (e.g. some controllers revert to PIO for certain sizes).
Returns the improved size, which might be unmodified.
Note that this function is only relevant when issuing a single scatter gather entry.
mmc_start_bkops - start BKOPS for supported cards : MMC card to start BKOPS : A flag to indicate if this function was called due to an exception raised by the card
Start background operations whenever requested. When the urgent BKOPS bit is set in a R1 command response then background operations should be started immediately.
|
read |
mmc_start_req - start a non-blocking request : MMC host to start command : async request to start : out parameter returns 0 for success, otherwise non zero
Start a new MMC custom command request for a host. If there is on ongoing async request wait for completion of that request and start the new one and return. Does not wait for the new request to complete.
Returns the completed request, NULL in case of none completed.
Wait for the an ongoing request (previoulsy started) to complete and return the completed request. If there is no ongoing request, NULL is returned without waiting. NULL is not an error condition.
mmc_vddrange_to_ocrmask - Convert a voltage range to the OCR mask : minimum voltage value (mV) : maximum voltage value (mV)
This function returns the OCR mask bits according to the provided and values. If conversion is not possible the function returns 0.
Notes wrt boundary cases: This function sets the OCR bits for all boundary voltages, for example [3300:3400] range is translated to MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_34_35 mask.
int mmc_wait_for_app_cmd | ( | struct mmc_host * | host, |
struct mmc_card * | card, | ||
struct mmc_command * | cmd, | ||
int | retries | ||
) |
mmc_wait_for_app_cmd - start an application command and wait for completion : MMC host to start command : Card to send MMC_APP_CMD to : MMC command to start : maximum number of retries
Sends a MMC_APP_CMD, checks the card response, sends the command in the parameter and waits for it to complete. Return any error that occurred while the command was executing. Do not attempt to parse the response.
mmc_wait_for_cmd - start a command and wait for completion : MMC host to start command : MMC command to start : maximum number of retries
Start a new MMC command for a host, and wait for the command to complete. Return any error that occurred while the command was executing. Do not attempt to parse the response.
void mmc_wait_for_req | ( | struct mmc_host * | host, |
struct mmc_request * | mrq | ||
) |