From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 2/2] PCI: qcom: add support for ddrss_sf_tbu clock
Date: Wed, 30 Dec 2020 18:14:48 +0530 [thread overview]
Message-ID: <20201230124448.GB5679@thinkpad> (raw)
In-Reply-To: <20201230115408.492565-3-dmitry.baryshkov@linaro.org>
On Wed, Dec 30, 2020 at 02:54:08PM +0300, Dmitry Baryshkov wrote:
> On SM8250 additional clock is required for PCIe devices to access NOC.
> Update PCIe controller driver to control this clock.
>
If it is really required then why make it optional?
Thanks,
Mani
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Fixes: e1dd639e374a ("PCI: qcom: Add SM8250 SoC support")
> ---
> drivers/pci/controller/dwc/pcie-qcom.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> index affa2713bf80..658d007a764c 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> @@ -159,8 +159,9 @@ struct qcom_pcie_resources_2_3_3 {
> struct reset_control *rst[7];
> };
>
> +#define QCOM_PCIE_2_7_0_MAX_CLOCKS 6
> struct qcom_pcie_resources_2_7_0 {
> - struct clk_bulk_data clks[6];
> + struct clk_bulk_data clks[QCOM_PCIE_2_7_0_MAX_CLOCKS + 1]; /* + 1 for sf_tbu */
> struct regulator_bulk_data supplies[2];
> struct reset_control *pci_reset;
> struct clk *pipe_clk;
> @@ -1153,10 +1154,15 @@ static int qcom_pcie_get_resources_2_7_0(struct qcom_pcie *pcie)
> res->clks[4].id = "slave_q2a";
> res->clks[5].id = "tbu";
>
> - ret = devm_clk_bulk_get(dev, ARRAY_SIZE(res->clks), res->clks);
> + ret = devm_clk_bulk_get(dev, QCOM_PCIE_2_7_0_MAX_CLOCKS, res->clks);
> if (ret < 0)
> return ret;
>
> + /* Optional clock for SM8250 */
> + res->clks[6].clk = devm_clk_get_optional(dev, "ddrss_sf_tbu");
> + if (IS_ERR(res->clks[6].clk))
> + return PTR_ERR(res->clks[6].clk);
> +
> res->pipe_clk = devm_clk_get(dev, "pipe");
> return PTR_ERR_OR_ZERO(res->pipe_clk);
> }
> --
> 2.29.2
>
next prev parent reply other threads:[~2020-12-30 12:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-30 11:54 [PATCH v2 0/2] PCI: qcom: fixup PCIe support on sm8250 Dmitry Baryshkov
2020-12-30 11:54 ` [PATCH v2 1/2] dt-bindings: pci: qcom: Document ddrss_sf_tbu clock for sm8250 Dmitry Baryshkov
2020-12-30 11:54 ` [PATCH v2 2/2] PCI: qcom: add support for ddrss_sf_tbu clock Dmitry Baryshkov
2020-12-30 12:44 ` Manivannan Sadhasivam [this message]
2020-12-30 12:35 ` [PATCH v2 0/2] PCI: qcom: fixup PCIe support on sm8250 Manivannan Sadhasivam
2020-12-30 12:38 ` Dmitry Baryshkov
2020-12-30 12:46 ` Manivannan Sadhasivam
2020-12-30 12:57 ` Dmitry Baryshkov
2020-12-30 13:06 ` Manivannan Sadhasivam
2020-12-31 12:38 ` Dmitry Baryshkov
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=20201230124448.GB5679@thinkpad \
--to=manivannan.sadhasivam@linaro.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).