Skip to contentSkip to conversation

mmc: sdhci-pci-gli: Fix GL9763E runtime PM when the system resumes from suspend

PATCH RESEND In review Ben Chuang 2 participants 3 messages May 20, 2022 – Jun 2, 2022

Subsystems (2)
lore
Share & tools
lore

Ben Chuang

author
#0 lore raw

PATCH RESEND 1/1 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)

---
Hi,

Sorry, resend this patch because typo two email addresses. Sorry for Adrian and Kane.

Best regards,
Ben

---
 drivers/mmc/host/sdhci-pci-gli.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/mmc/host/sdhci-pci-gli.c +3 -0
index d09728c37d03..d81e5dc90e15 100644
@@ -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;
Signature · 1 line
2.36.0
#1 lore raw
Quoted 8 lines · Ben Chuang

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)

Sorry for the delay, I have been out traveling. Unfortunately this didn't make it for v5.18, although I have queued it up for v5.19 and added a stable tag.

Thanks and kind regards
Uffe

Quoted 29 lines

---
Hi,

Sorry, resend this patch because typo two email addresses. Sorry for Adrian and Kane.

Best regards,
Ben

---
 drivers/mmc/host/sdhci-pci-gli.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/mmc/host/sdhci-pci-gli.c +3 -1
index d09728c37d03..d81e5dc90e15 100644
@@ -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

author
#2 lore raw
Quoted 11 lines · Ulf Hansson
Quoted 8 lines · Ben Chuang

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)
Quoted 7 lines

Sorry for the delay, I have been out traveling. Unfortunately this didn't make it for v5.18, although I have queued it up for v5.19 and added a stable tag.

Thanks and kind regards
Uffe

It's ok. Thank you for the explanation.

Best regards,
Ben

Quoted 30 lines
Quoted 30 lines

---
Hi,

Sorry, resend this patch because typo two email addresses. Sorry for Adrian and Kane.

Best regards,
Ben

---
 drivers/mmc/host/sdhci-pci-gli.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/mmc/host/sdhci-pci-gli.c +3 -1
index d09728c37d03..d81e5dc90e15 100644
@@ -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