msm: smd: Add SMSM Reset Handshaking disable config
Add Subsystem Restart configuration to platform data that specifies if
the legacy SMSM_RESET Modem<->Apps handshaking should be used. This
allows removing the calls to cpu_is_msmXXXX() which is currently being
used to disable the legacy handshaking.
Not disabling the handshaking for targets that support subsystem restart
will result in an erroneous modem-restart notification during a modem
subsystem restart which will typically result in a panic in the
subsystem restart handler.
Change-Id: Iaaf162f35c16d0abfff768ac62f00d3179dc5c91
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
index 9321b40..d7f2623 100644
--- a/arch/arm/mach-msm/smd.c
+++ b/arch/arm/mach-msm/smd.c
@@ -654,6 +654,7 @@
struct notifier_block nb;
};
+static int disable_smsm_reset_handshake;
static struct platform_device loopback_tty_pdev = {.name = "LOOPBACK_TTY"};
static LIST_HEAD(smd_ch_closed_list);
@@ -2338,7 +2339,7 @@
/* If we get an interrupt and the apps SMSM_RESET
bit is already set, the modem is acking the
app's reset ack. */
- if (!cpu_is_msm8960() && !cpu_is_msm8930())
+ if (!disable_smsm_reset_handshake)
apps &= ~SMSM_RESET;
/* Issue a fake irq to handle any
* smd state changes during reset
@@ -2349,7 +2350,7 @@
modem_queue_start_reset_notify();
} else if (modm & SMSM_RESET) {
- if (!cpu_is_msm8960() && !cpu_is_msm8930())
+ if (!disable_smsm_reset_handshake)
apps |= SMSM_RESET;
pr_err("\nSMSM: Modem SMSM state changed to SMSM_RESET.");
@@ -2871,6 +2872,10 @@
num_ss = smd_platform_data->num_ss_configs;
smd_ss_config_list = smd_platform_data->smd_ss_configs;
+ if (smd_platform_data->smd_ssr_config)
+ disable_smsm_reset_handshake = smd_platform_data->
+ smd_ssr_config->disable_smsm_reset_handshake;
+
for (i = 0; i < num_ss; i++) {
cfg = &smd_ss_config_list[i];