All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH] PCI: qcom: use PHY_REFCLK_USE_PAD only for ipq8064
@ 2020-10-19 16:55 Ansuel Smith
  2021-01-18 15:15 ` Lorenzo Pieralisi
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ansuel Smith @ 2020-10-19 16:55 UTC (permalink / raw)
  To: lorenzo.pieralisi
  Cc: Ansuel Smith, Ilia Mirkin, stable, Andy Gross, Bjorn Andersson,
	Stanimir Varbanov, Rob Herring, Bjorn Helgaas, Sham Muthayyan,
	linux-arm-msm, linux-pci, linux-kernel

The use of PHY_REFCLK_USE_PAD introduced a regression for apq8064
devices. It was tested that while apq doesn't require the padding, ipq
SoC must use it or the kernel hangs on boot.

Fixes: de3c4bf6489 ("PCI: qcom: Add support for tx term offset for rev 2.1.0")
Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Cc: stable@vger.kernel.org # v4.19+
---
 drivers/pci/controller/dwc/pcie-qcom.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index 3aac77a295ba..dad6e9ce66ba 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -387,7 +387,9 @@ static int qcom_pcie_init_2_1_0(struct qcom_pcie *pcie)
 
 	/* enable external reference clock */
 	val = readl(pcie->parf + PCIE20_PARF_PHY_REFCLK);
-	val &= ~PHY_REFCLK_USE_PAD;
+	/* USE_PAD is required only for ipq806x */
+	if (!of_device_is_compatible(node, "qcom,pcie-apq8064"))
+		val &= ~PHY_REFCLK_USE_PAD;
 	val |= PHY_REFCLK_SSP_EN;
 	writel(val, pcie->parf + PCIE20_PARF_PHY_REFCLK);
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [RESEND PATCH] PCI: qcom: use PHY_REFCLK_USE_PAD only for ipq8064
  2020-10-19 16:55 [RESEND PATCH] PCI: qcom: use PHY_REFCLK_USE_PAD only for ipq8064 Ansuel Smith
@ 2021-01-18 15:15 ` Lorenzo Pieralisi
  2021-01-18 15:21 ` Stanimir Varbanov
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Lorenzo Pieralisi @ 2021-01-18 15:15 UTC (permalink / raw)
  To: Ansuel Smith, Stanimir Varbanov
  Cc: Ilia Mirkin, stable, Andy Gross, Bjorn Andersson, Rob Herring,
	Bjorn Helgaas, Sham Muthayyan, linux-arm-msm, linux-pci,
	linux-kernel

On Mon, Oct 19, 2020 at 06:55:55PM +0200, Ansuel Smith wrote:
> The use of PHY_REFCLK_USE_PAD introduced a regression for apq8064
> devices. It was tested that while apq doesn't require the padding, ipq
> SoC must use it or the kernel hangs on boot.
> 
> Fixes: de3c4bf6489 ("PCI: qcom: Add support for tx term offset for rev 2.1.0")
> Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> Cc: stable@vger.kernel.org # v4.19+
> ---
>  drivers/pci/controller/dwc/pcie-qcom.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Need qcom maintainer's ack, thanks.

Lorenzo

> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> index 3aac77a295ba..dad6e9ce66ba 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> @@ -387,7 +387,9 @@ static int qcom_pcie_init_2_1_0(struct qcom_pcie *pcie)
>  
>  	/* enable external reference clock */
>  	val = readl(pcie->parf + PCIE20_PARF_PHY_REFCLK);
> -	val &= ~PHY_REFCLK_USE_PAD;
> +	/* USE_PAD is required only for ipq806x */
> +	if (!of_device_is_compatible(node, "qcom,pcie-apq8064"))
> +		val &= ~PHY_REFCLK_USE_PAD;
>  	val |= PHY_REFCLK_SSP_EN;
>  	writel(val, pcie->parf + PCIE20_PARF_PHY_REFCLK);
>  
> -- 
> 2.27.0
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RESEND PATCH] PCI: qcom: use PHY_REFCLK_USE_PAD only for ipq8064
  2020-10-19 16:55 [RESEND PATCH] PCI: qcom: use PHY_REFCLK_USE_PAD only for ipq8064 Ansuel Smith
  2021-01-18 15:15 ` Lorenzo Pieralisi
@ 2021-01-18 15:21 ` Stanimir Varbanov
  2021-01-18 15:38 ` Lorenzo Pieralisi
  2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
  3 siblings, 0 replies; 5+ messages in thread
