diff options
Diffstat (limited to 'include/linux/mmc/card.h')
-rw-r--r-- | include/linux/mmc/card.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 991a37382a22..d0e6a5497614 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -39,6 +39,10 @@ struct mmc_csd { | |||
39 | write_misalign:1; | 39 | write_misalign:1; |
40 | }; | 40 | }; |
41 | 41 | ||
42 | struct mmc_ext_csd { | ||
43 | unsigned int hs_max_dtr; | ||
44 | }; | ||
45 | |||
42 | struct sd_scr { | 46 | struct sd_scr { |
43 | unsigned char sda_vsn; | 47 | unsigned char sda_vsn; |
44 | unsigned char bus_widths; | 48 | unsigned char bus_widths; |
@@ -46,6 +50,10 @@ struct sd_scr { | |||
46 | #define SD_SCR_BUS_WIDTH_4 (1<<2) | 50 | #define SD_SCR_BUS_WIDTH_4 (1<<2) |
47 | }; | 51 | }; |
48 | 52 | ||
53 | struct sd_switch_caps { | ||
54 | unsigned int hs_max_dtr; | ||
55 | }; | ||
56 | |||
49 | struct mmc_host; | 57 | struct mmc_host; |
50 | 58 | ||
51 | /* | 59 | /* |
@@ -62,12 +70,15 @@ struct mmc_card { | |||
62 | #define MMC_STATE_BAD (1<<2) /* unrecognised device */ | 70 | #define MMC_STATE_BAD (1<<2) /* unrecognised device */ |
63 | #define MMC_STATE_SDCARD (1<<3) /* is an SD card */ | 71 | #define MMC_STATE_SDCARD (1<<3) /* is an SD card */ |
64 | #define MMC_STATE_READONLY (1<<4) /* card is read-only */ | 72 | #define MMC_STATE_READONLY (1<<4) /* card is read-only */ |
73 | #define MMC_STATE_HIGHSPEED (1<<5) /* card is in high speed mode */ | ||
65 | u32 raw_cid[4]; /* raw card CID */ | 74 | u32 raw_cid[4]; /* raw card CID */ |
66 | u32 raw_csd[4]; /* raw card CSD */ | 75 | u32 raw_csd[4]; /* raw card CSD */ |
67 | u32 raw_scr[2]; /* raw card SCR */ | 76 | u32 raw_scr[2]; /* raw card SCR */ |
68 | struct mmc_cid cid; /* card identification */ | 77 | struct mmc_cid cid; /* card identification */ |
69 | struct mmc_csd csd; /* card specific */ | 78 | struct mmc_csd csd; /* card specific */ |
79 | struct mmc_ext_csd ext_csd; /* mmc v4 extended card specific */ | ||
70 | struct sd_scr scr; /* extra SD information */ | 80 | struct sd_scr scr; /* extra SD information */ |
81 | struct sd_switch_caps sw_caps; /* switch (CMD6) caps */ | ||
71 | }; | 82 | }; |
72 | 83 | ||
73 | #define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT) | 84 | #define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT) |
@@ -75,12 +86,14 @@ struct mmc_card { | |||
75 | #define mmc_card_bad(c) ((c)->state & MMC_STATE_BAD) | 86 | #define mmc_card_bad(c) ((c)->state & MMC_STATE_BAD) |
76 | #define mmc_card_sd(c) ((c)->state & MMC_STATE_SDCARD) | 87 | #define mmc_card_sd(c) ((c)->state & MMC_STATE_SDCARD) |
77 | #define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY) | 88 | #define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY) |
89 | #define mmc_card_highspeed(c) ((c)->state & MMC_STATE_HIGHSPEED) | ||
78 | 90 | ||
79 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) | 91 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) |
80 | #define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD) | 92 | #define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD) |
81 | #define mmc_card_set_bad(c) ((c)->state |= MMC_STATE_BAD) | 93 | #define mmc_card_set_bad(c) ((c)->state |= MMC_STATE_BAD) |
82 | #define mmc_card_set_sd(c) ((c)->state |= MMC_STATE_SDCARD) | 94 | #define mmc_card_set_sd(c) ((c)->state |= MMC_STATE_SDCARD) |
83 | #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) | 95 | #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) |
96 | #define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED) | ||
84 | 97 | ||
85 | #define mmc_card_name(c) ((c)->cid.prod_name) | 98 | #define mmc_card_name(c) ((c)->cid.prod_name) |
86 | #define mmc_card_id(c) ((c)->dev.bus_id) | 99 | #define mmc_card_id(c) ((c)->dev.bus_id) |