diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-03 18:51:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-03 18:51:13 -0500 |
commit | f3e39e67b9b6ad6a51d13be902e8341f13b93531 (patch) | |
tree | dd0d21776b936fdff1bd1e1ba762fc47e94259cf /include | |
parent | 1a56f54c351d8d2e276aefc4f4094037c178d6c7 (diff) | |
parent | e92251762d02a46177d4105d1744041e3f8bc465 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-mmc
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mmc/mmc.h | 35 | ||||
-rw-r--r-- | include/linux/mmc/protocol.h | 2 |
2 files changed, 24 insertions, 13 deletions
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index ccd3e13de1e8..f38872abc126 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -21,24 +21,35 @@ struct mmc_command { | |||
21 | u32 arg; | 21 | u32 arg; |
22 | u32 resp[4]; | 22 | u32 resp[4]; |
23 | unsigned int flags; /* expected response type */ | 23 | unsigned int flags; /* expected response type */ |
24 | #define MMC_RSP_NONE (0 << 0) | 24 | #define MMC_RSP_PRESENT (1 << 0) |
25 | #define MMC_RSP_SHORT (1 << 0) | 25 | #define MMC_RSP_136 (1 << 1) /* 136 bit response */ |
26 | #define MMC_RSP_LONG (2 << 0) | 26 | #define MMC_RSP_CRC (1 << 2) /* expect valid crc */ |
27 | #define MMC_RSP_MASK (3 << 0) | 27 | #define MMC_RSP_BUSY (1 << 3) /* card may send busy */ |
28 | #define MMC_RSP_CRC (1 << 3) /* expect valid crc */ | 28 | #define MMC_RSP_OPCODE (1 << 4) /* response contains opcode */ |
29 | #define MMC_RSP_BUSY (1 << 4) /* card may send busy */ | 29 | #define MMC_CMD_MASK (3 << 5) /* command type */ |
30 | #define MMC_RSP_OPCODE (1 << 5) /* response contains opcode */ | 30 | #define MMC_CMD_AC (0 << 5) |
31 | #define MMC_CMD_ADTC (1 << 5) | ||
32 | #define MMC_CMD_BC (2 << 5) | ||
33 | #define MMC_CMD_BCR (3 << 5) | ||
31 | 34 | ||
32 | /* | 35 | /* |
33 | * These are the response types, and correspond to valid bit | 36 | * These are the response types, and correspond to valid bit |
34 | * patterns of the above flags. One additional valid pattern | 37 | * patterns of the above flags. One additional valid pattern |
35 | * is all zeros, which means we don't expect a response. | 38 | * is all zeros, which means we don't expect a response. |
36 | */ | 39 | */ |
37 | #define MMC_RSP_R1 (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_OPCODE) | 40 | #define MMC_RSP_NONE (0) |
38 | #define MMC_RSP_R1B (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) | 41 | #define MMC_RSP_R1 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) |
39 | #define MMC_RSP_R2 (MMC_RSP_LONG|MMC_RSP_CRC) | 42 | #define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) |
40 | #define MMC_RSP_R3 (MMC_RSP_SHORT) | 43 | #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) |
41 | #define MMC_RSP_R6 (MMC_RSP_SHORT|MMC_RSP_CRC) | 44 | #define MMC_RSP_R3 (MMC_RSP_PRESENT) |
45 | #define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC) | ||
46 | |||
47 | #define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE)) | ||
48 | |||
49 | /* | ||
50 | * These are the command types. | ||
51 | */ | ||
52 | #define mmc_cmd_type(cmd) ((cmd)->flags & MMC_CMD_TYPE) | ||
42 | 53 | ||
43 | unsigned int retries; /* max number of retries */ | 54 | unsigned int retries; /* max number of retries */ |
44 | unsigned int error; /* command error */ | 55 | unsigned int error; /* command error */ |
diff --git a/include/linux/mmc/protocol.h b/include/linux/mmc/protocol.h index a14dc306545b..81c3f77f652c 100644 --- a/include/linux/mmc/protocol.h +++ b/include/linux/mmc/protocol.h | |||
@@ -79,7 +79,7 @@ | |||
79 | /* SD commands type argument response */ | 79 | /* SD commands type argument response */ |
80 | /* class 8 */ | 80 | /* class 8 */ |
81 | /* This is basically the same command as for MMC with some quirks. */ | 81 | /* This is basically the same command as for MMC with some quirks. */ |
82 | #define SD_SEND_RELATIVE_ADDR 3 /* ac R6 */ | 82 | #define SD_SEND_RELATIVE_ADDR 3 /* bcr R6 */ |
83 | 83 | ||
84 | /* Application commands */ | 84 | /* Application commands */ |
85 | #define SD_APP_SET_BUS_WIDTH 6 /* ac [1:0] bus width R1 */ | 85 | #define SD_APP_SET_BUS_WIDTH 6 /* ac [1:0] bus width R1 */ |