linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/5] PCI: qcom: Add system suspend & resume support
@ 2022-09-09  8:44 Krishna chaitanya chundru
  2022-09-09  8:44 ` [PATCH v6 1/5] PCI: qcom: Add system suspend and " Krishna chaitanya chundru
                   ` (6 more replies)
  0 siblings, 7 replies; 36+ messages in thread
From: Krishna chaitanya chundru @ 2022-09-09  8:44 UTC (permalink / raw)
  To: helgaas
  Cc: linux-pci, linux-arm-msm, linux-kernel, mka, quic_vbadigan,
	quic_hemantk, quic_nitegupt, quic_skananth, quic_ramkri,
	manivannan.sadhasivam, swboyd, dmitry.baryshkov,
	Krishna chaitanya chundru

Add suspend and resume syscore ops.

When system suspends, and if the link is in L1ss, disable the clocks
and power down the phy so that system enters into low power state by
parking link in L1ss to save the maximum power. And when the system
resumes, enable the clocks back and power on phy if they are disabled
in the suspend path.

we are doing this only when link is in l1ss but not in L2/L3 as
nowhere we are forcing link to L2/L3 by sending PME turn off.

is_suspended flag indicates if the clocks are disabled in the suspend
path or not.

There is access to Ep PCIe space to mask MSI/MSIX after pm suspend ops
(getting hit by affinity changes while making CPUs offline during suspend,
this will happen after devices are suspended (all phases of suspend ops)).
When registered with pm ops there is a crash due to un-clocked access,
as in the pm suspend op clocks are disabled. So, registering with syscore
ops which will called after making CPUs offline.

Make GDSC always on to ensure controller and its dependent clocks
won't go down during system suspend.

Krishna chaitanya chundru (5):
  PCI: qcom: Add system suspend and resume support
  PCI: qcom: Add retry logic for link to be stable in L1ss
  phy: core: Add support for phy power down & power up
  phy: qcom: Add power down/up callbacks to pcie phy
  clk: qcom: Alwaya on pcie gdsc

 drivers/clk/qcom/gcc-sc7280.c            |   2 +-
 drivers/pci/controller/dwc/pcie-qcom.c   | 156 ++++++++++++++++++++++++++++++-
 drivers/phy/phy-core.c                   |  30 ++++++
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c |  50 ++++++++++
 include/linux/phy/phy.h                  |  20 ++++
 5 files changed, 256 insertions(+), 2 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2022-09-20 10:00 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-09  8:44 [PATCH v6 0/5] PCI: qcom: Add system suspend & resume support Krishna chaitanya chundru
2022-09-09  8:44 ` [PATCH v6 1/5] PCI: qcom: Add system suspend and " Krishna chaitanya chundru
2022-09-09 17:31   ` Matthias Kaehlcke
2022-09-12 16:06     ` Krishna Chaitanya Chundru
2022-09-12 16:54       ` Matthias Kaehlcke
2022-09-12 17:09     ` Manivannan Sadhasivam
2022-09-09  8:44 ` [PATCH v6 2/5] PCI: qcom: Add retry logic for link to be stable in L1ss Krishna chaitanya chundru
2022-09-09 19:50   ` Bjorn Helgaas
2022-09-12 16:09     ` Krishna Chaitanya Chundru
2022-09-12 17:33       ` Manivannan Sadhasivam
2022-09-13 14:24         ` Krishna Chaitanya Chundru
2022-09-13 16:39           ` Manivannan Sadhasivam
2022-09-14  1:45             ` Krishna Chaitanya Chundru
2022-09-14  5:59               ` Manivannan Sadhasivam
2022-09-19 16:23   ` kernel test robot
2022-09-09  8:44 ` [PATCH v6 3/5] phy: core: Add support for phy power down & power up Krishna chaitanya chundru
2022-09-09  9:04   ` Dmitry Baryshkov
2022-09-14 14:50     ` Krishna Chaitanya Chundru
2022-09-19 17:29       ` Dmitry Baryshkov
2022-09-20  9:41         ` Krishna Chaitanya Chundru
2022-09-13 14:58   ` Vinod Koul
2022-09-13 16:41     ` Bjorn Helgaas
2022-09-09  8:44 ` [PATCH v6 4/5] phy: qcom: Add power down/up callbacks to pcie phy Krishna chaitanya chundru
2022-09-09  8:44 ` [PATCH v6 5/5] clk: qcom: Alwaya on pcie gdsc Krishna chaitanya chundru
2022-09-12 17:04   ` Manivannan Sadhasivam
2022-09-13  6:42     ` Rajendra Nayak
2022-09-13 16:42       ` Manivannan Sadhasivam
2022-09-14  1:47         ` Krishna Chaitanya Chundru
2022-09-13 16:34     ` Bjorn Helgaas
2022-09-14  1:48       ` Krishna Chaitanya Chundru
2022-09-09 19:51 ` [PATCH v6 0/5] PCI: qcom: Add system suspend & resume support Bjorn Helgaas
2022-09-12 16:10   ` Krishna Chaitanya Chundru
2022-09-12 17:08     ` Bjorn Helgaas
2022-09-12 17:21       ` Manivannan Sadhasivam
2022-09-12 17:37 ` Manivannan Sadhasivam
2022-09-14  1:47   ` Krishna Chaitanya Chundru

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).