Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] PCI: meson: Add system suspend/resume support
@ 2026-11-14 22:12 Igor Velkov via B4 Relay
  2026-11-14 22:12 ` [PATCH 1/2] PCI: meson: Power the PHY on and reset the controller in host .init Igor Velkov via B4 Relay
  2026-11-14 22:12 ` [PATCH 2/2] PCI: meson: Add system suspend/resume support Igor Velkov via B4 Relay
  0 siblings, 2 replies; 5+ messages in thread
From: Igor Velkov via B4 Relay @ 2026-11-14 22:12 UTC (permalink / raw)
  To: Yue Wang, Lorenzo Pieralisi, Krzysztof Wilczyński,
	Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas, Neil Armstrong,
	Kevin Hilman, Jerome Brunet, Martin Blumenstingl
  Cc: linux-pci, linux-amlogic, linux-arm-kernel, linux-kernel,
	Igor Velkov

On SM1 the PCIe controller loses power in system suspend and the driver
has no PM callbacks, so the first config access after resume hangs the
CPU; on ODROID-HC4 s2idle never returns.

Patch 1 moves the PHY power on and the resets into the host .init and
.deinit callbacks.  Patch 2 adds noirq suspend/resume through the DWC
helpers, for SM1 only.

Tested on ODROID-HC4 (SM1, ASM1061 SATA with two disks behind the port)
on an Armbian v7.4-rc2 kernel with this series, which also carries
Hans Zhang's pending MPS series (v9): 20 s2idle and 20 suspend-to-RAM
cycles, the link back at Gen2 x1 and the disk readable after each.
Suspend-to-RAM woke on the VRTC alarm via a patched BL301; the stock
firmware has no timer wake on this board.

Not tested on G12A, G12B or AXG.  There patch 1 changes probe and
remove, and patch 2 leaves suspend alone.

After a failed resume, dw_pcie_suspend_noirq() calls .deinit a second
time; pci-imx6 and pcie-rcar-gen4 have no guard against it.  Patch 2
guards with a flag; I can fix it in the DWC core instead if preferred.

Signed-off-by: Igor Velkov <iav@iav.lv>
---
Igor Velkov (2):
      PCI: meson: Power the PHY on and reset the controller in host .init
      PCI: meson: Add system suspend/resume support

 drivers/pci/controller/dwc/pci-meson.c | 108 +++++++++++++++++++++++++++------
 1 file changed, 89 insertions(+), 19 deletions(-)
---
base-commit: 35f800669ce835aa77364a2ab5b61be19b778d3c
change-id: 20261114-b4-pci-meson-suspend-20798a7b9956

Best regards,
-- 
Igor Velkov <iav@iav.lv>



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

end of thread, other threads:[~2026-11-14 22:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-14 22:12 [PATCH 0/2] PCI: meson: Add system suspend/resume support Igor Velkov via B4 Relay
2026-11-14 22:12 ` [PATCH 1/2] PCI: meson: Power the PHY on and reset the controller in host .init Igor Velkov via B4 Relay
2026-11-14 22:23   ` sashiko-bot
2026-11-14 22:12 ` [PATCH 2/2] PCI: meson: Add system suspend/resume support Igor Velkov via B4 Relay
2026-11-14 22:25   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox