aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmc/card.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mmc/card.h')
-rw-r--r--include/linux/mmc/card.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index d02d2c6e0cfe..6b7525099e56 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -24,12 +24,14 @@ struct mmc_cid {
24}; 24};
25 25
26struct mmc_csd { 26struct mmc_csd {
27 unsigned char structure;
27 unsigned char mmca_vsn; 28 unsigned char mmca_vsn;
28 unsigned short cmdclass; 29 unsigned short cmdclass;
29 unsigned short tacc_clks; 30 unsigned short tacc_clks;
30 unsigned int tacc_ns; 31 unsigned int tacc_ns;
31 unsigned int r2w_factor; 32 unsigned int r2w_factor;
32 unsigned int max_dtr; 33 unsigned int max_dtr;
34 unsigned int erase_size; /* In sectors */
33 unsigned int read_blkbits; 35 unsigned int read_blkbits;
34 unsigned int write_blkbits; 36 unsigned int write_blkbits;
35 unsigned int capacity; 37 unsigned int capacity;
@@ -41,9 +43,16 @@ struct mmc_csd {
41 43
42struct mmc_ext_csd { 44struct mmc_ext_csd {
43 u8 rev; 45 u8 rev;
46 u8 erase_group_def;
47 u8 sec_feature_support;
44 unsigned int sa_timeout; /* Units: 100ns */ 48 unsigned int sa_timeout; /* Units: 100ns */
45 unsigned int hs_max_dtr; 49 unsigned int hs_max_dtr;
46 unsigned int sectors; 50 unsigned int sectors;
51 unsigned int hc_erase_size; /* In sectors */
52 unsigned int hc_erase_timeout; /* In milliseconds */
53 unsigned int sec_trim_mult; /* Secure trim multiplier */
54 unsigned int sec_erase_mult; /* Secure erase multiplier */
55 unsigned int trim_timeout; /* In milliseconds */
47}; 56};
48 57
49struct sd_scr { 58struct sd_scr {
@@ -53,6 +62,12 @@ struct sd_scr {
53#define SD_SCR_BUS_WIDTH_4 (1<<2) 62#define SD_SCR_BUS_WIDTH_4 (1<<2)
54}; 63};
55 64
65struct sd_ssr {
66 unsigned int au; /* In sectors */
67 unsigned int erase_timeout; /* In milliseconds */
68 unsigned int erase_offset; /* In milliseconds */
69};
70
56struct sd_switch_caps { 71struct sd_switch_caps {
57 unsigned int hs_max_dtr; 72 unsigned int hs_max_dtr;
58}; 73};
@@ -92,6 +107,7 @@ struct mmc_card {
92#define MMC_TYPE_MMC 0 /* MMC card */ 107#define MMC_TYPE_MMC 0 /* MMC card */
93#define MMC_TYPE_SD 1 /* SD card */ 108#define MMC_TYPE_SD 1 /* SD card */
94#define MMC_TYPE_SDIO 2 /* SDIO card */ 109#define MMC_TYPE_SDIO 2 /* SDIO card */
110#define MMC_TYPE_SD_COMBO 3 /* SD combo (IO+mem) card */
95 unsigned int state; /* (our) card state */ 111 unsigned int state; /* (our) card state */
96#define MMC_STATE_PRESENT (1<<0) /* present in sysfs */ 112#define MMC_STATE_PRESENT (1<<0) /* present in sysfs */
97#define MMC_STATE_READONLY (1<<1) /* card is read-only */ 113#define MMC_STATE_READONLY (1<<1) /* card is read-only */
@@ -101,6 +117,13 @@ struct mmc_card {
101#define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */ 117#define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */
102#define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1) /* use func->cur_blksize */ 118#define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1) /* use func->cur_blksize */
103 /* for byte mode */ 119 /* for byte mode */
120#define MMC_QUIRK_NONSTD_SDIO (1<<2) /* non-standard SDIO card attached */
121 /* (missing CIA registers) */
122
123 unsigned int erase_size; /* erase size in sectors */
124 unsigned int erase_shift; /* if erase unit is power 2 */
125 unsigned int pref_erase; /* in sectors */
126 u8 erased_byte; /* value of erased bytes */
104 127
105 u32 raw_cid[4]; /* raw card CID */ 128 u32 raw_cid[4]; /* raw card CID */
106 u32 raw_csd[4]; /* raw card CSD */ 129 u32 raw_csd[4]; /* raw card CSD */
@@ -109,6 +132,7 @@ struct mmc_card {
109 struct mmc_csd csd; /* card specific */ 132 struct mmc_csd csd; /* card specific */
110 struct mmc_ext_csd ext_csd; /* mmc v4 extended card specific */ 133 struct mmc_ext_csd ext_csd; /* mmc v4 extended card specific */
111 struct sd_scr scr; /* extra SD information */ 134 struct sd_scr scr; /* extra SD information */
135 struct sd_ssr ssr; /* yet more SD information */
112 struct sd_switch_caps sw_caps; /* switch (CMD6) caps */ 136 struct sd_switch_caps sw_caps; /* switch (CMD6) caps */
113 137
114 unsigned int sdio_funcs; /* number of SDIO functions */ 138 unsigned int sdio_funcs; /* number of SDIO functions */