aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmc/card.h
diff options
context:
space:
mode:
authorBing Zhao <bzhao@marvell.com>2010-03-05 16:43:25 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-06 14:26:36 -0500
commit3fb7fb4a01d09f81d1daaf65e52d929734bd691f (patch)
tree8feac2d211f833fc1ef287aba3b138886454f45c /include/linux/mmc/card.h
parent729adf1b5f4562f67fe8bf6c1df97edc1128fac7 (diff)
sdio: add quirk to clamp byte mode transfer
Some SDIO cards expect byte transfers not to exceed the configured block transfer size. Add a quirk to that effect. Patches to make use of this quirk will be sent separately. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Nicolas Pitre <nico@marvell.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 2ee22e8af110..d02d2c6e0cfe 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -99,6 +99,8 @@ struct mmc_card {
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 */ 100 unsigned int quirks; /* card quirks */
101#define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */ 101#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 */
103 /* for byte mode */
102 104
103 u32 raw_cid[4]; /* raw card CID */ 105 u32 raw_cid[4]; /* raw card CID */
104 u32 raw_csd[4]; /* raw card CSD */ 106 u32 raw_csd[4]; /* raw card CSD */
@@ -139,6 +141,11 @@ static inline int mmc_card_lenient_fn0(const struct mmc_card *c)
139 return c->quirks & MMC_QUIRK_LENIENT_FN0; 141 return c->quirks & MMC_QUIRK_LENIENT_FN0;
140} 142}
141 143
144static inline int mmc_blksz_for_byte_mode(const struct mmc_card *c)
145{
146 return c->quirks & MMC_QUIRK_BLKSZ_FOR_BYTE_MODE;
147}
148
142#define mmc_card_name(c) ((c)->cid.prod_name) 149#define mmc_card_name(c) ((c)->cid.prod_name)
143#define mmc_card_id(c) (dev_name(&(c)->dev)) 150#define mmc_card_id(c) (dev_name(&(c)->dev))
144 151