mmc: tmio_mmc: Fixup system PM suspend lock-up
authorUlf Hansson <ulf.hansson@linaro.org>
Mon, 25 Aug 2014 10:28:20 +0000 (12:28 +0200)
committerSimon Horman <horms+renesas@verge.net.au>
Fri, 5 Dec 2014 01:39:25 +0000 (10:39 +0900)
At system PM suspend, the tmio core accessed the internal registers of
the controller without first moving the device into active state. This
caused a lock-up in system PM suspend phase.

The reason for the register access were masking of IRQs. Since that is
managed via the runtime PM suspend path, let's just re-use that path
for system PM suspend.

In other words force the device into runtime PM suspend state at system
PM suspend and restore it to active state at system PM resume.

Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
(cherry picked from commit 70a15e1a3c58ee841415c84170b80a3859027686)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/mmc/host/tmio_mmc.c

index 58f50ef..659028d 100644 (file)
@@ -30,7 +30,7 @@ static int tmio_mmc_suspend(struct device *dev)
        const struct mfd_cell *cell = mfd_get_cell(pdev);
        int ret;
 
-       ret = tmio_mmc_host_suspend(dev);
+       ret = pm_runtime_force_suspend(dev);
 
        /* Tell MFD core it can disable us now.*/
        if (!ret && cell->disable)
@@ -50,7 +50,7 @@ static int tmio_mmc_resume(struct device *dev)
                ret = cell->resume(pdev);
 
        if (!ret)
-               ret = tmio_mmc_host_resume(dev);
+               ret = pm_runtime_force_resume(dev);
 
        return ret;
 }