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: Naveen Kaje <nkaje@codeaurora.org>
This commit is contained in:
Naveen Kaje
2014-04-22 16:31:44 +05:30
committed by Kiran Gunda
parent b94aa31c9c
commit 284da55bbd
2 changed files with 10 additions and 7 deletions
@@ -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>;
+6 -3
View File
@@ -1205,6 +1205,7 @@ static int __devinit 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");
@@ -1265,8 +1266,10 @@ static int __devinit 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;
}
@@ -1341,7 +1344,7 @@ static int __devinit 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,