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

Commit 85547e3e authored by Dilip Kota's avatar Dilip Kota Committed by Gerrit - the friendly Code Review server
Browse files

slim-msm-ngd: Register with specific subsystem



Slimbus master is present in different subsystem
on different tragets.
Register with specific subsystem as mentioned in
the device tree.

Change-Id: I1bee7fdd7578deedca8e4e43af9055b41b96d652
Signed-off-by: default avatarDilip Kota <dkota@codeaurora.org>
parent 2642c0ad
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -59,6 +59,12 @@ Optional property:
		 register and receive subsytem restart notification from mdm
		 and follow appropriate steps to ensure communication on the bus
		 can be resumed after mdm-restart.
 - qcom,subsys-name: This value provides the subsystem name where slimbus master
		 is present. This property enables the slimbus driver to
		 register and receive subsytem restart notification from subsystem
		 and follow appropriate steps to ensure communication on the bus
		 can be resumed after subsytem restart. By default slimbus driver
		 register with ADSP subsystem.
Example:
	slim@fe12f000 {
		cell-index = <1>;
+12 −4
Original line number Diff line number Diff line
@@ -1496,7 +1496,7 @@ static int ngd_slim_probe(struct platform_device *pdev)
	struct resource		*irq, *bam_irq;
	bool			rxreg_access = false;
	bool			slim_mdm = false;
	const char		*ext_modem_id = NULL;
	const char		*ext_modem_id = NULL, *subsys_name = NULL;

	slim_mem = platform_get_resource_byname(pdev, IORESOURCE_MEM,
						"slimbus_physical");
@@ -1679,9 +1679,17 @@ static int ngd_slim_probe(struct platform_device *pdev)
	pm_runtime_set_suspended(dev->dev);
	pm_runtime_enable(dev->dev);

	ret = of_property_read_string(pdev->dev.of_node,
				"qcom,subsys-name", &subsys_name);
	if (ret) {
		dev->dsp.nb.notifier_call = dsp_ssr_notify_cb;
		dev->dsp.ssr = subsys_notif_register_notifier("adsp",
							&dev->dsp.nb);
	} else {
		dev->dsp.nb.notifier_call = dsp_ssr_notify_cb;
		dev->dsp.ssr = subsys_notif_register_notifier(subsys_name,
							&dev->dsp.nb);
	}
	if (IS_ERR_OR_NULL(dev->dsp.ssr))
		dev_err(dev->dev,
			"subsys_notif_register_notifier failed %p",