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 /drivers/mmc/core/sdio_irq.c | |
parent | 2b35bd83467df6f8284b9148d6f768148c3a5e5f (diff) |
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 'drivers/mmc/core/sdio_irq.c')
-rw-r--r-- | drivers/mmc/core/sdio_irq.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c index 3d8ceb4084de..aaa90460ed23 100644 --- a/drivers/mmc/core/sdio_irq.c +++ b/drivers/mmc/core/sdio_irq.c @@ -53,6 +53,17 @@ static int process_sdio_pending_irqs(struct mmc_host *host) return ret; } + if (pending && mmc_card_broken_irq_polling(card) && + !(host->caps & MMC_CAP_SDIO_IRQ)) { + unsigned char dummy; + + /* A fake interrupt could be created when we poll SDIO_CCCR_INTx + * register with a Marvell SD8797 card. A dummy CMD52 read to + * function 0 register 0xff can avoid this. + */ + mmc_io_rw_direct(card, 0, 0, 0xff, 0, &dummy); + } + count = 0; for (i = 1; i <= 7; i++) { if (pending & (1 << i)) { |