From: Ludovic Desroches Date: Thu, 9 Feb 2012 10:55:29 +0000 (+0100) Subject: mmc: atmel-mci: save and restore sdioirq when soft reset is performed X-Git-Tag: v3.2.7~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b207384ec8dd38b408be6c29bcf7a3484771c34e;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git mmc: atmel-mci: save and restore sdioirq when soft reset is performed commit 18ee684b8ab666329e0a0a72d8b70f16fb0e2243 upstream. Sometimes a software reset is needed. Then some registers are saved and restored but the interrupt mask register is missing. It causes issues with sdio devices whose interrupts are masked after reset. Signed-off-by: Ludovic Desroches Signed-off-by: Nicolas Ferre Signed-off-by: Chris Ball Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index a7ee502..72bc756 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -965,11 +965,14 @@ static void atmci_start_request(struct atmel_mci *host, host->data_status = 0; if (host->need_reset) { + iflags = atmci_readl(host, ATMCI_IMR); + iflags &= (ATMCI_SDIOIRQA | ATMCI_SDIOIRQB); atmci_writel(host, ATMCI_CR, ATMCI_CR_SWRST); atmci_writel(host, ATMCI_CR, ATMCI_CR_MCIEN); atmci_writel(host, ATMCI_MR, host->mode_reg); if (host->caps.has_cfg_reg) atmci_writel(host, ATMCI_CFG, host->cfg_reg); + atmci_writel(host, ATMCI_IER, iflags); host->need_reset = false; } atmci_writel(host, ATMCI_SDCR, slot->sdc_reg);