diff options
Diffstat (limited to 'include/linux/mmc/card.h')
-rw-r--r-- | include/linux/mmc/card.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 4b27f9f503e4..943550dfe9ea 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -57,6 +57,7 @@ struct mmc_ext_csd { | |||
57 | unsigned int sa_timeout; /* Units: 100ns */ | 57 | unsigned int sa_timeout; /* Units: 100ns */ |
58 | unsigned int generic_cmd6_time; /* Units: 10ms */ | 58 | unsigned int generic_cmd6_time; /* Units: 10ms */ |
59 | unsigned int power_off_longtime; /* Units: ms */ | 59 | unsigned int power_off_longtime; /* Units: ms */ |
60 | u8 power_off_notification; /* state */ | ||
60 | unsigned int hs_max_dtr; | 61 | unsigned int hs_max_dtr; |
61 | #define MMC_HIGH_26_MAX_DTR 26000000 | 62 | #define MMC_HIGH_26_MAX_DTR 26000000 |
62 | #define MMC_HIGH_52_MAX_DTR 52000000 | 63 | #define MMC_HIGH_52_MAX_DTR 52000000 |
@@ -76,10 +77,13 @@ struct mmc_ext_csd { | |||
76 | bool hpi_en; /* HPI enablebit */ | 77 | bool hpi_en; /* HPI enablebit */ |
77 | bool hpi; /* HPI support bit */ | 78 | bool hpi; /* HPI support bit */ |
78 | unsigned int hpi_cmd; /* cmd used as HPI */ | 79 | unsigned int hpi_cmd; /* cmd used as HPI */ |
80 | bool bkops; /* background support bit */ | ||
81 | bool bkops_en; /* background enable bit */ | ||
79 | unsigned int data_sector_size; /* 512 bytes or 4KB */ | 82 | unsigned int data_sector_size; /* 512 bytes or 4KB */ |
80 | unsigned int data_tag_unit_size; /* DATA TAG UNIT size */ | 83 | unsigned int data_tag_unit_size; /* DATA TAG UNIT size */ |
81 | unsigned int boot_ro_lock; /* ro lock support */ | 84 | unsigned int boot_ro_lock; /* ro lock support */ |
82 | bool boot_ro_lockable; | 85 | bool boot_ro_lockable; |
86 | u8 raw_exception_status; /* 53 */ | ||
83 | u8 raw_partition_support; /* 160 */ | 87 | u8 raw_partition_support; /* 160 */ |
84 | u8 raw_erased_mem_count; /* 181 */ | 88 | u8 raw_erased_mem_count; /* 181 */ |
85 | u8 raw_ext_csd_structure; /* 194 */ | 89 | u8 raw_ext_csd_structure; /* 194 */ |
@@ -93,6 +97,7 @@ struct mmc_ext_csd { | |||
93 | u8 raw_sec_erase_mult; /* 230 */ | 97 | u8 raw_sec_erase_mult; /* 230 */ |
94 | u8 raw_sec_feature_support;/* 231 */ | 98 | u8 raw_sec_feature_support;/* 231 */ |
95 | u8 raw_trim_mult; /* 232 */ | 99 | u8 raw_trim_mult; /* 232 */ |
100 | u8 raw_bkops_status; /* 246 */ | ||
96 | u8 raw_sectors[4]; /* 212 - 4 bytes */ | 101 | u8 raw_sectors[4]; /* 212 - 4 bytes */ |
97 | 102 | ||
98 | unsigned int feature_support; | 103 | unsigned int feature_support; |
@@ -225,7 +230,7 @@ struct mmc_card { | |||
225 | #define MMC_CARD_SDXC (1<<6) /* card is SDXC */ | 230 | #define MMC_CARD_SDXC (1<<6) /* card is SDXC */ |
226 | #define MMC_CARD_REMOVED (1<<7) /* card has been removed */ | 231 | #define MMC_CARD_REMOVED (1<<7) /* card has been removed */ |
227 | #define MMC_STATE_HIGHSPEED_200 (1<<8) /* card is in HS200 mode */ | 232 | #define MMC_STATE_HIGHSPEED_200 (1<<8) /* card is in HS200 mode */ |
228 | #define MMC_STATE_SLEEP (1<<9) /* card is in sleep state */ | 233 | #define MMC_STATE_DOING_BKOPS (1<<10) /* card is doing BKOPS */ |
229 | unsigned int quirks; /* card quirks */ | 234 | unsigned int quirks; /* card quirks */ |
230 | #define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */ | 235 | #define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */ |
231 | #define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1) /* use func->cur_blksize */ | 236 | #define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1) /* use func->cur_blksize */ |
@@ -241,11 +246,6 @@ struct mmc_card { | |||
241 | #define MMC_QUIRK_LONG_READ_TIME (1<<9) /* Data read time > CSD says */ | 246 | #define MMC_QUIRK_LONG_READ_TIME (1<<9) /* Data read time > CSD says */ |
242 | #define MMC_QUIRK_SEC_ERASE_TRIM_BROKEN (1<<10) /* Skip secure for erase/trim */ | 247 | #define MMC_QUIRK_SEC_ERASE_TRIM_BROKEN (1<<10) /* Skip secure for erase/trim */ |
243 | /* byte mode */ | 248 | /* byte mode */ |
244 | unsigned int poweroff_notify_state; /* eMMC4.5 notify feature */ | ||
245 | #define MMC_NO_POWER_NOTIFICATION 0 | ||
246 | #define MMC_POWERED_ON 1 | ||
247 | #define MMC_POWEROFF_SHORT 2 | ||
248 | #define MMC_POWEROFF_LONG 3 | ||
249 | 249 | ||
250 | unsigned int erase_size; /* erase size in sectors */ | 250 | unsigned int erase_size; /* erase size in sectors */ |
251 | unsigned int erase_shift; /* if erase unit is power 2 */ | 251 | unsigned int erase_shift; /* if erase unit is power 2 */ |
@@ -392,7 +392,7 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data) | |||
392 | #define mmc_sd_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED) | 392 | #define mmc_sd_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED) |
393 | #define mmc_card_ext_capacity(c) ((c)->state & MMC_CARD_SDXC) | 393 | #define mmc_card_ext_capacity(c) ((c)->state & MMC_CARD_SDXC) |
394 | #define mmc_card_removed(c) ((c) && ((c)->state & MMC_CARD_REMOVED)) | 394 | #define mmc_card_removed(c) ((c) && ((c)->state & MMC_CARD_REMOVED)) |
395 | #define mmc_card_is_sleep(c) ((c)->state & MMC_STATE_SLEEP) | 395 | #define mmc_card_doing_bkops(c) ((c)->state & MMC_STATE_DOING_BKOPS) |
396 | 396 | ||
397 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) | 397 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) |
398 | #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) | 398 | #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) |
@@ -404,9 +404,9 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data) | |||
404 | #define mmc_sd_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED) | 404 | #define mmc_sd_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED) |
405 | #define mmc_card_set_ext_capacity(c) ((c)->state |= MMC_CARD_SDXC) | 405 | #define mmc_card_set_ext_capacity(c) ((c)->state |= MMC_CARD_SDXC) |
406 | #define mmc_card_set_removed(c) ((c)->state |= MMC_CARD_REMOVED) | 406 | #define mmc_card_set_removed(c) ((c)->state |= MMC_CARD_REMOVED) |
407 | #define mmc_card_set_sleep(c) ((c)->state |= MMC_STATE_SLEEP) | 407 | #define mmc_card_set_doing_bkops(c) ((c)->state |= MMC_STATE_DOING_BKOPS) |
408 | #define mmc_card_clr_doing_bkops(c) ((c)->state &= ~MMC_STATE_DOING_BKOPS) | ||
408 | 409 | ||
409 | #define mmc_card_clr_sleep(c) ((c)->state &= ~MMC_STATE_SLEEP) | ||
410 | /* | 410 | /* |
411 | * Quirk add/remove for MMC products. | 411 | * Quirk add/remove for MMC products. |
412 | */ | 412 | */ |