diff options
author | Pierre Ossman <drzeus@drzeus.cx> | 2007-05-22 14:25:21 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-09-23 13:42:37 -0400 |
commit | b2bcc798bbb482b2909801280f3c4aff8cbbf5be (patch) | |
tree | 74b1b4e6876fbc7187f67cc2b36ed03ae7c59acc /include/linux/mmc | |
parent | 5c4e6f1301649d5b29dd0f70e6da83e728ab5ca5 (diff) |
mmc: implement SDIO IO_RW_DIRECT operation
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r-- | include/linux/mmc/core.h | 1 | ||||
-rw-r--r-- | include/linux/mmc/sdio.h | 34 |
2 files changed, 35 insertions, 0 deletions
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 8faa436c5571..43a92736be63 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h | |||
@@ -42,6 +42,7 @@ struct mmc_command { | |||
42 | #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) | 42 | #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) |
43 | #define MMC_RSP_R3 (MMC_RSP_PRESENT) | 43 | #define MMC_RSP_R3 (MMC_RSP_PRESENT) |
44 | #define MMC_RSP_R4 (MMC_RSP_PRESENT) | 44 | #define MMC_RSP_R4 (MMC_RSP_PRESENT) |
45 | #define MMC_RSP_R5 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) | ||
45 | #define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) | 46 | #define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) |
46 | #define MMC_RSP_R7 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) | 47 | #define MMC_RSP_R7 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) |
47 | 48 | ||
diff --git a/include/linux/mmc/sdio.h b/include/linux/mmc/sdio.h index d1a0b15cdfdf..e5f06de7d527 100644 --- a/include/linux/mmc/sdio.h +++ b/include/linux/mmc/sdio.h | |||
@@ -14,6 +14,40 @@ | |||
14 | 14 | ||
15 | /* SDIO commands type argument response */ | 15 | /* SDIO commands type argument response */ |
16 | #define SD_IO_SEND_OP_COND 5 /* bcr [23:0] OCR R4 */ | 16 | #define SD_IO_SEND_OP_COND 5 /* bcr [23:0] OCR R4 */ |
17 | #define SD_IO_RW_DIRECT 52 /* ac [31:0] See below R5 */ | ||
18 | |||
19 | /* | ||
20 | * SD_IO_RW_DIRECT argument format: | ||
21 | * | ||
22 | * [31] R/W flag | ||
23 | * [30:28] Function number | ||
24 | * [27] RAW flag | ||
25 | * [25:9] Register address | ||
26 | * [7:0] Data | ||
27 | */ | ||
28 | |||
29 | /* | ||
30 | SDIO status in R5 | ||
31 | Type | ||
32 | e : error bit | ||
33 | s : status bit | ||
34 | r : detected and set for the actual command response | ||
35 | x : detected and set during command execution. the host must poll | ||
36 | the card by sending status command in order to read these bits. | ||
37 | Clear condition | ||
38 | a : according to the card state | ||
39 | b : always related to the previous command. Reception of | ||
40 | a valid command will clear it (with a delay of one command) | ||
41 | c : clear by read | ||
42 | */ | ||
43 | |||
44 | #define R5_COM_CRC_ERROR (1 << 15) /* er, b */ | ||
45 | #define R5_ILLEGAL_COMMAND (1 << 14) /* er, b */ | ||
46 | #define R5_ERROR (1 << 11) /* erx, c */ | ||
47 | #define R5_FUNCTION_NUMBER (1 << 9) /* er, c */ | ||
48 | #define R5_OUT_OF_RANGE (1 << 8) /* er, c */ | ||
49 | #define R5_STATUS(x) (x & 0xCB00) | ||
50 | #define R5_IO_CURRENT_STATE(x) ((x & 0x3000) >> 12) /* s, b */ | ||
17 | 51 | ||
18 | #endif | 52 | #endif |
19 | 53 | ||