diff options
author | Bing Zhao <bzhao@marvell.com> | 2013-11-26 15:39:20 -0800 |
---|---|---|
committer | Chris Ball <chris@printf.net> | 2014-01-17 22:55:01 -0500 |
commit | e5624054c1726a16c13a89c08b2792aba3df06eb (patch) | |
tree | 2f54f5abf6337ed1571e6dd872a2e32164382f70 /include/linux/mmc | |
parent | 2b35bd83467df6f8284b9148d6f768148c3a5e5f (diff) | |
download | op-kernel-dev-e5624054c1726a16c13a89c08b2792aba3df06eb.zip op-kernel-dev-e5624054c1726a16c13a89c08b2792aba3df06eb.tar.gz |
mmc: sdio: add a quirk for broken SDIO_CCCR_INTx polling
Polling SDIO_CCCR_INTx could create a fake interrupt with Marvell
SD8797 card. Add a quirk to handle this case. The fixup here is
to issue a dummy CMD52 read to function 0 register 0xff, and this
dummy read must be right after SDIO_CCCR_INTx is read.
Patch has been verified on a dw_mmc controller (Samsung Chromebook)
with MMC_CAP_SDIO_IRQ disabled.
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r-- | include/linux/mmc/card.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 176fdf8..b730272 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -271,9 +271,10 @@ struct mmc_card { #define MMC_QUIRK_INAND_CMD38 (1<<6) /* iNAND devices have broken CMD38 */ #define MMC_QUIRK_BLK_NO_CMD23 (1<<7) /* Avoid CMD23 for regular multiblock */ #define MMC_QUIRK_BROKEN_BYTE_MODE_512 (1<<8) /* Avoid sending 512 bytes in */ + /* byte mode */ #define MMC_QUIRK_LONG_READ_TIME (1<<9) /* Data read time > CSD says */ #define MMC_QUIRK_SEC_ERASE_TRIM_BROKEN (1<<10) /* Skip secure for erase/trim */ - /* byte mode */ +#define MMC_QUIRK_BROKEN_IRQ_POLLING (1<<11) /* Polling SDIO_CCCR_INTx could create a fake interrupt */ unsigned int erase_size; /* erase size in sectors */ unsigned int erase_shift; /* if erase unit is power 2 */ @@ -505,6 +506,11 @@ static inline int mmc_card_long_read_time(const struct mmc_card *c) return c->quirks & MMC_QUIRK_LONG_READ_TIME; } +static inline int mmc_card_broken_irq_polling(const struct mmc_card *c) +{ + return c->quirks & MMC_QUIRK_BROKEN_IRQ_POLLING; +} + #define mmc_card_name(c) ((c)->cid.prod_name) #define mmc_card_id(c) (dev_name(&(c)->dev)) |