linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <mani@kernel.org>
To: Johan Hovold <johan+linaro@kernel.org>
Cc: "Stanimir Varbanov" <svarbanov@mm-sol.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Andy Gross" <agross@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konrad.dybcio@somainline.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] PCI: qcom: Fix host-init error handling
Date: Mon, 2 Jan 2023 23:13:13 +0530	[thread overview]
Message-ID: <20230102174313.GC16638@thinkpad> (raw)
In-Reply-To: <20221017114705.8277-2-johan+linaro@kernel.org>

On Mon, Oct 17, 2022 at 01:47:04PM +0200, Johan Hovold wrote:
> Implement the new host_deinit() callback so that the PHY is powered off
> and regulators and clocks are disabled also on late host-init errors.
> 
> Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver")
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>

Thanks,
Mani

> ---
>  drivers/pci/controller/dwc/pcie-qcom.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> index 0c13f976626f..417be4d225ed 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> @@ -1534,8 +1534,19 @@ static int qcom_pcie_host_init(struct dw_pcie_rp *pp)
>  	return ret;
>  }
>  
> +static void qcom_pcie_host_deinit(struct dw_pcie_rp *pp)
> +{
> +	struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
> +	struct qcom_pcie *pcie = to_qcom_pcie(pci);
> +
> +	qcom_ep_reset_assert(pcie);
> +	phy_power_off(pcie->phy);
> +	pcie->cfg->ops->deinit(pcie);
> +}
> +
>  static const struct dw_pcie_host_ops qcom_pcie_dw_ops = {
> -	.host_init = qcom_pcie_host_init,
> +	.host_init	= qcom_pcie_host_init,
> +	.host_deinit	= qcom_pcie_host_deinit,
>  };
>  
>  /* Qcom IP rev.: 2.1.0	Synopsys IP rev.: 4.01a */
> -- 
> 2.37.3
> 

-- 
மணிவண்ணன் சதாசிவம்

  reply	other threads:[~2023-01-02 17:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 11:47 [PATCH v3 0/2] PCI: qcom: Add support for modular builds Johan Hovold
2022-10-17 11:47 ` [PATCH v3 1/2] PCI: qcom: Fix host-init error handling Johan Hovold
2023-01-02 17:43   ` Manivannan Sadhasivam [this message]
2022-10-17 11:47 ` [PATCH v3 2/2] PCI: qcom: Add support for modular builds Johan Hovold
2022-10-17 17:34   ` Bjorn Helgaas
2022-10-18 15:10     ` Johan Hovold
2022-10-18 16:08       ` Bjorn Helgaas
2023-01-13 15:51 ` [PATCH v3 0/2] " Lorenzo Pieralisi
2023-01-15  4:27   ` Manivannan Sadhasivam
2023-01-16  7:36   ` Johan Hovold
2023-01-16  9:10 ` (subset) " 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=20230102174313.GC16638@thinkpad \
    --to=mani@kernel.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=johan+linaro@kernel.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=kw@linux.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=svarbanov@mm-sol.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 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).