* [PATCH v2] PCI: imx6: Assert i.MX8MM CLKREQ# even if no device present
@ 2022-02-24 3:06 Richard Zhu
2022-03-16 0:13 ` Hongxing Zhu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Richard Zhu @ 2022-02-24 3:06 UTC (permalink / raw)
To: l.stach, bhelgaas, lorenzo.pieralisi
Cc: linux-pci, linux-arm-kernel, linux-kernel, kernel, linux-imx,
Richard Zhu
The CLKREQ# signal is an open drain, active low signal that is driven
low by the remote Endpoint device. But it might not be driven low if no
Endpoint device is connected.
On i.MX8MM PCIe, phy_init() may fail and system boot may hang if no
Endpoint is connected to assert CLKREQ#.
Handle this as on i.MX8MQ, where we explicitly assert CLKREQ# so the
PHY can be initialized.
Fixes: 178e244cb6e2 ("PCI: imx: Add the imx8mm pcie support")
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
---
drivers/pci/controller/dwc/pci-imx6.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index 78e32a539060..168cb1287ba9 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -447,10 +447,6 @@ static int imx6_pcie_enable_ref_clk(struct imx6_pcie *imx6_pcie)
case IMX7D:
break;
case IMX8MM:
- ret = clk_prepare_enable(imx6_pcie->pcie_aux);
- if (ret)
- dev_err(dev, "unable to enable pcie_aux clock\n");
- break;
case IMX8MQ:
ret = clk_prepare_enable(imx6_pcie->pcie_aux);
if (ret) {
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH v2] PCI: imx6: Assert i.MX8MM CLKREQ# even if no device present
2022-02-24 3:06 [PATCH v2] PCI: imx6: Assert i.MX8MM CLKREQ# even if no device present Richard Zhu
@ 2022-03-16 0:13 ` Hongxing Zhu
2022-03-16 9:29 ` Lucas Stach
2022-03-17 9:01 ` Lorenzo Pieralisi
2 siblings, 0 replies; 4+ messages in thread
From: Hongxing Zhu @ 2022-03-16 0:13 UTC (permalink / raw)
To: Hongxing Zhu, l.stach, bhelgaas, lorenzo.pieralisi
Cc: linux-pci, linux-arm-kernel, linux-kernel, kernel, dl-linux-imx
Hi Lucas:
This patch is pending for a while.
Can you help to take look at it and give the ack if you don't have comments on it?
Thank you in advanced.
Best Regards
Richard Zhu
> -----Original Message-----
> From: Richard Zhu <hongxing.zhu@nxp.com>
> Sent: 2022年2月24日 11:07
> To: l.stach@pengutronix.de; bhelgaas@google.com;
> lorenzo.pieralisi@arm.com
> Cc: linux-pci@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> linux-kernel@vger.kernel.org; kernel@pengutronix.de; dl-linux-imx
> <linux-imx@nxp.com>; Hongxing Zhu <hongxing.zhu@nxp.com>
> Subject: [PATCH v2] PCI: imx6: Assert i.MX8MM CLKREQ# even if no device
> present
>
> The CLKREQ# signal is an open drain, active low signal that is driven low by the
> remote Endpoint device. But it might not be driven low if no Endpoint device is
> connected.
>
> On i.MX8MM PCIe, phy_init() may fail and system boot may hang if no
> Endpoint is connected to assert CLKREQ#.
>
> Handle this as on i.MX8MQ, where we explicitly assert CLKREQ# so the PHY
> can be initialized.
>
> Fixes: 178e244cb6e2 ("PCI: imx: Add the imx8mm pcie support")
> Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
> ---
> drivers/pci/controller/dwc/pci-imx6.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c
> b/drivers/pci/controller/dwc/pci-imx6.c
> index 78e32a539060..168cb1287ba9 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -447,10 +447,6 @@ static int imx6_pcie_enable_ref_clk(struct imx6_pcie
> *imx6_pcie)
> case IMX7D:
> break;
> case IMX8MM:
> - ret = clk_prepare_enable(imx6_pcie->pcie_aux);
> - if (ret)
> - dev_err(dev, "unable to enable pcie_aux clock\n");
> - break;
> case IMX8MQ:
> ret = clk_prepare_enable(imx6_pcie->pcie_aux);
> if (ret) {
> --
> 2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] PCI: imx6: Assert i.MX8MM CLKREQ# even if no device present
2022-02-24 3:06 [PATCH v2] PCI: imx6: Assert i.MX8MM CLKREQ# even if no device present Richard Zhu
2022-03-16 0:13 ` Hongxing Zhu
@ 2022-03-16 9:29 ` Lucas Stach
2022-03-17 9:01 ` Lorenzo Pieralisi
2 siblings, 0 replies; 4+ messages in thread
From: Lucas Stach @ 2022-03-16 9:29 UTC (permalink / raw)
To: Richard Zhu, bhelgaas, lorenzo.pieralisi
Cc: linux-pci, linux-arm-kernel, linux-kernel, kernel, linux-imx
Am Donnerstag, dem 24.02.2022 um 11:06 +0800 schrieb Richard Zhu:
> The CLKREQ# signal is an open drain, active low signal that is driven
> low by the remote Endpoint device. But it might not be driven low if no
> Endpoint device is connected.
>
> On i.MX8MM PCIe, phy_init() may fail and system boot may hang if no
> Endpoint is connected to assert CLKREQ#.
>
> Handle this as on i.MX8MQ, where we explicitly assert CLKREQ# so the
> PHY can be initialized.
>
> Fixes: 178e244cb6e2 ("PCI: imx: Add the imx8mm pcie support")
> Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> drivers/pci/controller/dwc/pci-imx6.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index 78e32a539060..168cb1287ba9 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -447,10 +447,6 @@ static int imx6_pcie_enable_ref_clk(struct imx6_pcie *imx6_pcie)
> case IMX7D:
> break;
> case IMX8MM:
> - ret = clk_prepare_enable(imx6_pcie->pcie_aux);
> - if (ret)
> - dev_err(dev, "unable to enable pcie_aux clock\n");
> - break;
> case IMX8MQ:
> ret = clk_prepare_enable(imx6_pcie->pcie_aux);
> if (ret) {
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] PCI: imx6: Assert i.MX8MM CLKREQ# even if no device present
2022-02-24 3:06 [PATCH v2] PCI: imx6: Assert i.MX8MM CLKREQ# even if no device present Richard Zhu
2022-03-16 0:13 ` Hongxing Zhu
2022-03-16 9:29 ` Lucas Stach
@ 2022-03-17 9:01 ` Lorenzo Pieralisi
2 siblings, 0 replies; 4+ messages in thread
From: Lorenzo Pieralisi @ 2022-03-17 9:01 UTC (permalink / raw)
To: Richard Zhu, bhelgaas, l.stach
Cc: Lorenzo Pieralisi, linux-imx, linux-arm-kernel, kernel,
linux-kernel, linux-pci
On Thu, 24 Feb 2022 11:06:53 +0800, Richard Zhu wrote:
> The CLKREQ# signal is an open drain, active low signal that is driven
> low by the remote Endpoint device. But it might not be driven low if no
> Endpoint device is connected.
>
> On i.MX8MM PCIe, phy_init() may fail and system boot may hang if no
> Endpoint is connected to assert CLKREQ#.
>
> [...]
Applied to pci/imx6, thanks!
[1/1] PCI: imx6: Assert i.MX8MM CLKREQ# even if no device present
https://git.kernel.org/lpieralisi/pci/c/45514f78c6
Thanks,
Lorenzo
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-17 9:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-24 3:06 [PATCH v2] PCI: imx6: Assert i.MX8MM CLKREQ# even if no device present Richard Zhu
2022-03-16 0:13 ` Hongxing Zhu
2022-03-16 9:29 ` Lucas Stach
2022-03-17 9:01 ` Lorenzo Pieralisi
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).