All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Richard Zhu <hongxing.zhu@nxp.com>,
	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,
	linux-imx@nxp.com
Subject: Re: [PATCH v2] PCI: imx6: Assert i.MX8MM CLKREQ# even if no device present
Date: Wed, 16 Mar 2022 10:29:29 +0100	[thread overview]
Message-ID: <2e4f1fa1add244b12954970b3c02cbe503176a26.camel@pengutronix.de> (raw)
In-Reply-To: <1645672013-8949-1-git-send-email-hongxing.zhu@nxp.com>

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) {



WARNING: multiple messages have this Message-ID (diff)
From: Lucas Stach <l.stach@pengutronix.de>
To: Richard Zhu <hongxing.zhu@nxp.com>,
	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,
	linux-imx@nxp.com
Subject: Re: [PATCH v2] PCI: imx6: Assert i.MX8MM CLKREQ# even if no device present
Date: Wed, 16 Mar 2022 10:29:29 +0100	[thread overview]
Message-ID: <2e4f1fa1add244b12954970b3c02cbe503176a26.camel@pengutronix.de> (raw)
In-Reply-To: <1645672013-8949-1-git-send-email-hongxing.zhu@nxp.com>

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

  parent reply	other threads:[~2022-03-16  9:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24  3:06 [PATCH v2] PCI: imx6: Assert i.MX8MM CLKREQ# even if no device present Richard Zhu
2022-02-24  3:06 ` Richard Zhu
2022-03-16  0:13 ` Hongxing Zhu
2022-03-16  0:13   ` Hongxing Zhu
2022-03-16  9:29 ` Lucas Stach [this message]
2022-03-16  9:29   ` Lucas Stach
2022-03-17  9:01 ` Lorenzo Pieralisi
2022-03-17  9:01   ` Lorenzo Pieralisi

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=2e4f1fa1add244b12954970b3c02cbe503176a26.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=bhelgaas@google.com \
    --cc=hongxing.zhu@nxp.com \
    --cc=kernel@pengutronix.de \
    --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 \
    /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 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.