[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220520081120.143927-1-benchuanggli@gmail.com>
Date: Fri, 20 May 2022 16:11:20 +0800
From: Ben Chuang <benchuanggli@...il.com>
To: andrian.hunter@...el.com, ulf.hansson@...aro.org
Cc: linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
ben.chuang@...esyslogic.com.tw, greg.tu@...esyslogic.com.tw,
SeanHY.Chen@...esyslogic.com.tw, jason.lai@...esyslogic.com.tw,
victor.shih@...esyslogic.com.tw,
kana.chen@...el.corp-partner.google.com,
Ben Chuang <benchuanggli@...il.com>
Subject: [PATCH] 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@...il.com>
---
drivers/mmc/host/sdhci-pci-gli.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/mmc/host/sdhci-pci-gli.c b/drivers/mmc/host/sdhci-pci-gli.c
index d09728c37d03..d81e5dc90e15 100644
--- a/drivers/mmc/host/sdhci-pci-gli.c
+++ b/drivers/mmc/host/sdhci-pci-gli.c
@@ -972,6 +972,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;
--
2.36.0
Powered by blists - more mailing lists