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

Commit 25a4514d authored by David Dai's avatar David Dai
Browse files

msm: msm_bus: Add flag to defer initial QoS configuration



Add new flag to defer QoS configuration at probe time to
accommodate hardware resources that have dependencies
from subsystems that are available much later.

Change-Id: Ia9f353adf5710743a1c0d421da97df19d95d74bc
Signed-off-by: default avatarDavid Dai <daidavid1@codeaurora.org>
parent be6243a4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -139,6 +139,7 @@ qcom,bcm-name: The name used to fetch details about the bcm device from
			the command DB driver.
qcom,drv-id:		The DRV id associated with the RSC, used to differentiate
			between RSCS owned by different execution environments.
qcom,defer-init-qos:	Flag to force defer initial QoS configuration at probe time.


Example:
+14 −3
Original line number Diff line number Diff line
@@ -544,9 +544,6 @@ int msm_bus_commit_data(struct list_head *clist)
		return ret;

	list_for_each_entry_safe(node, node_tmp, clist, link) {
		if (unlikely(node->node_info->defer_qos))
			msm_bus_dev_init_qos(&node->dev, NULL);

		bcm_clist_add(node);
	}

@@ -654,6 +651,12 @@ int msm_bus_commit_data(struct list_head *clist)
	kfree(cmdlist_active);
	kfree(n_active);


	list_for_each_entry_safe(node, node_tmp, clist, link) {
		if (unlikely(node->node_info->defer_qos))
			msm_bus_dev_init_qos(&node->dev, NULL);
	}

exit_msm_bus_commit_data:
	list_for_each_entry_safe(node, node_tmp, clist, link) {
		bcm_clist_clean(node);
@@ -948,6 +951,12 @@ static int msm_bus_dev_init_qos(struct device *dev, void *data)

	MSM_BUS_DBG("Device = %d", node_dev->node_info->id);

	if (node_dev->node_info->qos_params.defer_init_qos) {
		node_dev->node_info->qos_params.defer_init_qos = false;
		node_dev->node_info->defer_qos = true;
		goto exit_init_qos;
	}

	if (node_dev->ap_owned) {
		struct msm_bus_node_device_type *bus_node_info;

@@ -1275,6 +1284,8 @@ static int msm_bus_copy_node_info(struct msm_bus_node_device_type *pdata,
				pdata_node_info->qos_params.reg_mode.write;
	node_info->qos_params.urg_fwd_en =
				pdata_node_info->qos_params.urg_fwd_en;
	node_info->qos_params.defer_init_qos =
				pdata_node_info->qos_params.defer_init_qos;
	node_info->agg_params.buswidth = pdata_node_info->agg_params.buswidth;
	node_info->agg_params.agg_scheme =
					pdata_node_info->agg_params.agg_scheme;
+2 −0
Original line number Diff line number Diff line
@@ -241,6 +241,8 @@ static void get_qos_params(
	node_info->qos_params.urg_fwd_en = of_property_read_bool(dev_node,
						"qcom,forwarding");

	node_info->qos_params.defer_init_qos = of_property_read_bool(dev_node,
						"qcom,defer-init-qos");
}

static int msm_bus_of_parse_clk_array(struct device_node *dev_node,
+1 −0
Original line number Diff line number Diff line
@@ -136,6 +136,7 @@ struct msm_bus_noc_qos_params {
	struct msm_bus_noc_regulator reg;
	struct msm_bus_noc_regulator_mode reg_mode;
	bool urg_fwd_en;
	bool defer_init_qos;
};

struct node_util_levels_type {