From: Bjorn Helgaas <helgaas@kernel.org>
To: Frank Li <Frank.Li@nxp.com>
Cc: lorenzo.pieralisi@arm.com, manivannan.sadhasivam@linaro.org,
bhelgaas@google.com, devicetree@vger.kernel.org,
gustavo.pimentel@synopsys.com, imx@lists.linux.dev, kw@linux.com,
leoyang.li@nxp.com, linux-arm-kernel@lists.infradead.org,
linux-imx@nxp.com, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, mani@kernel.org,
minghuan.lian@nxp.com, mingkai.hu@nxp.com, robh+dt@kernel.org,
roy.zang@nxp.com, shawnguo@kernel.org, zhiqiang.hou@nxp.com
Subject: Re: [PATCH v5 2/2] PCI: layerscape: Add power management support for ls1028a
Date: Tue, 25 Jul 2023 16:09:08 -0500 [thread overview]
Message-ID: <20230725210908.GA665573@bhelgaas> (raw)
In-Reply-To: <20230724215830.2253112-2-Frank.Li@nxp.com>
On Mon, Jul 24, 2023 at 05:58:30PM -0400, Frank Li wrote:
> From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
>
> Add PME_Turn_Off/PME_TO_Ack handshake sequence, and finally
> put the PCIe controller into D3 state after the L2/L3 ready
> state transition process completion.
> ...
> +#ifdef CONFIG_PM_SLEEP
> +static int ls_pcie_suspend_noirq(struct device *dev)
> +{
> + struct ls_pcie *pcie = dev_get_drvdata(dev);
> + struct dw_pcie *pci = pcie->pci;
> +
> + if (!pcie->drvdata->pm_support)
> + return 0;
> +
> + return dw_pcie_suspend_noirq(pci);
> +}
> +
> +static int ls_pcie_resume_noirq(struct device *dev)
> +{
> +
> + struct ls_pcie *pcie = dev_get_drvdata(dev);
> + struct dw_pcie *pci = pcie->pci;
> +
> + if (!pcie->drvdata->pm_support)
> + return 0;
> +
> + return dw_pcie_resume_noirq(pci);
> +}
> +#endif /* CONFIG_PM_SLEEP */
You may be able to dispense with some of these #ifdefs as in
https://lore.kernel.org/all/20220720224829.GA1667002@bhelgaas/
> +static const struct dev_pm_ops ls_pcie_pm_ops = {
> + SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(ls_pcie_suspend_noirq,
> + ls_pcie_resume_noirq)
> +};
> +
> static struct platform_driver ls_pcie_driver = {
> .probe = ls_pcie_probe,
> .driver = {
> .name = "layerscape-pcie",
> .of_match_table = ls_pcie_of_match,
> .suppress_bind_attrs = true,
> + .pm = &ls_pcie_pm_ops,
> },
> };
> builtin_platform_driver(ls_pcie_driver);
> --
> 2.34.1
>
next prev parent reply other threads:[~2023-07-25 21:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-24 21:58 [PATCH v5 1/2] PCI: dwc: Implement general suspend/resume functionality for L2/L3 transitions Frank Li
2023-07-24 21:58 ` [PATCH v5 2/2] PCI: layerscape: Add power management support for ls1028a Frank Li
2023-07-25 21:09 ` Bjorn Helgaas [this message]
2023-07-28 9:05 ` [PATCH v5 1/2] PCI: dwc: Implement general suspend/resume functionality for L2/L3 transitions Lorenzo Pieralisi
2023-07-28 15:02 ` Frank Li
2023-07-28 15:32 ` Manivannan Sadhasivam
2023-07-28 15:49 ` [PATCH v5 1/2] PCI: dwc: Implement general suspend/resume functionality for L2/L3 transitionse Frank Li
2023-07-31 13:36 ` Manivannan Sadhasivam
2023-07-31 16:54 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230725210908.GA665573@bhelgaas \
--to=helgaas@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=gustavo.pimentel@synopsys.com \
--cc=imx@lists.linux.dev \
--cc=kw@linux.com \
--cc=leoyang.li@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=mani@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=minghuan.lian@nxp.com \
--cc=mingkai.hu@nxp.com \
--cc=robh+dt@kernel.org \
--cc=roy.zang@nxp.com \
--cc=shawnguo@kernel.org \
--cc=zhiqiang.hou@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).