Linux PCI subsystem development
 help / color / mirror / Atom feed
From: "Krzysztof Wilczyński" <kw@linux.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: lpieralisi@kernel.org, bhelgaas@google.com, robh@kernel.org,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Subject: Re: [PATCH v3] PCI: qcom-ep: Enable controller resources like PHY only after refclk is available
Date: Sat, 14 Sep 2024 07:48:17 +0900	[thread overview]
Message-ID: <20240913224817.GA635227@rocinante> (raw)
In-Reply-To: <20240830082319.51387-1-manivannan.sadhasivam@linaro.org>

Hello,

> qcom_pcie_enable_resources() is called by qcom_pcie_ep_probe() and it
> enables the controller resources like clocks, regulator, PHY. On one of the
> new unreleased Qcom SoC, PHY enablement depends on the active refclk. And
> on all of the supported Qcom endpoint SoCs, refclk comes from the host
> (RC). So calling qcom_pcie_enable_resources() without refclk causes the
> NoC (Network On Chip) error in the endpoint SoC and in turn results in a
> whole SoC crash and rebooting into EDL (Emergency Download) mode which is
> an unrecoverable state.
> 
> But qcom_pcie_enable_resources() is already called by
> qcom_pcie_perst_deassert() when PERST# is deasserted, and refclk is
> available at that time.
> 
> Hence, remove the unnecessary call to qcom_pcie_enable_resources() from
> qcom_pcie_ep_probe() to prevent the above mentioned crash.
> 
> It should be noted that this commit prevents the crash only under normal
> working condition (booting endpoint before host), but the crash may also
> occur if PERST# assert happens at the wrong time. For avoiding the crash
> completely, it is recommended to use SRIS mode which allows the endpoint
> SoC to generate its own refclk. The driver is not supporting SRIS mode
> currently, but will be added in the future.

Applied to controller/qcom, thank you!

[1/1] PCI: qcom-ep: Enable controller resources like PHY only after refclk is available
      https://git.kernel.org/pci/pci/c/d3745e3ae6c0

	Krzysztof

      reply	other threads:[~2024-09-13 22:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-30  8:23 [PATCH v3] PCI: qcom-ep: Enable controller resources like PHY only after refclk is available Manivannan Sadhasivam
2024-09-13 22:48 ` Krzysztof Wilczyński [this message]

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=20240913224817.GA635227@rocinante \
    --to=kw@linux.com \
    --cc=bhelgaas@google.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=robh@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox