Merge tag 'pci-v5.19-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
[linux-block.git] / drivers / pci / controller / dwc / pcie-qcom.c
index 816028c0f6edb0bea64c980d3573143388224d67..2ea13750b4924149fa1c8e962f225291b5fa368c 100644 (file)
@@ -1238,12 +1238,6 @@ static int qcom_pcie_init_2_7_0(struct qcom_pcie *pcie)
                goto err_disable_clocks;
        }
 
-       ret = clk_prepare_enable(res->pipe_clk);
-       if (ret) {
-               dev_err(dev, "cannot prepare/enable pipe clock\n");
-               goto err_disable_clocks;
-       }
-
        /* Wait for reset to complete, required on SM8450 */
        usleep_range(1000, 1500);
 
@@ -1523,6 +1517,13 @@ static const struct qcom_pcie_cfg sdm845_cfg = {
        .has_tbu_clk = true,
 };
 
+static const struct qcom_pcie_cfg sm8150_cfg = {
+       /* sm8150 has qcom IP rev 1.5.0. However 1.5.0 ops are same as
+        * 1.9.0, so reuse the same.
+        */
+       .ops = &ops_1_9_0,
+};
+
 static const struct qcom_pcie_cfg sm8250_cfg = {
        .ops = &ops_1_9_0,
        .has_tbu_clk = true,
@@ -1627,22 +1628,21 @@ static int qcom_pcie_probe(struct platform_device *pdev)
        pp->ops = &qcom_pcie_dw_ops;
 
        ret = phy_init(pcie->phy);
-       if (ret) {
-               pm_runtime_disable(&pdev->dev);
+       if (ret)
                goto err_pm_runtime_put;
-       }
 
        platform_set_drvdata(pdev, pcie);
 
        ret = dw_pcie_host_init(pp);
        if (ret) {
                dev_err(dev, "cannot initialize host\n");
-               pm_runtime_disable(&pdev->dev);
-               goto err_pm_runtime_put;
+               goto err_phy_exit;
        }
 
        return 0;
 
+err_phy_exit:
+       phy_exit(pcie->phy);
 err_pm_runtime_put:
        pm_runtime_put(dev);
        pm_runtime_disable(dev);
@@ -1660,6 +1660,7 @@ static const struct of_device_id qcom_pcie_match[] = {
        { .compatible = "qcom,pcie-ipq4019", .data = &ipq4019_cfg },
        { .compatible = "qcom,pcie-qcs404", .data = &ipq4019_cfg },
        { .compatible = "qcom,pcie-sdm845", .data = &sdm845_cfg },
+       { .compatible = "qcom,pcie-sm8150", .data = &sm8150_cfg },
        { .compatible = "qcom,pcie-sm8250", .data = &sm8250_cfg },
        { .compatible = "qcom,pcie-sc8180x", .data = &sc8180x_cfg },
        { .compatible = "qcom,pcie-sm8450-pcie0", .data = &sm8450_pcie0_cfg },