From: Stanimir Varbanov @ 2021-01-18 15:21 UTC (permalink / raw)
  To: Ansuel Smith, lorenzo.pieralisi
  Cc: Ilia Mirkin, stable, Andy Gross, Bjorn Andersson, Rob Herring,
	Bjorn Helgaas, Sham Muthayyan, linux-arm-msm, linux-pci,
	linux-kernel


Thanks for the patch!

On 10/19/20 7:55 PM, Ansuel Smith wrote:
> The use of PHY_REFCLK_USE_PAD introduced a regression for apq8064
> devices. It was tested that while apq doesn't require the padding, ipq
> SoC must use it or the kernel hangs on boot.
> 
> Fixes: de3c4bf6489 ("PCI: qcom: Add support for tx term offset for rev 2.1.0")
> Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> Cc: stable@vger.kernel.org # v4.19+

Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>

> ---
>  drivers/pci/controller/dwc/pcie-qcom.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> index 3aac77a295ba..dad6e9ce66ba 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> @@ -387,7 +387,9 @@ static int qcom_pcie_init_2_1_0(struct qcom_pcie *pcie)
>  
>  	/* enable external reference clock */
>  	val = readl(pcie->parf + PCIE20_PARF_PHY_REFCLK);
> -	val &= ~PHY_REFCLK_USE_PAD;
> +	/* USE_PAD is required only for ipq806x */
> +	if (!of_device_is_compatible(node, "qcom,pcie-apq8064"))
> +		val &= ~PHY_REFCLK_USE_PAD;
>  	val |= PHY_REFCLK_SSP_EN;
>  	writel(val, pcie->parf + PCIE20_PARF_PHY_REFCLK);
>  
> 

-- 
regards,
Stan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RESEND PATCH] PCI: qcom: use PHY_REFCLK_USE_PAD only for ipq8064
  2020-10-19 16:55 [RESEND PATCH] PCI: qcom: use PHY_REFCLK_USE_PAD only for ipq8064 Ansuel Smith
  2021-01-18 15:15 ` Lorenzo Pieralisi
  2021-01-18 15:21 ` Stanimir Varbanov
@ 2021-01-18 15:38 ` Lorenzo Pieralisi
  2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
  3 siblings, 0 replies; 5+ messages in thread
From: Lorenzo Pieralisi @ 2021-01-18 15:38 UTC (permalink / raw)
  To: Ansuel Smith
  Cc: Lorenzo Pieralisi, linux-arm-msm, Stanimir Varbanov, stable,
	Bjorn Andersson, Rob Herring, linux-pci, Sham Muthayyan,
	Bjorn Helgaas, linux-kernel, Ilia Mirkin, Andy Gross

On Mon, 19 Oct 2020 18:55:55 +0200, Ansuel Smith wrote:
> The use of PHY_REFCLK_USE_PAD introduced a regression for apq8064
> devices. It was tested that while apq doesn't require the padding, ipq
> SoC must use it or the kernel hangs on boot.

Applied to pci/dwc, thanks!

[1/1] PCI: qcom: use PHY_REFCLK_USE_PAD only for ipq8064
      https://git.kernel.org/lpieralisi/pci/c/cef11c377a

Thanks,
Lorenzo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RESEND PATCH] PCI: qcom: use PHY_REFCLK_USE_PAD only for ipq8064
  2020-10-19 16:55 [RESEND PATCH] PCI: qcom: use PHY_REFCLK_USE_PAD only for ipq8064 Ansuel Smith
                   ` (2 preceding siblings ...)
  2021-01-18 15:38 ` Lorenzo Pieralisi
@ 2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
  3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-03-01 19:59 UTC (permalink / raw)
  To: Ansuel Smith; +Cc: linux-arm-msm

Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

On Mon, 19 Oct 2020 18:55:55 +0200 you wrote:
> The use of PHY_REFCLK_USE_PAD introduced a regression for apq8064
> devices. It was tested that while apq doesn't require the padding, ipq
> SoC must use it or the kernel hangs on boot.
> 
> Fixes: de3c4bf6489 ("PCI: qcom: Add support for tx term offset for rev 2.1.0")
> Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> Cc: stable@vger.kernel.org # v4.19+
> 
> [...]

Here is the summary with links:
  - [RESEND] PCI: qcom: use PHY_REFCLK_USE_PAD only for ipq8064
    https://git.kernel.org/qcom/c/2cfef1971aea

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-01 20:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 16:55 [RESEND PATCH] PCI: qcom: use PHY_REFCLK_USE_PAD only for ipq8064 Ansuel Smith
2021-01-18 15:15 ` Lorenzo Pieralisi
2021-01-18 15:21 ` Stanimir Varbanov
2021-01-18 15:38 ` Lorenzo Pieralisi
2021-03-01 19:59 ` patchwork-bot+linux-arm-msm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.