From: Manivannan Sadhasivam <mani@kernel.org>
To: Nitheesh Sekar <quic_nsekar@quicinc.com>
Cc: agross@kernel.org, andersson@kernel.org,
konrad.dybcio@linaro.org, lpieralisi@kernel.org, kw@linux.com,
robh@kernel.org, bhelgaas@google.com,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
vkoul@kernel.org, kishon@kernel.org, p.zabel@pengutronix.de,
quic_srichara@quicinc.com, quic_varada@quicinc.com,
quic_ipkumar@quicinc.com, linux-arm-msm@vger.kernel.org,
linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org,
Anusha Rao <quic_anusha@quicinc.com>,
Devi Priya <quic_devipriy@quicinc.com>
Subject: Re: [PATCH 4/6] PCI: qcom: Add support for IPQ5018
Date: Mon, 9 Oct 2023 23:02:59 +0530 [thread overview]
Message-ID: <20231009173259.GC31623@thinkpad> (raw)
In-Reply-To: <20231003120846.28626-5-quic_nsekar@quicinc.com>
On Tue, Oct 03, 2023 at 05:38:44PM +0530, Nitheesh Sekar wrote:
> Added a new compatible 'qcom,pcie-ipq5018' and modified
> get_resources of 'ops 2_9_0' to get the clocks from the
> device-tree.
>
As per Documentation/process/submitting-patches.rst:
Describe your changes in imperative mood, e.g. "make xyzzy do frotz"
instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy
to do frotz", as if you are giving orders to the codebase to change
its behaviour.
Also, please elaborate your change in a detailed manner. For instance, saying
that you modified "get_resources of 'ops 2_9_0' to get the clocks from the
devicetree" is not sufficient since all clocks are being parsed based on the
devicetree info only.
- Mani
> Co-developed-by: Anusha Rao <quic_anusha@quicinc.com>
> Signed-off-by: Anusha Rao <quic_anusha@quicinc.com>
> Co-developed-by: Devi Priya <quic_devipriy@quicinc.com>
> Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
> Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
> ---
> drivers/pci/controller/dwc/pcie-qcom.c | 22 ++++++++--------------
> 1 file changed, 8 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> index e2f29404c84e..bb0717190920 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> @@ -197,10 +197,10 @@ struct qcom_pcie_resources_2_7_0 {
> struct reset_control *rst;
> };
>
> -#define QCOM_PCIE_2_9_0_MAX_CLOCKS 5
> struct qcom_pcie_resources_2_9_0 {
> - struct clk_bulk_data clks[QCOM_PCIE_2_9_0_MAX_CLOCKS];
> + struct clk_bulk_data *clks;
> struct reset_control *rst;
> + int num_clks;
> };
>
> union qcom_pcie_resources {
> @@ -1048,17 +1048,10 @@ static int qcom_pcie_get_resources_2_9_0(struct qcom_pcie *pcie)
> struct qcom_pcie_resources_2_9_0 *res = &pcie->res.v2_9_0;
> struct dw_pcie *pci = pcie->pci;
> struct device *dev = pci->dev;
> - int ret;
>
> - res->clks[0].id = "iface";
> - res->clks[1].id = "axi_m";
> - res->clks[2].id = "axi_s";
> - res->clks[3].id = "axi_bridge";
> - res->clks[4].id = "rchng";
> -
> - ret = devm_clk_bulk_get(dev, ARRAY_SIZE(res->clks), res->clks);
> - if (ret < 0)
> - return ret;
> + res->num_clks = devm_clk_bulk_get_all(dev, &res->clks);
> + if (res->num_clks < 0)
> + return res->num_clks;
>
> res->rst = devm_reset_control_array_get_exclusive(dev);
> if (IS_ERR(res->rst))
> @@ -1071,7 +1064,7 @@ static void qcom_pcie_deinit_2_9_0(struct qcom_pcie *pcie)
> {
> struct qcom_pcie_resources_2_9_0 *res = &pcie->res.v2_9_0;
>
> - clk_bulk_disable_unprepare(ARRAY_SIZE(res->clks), res->clks);
> + clk_bulk_disable_unprepare(res->num_clks, res->clks);
> }
>
> static int qcom_pcie_init_2_9_0(struct qcom_pcie *pcie)
> @@ -1100,7 +1093,7 @@ static int qcom_pcie_init_2_9_0(struct qcom_pcie *pcie)
>
> usleep_range(2000, 2500);
>
> - return clk_bulk_prepare_enable(ARRAY_SIZE(res->clks), res->clks);
> + return clk_bulk_prepare_enable(res->num_clks, res->clks);
> }
>
> static int qcom_pcie_post_init_2_9_0(struct qcom_pcie *pcie)
> @@ -1605,6 +1598,7 @@ static const struct of_device_id qcom_pcie_match[] = {
> { .compatible = "qcom,pcie-apq8064", .data = &cfg_2_1_0 },
> { .compatible = "qcom,pcie-apq8084", .data = &cfg_1_0_0 },
> { .compatible = "qcom,pcie-ipq4019", .data = &cfg_2_4_0 },
> + { .compatible = "qcom,pcie-ipq5018", .data = &cfg_2_9_0 },
> { .compatible = "qcom,pcie-ipq6018", .data = &cfg_2_9_0 },
> { .compatible = "qcom,pcie-ipq8064", .data = &cfg_2_1_0 },
> { .compatible = "qcom,pcie-ipq8064-v2", .data = &cfg_2_1_0 },
> --
> 2.17.1
>
--
மணிவண்ணன் சதாசிவம்
next prev parent reply other threads:[~2023-10-09 17:33 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-03 12:08 [PATCH 0/6] Enable IPQ5018 PCI support Nitheesh Sekar
2023-10-03 12:08 ` [PATCH 1/6] dt-bindings: phy: qcom,uniphy-pcie: Document PCIe uniphy Nitheesh Sekar
2023-10-04 6:57 ` Krzysztof Kozlowski
2023-10-05 2:53 ` Nitheesh Sekar
2023-10-03 12:08 ` [PATCH 2/6] dt-bindings: PCI: qcom: Add IPQ5108 SoC Nitheesh Sekar
2023-10-04 6:59 ` Krzysztof Kozlowski
2023-10-07 0:25 ` Konrad Dybcio
2023-10-09 9:10 ` Nitheesh Sekar
2023-10-03 12:08 ` [PATCH 3/6] phy: qcom: Introduce PCIe UNIPHY 28LP driver Nitheesh Sekar
2023-10-03 15:15 ` Dmitry Baryshkov
2023-10-04 8:13 ` Krzysztof Kozlowski
2023-10-05 2:55 ` Nitheesh Sekar
2023-10-04 17:27 ` Robert Marko
2023-10-03 12:08 ` [PATCH 4/6] PCI: qcom: Add support for IPQ5018 Nitheesh Sekar
2023-10-03 15:19 ` Dmitry Baryshkov
2023-10-09 17:32 ` Manivannan Sadhasivam [this message]
2023-10-03 12:08 ` [PATCH 5/6] arm64: dts: qcom: ipq5018: Add PCIe related nodes Nitheesh Sekar
2023-10-03 15:23 ` Dmitry Baryshkov
2023-10-03 17:29 ` Nitheesh Sekar
2023-10-09 17:17 ` Manivannan Sadhasivam
2023-10-03 12:08 ` [PATCH 6/6] arm64: dts: qcom: ipq5018: Enable PCIe Nitheesh Sekar
2023-10-07 0:27 ` Konrad Dybcio
2023-10-09 6:15 ` Nitheesh Sekar
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=20231009173259.GC31623@thinkpad \
--to=mani@kernel.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=bhelgaas@google.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kishon@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.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=linux-phy@lists.infradead.org \
--cc=lpieralisi@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=quic_anusha@quicinc.com \
--cc=quic_devipriy@quicinc.com \
--cc=quic_ipkumar@quicinc.com \
--cc=quic_nsekar@quicinc.com \
--cc=quic_srichara@quicinc.com \
--cc=quic_varada@quicinc.com \
--cc=robh@kernel.org \
--cc=vkoul@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).