Skip to contentSkip to conversation

PCI: qcom: Remove ddrss_sf_tbu clock from sc8180x

PATCH In review Bjorn Andersson 5 participants 6 messages Mar 31, 2022 – May 3, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: qcom: Remove ddrss_sf_tbu clock from sc8180x

The Qualcomm SC8180X platform was piggy backing on the SM8250 qcom_pcie_cfg, but the platform doesn't have the ddrss_sf_tbu clock, so it now fails to probe due to the missing clock.

Give SC8180X its own qcom_pcie_cfg, without the ddrss_sf_tbu flag set.

Fixes 0614f98bbb9f ("PCI: qcom: Add ddrss_sf_tbu flag")
---
 drivers/pci/controller/dwc/pcie-qcom.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/pci/controller/dwc/pcie-qcom.c +6 -1
index 6ab90891801d..816028c0f6ed 100644
@@ -1550,6 +1550,11 @@ static const struct qcom_pcie_cfg sc7280_cfg = {
 	.pipe_clk_need_muxing = true,
 };
 
+static const struct qcom_pcie_cfg sc8180x_cfg = {
+	.ops = &ops_1_9_0,
+	.has_tbu_clk = true,
+};
+
 static const struct dw_pcie_ops dw_pcie_ops = {
 	.link_up = qcom_pcie_link_up,
 	.start_link = qcom_pcie_start_link,
@@ -1656,7 +1661,7 @@ static const struct of_device_id qcom_pcie_match[] = {
 	{ .compatible = "qcom,pcie-qcs404", .data = &ipq4019_cfg },
 	{ .compatible = "qcom,pcie-sdm845", .data = &sdm845_cfg },
 	{ .compatible = "qcom,pcie-sm8250", .data = &sm8250_cfg },
-	{ .compatible = "qcom,pcie-sc8180x", .data = &sm8250_cfg },
+	{ .compatible = "qcom,pcie-sc8180x", .data = &sc8180x_cfg },
 	{ .compatible = "qcom,pcie-sm8450-pcie0", .data = &sm8450_pcie0_cfg },
 	{ .compatible = "qcom,pcie-sm8450-pcie1", .data = &sm8450_pcie1_cfg },
 	{ .compatible = "qcom,pcie-sc7280", .data = &sc7280_cfg },
Signature · 1 line
2.35.1
#1 lore raw
Quoted 8 lines · Bjorn Andersson

The Qualcomm SC8180X platform was piggy backing on the SM8250 qcom_pcie_cfg, but the platform doesn't have the ddrss_sf_tbu clock, so it now fails to probe due to the missing clock.

Give SC8180X its own qcom_pcie_cfg, without the ddrss_sf_tbu flag set.

Fixes 0614f98bbb9f ("PCI: qcom: Add ddrss_sf_tbu flag")

Ping. Would be nice to have this regression fix picked up for v5.18...

Thanks,
Bjorn

Quoted 32 lines
---
 drivers/pci/controller/dwc/pcie-qcom.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/pci/controller/dwc/pcie-qcom.c +6 -1
index 6ab90891801d..816028c0f6ed 100644
@@ -1550,6 +1550,11 @@ static const struct qcom_pcie_cfg sc7280_cfg = {
 	.pipe_clk_need_muxing = true,
 };
 
+static const struct qcom_pcie_cfg sc8180x_cfg = {
+	.ops = &ops_1_9_0,
+	.has_tbu_clk = true,
+};
+
 static const struct dw_pcie_ops dw_pcie_ops = {
 	.link_up = qcom_pcie_link_up,
 	.start_link = qcom_pcie_start_link,
@@ -1656,7 +1661,7 @@ static const struct of_device_id qcom_pcie_match[] = {
 	{ .compatible = "qcom,pcie-qcs404", .data = &ipq4019_cfg },
 	{ .compatible = "qcom,pcie-sdm845", .data = &sdm845_cfg },
 	{ .compatible = "qcom,pcie-sm8250", .data = &sm8250_cfg },
-	{ .compatible = "qcom,pcie-sc8180x", .data = &sm8250_cfg },
+	{ .compatible = "qcom,pcie-sc8180x", .data = &sc8180x_cfg },
 	{ .compatible = "qcom,pcie-sm8450-pcie0", .data = &sm8450_pcie0_cfg },
 	{ .compatible = "qcom,pcie-sm8450-pcie1", .data = &sm8450_pcie1_cfg },
 	{ .compatible = "qcom,pcie-sc7280", .data = &sc7280_cfg },
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#2 lore raw
In reply to Bjorn Andersson
Quoted 9 lines · Bjorn Andersson

The Qualcomm SC8180X platform was piggy backing on the SM8250 qcom_pcie_cfg, but the platform doesn't have the ddrss_sf_tbu clock, so it now fails to probe due to the missing clock.

Give SC8180X its own qcom_pcie_cfg, without the ddrss_sf_tbu flag set.

Fixes 0614f98bbb9f ("PCI: qcom: Add ddrss_sf_tbu flag")
Quoted 32 lines
---
 drivers/pci/controller/dwc/pcie-qcom.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/pci/controller/dwc/pcie-qcom.c +6 -2
index 6ab90891801d..816028c0f6ed 100644
@@ -1550,6 +1550,11 @@ static const struct qcom_pcie_cfg sc7280_cfg = {
        .pipe_clk_need_muxing = true,
 };
 
+static const struct qcom_pcie_cfg sc8180x_cfg = {
+       .ops = &ops_1_9_0,
+       .has_tbu_clk = true,
+};
+
 static const struct dw_pcie_ops dw_pcie_ops = {
        .link_up = qcom_pcie_link_up,
        .start_link = qcom_pcie_start_link,
@@ -1656,7 +1661,7 @@ static const struct of_device_id qcom_pcie_match[] = {
        { .compatible = "qcom,pcie-qcs404", .data = &ipq4019_cfg },
        { .compatible = "qcom,pcie-sdm845", .data = &sdm845_cfg },
        { .compatible = "qcom,pcie-sm8250", .data = &sm8250_cfg },
-       { .compatible = "qcom,pcie-sc8180x", .data = &sm8250_cfg },
+       { .compatible = "qcom,pcie-sc8180x", .data = &sc8180x_cfg },
        { .compatible = "qcom,pcie-sm8450-pcie0", .data = &sm8450_pcie0_cfg },
        { .compatible = "qcom,pcie-sm8450-pcie1", .data = &sm8450_pcie1_cfg },
        { .compatible = "qcom,pcie-sc7280", .data = &sc7280_cfg },
--

2.35.1

Signature · 2 lines
With best wishes
Dmitry
Acked-by on v1 1/1
#3 lore raw
In reply to Bjorn Andersson
Quoted 11 lines · Bjorn Andersson

The Qualcomm SC8180X platform was piggy backing on the SM8250 qcom_pcie_cfg, but the platform doesn't have the ddrss_sf_tbu clock, so it now fails to probe due to the missing clock.

Give SC8180X its own qcom_pcie_cfg, without the ddrss_sf_tbu flag set.

Fixes 0614f98bbb9f ("PCI: qcom: Add ddrss_sf_tbu flag")
---
 drivers/pci/controller/dwc/pcie-qcom.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Signature · 2 lines
regards,
Stan
Tested-by on v1 1/1
#4 lore raw
In reply to Bjorn Andersson
Quoted 29 lines · Bjorn Andersson

The Qualcomm SC8180X platform was piggy backing on the SM8250 qcom_pcie_cfg, but the platform doesn't have the ddrss_sf_tbu clock, so it now fails to probe due to the missing clock.

Give SC8180X its own qcom_pcie_cfg, without the ddrss_sf_tbu flag set.

Fixes 0614f98bbb9f ("PCI: qcom: Add ddrss_sf_tbu flag")
---
  drivers/pci/controller/dwc/pcie-qcom.c | 7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)
drivers/pci/controller/dwc/pcie-qcom.c +5 -0
index 6ab90891801d..816028c0f6ed 100644
@@ -1550,6 +1550,11 @@ static const struct qcom_pcie_cfg sc7280_cfg = {
  	.pipe_clk_need_muxing = true,
  };
 
+static const struct qcom_pcie_cfg sc8180x_cfg = {
+	.ops = &ops_1_9_0,
+	.has_tbu_clk = true,
+};
+
  static const struct dw_pcie_ops dw_pcie_ops = {
  	.link_up = qcom_pcie_link_up,
  	.start_link = qcom_pcie_start_link,

drivers/pci/controller/dwc/pcie-qcom.c static const struct of_device_id qcom_pcie_match[] = { · line 1667

Quoted 8 lines
drivers/pci/controller/dwc/pcie-qcom.c +1 -1
@@ -1656,7 +1661,7 @@ static const struct of_device_id qcom_pcie_match[] = {
  	{ .compatible = "qcom,pcie-qcs404", .data = &ipq4019_cfg },
  	{ .compatible = "qcom,pcie-sdm845", .data = &sdm845_cfg },
  	{ .compatible = "qcom,pcie-sm8250", .data = &sm8250_cfg },
-	{ .compatible = "qcom,pcie-sc8180x", .data = &sm8250_cfg },
+	{ .compatible = "qcom,pcie-sc8180x", .data = &sc8180x_cfg },
  	{ .compatible = "qcom,pcie-sm8450-pcie0", .data = &sm8450_pcie0_cfg },
  	{ .compatible = "qcom,pcie-sm8450-pcie1", .data = &sm8450_pcie1_cfg },
  	{ .compatible = "qcom,pcie-sc7280", .data = &sc7280_cfg },

Hi Bjorn,

Tested on the Lenovo Flex 5G and fixes the issue I saw.

#5 lore raw
In reply to Bjorn Andersson
Quoted 8 lines · Bjorn Andersson

The Qualcomm SC8180X platform was piggy backing on the SM8250 qcom_pcie_cfg, but the platform doesn't have the ddrss_sf_tbu clock, so it now fails to probe due to the missing clock.

Give SC8180X its own qcom_pcie_cfg, without the ddrss_sf_tbu flag set.

Fixes 0614f98bbb9f ("PCI: qcom: Add ddrss_sf_tbu flag")

Since this fixes a regression that we added in v5.18-rc1, I applied this to for-linus for v5.18. Thanks!

Quoted 32 lines
---
 drivers/pci/controller/dwc/pcie-qcom.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/pci/controller/dwc/pcie-qcom.c +6 -1
index 6ab90891801d..816028c0f6ed 100644
@@ -1550,6 +1550,11 @@ static const struct qcom_pcie_cfg sc7280_cfg = {
 	.pipe_clk_need_muxing = true,
 };
 
+static const struct qcom_pcie_cfg sc8180x_cfg = {
+	.ops = &ops_1_9_0,
+	.has_tbu_clk = true,
+};
+
 static const struct dw_pcie_ops dw_pcie_ops = {
 	.link_up = qcom_pcie_link_up,
 	.start_link = qcom_pcie_start_link,
@@ -1656,7 +1661,7 @@ static const struct of_device_id qcom_pcie_match[] = {
 	{ .compatible = "qcom,pcie-qcs404", .data = &ipq4019_cfg },
 	{ .compatible = "qcom,pcie-sdm845", .data = &sdm845_cfg },
 	{ .compatible = "qcom,pcie-sm8250", .data = &sm8250_cfg },
-	{ .compatible = "qcom,pcie-sc8180x", .data = &sm8250_cfg },
+	{ .compatible = "qcom,pcie-sc8180x", .data = &sc8180x_cfg },
 	{ .compatible = "qcom,pcie-sm8450-pcie0", .data = &sm8450_pcie0_cfg },
 	{ .compatible = "qcom,pcie-sm8450-pcie1", .data = &sm8450_pcie1_cfg },
 	{ .compatible = "qcom,pcie-sc7280", .data = &sc7280_cfg },
Signature · 1 line
2.35.1