mdm2: Disconnect and connect hsic when mdm status goes high
Once all the images are downloaded to mdm(using flashless-boot
procedure) mdm will boot to HLOS(high-level os) and will turn on
hsic controller. mdm staus gpio will be pulled high during early
stages of HLOS. Indicate hsic disconnection/connection when mdm
status gpio goes high.
Change-Id: Ib014404ddde39313e6c6347664ed17360e8a8908
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
diff --git a/arch/arm/mach-msm/mdm2.c b/arch/arm/mach-msm/mdm2.c
index 91f8fc2..bf4e6a4 100644
--- a/arch/arm/mach-msm/mdm2.c
+++ b/arch/arm/mach-msm/mdm2.c
@@ -116,6 +116,16 @@
mdm_debug_on = value;
}
+static void mdm_status_changed(int value)
+{
+ MDM_DBG("%s: value:%d\n", __func__, value);
+
+ if (value) {
+ peripheral_disconnect();
+ peripheral_connect();
+ }
+}
+
static int __init mdm_modem_probe(struct platform_device *pdev)
{
/* Instantiate driver object. */
@@ -123,6 +133,7 @@
mdm_cb.power_down_mdm_cb = power_down_mdm;
mdm_cb.normal_boot_done_cb = normal_boot_done;
mdm_cb.debug_state_changed_cb = debug_state_changed;
+ mdm_cb.status_cb = mdm_status_changed;
return mdm_common_create(pdev, &mdm_cb);
}