From d813843cc0b003e3ec24bc67cfc59446d6a80b42 Mon Sep 17 00:00:00 2001 From: Odelu Kukatla Date: Thu, 10 Jun 2021 15:49:50 +0530 Subject: [PATCH] interconnect: qcom: Enable BCMs needed for QoS configuration for Shima Some QoS blocks require voting for BCMs before their registers can be accessed, since they require clocks and regulators controlled by BCM. Vote for these BCMs before configuring QoS during probe. Change-Id: I6aaf8a963f4ace12eb639b61ae0ae45ac045d849 Signed-off-by: Odelu Kukatla --- drivers/interconnect/qcom/shima.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/interconnect/qcom/shima.c b/drivers/interconnect/qcom/shima.c index ad6c4bb014ce..f372f4515d28 100644 --- a/drivers/interconnect/qcom/shima.c +++ b/drivers/interconnect/qcom/shima.c @@ -2548,12 +2548,12 @@ static int qnoc_probe(struct platform_device *pdev) if (qp->num_clks < 0) return qp->num_clks; - ret = clk_bulk_prepare_enable(qp->num_clks, qp->clks); + for (i = 0; i < qp->num_bcms; i++) + qcom_icc_bcm_init(qp->bcms[i], &pdev->dev); - if (ret) { - dev_err(&pdev->dev, "failed to enable clocks\n"); + ret = qcom_icc_enable_qos_deps(qp); + if (ret) return ret; - } for (i = 0; i < num_nodes; i++) { size_t j; @@ -2589,11 +2589,7 @@ static int qnoc_probe(struct platform_device *pdev) } data->num_nodes = num_nodes; - clk_bulk_disable_unprepare(qp->num_clks, qp->clks); - - for (i = 0; i < qp->num_bcms; i++) - qcom_icc_bcm_init(qp->bcms[i], &pdev->dev); - + qcom_icc_disable_qos_deps(qp); platform_set_drvdata(pdev, qp); dev_info(&pdev->dev, "Registered SHIMA ICC\n"); @@ -2609,6 +2605,7 @@ err: icc_node_destroy(node->id); } + qcom_icc_disable_qos_deps(qp); clk_bulk_put_all(qp->num_clks, qp->clks); icc_provider_del(provider);