diff options
author | Ben Chuang <benchuanggli@gmail.com> | 2022-05-20 19:42:42 +0800 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2022-05-31 15:31:39 +0200 |
commit | 291e7d52d19f114cad6cbf802f3f19ef12a011f8 (patch) | |
tree | dba6262d628a14d6d149a8bf65401ca61c5c8c0c /drivers/mmc | |
parent | b00ed48bb0a7c295facf9036135a573a5cdbe7de (diff) | |
download | linux-291e7d52d19f114cad6cbf802f3f19ef12a011f8.tar.bz2 |
mmc: sdhci-pci-gli: Fix GL9763E runtime PM when the system resumes from suspend
When the system resumes from suspend (S3 or S4), the power mode is
MMC_POWER_OFF. In this status, gl9763e_runtime_resume() should not enable
PLL. Add a condition to this function to enable PLL only when the power
mode is MMC_POWER_ON.
Fixes: d607667bb8fa (mmc: sdhci-pci-gli: Add runtime PM for GL9763E)
Signed-off-by: Ben Chuang <benchuanggli@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220520114242.150235-1-benchuanggli@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-pci-gli.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-pci-gli.c b/drivers/mmc/host/sdhci-pci-gli.c index 1499a64ec3aa..f13c08db3da5 100644 --- a/drivers/mmc/host/sdhci-pci-gli.c +++ b/drivers/mmc/host/sdhci-pci-gli.c @@ -982,6 +982,9 @@ static int gl9763e_runtime_resume(struct sdhci_pci_chip *chip) struct sdhci_host *host = slot->host; u16 clock; + if (host->mmc->ios.power_mode != MMC_POWER_ON) + return 0; + clock = sdhci_readw(host, SDHCI_CLOCK_CONTROL); clock |= SDHCI_CLOCK_PLL_EN; |