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.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index aefedf04b9bb..18fc77f682de 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -33,6 +33,13 @@ struct mmc_csd {
33 unsigned int capacity; 33 unsigned int capacity;
34}; 34};
35 35
36struct sd_scr {
37 unsigned char sda_vsn;
38 unsigned char bus_widths;
39#define SD_SCR_BUS_WIDTH_1 (1<<0)
40#define SD_SCR_BUS_WIDTH_4 (1<<2)
41};
42
36struct mmc_host; 43struct mmc_host;
37 44
38/* 45/*
@@ -47,19 +54,27 @@ struct mmc_card {
47#define MMC_STATE_PRESENT (1<<0) /* present in sysfs */ 54#define MMC_STATE_PRESENT (1<<0) /* present in sysfs */
48#define MMC_STATE_DEAD (1<<1) /* device no longer in stack */ 55#define MMC_STATE_DEAD (1<<1) /* device no longer in stack */
49#define MMC_STATE_BAD (1<<2) /* unrecognised device */ 56#define MMC_STATE_BAD (1<<2) /* unrecognised device */
57#define MMC_STATE_SDCARD (1<<3) /* is an SD card */
58#define MMC_STATE_READONLY (1<<4) /* card is read-only */
50 u32 raw_cid[4]; /* raw card CID */ 59 u32 raw_cid[4]; /* raw card CID */
51 u32 raw_csd[4]; /* raw card CSD */ 60 u32 raw_csd[4]; /* raw card CSD */
61 u32 raw_scr[2]; /* raw card SCR */
52 struct mmc_cid cid; /* card identification */ 62 struct mmc_cid cid; /* card identification */
53 struct mmc_csd csd; /* card specific */ 63 struct mmc_csd csd; /* card specific */
64 struct sd_scr scr; /* extra SD information */
54}; 65};
55 66
56#define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT) 67#define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT)
57#define mmc_card_dead(c) ((c)->state & MMC_STATE_DEAD) 68#define mmc_card_dead(c) ((c)->state & MMC_STATE_DEAD)
58#define mmc_card_bad(c) ((c)->state & MMC_STATE_BAD) 69#define mmc_card_bad(c) ((c)->state & MMC_STATE_BAD)
70#define mmc_card_sd(c) ((c)->state & MMC_STATE_SDCARD)
71#define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY)
59 72
60#define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) 73#define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT)
61#define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD) 74#define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD)
62#define mmc_card_set_bad(c) ((c)->state |= MMC_STATE_BAD) 75#define mmc_card_set_bad(c) ((c)->state |= MMC_STATE_BAD)
76#define mmc_card_set_sd(c) ((c)->state |= MMC_STATE_SDCARD)
77#define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY)
63 78
64#define mmc_card_name(c) ((c)->cid.prod_name) 79#define mmc_card_name(c) ((c)->cid.prod_name)
65#define mmc_card_id(c) ((c)->dev.bus_id) 80#define mmc_card_id(c) ((c)->dev.bus_id)