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

Commit 4eb3ec95 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: msm_bus: Add support for QoS clk for fabrics"

parents ff0c45fa b282d028
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -299,8 +299,13 @@ static int flush_clk_data(struct device *node_device, int ctx)
			}

			ret = enable_nodeclk(nodeclk);
		} else
		} else {
			if ((node->node_info->is_fab_dev) &&
				!IS_ERR_OR_NULL(node->qos_clk.clk))
					ret = disable_nodeclk(&node->qos_clk);

			ret = disable_nodeclk(nodeclk);
		}

		if (ret) {
			MSM_BUS_ERR("%s: Failed to enable for %d", __func__,
@@ -618,6 +623,15 @@ static int msm_bus_qos_enable_clk(struct msm_bus_node_device_type *node)
	}
	bus_qos_enabled = 1;

	if (!IS_ERR_OR_NULL(bus_node->qos_clk.clk)) {
		ret = enable_nodeclk(&bus_node->qos_clk);
		if (ret) {
			MSM_BUS_ERR("%s: Failed to enable bus QOS clk, node %d",
				__func__, node->node_info->id);
			goto exit_enable_qos_clk;
		}
	}

	if (!IS_ERR_OR_NULL(node->qos_clk.clk)) {
		rounded_rate = clk_round_rate(node->qos_clk.clk, 1);
		ret = setrate_nodeclk(&node->qos_clk, rounded_rate);
@@ -799,8 +813,6 @@ static int msm_bus_fabric_init(struct device *dev,
		goto exit_fabric_init;
	}

	/*if (msmbus_coresight_init(pdev))
		pr_warn("Coresight support absent for bus: %d\n", pdata->id);*/
exit_fabric_init:
	return ret;
}
+9 −0
Original line number Diff line number Diff line
@@ -392,6 +392,15 @@ static unsigned int get_bus_node_device_data(
			dev_err(&pdev->dev,
				"Failed to get bus clk for bus%d ctx%d",
				 node_device->node_info->id, ACTIVE_CTX);

		node_device->qos_clk.clk = of_clk_get_by_name(dev_node,
							"bus_qos_clk");

		if (IS_ERR_OR_NULL(node_device->qos_clk.clk))
			dev_dbg(&pdev->dev,
				"%s:Failed to get bus qos clk for %d",
				__func__, node_device->node_info->id);

		if (msmbus_coresight_init_adhoc(pdev, dev_node))
			dev_warn(&pdev->dev,
				 "Coresight support absent for bus: %d\n",