aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-07 12:15:20 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-07 12:15:20 -0500
commit1afa471706963643ceeda7cbbe9c605a1e883d53 (patch)
tree90595cfe8f70f1307432993c59addd612dc4afef
parent18a2f371f5edf41810f6469cb9be39931ef9deb9 (diff)
parent91ab252ac5a5c3461dd6910797611e9172626aed (diff)
Merge tag 'mmc-fixes-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
Pull MMC fixes from Chris Ball: "Two small regression fixes: - sdhci-s3c: Fix runtime PM regression against 3.7-rc1 - sh-mmcif: Fix oops against 3.6" * tag 'mmc-fixes-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: mmc: sh-mmcif: avoid oops on spurious interrupts (second try) Revert misapplied "mmc: sh-mmcif: avoid oops on spurious interrupts" mmc: sdhci-s3c: fix missing clock for gpio card-detect
-rw-r--r--drivers/mmc/host/sdhci-s3c.c7
-rw-r--r--drivers/mmc/host/sh_mmcif.c8
2 files changed, 9 insertions, 6 deletions
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index a54dd5d7a5f9..c9ec725884e5 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -373,18 +373,25 @@ static struct sdhci_ops sdhci_s3c_ops = {
373static void sdhci_s3c_notify_change(struct platform_device *dev, int state) 373static void sdhci_s3c_notify_change(struct platform_device *dev, int state)
374{ 374{
375 struct sdhci_host *host = platform_get_drvdata(dev); 375 struct sdhci_host *host = platform_get_drvdata(dev);
376 struct sdhci_s3c *sc = sdhci_priv(host);
376 unsigned long flags; 377 unsigned long flags;
377 378
378 if (host) { 379 if (host) {
379 spin_lock_irqsave(&host->lock, flags); 380 spin_lock_irqsave(&host->lock, flags);
380 if (state) { 381 if (state) {
381 dev_dbg(&dev->dev, "card inserted.\n"); 382 dev_dbg(&dev->dev, "card inserted.\n");
383#ifdef CONFIG_PM_RUNTIME
384 clk_prepare_enable(sc->clk_io);
385#endif
382 host->flags &= ~SDHCI_DEVICE_DEAD; 386 host->flags &= ~SDHCI_DEVICE_DEAD;
383 host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION; 387 host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
384 } else { 388 } else {
385 dev_dbg(&dev->dev, "card removed.\n"); 389 dev_dbg(&dev->dev, "card removed.\n");
386 host->flags |= SDHCI_DEVICE_DEAD; 390 host->flags |= SDHCI_DEVICE_DEAD;
387 host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION; 391 host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
392#ifdef CONFIG_PM_RUNTIME
393 clk_disable_unprepare(sc->clk_io);
394#endif
388 } 395 }
389 tasklet_schedule(&host->card_tasklet); 396 tasklet_schedule(&host->card_tasklet);
390 spin_unlock_irqrestore(&host->lock, flags); 397 spin_unlock_irqrestore(&host->lock, flags);
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index d25bc97dc5c6..7eaee3eeb6b2 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -1104,7 +1104,6 @@ static irqreturn_t sh_mmcif_irqt(int irq, void *dev_id)
1104{ 1104{
1105 struct sh_mmcif_host *host = dev_id; 1105 struct sh_mmcif_host *host = dev_id;
1106 struct mmc_request *mrq = host->mrq; 1106 struct mmc_request *mrq = host->mrq;
1107 struct mmc_data *data = mrq->data;
1108 1107
1109 cancel_delayed_work_sync(&host->timeout_work); 1108 cancel_delayed_work_sync(&host->timeout_work);
1110 1109
@@ -1152,13 +1151,14 @@ static irqreturn_t sh_mmcif_irqt(int irq, void *dev_id)
1152 case MMCIF_WAIT_FOR_READ_END: 1151 case MMCIF_WAIT_FOR_READ_END:
1153 case MMCIF_WAIT_FOR_WRITE_END: 1152 case MMCIF_WAIT_FOR_WRITE_END:
1154 if (host->sd_error) 1153 if (host->sd_error)
1155 data->error = sh_mmcif_error_manage(host); 1154 mrq->data->error = sh_mmcif_error_manage(host);
1156 break; 1155 break;
1157 default: 1156 default:
1158 BUG(); 1157 BUG();
1159 } 1158 }
1160 1159
1161 if (host->wait_for != MMCIF_WAIT_FOR_STOP) { 1160 if (host->wait_for != MMCIF_WAIT_FOR_STOP) {
1161 struct mmc_data *data = mrq->data;
1162 if (!mrq->cmd->error && data && !data->error) 1162 if (!mrq->cmd->error && data && !data->error)
1163 data->bytes_xfered = 1163 data->bytes_xfered =
1164 data->blocks * data->blksz; 1164 data->blocks * data->blksz;
@@ -1231,10 +1231,6 @@ static irqreturn_t sh_mmcif_intr(int irq, void *dev_id)
1231 host->sd_error = true; 1231 host->sd_error = true;
1232 dev_dbg(&host->pd->dev, "int err state = %08x\n", state); 1232 dev_dbg(&host->pd->dev, "int err state = %08x\n", state);
1233 } 1233 }
1234 if (host->state == STATE_IDLE) {
1235 dev_info(&host->pd->dev, "Spurious IRQ status 0x%x", state);
1236 return IRQ_HANDLED;
1237 }
1238 if (state & ~(INT_CMD12RBE | INT_CMD12CRE)) { 1234 if (state & ~(INT_CMD12RBE | INT_CMD12CRE)) {
1239 if (!host->dma_active) 1235 if (!host->dma_active)
1240 return IRQ_WAKE_THREAD; 1236 return IRQ_WAKE_THREAD;