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

Commit c5eab7ea authored by Naveen Kaje's avatar Naveen Kaje
Browse files

msm-slim-ngd: Read configurable external modem identifier



When an external modem is used, read the config from dt and use the
value in subsystem restart callback registration.

CRs-Fixed: 612775
Change-Id: I5e40e98a60c304c82741914157191cfb2f0697d5
Signed-off-by: default avatarNaveen Kaje <nkaje@codeaurora.org>
parent 186f5c0e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -54,11 +54,11 @@ Optional property:
		 are to be used, so that application processor can query
		 logical address of the ported generic device to be used.
		 Other than PC, fields of EA are same across platforms.
 -qcom,slim-mdm: This value indicates presence of slimbus component on
 - qcom,slim-mdm: This value provides the identifier of slimbus component on
		 external mdm. This property enables the slimbus driver to
		 receive subsytem restart notification from mdm and follow
		 appropriate steps to ensure communication on the bus can be
		 resumed after mdm-restart.
		 register and receive subsytem restart notification from mdm
		 and follow appropriate steps to ensure communication on the bus
		 can be resumed after mdm-restart.
Example:
	slim@fe12f000 {
		cell-index = <1>;
+1 −1
Original line number Diff line number Diff line
@@ -728,7 +728,7 @@
		interrupt-names = "slimbus_irq", "slimbus_bam_irq";
		qcom,apps-ch-pipes = <0x60000000>;
		qcom,ea-pc = <0xb0>;
		qcom,slim-mdm;
		qcom,slim-mdm = "esoc0";

		audio_slimslave {
			compatible = "qcom,audio-slimslave";
+6 −3
Original line number Diff line number Diff line
@@ -1204,6 +1204,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;

	slim_mem = platform_get_resource_byname(pdev, IORESOURCE_MEM,
						"slimbus_physical");
@@ -1264,8 +1265,10 @@ static int ngd_slim_probe(struct platform_device *pdev)
					&dev->pdata.apps_pipes);
		of_property_read_u32(pdev->dev.of_node, "qcom,ea-pc",
					&dev->pdata.eapc);
		slim_mdm = of_property_read_bool(pdev->dev.of_node,
					"qcom,slim-mdm");
		ret = of_property_read_string(pdev->dev.of_node,
					"qcom,slim-mdm", &ext_modem_id);
		if (!ret)
			slim_mdm = true;
	} else {
		dev->ctrl.nr = pdev->id;
	}
@@ -1340,7 +1343,7 @@ static int ngd_slim_probe(struct platform_device *pdev)

	if (slim_mdm) {
		dev->mdm.nb.notifier_call = mdm_ssr_notify_cb;
		dev->mdm.ssr = subsys_notif_register_notifier("external_modem",
		dev->mdm.ssr = subsys_notif_register_notifier(ext_modem_id,
							&dev->mdm.nb);
		if (IS_ERR_OR_NULL(dev->mdm.ssr))
			dev_err(dev->dev,