mmc: sdhci-pci-gli: Use pci_set_power_state(), not direct PMCSR writes
authorBjorn Helgaas <bhelgaas@google.com>
Wed, 27 Mar 2024 21:48:31 +0000 (16:48 -0500)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 2 Apr 2024 10:34:06 +0000 (12:34 +0200)
commitf9b17ffcb52307fec34bf613a313ec087347cbb8
tree95faccb429d35e411a06cbd43093b9c695ab5803
parent951b7ccc54591ba48755b5e0c7fc8b9623a64640
mmc: sdhci-pci-gli: Use pci_set_power_state(), not direct PMCSR writes

d7133797e9e1 ("mmc: sdhci-pci-gli: A workaround to allow GL9750 to enter
ASPM L1.2") and 36ed2fd32b2c ("mmc: sdhci-pci-gli: A workaround to allow
GL9755 to enter ASPM L1.2") added writes to the Control register in the
Power Management Capability to put the device in D3hot and back to D0.

Use the pci_set_power_state() interface instead because these are generic
operations that don't need to be driver-specific.  Also, the PCI spec
requires some delays after these power transitions, and
pci_set_power_state() takes care of those, while d7133797e9e1 and
36ed2fd32b2c did not.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
Link: https://lore.kernel.org/r/20240327214831.1544595-3-helgaas@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-pci-gli.c