]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
mmc: sdhci: allow clock enable in suspend sequence
authorBitan Biswas <bbiswas@nvidia.com>
Wed, 17 Feb 2016 12:24:10 +0000 (17:54 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Sun, 17 Jul 2016 21:00:22 +0000 (14:00 -0700)
Some host with SDHCI_QUIRK2_NON_STD_RTPM deviation
need to enable clock in the suspend sequence.
This change enables such platforms to
suspend properly.

bug 200155814

Change-Id: I37969748660965c4b4097837e9b9c6bb7a593b4e
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/1012839
(cherry picked from commit e27946db4cc054ab016459e3e16f3e68a51f0872)
Reviewed-on: http://git-master/r/1177603
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
drivers/mmc/host/sdhci.c

index 0343536dfcace762b4f7246876c776c98e0d169a..382bc127ed2791f53e7c3c0eed9e184c8bac7757 100644 (file)
@@ -3662,7 +3662,11 @@ int sdhci_suspend_host(struct sdhci_host *host)
        int ret;
        struct mmc_host *mmc = host->mmc;
 
-       host->suspend_task = current;
+       /* we need to enable clocks during
+        * mmc_suspend_host for SDHCI_QUIRK2_NON_STD_RTPM
+        */
+       if (!(host->quirks2 & SDHCI_QUIRK2_NON_STD_RTPM))
+               host->suspend_task = current;
 
        if (host->ops->platform_suspend)
                host->ops->platform_suspend(host);
@@ -3693,7 +3697,8 @@ int sdhci_suspend_host(struct sdhci_host *host)
 
                sdhci_enable_card_detection(host);
 
-               host->suspend_task = NULL;
+               if (!(host->quirks2 & SDHCI_QUIRK2_NON_STD_RTPM))
+                       host->suspend_task = NULL;
                return ret;
        }
        /* cancel delayed clk gate work */
@@ -3734,7 +3739,8 @@ int sdhci_suspend_host(struct sdhci_host *host)
                                host->ops->set_clock(host, 0);
        }
 
-       host->suspend_task = NULL;
+       if (!(host->quirks2 & SDHCI_QUIRK2_NON_STD_RTPM))
+               host->suspend_task = NULL;
 
        return ret;
 }