aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmc/card.h
diff options
context:
space:
mode:
authorOhad Ben-Cohen <ohad@wizery.com>2009-09-22 19:45:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 10:39:37 -0400
commit7c979ec7135d96bbff34790bf4b85a8508ede7fc (patch)
tree7844a33af78db54561e2bf7d5d11d48885d3b03b /include/linux/mmc/card.h
parentad1e597d4199ffcdee04b9fb402e45c5be6a5052 (diff)
sdio: add MMC_QUIRK_LENIENT_FN0
Normally writes to SDIO function 0 outside the vendor specific CCCR registers are prohibited. To support embedded devices that require writes to SDIO function 0 outside this range (e.g. TI WL127x embedded sdio wifi device), MMC_QUIRK_LENIENT_FN0 is introduced. A card quirks field is added to `struct mmc_card' to support non-standard devices (e.g. embedded sdio devices). [akpm@linux-foundation.org: code in C, not cpp!] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mmc/card.h')
-rw-r--r--include/linux/mmc/card.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 00db39cceadc..2ee22e8af110 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -97,6 +97,8 @@ struct mmc_card {
97#define MMC_STATE_READONLY (1<<1) /* card is read-only */ 97#define MMC_STATE_READONLY (1<<1) /* card is read-only */
98#define MMC_STATE_HIGHSPEED (1<<2) /* card is in high speed mode */ 98#define MMC_STATE_HIGHSPEED (1<<2) /* card is in high speed mode */
99#define MMC_STATE_BLOCKADDR (1<<3) /* card uses block-addressing */ 99#define MMC_STATE_BLOCKADDR (1<<3) /* card uses block-addressing */
100 unsigned int quirks; /* card quirks */
101#define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */
100 102
101 u32 raw_cid[4]; /* raw card CID */ 103 u32 raw_cid[4]; /* raw card CID */
102 u32 raw_csd[4]; /* raw card CSD */ 104 u32 raw_csd[4]; /* raw card CSD */
@@ -132,6 +134,11 @@ struct mmc_card {
132#define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED) 134#define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED)
133#define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR) 135#define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR)
134 136
137static inline int mmc_card_lenient_fn0(const struct mmc_card *c)
138{
139 return c->quirks & MMC_QUIRK_LENIENT_FN0;
140}
141
135#define mmc_card_name(c) ((c)->cid.prod_name) 142#define mmc_card_name(c) ((c)->cid.prod_name)
136#define mmc_card_id(c) (dev_name(&(c)->dev)) 143#define mmc_card_id(c) (dev_name(&(c)->dev))
137 144