Loading arch/arm64/configs/vendor/lahaina_QGKI.config +1 −0 Original line number Diff line number Diff line Loading @@ -165,3 +165,4 @@ CONFIG_ADSPRPC_QGKI=y CONFIG_COMMON_CLK_QCOM_DEBUG=y CONFIG_QMP_DEBUGFS_CLIENT=y CONFIG_SDC_QTI=y CONFIG_PCI_QTI=y drivers/net/wireless/cnss2/pci.c +3 −3 Original line number Diff line number Diff line Loading @@ -2583,9 +2583,6 @@ static int cnss_pci_suspend_noirq(struct device *dev) if (driver_ops && driver_ops->suspend_noirq) ret = driver_ops->suspend_noirq(pci_dev); if (pci_priv->disable_pc && !pci_dev->state_saved) pci_save_state(pci_dev); out: return ret; } Loading Loading @@ -4401,6 +4398,9 @@ static int cnss_pci_probe(struct pci_dev *pci_dev, goto out; } #ifdef CONFIG_PCI_QTI pci_dev->no_d3hot = true; #endif pci_priv->pci_link_state = PCI_LINK_UP; pci_priv->plat_priv = plat_priv; pci_priv->pci_dev = pci_dev; Loading drivers/pci/controller/Kconfig +11 −0 Original line number Diff line number Diff line Loading @@ -303,5 +303,16 @@ config PCI_MSM If unsure, say N. config PCI_QTI tristate "Enable QTI specific code in PCI upstream driver" depends on QGKI default n help This configuration flag allows adding QTI specific code in PCI upstream driver. This macro guards the code against ABI breakage in PCI upstream driver. When this flag is enabled, it is safe to assume that the build is a Non GKI build. source "drivers/pci/controller/dwc/Kconfig" endmenu drivers/pci/pci-driver.c +26 −1 Original line number Diff line number Diff line Loading @@ -848,6 +848,12 @@ static int pci_pm_suspend_noirq(struct device *dev) } } #ifdef CONFIG_PCI_QTI /* if d3hot is not supported bail out */ if (pci_dev->no_d3hot) return 0; #endif if (pci_dev->skip_bus_pm) { /* * Either the device is a bridge with a child in D0 below it, or Loading Loading @@ -937,7 +943,11 @@ static int pci_pm_resume_noirq(struct device *dev) * configuration here and attempting to put them into D0 again is * pointless, so avoid doing that. */ if (!(pci_dev->skip_bus_pm && pm_suspend_no_platform())) if (!(pci_dev->skip_bus_pm && pm_suspend_no_platform()) #ifdef CONFIG_PCI_QTI && !pci_dev->no_d3hot #endif ) pci_pm_default_resume_early(pci_dev); pci_fixup_device(pci_fixup_resume_early, pci_dev); Loading Loading @@ -1320,6 +1330,12 @@ static int pci_pm_runtime_suspend(struct device *dev) return 0; } #ifdef CONFIG_PCI_QTI /* if d3hot is not supported bail out */ if (pci_dev->no_d3hot) return 0; #endif if (!pci_dev->state_saved) { pci_save_state(pci_dev); pci_finish_runtime_suspend(pci_dev); Loading @@ -1334,6 +1350,12 @@ static int pci_pm_runtime_resume(struct device *dev) struct pci_dev *pci_dev = to_pci_dev(dev); const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; #ifdef CONFIG_PCI_QTI /* we skipped d3hot processing so skip re-init */ if (pci_dev->no_d3hot) goto skip_restore; #endif /* * Restoring config space is necessary even if the device is not bound * to a driver because although we left it in D0, it may have gone to Loading @@ -1348,6 +1370,9 @@ static int pci_pm_runtime_resume(struct device *dev) pci_enable_wake(pci_dev, PCI_D0, false); pci_fixup_device(pci_fixup_resume, pci_dev); #ifdef CONFIG_PCI_QTI skip_restore: #endif if (pm && pm->runtime_resume) rc = pm->runtime_resume(dev); Loading include/linux/pci.h +3 −0 Original line number Diff line number Diff line Loading @@ -339,6 +339,9 @@ struct pci_dev { unsigned int d2_support:1; /* Low power state D2 is supported */ unsigned int no_d1d2:1; /* D1 and D2 are forbidden */ unsigned int no_d3cold:1; /* D3cold is forbidden */ #ifdef CONFIG_PCI_QTI unsigned int no_d3hot:1; /* D3hot is forbidden */ #endif unsigned int bridge_d3:1; /* Allow D3 for bridge */ unsigned int d3cold_allowed:1; /* D3cold is allowed by user */ unsigned int mmio_always_on:1; /* Disallow turning off io/mem Loading Loading
arch/arm64/configs/vendor/lahaina_QGKI.config +1 −0 Original line number Diff line number Diff line Loading @@ -165,3 +165,4 @@ CONFIG_ADSPRPC_QGKI=y CONFIG_COMMON_CLK_QCOM_DEBUG=y CONFIG_QMP_DEBUGFS_CLIENT=y CONFIG_SDC_QTI=y CONFIG_PCI_QTI=y
drivers/net/wireless/cnss2/pci.c +3 −3 Original line number Diff line number Diff line Loading @@ -2583,9 +2583,6 @@ static int cnss_pci_suspend_noirq(struct device *dev) if (driver_ops && driver_ops->suspend_noirq) ret = driver_ops->suspend_noirq(pci_dev); if (pci_priv->disable_pc && !pci_dev->state_saved) pci_save_state(pci_dev); out: return ret; } Loading Loading @@ -4401,6 +4398,9 @@ static int cnss_pci_probe(struct pci_dev *pci_dev, goto out; } #ifdef CONFIG_PCI_QTI pci_dev->no_d3hot = true; #endif pci_priv->pci_link_state = PCI_LINK_UP; pci_priv->plat_priv = plat_priv; pci_priv->pci_dev = pci_dev; Loading
drivers/pci/controller/Kconfig +11 −0 Original line number Diff line number Diff line Loading @@ -303,5 +303,16 @@ config PCI_MSM If unsure, say N. config PCI_QTI tristate "Enable QTI specific code in PCI upstream driver" depends on QGKI default n help This configuration flag allows adding QTI specific code in PCI upstream driver. This macro guards the code against ABI breakage in PCI upstream driver. When this flag is enabled, it is safe to assume that the build is a Non GKI build. source "drivers/pci/controller/dwc/Kconfig" endmenu
drivers/pci/pci-driver.c +26 −1 Original line number Diff line number Diff line Loading @@ -848,6 +848,12 @@ static int pci_pm_suspend_noirq(struct device *dev) } } #ifdef CONFIG_PCI_QTI /* if d3hot is not supported bail out */ if (pci_dev->no_d3hot) return 0; #endif if (pci_dev->skip_bus_pm) { /* * Either the device is a bridge with a child in D0 below it, or Loading Loading @@ -937,7 +943,11 @@ static int pci_pm_resume_noirq(struct device *dev) * configuration here and attempting to put them into D0 again is * pointless, so avoid doing that. */ if (!(pci_dev->skip_bus_pm && pm_suspend_no_platform())) if (!(pci_dev->skip_bus_pm && pm_suspend_no_platform()) #ifdef CONFIG_PCI_QTI && !pci_dev->no_d3hot #endif ) pci_pm_default_resume_early(pci_dev); pci_fixup_device(pci_fixup_resume_early, pci_dev); Loading Loading @@ -1320,6 +1330,12 @@ static int pci_pm_runtime_suspend(struct device *dev) return 0; } #ifdef CONFIG_PCI_QTI /* if d3hot is not supported bail out */ if (pci_dev->no_d3hot) return 0; #endif if (!pci_dev->state_saved) { pci_save_state(pci_dev); pci_finish_runtime_suspend(pci_dev); Loading @@ -1334,6 +1350,12 @@ static int pci_pm_runtime_resume(struct device *dev) struct pci_dev *pci_dev = to_pci_dev(dev); const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; #ifdef CONFIG_PCI_QTI /* we skipped d3hot processing so skip re-init */ if (pci_dev->no_d3hot) goto skip_restore; #endif /* * Restoring config space is necessary even if the device is not bound * to a driver because although we left it in D0, it may have gone to Loading @@ -1348,6 +1370,9 @@ static int pci_pm_runtime_resume(struct device *dev) pci_enable_wake(pci_dev, PCI_D0, false); pci_fixup_device(pci_fixup_resume, pci_dev); #ifdef CONFIG_PCI_QTI skip_restore: #endif if (pm && pm->runtime_resume) rc = pm->runtime_resume(dev); Loading
include/linux/pci.h +3 −0 Original line number Diff line number Diff line Loading @@ -339,6 +339,9 @@ struct pci_dev { unsigned int d2_support:1; /* Low power state D2 is supported */ unsigned int no_d1d2:1; /* D1 and D2 are forbidden */ unsigned int no_d3cold:1; /* D3cold is forbidden */ #ifdef CONFIG_PCI_QTI unsigned int no_d3hot:1; /* D3hot is forbidden */ #endif unsigned int bridge_d3:1; /* Allow D3 for bridge */ unsigned int d3cold_allowed:1; /* D3cold is allowed by user */ unsigned int mmio_always_on:1; /* Disallow turning off io/mem Loading