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

Commit 6aea7375 authored by Deepak Katragadda's avatar Deepak Katragadda
Browse files

qcom: pil: Allow subsys probe to succeed if bus driver is not ready



Allow the subsystem PIL drivers to probe succesfully even if
the bus driver is not ready. This resolves the problem of not
being able to load subsystem firmware due to the bus dependancy.
The PIL driver will however, no longer be able to vote for bus
bandwidth for the subsystem.

Change-Id: I26641028f07181d5af1cd99b97104828e4fc4b88
Signed-off-by: default avatarDeepak Katragadda <dkatraga@codeaurora.org>
parent 1c267e4a
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -71,6 +71,8 @@ struct reg_info {
 * @ramdump_dev: ramdump device pointer
 * @pas_id: the PAS id for tz
 * @bus_client: bus client id
 * @enable_bus_scaling: set to true if PIL needs to vote for
 *			bus bandwidth
 * @stop_ack: state of completion of stop ack
 * @desc: PIL descriptor
 * @subsys: subsystem device pointer
@@ -89,6 +91,7 @@ struct pil_tz_data {
	void *ramdump_dev;
	u32 pas_id;
	u32 bus_client;
	bool enable_bus_scaling;
	struct completion stop_ack;
	struct pil_desc desc;
	struct subsys_device *subsys;
@@ -345,7 +348,7 @@ static int of_read_bus_pdata(struct platform_device *pdev,

	d->bus_client = msm_bus_scale_register_client(pdata);
	if (!d->bus_client)
		return -EINVAL;
		pr_warn("%s: Unable to register bus client\n", __func__);

	return 0;
}
@@ -384,6 +387,7 @@ static int piltz_resc_init(struct platform_device *pdev, struct pil_tz_data *d)
	d->proxy_reg_count = count;

	if (of_find_property(dev->of_node, "qcom,msm-bus,name", &len)) {
		d->enable_bus_scaling = true;
		rc = of_read_bus_pdata(pdev, d);
		if (rc) {
			dev_err(dev, "Failed to setup bus scaling client.\n");
@@ -516,7 +520,9 @@ static int pil_make_proxy_vote(struct pil_desc *pil)
			dev_err(pil->dev, "bandwidth request failed\n");
			goto err_bw;
		}
	}
	} else
		WARN(d->enable_bus_scaling, "Bus scaling not set up for %s!\n",
					d->subsys_desc.name);

	return 0;
err_bw:
@@ -536,6 +542,9 @@ static void pil_remove_proxy_vote(struct pil_desc *pil)

	if (d->bus_client)
		msm_bus_scale_client_update_request(d->bus_client, 0);
	else
		WARN(d->enable_bus_scaling, "Bus scaling not set up for %s!\n",
					d->subsys_desc.name);

	disable_unprepare_clocks(d->proxy_clks, d->proxy_clk_count);