* [PATCH v1] PCI: imx6: Align EP link start behavior with documentation
@ 2025-06-06 7:57 Richard Zhu
2025-06-06 15:30 ` Frank Li
0 siblings, 1 reply; 2+ messages in thread
From: Richard Zhu @ 2025-06-06 7:57 UTC (permalink / raw)
To: frank.li, l.stach, lpieralisi, kw, manivannan.sadhasivam, robh,
bhelgaas, shawnguo, s.hauer, kernel, festevam
Cc: linux-pci, linux-arm-kernel, imx, linux-kernel, Richard Zhu
According to PCI/endpoint/pci-endpoint-cfs.rst, the endpoint (EP) should
only link up after `echo 1 > start` is executed.
To match the documented behavior, do not start the link automatically
when adding the EP controller. Ensure the LTSSM_EN bit is not asserted
to 1'b1 by default.
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
---
drivers/pci/controller/dwc/pci-imx6.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index 5f267dd261b5..69825e47d2d4 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -1337,6 +1337,10 @@ static int imx_add_pcie_ep(struct imx_pcie *imx_pcie,
struct device *dev = pci->dev;
imx_pcie_host_init(pp);
+
+ /* Make sure that PCIe LTSSM is cleared */
+ imx_pcie_ltssm_disable(dev);
+
ep = &pci->ep;
ep->ops = &pcie_ep_ops;
@@ -1360,9 +1364,6 @@ static int imx_add_pcie_ep(struct imx_pcie *imx_pcie,
pci_epc_init_notify(ep->epc);
- /* Start LTSSM. */
- imx_pcie_ltssm_enable(dev);
-
return 0;
}
--
2.37.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] PCI: imx6: Align EP link start behavior with documentation
2025-06-06 7:57 [PATCH v1] PCI: imx6: Align EP link start behavior with documentation Richard Zhu
@ 2025-06-06 15:30 ` Frank Li
0 siblings, 0 replies; 2+ messages in thread
From: Frank Li @ 2025-06-06 15:30 UTC (permalink / raw)
To: Richard Zhu
Cc: l.stach, lpieralisi, kw, manivannan.sadhasivam, robh, bhelgaas,
shawnguo, s.hauer, kernel, festevam, linux-pci, linux-arm-kernel,
imx, linux-kernel
On Fri, Jun 06, 2025 at 03:57:29PM +0800, Richard Zhu wrote:
> According to PCI/endpoint/pci-endpoint-cfs.rst, the endpoint (EP) should
> only link up after `echo 1 > start` is executed.
>
> To match the documented behavior, do not start the link automatically
> when adding the EP controller. Ensure the LTSSM_EN bit is not asserted
> to 1'b1 by default.
Reviewed-by: Frank Li <Frank.Li@nxp.com>
>
> Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
> ---
> drivers/pci/controller/dwc/pci-imx6.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index 5f267dd261b5..69825e47d2d4 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -1337,6 +1337,10 @@ static int imx_add_pcie_ep(struct imx_pcie *imx_pcie,
> struct device *dev = pci->dev;
>
> imx_pcie_host_init(pp);
> +
> + /* Make sure that PCIe LTSSM is cleared */
> + imx_pcie_ltssm_disable(dev);
> +
> ep = &pci->ep;
> ep->ops = &pcie_ep_ops;
>
> @@ -1360,9 +1364,6 @@ static int imx_add_pcie_ep(struct imx_pcie *imx_pcie,
>
> pci_epc_init_notify(ep->epc);
>
> - /* Start LTSSM. */
> - imx_pcie_ltssm_enable(dev);
> -
> return 0;
> }
>
> --
> 2.37.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-06 15:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-06 7:57 [PATCH v1] PCI: imx6: Align EP link start behavior with documentation Richard Zhu
2025-06-06 15:30 ` Frank Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox