aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2013-05-15 01:50:51 -0400
committerChris Ball <cjb@laptop.org>2013-06-06 07:40:48 -0400
commit19f1ba51c79f133aec3ce558b8292e3b081363f3 (patch)
tree536e66c0b06118c6ab4f4dcd485bdb302c3b5167 /drivers/mmc
parentb22ffdcd25d67a07f2b5a75a7805826bfe8597f1 (diff)
mmc: sh_mmcif: don't clear masked interrupts
Masking events on MMCIF means that an occurrence of the masked event won't raise an interrupt, but the event bit will still be set in the interrupt status register. If simultaneously a different event occurs which was enabled, both flags will be set. However, only the unmasked event bit should be cleared in the status register in such a case. Clearing also the masked bit can lead to lost interrupts, which indeed can be observed on the armadillo800eva r8a7740 board with an eMMC chip. The problem has been introduced by the recent "mmc: sh_mmcif: simplify IRQ processing" patch. Fix the problem by only clearing enabled interrupts. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Tested-by: Nguyen Viet Dung <nv-dung@jinso.co.jp> Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sh_mmcif.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 117a1f774720..8ef5efad45d0 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -1244,7 +1244,8 @@ static irqreturn_t sh_mmcif_intr(int irq, void *dev_id)
1244 u32 state; 1244 u32 state;
1245 1245
1246 state = sh_mmcif_readl(host->addr, MMCIF_CE_INT); 1246 state = sh_mmcif_readl(host->addr, MMCIF_CE_INT);
1247 sh_mmcif_writel(host->addr, MMCIF_CE_INT, ~state); 1247 sh_mmcif_writel(host->addr, MMCIF_CE_INT,
1248 ~(state & sh_mmcif_readl(host->addr, MMCIF_CE_INT_MASK)));
1248 sh_mmcif_bitclr(host, MMCIF_CE_INT_MASK, state & MASK_CLEAN); 1249 sh_mmcif_bitclr(host, MMCIF_CE_INT_MASK, state & MASK_CLEAN);
1249 1250
1250 if (state & ~MASK_CLEAN) 1251 if (state & ~MASK_CLEAN)