mmc: sdhci-pci-gli: GL9767: Fix low power mode in the SD Express process
authorBen Chuang <ben.chuang@genesyslogic.com.tw>
Fri, 25 Oct 2024 06:00:17 +0000 (14:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Nov 2024 15:28:24 +0000 (16:28 +0100)
commit c4dedaaeb3f78d3718e9c1b1e4d972a6b99073cd upstream.

When starting the SD Express process, the low power negotiation mode will
be disabled, so we need to re-enable it after switching back to SD mode.

Fixes: 0e92aec2efa0 ("mmc: sdhci-pci-gli: Add support SD Express card for GL9767")
Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
Cc: stable@vger.kernel.org
Message-ID: <20241025060017.1663697-2-benchuanggli@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/sdhci-pci-gli.c

index 4c89ecd22ea1eb035e625e9d90e725d85c40590c..11c404374d79da2a1842488ab59ff182349457d7 100644 (file)
@@ -1078,6 +1078,9 @@ static int gl9767_init_sd_express(struct mmc_host *mmc, struct mmc_ios *ios)
                sdhci_writew(host, value, SDHCI_CLOCK_CONTROL);
        }
 
+       pci_read_config_dword(pdev, PCIE_GLI_9767_CFG, &value);
+       value &= ~PCIE_GLI_9767_CFG_LOW_PWR_OFF;
+       pci_write_config_dword(pdev, PCIE_GLI_9767_CFG, value);
        gl9767_vhs_read(pdev);
 
        return 0;