PCI: imx6: Reformat suspend callback to keep symmetric with resume
authorRichard Zhu <hongxing.zhu@nxp.com>
Thu, 14 Jul 2022 07:31:09 +0000 (15:31 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 1 Aug 2022 20:34:09 +0000 (15:34 -0500)
commit835a345b18b013cc03b0fc392394fbccd61d4efb
tree41f160778536d4fbb90c4d3f5b04c92f7c8de25d
parent1c5e761565c10945049e5d52fb17540cda23690e
PCI: imx6: Reformat suspend callback to keep symmetric with resume

Create imx6_pcie_stop_link() and imx6_pcie_host_exit() functions.
Encapsulate clocks, regulators disables and PHY uninitialization into
imx6_pcie_host_exit().

To keep suspend/resume symmetric as much as possible, invoke these two
new created functions in suspend callback.

To be symmetric with imx6_pcie_host_exit(), move imx6_pcie_clk_enable()
to imx6_pcie_host_init() from imx6_pcie_deassert_core_reset().

Link: https://lore.kernel.org/r/1657783869-19194-18-git-send-email-hongxing.zhu@nxp.com
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
drivers/pci/controller/dwc/pci-imx6.c