mirror of
https://github.com/torvalds/linux.git
synced 2026-11-28 01:13:11 +00:00
mmc: sdhci-pci-gli: A workaround to allow GL9755 to enter ASPM L1.2
When GL9755 enters ASPM L1 sub-states, it will stay at L1.1 and will not enter L1.2. The workaround is to toggle PM state to allow GL9755 to enter ASPM L1.2. Signed-off-by: Ben Chuang <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
This commit is contained in:
@@ -142,6 +142,9 @@
|
||||
#define PCI_GLI_9755_MISC 0x78
|
||||
#define PCI_GLI_9755_MISC_SSC_OFF BIT(26)
|
||||
|
||||
#define PCI_GLI_9755_PM_CTRL 0xFC
|
||||
#define PCI_GLI_9755_PM_STATE GENMASK(1, 0)
|
||||
|
||||
#define GLI_MAX_TUNING_LOOP 40
|
||||
|
||||
/* Genesys Logic chipset */
|
||||
@@ -676,6 +679,13 @@ static void gl9755_hw_setting(struct sdhci_pci_slot *slot)
|
||||
GLI_9755_CFG2_L1DLY_VALUE);
|
||||
pci_write_config_dword(pdev, PCI_GLI_9755_CFG2, value);
|
||||
|
||||
/* toggle PM state to allow GL9755 to enter ASPM L1.2 */
|
||||
pci_read_config_dword(pdev, PCI_GLI_9755_PM_CTRL, &value);
|
||||
value |= PCI_GLI_9755_PM_STATE;
|
||||
pci_write_config_dword(pdev, PCI_GLI_9755_PM_CTRL, value);
|
||||
value &= ~PCI_GLI_9755_PM_STATE;
|
||||
pci_write_config_dword(pdev, PCI_GLI_9755_PM_CTRL, value);
|
||||
|
||||
gl9755_wt_off(pdev);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user