aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorLudovic Barre <ludovic.barre@stericsson.com>2011-02-18 15:00:26 +0100
committerSebastian RASMUSSEN <sebastian.rasmussen@stericsson.com>2011-04-07 16:06:44 +0200
commit745f9f21e31bf8684b4c4e270883137aa830cba5 (patch)
treee0b80b34505e0e3151dfd13feee1e150956e5df5 /drivers/mmc
parent8123700cb85ac44506223688e4df0f1e174237f9 (diff)
mmci: sdio adaptation
ST-Ericsson Linux next: N/A ST-Ericsson ID: - ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Ie9f992e1be89d60c0505014b1944987cda523c1c Signed-off-by: Ludovic Barre <ludovic.barre@stericsson.com> Change-Id: Ie9f992e1be89d60c0505014b1944987cda523c1c Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/17182 Reviewed-by: Sebastian RASMUSSEN <sebastian.rasmussen@stericsson.com> Tested-by: Sebastian RASMUSSEN <sebastian.rasmussen@stericsson.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mmci.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 4ea24d5e049..f89aa0d55a8 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1289,7 +1289,8 @@ static int mmci_enable(struct mmc_host *mmc)
* register to enable SDIO mode. This bit must be set otherwise
* no SDIO interrupts can be received.
*/
- writel(MCI_ST_DPSM_SDIOEN, host->base + MMCIDATACTRL);
+ host->mmci_datactrl = MCI_ST_DPSM_SDIOEN;
+ writel(host->mmci_datactrl, host->base + MMCIDATACTRL);
}
/* Restore registers for POWER and CLOCK. */
@@ -1360,17 +1361,21 @@ static irqreturn_t mmci_cd_irq(int irq, void *dev_id)
static void mmci_enable_sdio_irq(struct mmc_host *mmc, int enable)
{
unsigned long flags;
- unsigned int mask0;
struct mmci_host *host = mmc_priv(mmc);
spin_lock_irqsave(&host->lock, flags);
- mask0 = readl(host->base + MMCIMASK0);
- if (enable)
- mask0 |= MCI_SDIOIT;
- else
- mask0 &= ~MCI_SDIOIT;
- writel(mask0, host->base + MMCIMASK0);
+ if (enable) {
+ /*
+ * Since the host is not claimed when doing enable
+ * we must handle it here.
+ */
+ host->mmci_mask0 |= MCI_SDIOITMASK;
+ } else {
+ /* We assumes the host is claimed when doing disable. */
+ host->mmci_mask0 &= ~MCI_SDIOITMASK;
+ }
+ enable_imasks(host);
spin_unlock_irqrestore(&host->lock, flags);
}