summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/mxs-mmc.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-09-25 13:41:02 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-09-25 13:41:02 +0100
commitac48f6cb5f268daff06b636444819e5ffb462611 (patch)
tree56bcc8b2de42738764ac65056067a17cb97609f4 /drivers/mmc/host/mxs-mmc.c
parente64d07a2dae569fc3c938adac777562a1d6f151e (diff)
parent5698bd757d55b1bb87edd1a9744ab09c142abfc2 (diff)
downloadlinux-ac48f6cb5f268daff06b636444819e5ffb462611.tar.gz
linux-ac48f6cb5f268daff06b636444819e5ffb462611.tar.bz2
linux-ac48f6cb5f268daff06b636444819e5ffb462611.zip
Merge tag 'v3.6-rc6' into spi-mxs
Linux 3.6-rc6 Conflicts (overlap between moving code that accesses registers around and factoring the register access out into a SSP layer): drivers/mmc/host/mxs-mmc.c
Diffstat (limited to 'drivers/mmc/host/mxs-mmc.c')
-rw-r--r--drivers/mmc/host/mxs-mmc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index 4da996654772..bb4c2bf04d09 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -197,11 +197,11 @@ static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id)
writel(stat & MXS_MMC_IRQ_BITS,
ssp->base + HW_SSP_CTRL1(ssp) + STMP_OFFSET_REG_CLR);
+ spin_unlock(&host->lock);
+
if ((stat & BM_SSP_CTRL1_SDIO_IRQ) && (stat & BM_SSP_CTRL1_SDIO_IRQ_EN))
mmc_signal_sdio_irq(host->mmc);
- spin_unlock(&host->lock);
-
if (stat & BM_SSP_CTRL1_RESP_TIMEOUT_IRQ)
cmd->error = -ETIMEDOUT;
else if (stat & BM_SSP_CTRL1_RESP_ERR_IRQ)
@@ -525,12 +525,7 @@ static void mxs_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
writel(BM_SSP_CTRL0_SDIO_IRQ_CHECK,
ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
writel(BM_SSP_CTRL1_SDIO_IRQ_EN,
- ssp->base + HW_SSP_CTRL1(ssp) + STMP_OFFSET_REG_SET);
-
- if (readl(ssp->base + HW_SSP_STATUS(ssp)) &
- BM_SSP_STATUS_SDIO_IRQ)
- mmc_signal_sdio_irq(host->mmc);
-
+ host->base + HW_SSP_CTRL1(host) + STMP_OFFSET_REG_SET);
} else {
writel(BM_SSP_CTRL0_SDIO_IRQ_CHECK,
ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
@@ -539,6 +534,11 @@ static void mxs_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
}
spin_unlock_irqrestore(&host->lock, flags);
+
+ if (enable && readl(ssp->base + HW_SSP_STATUS(ssp)) &
+ BM_SSP_STATUS_SDIO_IRQ)
+ mmc_signal_sdio_irq(host->mmc);
+
}
static const struct mmc_host_ops mxs_mmc_ops = {