diff options
author | Ludovic Desroches <ludovic.desroches@atmel.com> | 2012-02-09 05:55:29 -0500 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-02-13 20:39:05 -0500 |
commit | 18ee684b8ab666329e0a0a72d8b70f16fb0e2243 (patch) | |
tree | f7d12e7061397d3b2c3747572f84cd19e504a75a /drivers/mmc | |
parent | 00d9ac08757049f334803b3d4dd202a6b1687dab (diff) |
mmc: atmel-mci: save and restore sdioirq when soft reset is performed
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 <ludovic.desroches@atmel.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/atmel-mci.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index fcfe1eb5acc8..6985cdb0bb26 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c | |||
@@ -969,11 +969,14 @@ static void atmci_start_request(struct atmel_mci *host, | |||
969 | host->data_status = 0; | 969 | host->data_status = 0; |
970 | 970 | ||
971 | if (host->need_reset) { | 971 | if (host->need_reset) { |
972 | iflags = atmci_readl(host, ATMCI_IMR); | ||
973 | iflags &= (ATMCI_SDIOIRQA | ATMCI_SDIOIRQB); | ||
972 | atmci_writel(host, ATMCI_CR, ATMCI_CR_SWRST); | 974 | atmci_writel(host, ATMCI_CR, ATMCI_CR_SWRST); |
973 | atmci_writel(host, ATMCI_CR, ATMCI_CR_MCIEN); | 975 | atmci_writel(host, ATMCI_CR, ATMCI_CR_MCIEN); |
974 | atmci_writel(host, ATMCI_MR, host->mode_reg); | 976 | atmci_writel(host, ATMCI_MR, host->mode_reg); |
975 | if (host->caps.has_cfg_reg) | 977 | if (host->caps.has_cfg_reg) |
976 | atmci_writel(host, ATMCI_CFG, host->cfg_reg); | 978 | atmci_writel(host, ATMCI_CFG, host->cfg_reg); |
979 | atmci_writel(host, ATMCI_IER, iflags); | ||
977 | host->need_reset = false; | 980 | host->need_reset = false; |
978 | } | 981 | } |
979 | atmci_writel(host, ATMCI_SDCR, slot->sdc_reg); | 982 | atmci_writel(host, ATMCI_SDCR, slot->sdc_reg); |