aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/mmci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/mmci.c')
-rw-r--r--drivers/mmc/host/mmci.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index d135c76c4855..f32057972dd7 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1730,37 +1730,28 @@ static int mmci_suspend(struct device *dev)
1730{ 1730{
1731 struct amba_device *adev = to_amba_device(dev); 1731 struct amba_device *adev = to_amba_device(dev);
1732 struct mmc_host *mmc = amba_get_drvdata(adev); 1732 struct mmc_host *mmc = amba_get_drvdata(adev);
1733 int ret = 0;
1734 1733
1735 if (mmc) { 1734 if (mmc) {
1736 struct mmci_host *host = mmc_priv(mmc); 1735 struct mmci_host *host = mmc_priv(mmc);
1737 1736 pm_runtime_get_sync(dev);
1738 ret = mmc_suspend_host(mmc); 1737 writel(0, host->base + MMCIMASK0);
1739 if (ret == 0) {
1740 pm_runtime_get_sync(dev);
1741 writel(0, host->base + MMCIMASK0);
1742 }
1743 } 1738 }
1744 1739
1745 return ret; 1740 return 0;
1746} 1741}
1747 1742
1748static int mmci_resume(struct device *dev) 1743static int mmci_resume(struct device *dev)
1749{ 1744{
1750 struct amba_device *adev = to_amba_device(dev); 1745 struct amba_device *adev = to_amba_device(dev);
1751 struct mmc_host *mmc = amba_get_drvdata(adev); 1746 struct mmc_host *mmc = amba_get_drvdata(adev);
1752 int ret = 0;
1753 1747
1754 if (mmc) { 1748 if (mmc) {
1755 struct mmci_host *host = mmc_priv(mmc); 1749 struct mmci_host *host = mmc_priv(mmc);
1756
1757 writel(MCI_IRQENABLE, host->base + MMCIMASK0); 1750 writel(MCI_IRQENABLE, host->base + MMCIMASK0);
1758 pm_runtime_put(dev); 1751 pm_runtime_put(dev);
1759
1760 ret = mmc_resume_host(mmc);
1761 } 1752 }
1762 1753
1763 return ret; 1754 return 0;
1764} 1755}
1765#endif 1756#endif
1766 1757