diff options
Diffstat (limited to 'include/linux/mmc/mmc.h')
-rw-r--r-- | include/linux/mmc/mmc.h | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index ac26a685cca..2bb1dfd4cf1 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -21,8 +21,8 @@ | |||
21 | * 15 May 2002 | 21 | * 15 May 2002 |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #ifndef MMC_MMC_H | 24 | #ifndef LINUX_MMC_MMC_H |
25 | #define MMC_MMC_H | 25 | #define LINUX_MMC_MMC_H |
26 | 26 | ||
27 | /* Standard MMC commands (4.1) type argument response */ | 27 | /* Standard MMC commands (4.1) type argument response */ |
28 | /* class 1 */ | 28 | /* class 1 */ |
@@ -138,8 +138,19 @@ static inline bool mmc_op_multi(u32 opcode) | |||
138 | #define R1_CURRENT_STATE(x) ((x & 0x00001E00) >> 9) /* sx, b (4 bits) */ | 138 | #define R1_CURRENT_STATE(x) ((x & 0x00001E00) >> 9) /* sx, b (4 bits) */ |
139 | #define R1_READY_FOR_DATA (1 << 8) /* sx, a */ | 139 | #define R1_READY_FOR_DATA (1 << 8) /* sx, a */ |
140 | #define R1_SWITCH_ERROR (1 << 7) /* sx, c */ | 140 | #define R1_SWITCH_ERROR (1 << 7) /* sx, c */ |
141 | #define R1_URGENT_BKOPS (1 << 6) /* sr, a */ | ||
141 | #define R1_APP_CMD (1 << 5) /* sr, c */ | 142 | #define R1_APP_CMD (1 << 5) /* sr, c */ |
142 | 143 | ||
144 | #define R1_STATE_IDLE 0 | ||
145 | #define R1_STATE_READY 1 | ||
146 | #define R1_STATE_IDENT 2 | ||
147 | #define R1_STATE_STBY 3 | ||
148 | #define R1_STATE_TRAN 4 | ||
149 | #define R1_STATE_DATA 5 | ||
150 | #define R1_STATE_RCV 6 | ||
151 | #define R1_STATE_PRG 7 | ||
152 | #define R1_STATE_DIS 8 | ||
153 | |||
143 | /* | 154 | /* |
144 | * MMC/SD in SPI mode reports R1 status always, and R2 for SEND_STATUS | 155 | * MMC/SD in SPI mode reports R1 status always, and R2 for SEND_STATUS |
145 | * R1 is the low order byte; R2 is the next highest byte, when present. | 156 | * R1 is the low order byte; R2 is the next highest byte, when present. |
@@ -262,6 +273,9 @@ struct _mmc_csd { | |||
262 | 273 | ||
263 | #define EXT_CSD_PARTITION_ATTRIBUTE 156 /* R/W */ | 274 | #define EXT_CSD_PARTITION_ATTRIBUTE 156 /* R/W */ |
264 | #define EXT_CSD_PARTITION_SUPPORT 160 /* RO */ | 275 | #define EXT_CSD_PARTITION_SUPPORT 160 /* RO */ |
276 | #define EXT_CSD_HPI_MGMT 161 /* R/W */ | ||
277 | #define EXT_CSD_BKOPS_EN 163 /* R/W */ | ||
278 | #define EXT_CSD_BKOPS_START 164 /* R/W */ | ||
265 | #define EXT_CSD_WR_REL_PARAM 166 /* RO */ | 279 | #define EXT_CSD_WR_REL_PARAM 166 /* RO */ |
266 | #define EXT_CSD_ERASE_GROUP_DEF 175 /* R/W */ | 280 | #define EXT_CSD_ERASE_GROUP_DEF 175 /* R/W */ |
267 | #define EXT_CSD_PART_CONFIG 179 /* R/W */ | 281 | #define EXT_CSD_PART_CONFIG 179 /* R/W */ |
@@ -271,6 +285,7 @@ struct _mmc_csd { | |||
271 | #define EXT_CSD_REV 192 /* RO */ | 285 | #define EXT_CSD_REV 192 /* RO */ |
272 | #define EXT_CSD_STRUCTURE 194 /* RO */ | 286 | #define EXT_CSD_STRUCTURE 194 /* RO */ |
273 | #define EXT_CSD_CARD_TYPE 196 /* RO */ | 287 | #define EXT_CSD_CARD_TYPE 196 /* RO */ |
288 | #define EXT_CSD_OUT_OF_INTERRUPT_TIME 198 /* RO */ | ||
274 | #define EXT_CSD_PART_SWITCH_TIME 199 /* RO */ | 289 | #define EXT_CSD_PART_SWITCH_TIME 199 /* RO */ |
275 | #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ | 290 | #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ |
276 | #define EXT_CSD_S_A_TIMEOUT 217 /* RO */ | 291 | #define EXT_CSD_S_A_TIMEOUT 217 /* RO */ |
@@ -283,6 +298,9 @@ struct _mmc_csd { | |||
283 | #define EXT_CSD_SEC_ERASE_MULT 230 /* RO */ | 298 | #define EXT_CSD_SEC_ERASE_MULT 230 /* RO */ |
284 | #define EXT_CSD_SEC_FEATURE_SUPPORT 231 /* RO */ | 299 | #define EXT_CSD_SEC_FEATURE_SUPPORT 231 /* RO */ |
285 | #define EXT_CSD_TRIM_MULT 232 /* RO */ | 300 | #define EXT_CSD_TRIM_MULT 232 /* RO */ |
301 | #define EXT_CSD_BKOPS_STATUS 246 /* RO */ | ||
302 | #define EXT_CSD_BKOPS_SUPPORT 502 /* RO */ | ||
303 | #define EXT_CSD_HPI_FEATURES 503 /* RO */ | ||
286 | 304 | ||
287 | /* | 305 | /* |
288 | * EXT_CSD field definitions | 306 | * EXT_CSD field definitions |
@@ -327,5 +345,4 @@ struct _mmc_csd { | |||
327 | #define MMC_SWITCH_MODE_CLEAR_BITS 0x02 /* Clear bits which are 1 in value */ | 345 | #define MMC_SWITCH_MODE_CLEAR_BITS 0x02 /* Clear bits which are 1 in value */ |
328 | #define MMC_SWITCH_MODE_WRITE_BYTE 0x03 /* Set target to value */ | 346 | #define MMC_SWITCH_MODE_WRITE_BYTE 0x03 /* Set target to value */ |
329 | 347 | ||
330 | #endif /* MMC_MMC_PROTOCOL_H */ | 348 | #endif /* LINUX_MMC_MMC_H */ |
331 | |||