[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <jwvprh7rvvzwxb5bsny5h3s74srbifurlusbpniupf4uujkflk@caaxxgw7xebq>
Date: Sat, 20 Sep 2025 12:00:06 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Richard Zhu <hongxing.zhu@....com>
Cc: frank.li@....com, jingoohan1@...il.com, l.stach@...gutronix.de,
lpieralisi@...nel.org, kwilczynski@...nel.org, robh@...nel.org, bhelgaas@...gle.com,
shawnguo@...nel.org, s.hauer@...gutronix.de, kernel@...gutronix.de,
festevam@...il.com, linux-pci@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
imx@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 3/6] PCI: imx6: Don't poll LTSSM state of i.MX6QP PCIe
in PM operations
On Tue, Sep 02, 2025 at 04:01:48PM +0800, Richard Zhu wrote:
> Refer to PCIe r6.0, sec 5.2, fig 5-1 Link Power Management State Flow
> Diagram. Both L0 and L2/L3 Ready can be transferred to LDn directly.
>
> It's harmless to let dw_pcie_suspend_noirq() proceed suspend after the
> PME_Turn_Off is sent out, whatever the LTSSM state is in L2 or L3 after
> a recommended 10ms max wait refer to PCIe r6.0, sec 5.3.3.2.1 PME
> Synchronization.
>
> The LTSSM states of i.MX6QP PCIe are inaccessible after the PME_Turn_Off
> is kicked off. To handle this case, don't poll L2 state and add one max
> 10ms delay if QUIRK_NOL2POLL_IN_PM flag is existing in suspend.
>
> Signed-off-by: Richard Zhu <hongxing.zhu@....com>
Squash this patch with the previous one.
- Mani
> Reviewed-by: Frank Li <Frank.Li@....com>
> ---
> drivers/pci/controller/dwc/pci-imx6.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index 80e48746bbaf..18b97bd0462b 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -125,6 +125,7 @@ struct imx_pcie_drvdata {
> enum imx_pcie_variants variant;
> enum dw_pcie_device_mode mode;
> u32 flags;
> + u32 quirk;
> int dbi_length;
> const char *gpr;
> const u32 ltssm_off;
> @@ -1765,6 +1766,7 @@ static int imx_pcie_probe(struct platform_device *pdev)
> if (ret)
> return ret;
>
> + pci->quirk_flag = imx_pcie->drvdata->quirk;
> pci->use_parent_dt_ranges = true;
> if (imx_pcie->drvdata->mode == DW_PCIE_EP_TYPE) {
> ret = imx_add_pcie_ep(imx_pcie, pdev);
> @@ -1849,6 +1851,7 @@ static const struct imx_pcie_drvdata drvdata[] = {
> .enable_ref_clk = imx6q_pcie_enable_ref_clk,
> .core_reset = imx6qp_pcie_core_reset,
> .ops = &imx_pcie_host_ops,
> + .quirk = QUIRK_NOL2POLL_IN_PM,
> },
> [IMX7D] = {
> .variant = IMX7D,
> --
> 2.37.1
>
--
மணிவண்ணன் சதாசிவம்
Powered by blists - more mailing lists