From: Johan Hovold <johan+linaro@kernel.org>
To: Bjorn Helgaas <bhelgaas@google.com>,
Stanimir Varbanov <svarbanov@mm-sol.com>,
Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: "Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Andy Gross" <agross@kernel.org>,
"Bjorn Andersson" <bjorn.andersson@linaro.org>,
"Konrad Dybcio" <konrad.dybcio@somainline.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
"Johan Hovold" <johan+linaro@kernel.org>,
"Rob Herring" <robh@kernel.org>
Subject: [PATCH v2 6/8] PCI: qcom: Make all optional clocks optional
Date: Thu, 14 Jul 2022 09:13:46 +0200 [thread overview]
Message-ID: <20220714071348.6792-7-johan+linaro@kernel.org> (raw)
In-Reply-To: <20220714071348.6792-1-johan+linaro@kernel.org>
The kernel is not a devicetree validator and does not need to re-encode
information which is already available in the devicetree.
This is specifically true for the optional PCIe clocks, some of which
are really interconnect clocks.
Treat also the 2.7.0 optional clocks as truly optional instead of
maintaining a list of clocks per compatible (including two compatible
strings for the two identical controllers on sm8450) just to validate
the devicetree.
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
drivers/pci/controller/dwc/pcie-qcom.c | 28 ++++----------------------
1 file changed, 4 insertions(+), 24 deletions(-)
diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index 699cd8b0f38e..1339f05bee65 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -212,10 +212,6 @@ struct qcom_pcie_ops {
struct qcom_pcie_cfg {
const struct qcom_pcie_ops *ops;
- unsigned int has_tbu_clk:1;
- unsigned int has_ddrss_sf_tbu_clk:1;
- unsigned int has_aggre0_clk:1;
- unsigned int has_aggre1_clk:1;
};
struct qcom_pcie {
@@ -1193,14 +1189,6 @@ static int qcom_pcie_get_resources_2_7_0(struct qcom_pcie *pcie)
res->clks[idx++].id = "bus_master";
res->clks[idx++].id = "bus_slave";
res->clks[idx++].id = "slave_q2a";
- if (pcie->cfg->has_tbu_clk)
- res->clks[idx++].id = "tbu";
- if (pcie->cfg->has_ddrss_sf_tbu_clk)
- res->clks[idx++].id = "ddrss_sf_tbu";
- if (pcie->cfg->has_aggre0_clk)
- res->clks[idx++].id = "aggre0";
- if (pcie->cfg->has_aggre1_clk)
- res->clks[idx++].id = "aggre1";
num_clks = idx;
@@ -1208,6 +1196,10 @@ static int qcom_pcie_get_resources_2_7_0(struct qcom_pcie *pcie)
if (ret < 0)
return ret;
+ res->clks[idx++].id = "tbu";
+ res->clks[idx++].id = "ddrss_sf_tbu";
+ res->clks[idx++].id = "aggre0";
+ res->clks[idx++].id = "aggre1";
res->clks[idx++].id = "noc_aggr_4";
res->clks[idx++].id = "noc_aggr_south_sf";
res->clks[idx++].id = "cnoc_qx";
@@ -1636,17 +1628,14 @@ static const struct qcom_pcie_cfg ipq4019_cfg = {
static const struct qcom_pcie_cfg sa8540p_cfg = {
.ops = &ops_1_9_0,
- .has_ddrss_sf_tbu_clk = true,
};
static const struct qcom_pcie_cfg sc8280xp_cfg = {
.ops = &ops_1_9_0,
- .has_ddrss_sf_tbu_clk = true,
};
static const struct qcom_pcie_cfg sdm845_cfg = {
.ops = &ops_2_7_0,
- .has_tbu_clk = true,
};
static const struct qcom_pcie_cfg sm8150_cfg = {
@@ -1658,31 +1647,22 @@ static const struct qcom_pcie_cfg sm8150_cfg = {
static const struct qcom_pcie_cfg sm8250_cfg = {
.ops = &ops_1_9_0,
- .has_tbu_clk = true,
- .has_ddrss_sf_tbu_clk = true,
};
static const struct qcom_pcie_cfg sm8450_pcie0_cfg = {
.ops = &ops_1_9_0,
- .has_ddrss_sf_tbu_clk = true,
- .has_aggre0_clk = true,
- .has_aggre1_clk = true,
};
static const struct qcom_pcie_cfg sm8450_pcie1_cfg = {
.ops = &ops_1_9_0,
- .has_ddrss_sf_tbu_clk = true,
- .has_aggre1_clk = true,
};
static const struct qcom_pcie_cfg sc7280_cfg = {
.ops = &ops_1_9_0,
- .has_tbu_clk = true,
};
static const struct qcom_pcie_cfg sc8180x_cfg = {
.ops = &ops_1_9_0,
- .has_tbu_clk = true,
};
static const struct qcom_pcie_cfg ipq6018_cfg = {
--
2.35.1
next prev parent reply other threads:[~2022-07-14 7:15 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-14 7:13 [PATCH v2 0/8] PCI: qcom: Add support for SC8280XP and SA8540P Johan Hovold
2022-07-14 7:13 ` [PATCH v2 1/8] dt-bindings: PCI: qcom: Enumerate platforms with single msi interrupt Johan Hovold
2022-07-14 10:44 ` Krzysztof Kozlowski
2022-07-14 7:13 ` [PATCH v2 2/8] dt-bindings: PCI: qcom: Add SC8280XP to binding Johan Hovold
2022-07-14 7:13 ` [PATCH v2 3/8] dt-bindings: PCI: qcom: Add SA8540P " Johan Hovold
2022-07-14 14:29 ` Brian Masney
2022-07-14 7:13 ` [PATCH v2 4/8] PCI: qcom: Add support for SC8280XP Johan Hovold
2022-07-14 7:13 ` [PATCH v2 5/8] PCI: qcom: Add support for SA8540P Johan Hovold
2022-07-14 14:30 ` Brian Masney
2022-07-14 7:13 ` Johan Hovold [this message]
2022-07-14 14:31 ` [PATCH v2 6/8] PCI: qcom: Make all optional clocks optional Brian Masney
2022-07-18 10:37 ` Dmitry Baryshkov
2022-07-14 7:13 ` [PATCH v2 7/8] PCI: qcom: Clean up IP configurations Johan Hovold
2022-07-14 14:42 ` Brian Masney
2022-07-18 10:39 ` Dmitry Baryshkov
2022-07-18 12:00 ` Johan Hovold
2022-07-14 7:13 ` [PATCH v2 8/8] PCI: qcom: Sort device-id table Johan Hovold
2022-07-14 14:27 ` Brian Masney
2022-07-15 7:43 ` Johan Hovold
2022-07-15 9:26 ` Brian Masney
2022-08-16 16:06 ` Lorenzo Pieralisi
2022-08-18 20:05 ` Andrew Halaney
2022-08-19 7:46 ` Lorenzo Pieralisi
2022-08-22 12:45 ` Johan Hovold
2022-07-15 22:37 ` [PATCH v2 0/8] PCI: qcom: Add support for SC8280XP and SA8540P Bjorn Helgaas
2022-07-18 10:16 ` Johan Hovold
2022-07-18 7:49 ` Stanimir Varbanov
2022-07-18 10:18 ` Johan Hovold
2022-07-18 10:51 ` Johan Hovold
2022-08-19 8:40 ` Lorenzo Pieralisi
2022-08-22 12:52 ` Johan Hovold
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=20220714071348.6792-7-johan+linaro@kernel.org \
--to=johan+linaro@kernel.org \
--cc=agross@kernel.org \
--cc=bhelgaas@google.com \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=konrad.dybcio@somainline.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=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=robh+dt@kernel.org \
--cc=robh@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).