diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mmc/card.h | 4 | ||||
-rw-r--r-- | include/linux/mmc/core.h | 1 | ||||
-rw-r--r-- | include/linux/mmc/host.h | 4 | ||||
-rw-r--r-- | include/linux/mmc/mmc.h | 10 |
4 files changed, 18 insertions, 1 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 7bd49234cd88..8ce082781ccb 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -48,6 +48,7 @@ struct mmc_ext_csd { | |||
48 | unsigned int sa_timeout; /* Units: 100ns */ | 48 | unsigned int sa_timeout; /* Units: 100ns */ |
49 | unsigned int hs_max_dtr; | 49 | unsigned int hs_max_dtr; |
50 | unsigned int sectors; | 50 | unsigned int sectors; |
51 | unsigned int card_type; | ||
51 | unsigned int hc_erase_size; /* In sectors */ | 52 | unsigned int hc_erase_size; /* In sectors */ |
52 | unsigned int hc_erase_timeout; /* In milliseconds */ | 53 | unsigned int hc_erase_timeout; /* In milliseconds */ |
53 | unsigned int sec_trim_mult; /* Secure trim multiplier */ | 54 | unsigned int sec_trim_mult; /* Secure trim multiplier */ |
@@ -113,6 +114,7 @@ struct mmc_card { | |||
113 | #define MMC_STATE_READONLY (1<<1) /* card is read-only */ | 114 | #define MMC_STATE_READONLY (1<<1) /* card is read-only */ |
114 | #define MMC_STATE_HIGHSPEED (1<<2) /* card is in high speed mode */ | 115 | #define MMC_STATE_HIGHSPEED (1<<2) /* card is in high speed mode */ |
115 | #define MMC_STATE_BLOCKADDR (1<<3) /* card uses block-addressing */ | 116 | #define MMC_STATE_BLOCKADDR (1<<3) /* card uses block-addressing */ |
117 | #define MMC_STATE_HIGHSPEED_DDR (1<<4) /* card is in high speed mode */ | ||
116 | unsigned int quirks; /* card quirks */ | 118 | unsigned int quirks; /* card quirks */ |
117 | #define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */ | 119 | #define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */ |
118 | #define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1) /* use func->cur_blksize */ | 120 | #define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1) /* use func->cur_blksize */ |
@@ -154,11 +156,13 @@ struct mmc_card { | |||
154 | #define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY) | 156 | #define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY) |
155 | #define mmc_card_highspeed(c) ((c)->state & MMC_STATE_HIGHSPEED) | 157 | #define mmc_card_highspeed(c) ((c)->state & MMC_STATE_HIGHSPEED) |
156 | #define mmc_card_blockaddr(c) ((c)->state & MMC_STATE_BLOCKADDR) | 158 | #define mmc_card_blockaddr(c) ((c)->state & MMC_STATE_BLOCKADDR) |
159 | #define mmc_card_ddr_mode(c) ((c)->state & MMC_STATE_HIGHSPEED_DDR) | ||
157 | 160 | ||
158 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) | 161 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) |
159 | #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) | 162 | #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) |
160 | #define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED) | 163 | #define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED) |
161 | #define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR) | 164 | #define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR) |
165 | #define mmc_card_set_ddr_mode(c) ((c)->state |= MMC_STATE_HIGHSPEED_DDR) | ||
162 | 166 | ||
163 | static inline int mmc_card_lenient_fn0(const struct mmc_card *c) | 167 | static inline int mmc_card_lenient_fn0(const struct mmc_card *c) |
164 | { | 168 | { |
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 7429033acb66..d0fbcacab52c 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h | |||
@@ -109,6 +109,7 @@ struct mmc_data { | |||
109 | #define MMC_DATA_WRITE (1 << 8) | 109 | #define MMC_DATA_WRITE (1 << 8) |
110 | #define MMC_DATA_READ (1 << 9) | 110 | #define MMC_DATA_READ (1 << 9) |
111 | #define MMC_DATA_STREAM (1 << 10) | 111 | #define MMC_DATA_STREAM (1 << 10) |
112 | #define MMC_DDR_MODE (1 << 11) | ||
112 | 113 | ||
113 | unsigned int bytes_xfered; | 114 | unsigned int bytes_xfered; |
114 | 115 | ||
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index ccac56ae1286..6711eb8715ba 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -158,6 +158,10 @@ struct mmc_host { | |||
158 | #define MMC_CAP_NONREMOVABLE (1 << 8) /* Nonremovable e.g. eMMC */ | 158 | #define MMC_CAP_NONREMOVABLE (1 << 8) /* Nonremovable e.g. eMMC */ |
159 | #define MMC_CAP_WAIT_WHILE_BUSY (1 << 9) /* Waits while card is busy */ | 159 | #define MMC_CAP_WAIT_WHILE_BUSY (1 << 9) /* Waits while card is busy */ |
160 | #define MMC_CAP_ERASE (1 << 10) /* Allow erase/trim commands */ | 160 | #define MMC_CAP_ERASE (1 << 10) /* Allow erase/trim commands */ |
161 | #define MMC_CAP_1_8V_DDR (1 << 11) /* can support */ | ||
162 | /* DDR mode at 1.8V */ | ||
163 | #define MMC_CAP_1_2V_DDR (1 << 12) /* can support */ | ||
164 | /* DDR mode at 1.2V */ | ||
161 | 165 | ||
162 | mmc_pm_flag_t pm_caps; /* supported pm features */ | 166 | mmc_pm_flag_t pm_caps; /* supported pm features */ |
163 | 167 | ||
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index dd11ae51fb68..956fbd877692 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -277,11 +277,19 @@ struct _mmc_csd { | |||
277 | 277 | ||
278 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ | 278 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ |
279 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ | 279 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ |
280 | #define EXT_CSD_CARD_TYPE_MASK 0x3 /* Mask out reserved and DDR bits */ | 280 | #define EXT_CSD_CARD_TYPE_MASK 0xF /* Mask out reserved bits */ |
281 | #define EXT_CSD_CARD_TYPE_DDR_1_8V (1<<2) /* Card can run at 52MHz */ | ||
282 | /* DDR mode @1.8V or 3V I/O */ | ||
283 | #define EXT_CSD_CARD_TYPE_DDR_1_2V (1<<3) /* Card can run at 52MHz */ | ||
284 | /* DDR mode @1.2V I/O */ | ||
285 | #define EXT_CSD_CARD_TYPE_DDR_52 (EXT_CSD_CARD_TYPE_DDR_1_8V \ | ||
286 | | EXT_CSD_CARD_TYPE_DDR_1_2V) | ||
281 | 287 | ||
282 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ | 288 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ |
283 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ | 289 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ |
284 | #define EXT_CSD_BUS_WIDTH_8 2 /* Card is in 8 bit mode */ | 290 | #define EXT_CSD_BUS_WIDTH_8 2 /* Card is in 8 bit mode */ |
291 | #define EXT_CSD_DDR_BUS_WIDTH_4 5 /* Card is in 4 bit DDR mode */ | ||
292 | #define EXT_CSD_DDR_BUS_WIDTH_8 6 /* Card is in 8 bit DDR mode */ | ||
285 | 293 | ||
286 | #define EXT_CSD_SEC_ER_EN BIT(0) | 294 | #define EXT_CSD_SEC_ER_EN BIT(0) |
287 | #define EXT_CSD_SEC_BD_BLK_EN BIT(2) | 295 | #define EXT_CSD_SEC_BD_BLK_EN BIT(2) |