]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: imx6: Use DWC common suspend resume method
authorFrank Li <Frank.Li@nxp.com>
Tue, 26 Nov 2024 07:57:00 +0000 (15:57 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Sat, 18 Jan 2025 21:04:23 +0000 (15:04 -0600)
commita528d1a725974d5e60a8b42fe4d0dade0b5fd026
tree51e85c4ff86c15c8940baf27739061290ea91ad5
parentec57335b81d8fcf3088994c532b5ca21e839616a
PCI: imx6: Use DWC common suspend resume method

Call common DWC suspend/resume function. Use DWC common iATU method to
send out PME_TURN_OFF message.

In old DWC implementations, PCIE_ATU_INHIBIT_PAYLOAD in iATU Ctrl2 register
is reserved, so the generic DWC implementation of sending the PME_Turn_Off
message using a dummy MMIO write cannot be used. Use the previous method to
kick off PME_TURN_OFF message for these platforms.

The System Reset Control (SRC) interface is used to toggle 'turnoff_reset'
to send PME_TURN_OFF and since the DWC implementation is used, it is not
needed now.

Replace the imx_pcie_stop_link() and imx_pcie_host_exit() by
dw_pcie_suspend_noirq() in imx_pcie_suspend_noirq().

Since dw_pcie_suspend_noirq() already does these, see below call stack:

  dw_pcie_suspend_noirq()
    dw_pcie_stop_link()
      imx_pcie_stop_link()
    pci->pp.ops->deinit()
      imx_pcie_host_exit()

Replace the imx_pcie_host_init(), dw_pcie_setup_rc() and
imx_pcie_start_link() by dw_pcie_resume_noirq() in imx_pcie_resume_noirq().

Since dw_pcie_resume_noirq() already does these, see below call stack:

  dw_pcie_resume_noirq()
    pci->pp.ops->init()
      imx_pcie_host_init()
    dw_pcie_setup_rc()
    dw_pcie_start_link()
      imx_pcie_start_link(;

Link: https://lore.kernel.org/r/20241126075702.4099164-9-hongxing.zhu@nxp.com
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Krzysztof WilczyƄski <kwilczynski@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/controller/dwc/pci-imx6.c