Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dab6ccda authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "interconnect: qcom: holi: Configure QoS during probe"

parents 3b7468e3 76db2b85
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
 *
 */

@@ -1718,6 +1718,13 @@ static int qnoc_probe(struct platform_device *pdev)
		return ret;
	}

	ret = clk_bulk_prepare_enable(qp->num_qos_clks, qp->qos_clks);
	if (ret) {
		clk_bulk_disable_unprepare(qp->num_clks, qp->bus_clks);
		dev_err(&pdev->dev, "failed to enable QoS clocks\n");
		return ret;
	}

	for (i = 0; i < num_nodes; i++) {
		size_t j;

@@ -1732,6 +1739,11 @@ static int qnoc_probe(struct platform_device *pdev)
			goto err;
		}

		if (qnodes[i]->qosbox) {
			qnodes[i]->noc_ops->set_qos(qnodes[i]);
			qnodes[i]->qosbox->initialized = true;
		}

		node->name = qnodes[i]->name;
		node->data = qnodes[i];
		icc_node_add(node, provider);
@@ -1743,6 +1755,8 @@ static int qnoc_probe(struct platform_device *pdev)
	}
	data->num_nodes = num_nodes;

	clk_bulk_disable_unprepare(qp->num_qos_clks, qp->qos_clks);

	platform_set_drvdata(pdev, qp);

	dev_info(dev, "Registered HOLI ICC\n");
@@ -1758,6 +1772,7 @@ static int qnoc_probe(struct platform_device *pdev)
		icc_node_destroy(node->id);
	}

	clk_bulk_disable_unprepare(qp->num_qos_clks, qp->qos_clks);
	clk_bulk_disable_unprepare(qp->num_clks, qp->bus_clks);
	icc_provider_del(provider);
	return ret;