aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/omap_hsmmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/omap_hsmmc.c')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index e97fb9cb24d5..5167e55c0849 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1998,7 +1998,6 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
1998 const struct of_device_id *match; 1998 const struct of_device_id *match;
1999 dma_cap_mask_t mask; 1999 dma_cap_mask_t mask;
2000 unsigned tx_req, rx_req; 2000 unsigned tx_req, rx_req;
2001 struct pinctrl *pinctrl;
2002 const struct omap_mmc_of_data *data; 2001 const struct omap_mmc_of_data *data;
2003 void __iomem *base; 2002 void __iomem *base;
2004 2003
@@ -2212,11 +2211,6 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
2212 2211
2213 omap_hsmmc_disable_irq(host); 2212 omap_hsmmc_disable_irq(host);
2214 2213
2215 pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
2216 if (IS_ERR(pinctrl))
2217 dev_warn(&pdev->dev,
2218 "pins are not configured from the driver\n");
2219
2220 /* 2214 /*
2221 * For now, only support SDIO interrupt if we have a separate 2215 * For now, only support SDIO interrupt if we have a separate
2222 * wake-up interrupt configured from device tree. This is because 2216 * wake-up interrupt configured from device tree. This is because
@@ -2418,10 +2412,15 @@ static int omap_hsmmc_runtime_suspend(struct device *dev)
2418 goto abort; 2412 goto abort;
2419 } 2413 }
2420 2414
2415 pinctrl_pm_select_idle_state(dev);
2416
2421 WARN_ON(host->flags & HSMMC_WAKE_IRQ_ENABLED); 2417 WARN_ON(host->flags & HSMMC_WAKE_IRQ_ENABLED);
2422 enable_irq(host->wake_irq); 2418 enable_irq(host->wake_irq);
2423 host->flags |= HSMMC_WAKE_IRQ_ENABLED; 2419 host->flags |= HSMMC_WAKE_IRQ_ENABLED;
2420 } else {
2421 pinctrl_pm_select_idle_state(dev);
2424 } 2422 }
2423
2425abort: 2424abort:
2426 spin_unlock_irqrestore(&host->irq_lock, flags); 2425 spin_unlock_irqrestore(&host->irq_lock, flags);
2427 return ret; 2426 return ret;
@@ -2445,9 +2444,14 @@ static int omap_hsmmc_runtime_resume(struct device *dev)
2445 host->flags &= ~HSMMC_WAKE_IRQ_ENABLED; 2444 host->flags &= ~HSMMC_WAKE_IRQ_ENABLED;
2446 } 2445 }
2447 2446
2447 pinctrl_pm_select_default_state(host->dev);
2448
2449 /* irq lost, if pinmux incorrect */
2448 OMAP_HSMMC_WRITE(host->base, STAT, STAT_CLEAR); 2450 OMAP_HSMMC_WRITE(host->base, STAT, STAT_CLEAR);
2449 OMAP_HSMMC_WRITE(host->base, ISE, CIRQ_EN); 2451 OMAP_HSMMC_WRITE(host->base, ISE, CIRQ_EN);
2450 OMAP_HSMMC_WRITE(host->base, IE, CIRQ_EN); 2452 OMAP_HSMMC_WRITE(host->base, IE, CIRQ_EN);
2453 } else {
2454 pinctrl_pm_select_default_state(host->dev);
2451 } 2455 }
2452 spin_unlock_irqrestore(&host->irq_lock, flags); 2456 spin_unlock_irqrestore(&host->irq_lock, flags);
2453 return 0; 2457 return 0;