msm: mdm: do not assert ap2mdm_errfatal gpio in some cases during SSR

Some platforms have the ap2mdm_errfatal line shared between
two external modems. Current implementation is to assert that
gpio during the SSR shutdown callback but that does not allow
for independent restart of each modem. On most platforms it is
actually not necessary to assert the ap2mdm_errfatal during
restart of the mdm. It is necessary during kernel panic of the
apps processor but that is already done in the panic handler.
The use case where it is necessary to assert the errfatal gpio
is where the mdm needs to be restarted by the SSR module, for
example on platforms where the internal and external modems need
to be restarted together. This patch adds a platform data parameter
to identify those platforms.

Change-Id: Ie4f5cbed752a04a80f1e4bfb50da03f52e010045
Signed-off-by: Joel King <joelking@codeaurora.org>
diff --git a/arch/arm/mach-msm/mdm_common.c b/arch/arm/mach-msm/mdm_common.c
index 536e859..63f1af0 100644
--- a/arch/arm/mach-msm/mdm_common.c
+++ b/arch/arm/mach-msm/mdm_common.c
@@ -651,7 +651,10 @@
 
 	mdm_ssr_started(mdev);
 	cancel_delayed_work(&mdev->mdm2ap_status_check_work);
-	gpio_direction_output(mdm_drv->ap2mdm_errfatal_gpio, 1);
+
+	if (!mdm_drv->pdata->no_a2m_errfatal_on_ssr)
+		gpio_direction_output(mdm_drv->ap2mdm_errfatal_gpio, 1);
+
 	if (mdm_drv->pdata->ramdump_delay_ms > 0) {
 		/* Wait for the external modem to complete
 		 * its preparation for ramdumps.