msm: smsm: Clear Apps bits for Modem Restart

Only clear Apps.SMSM_INIT and Apps.SMSM_LOOPBACK
bits if a modem restart occurs.

CRs-Fixed: 318556
Change-Id: I936abe2b13f283f29440e91cc727de90273f1dd4
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 76781cb..691dad2 100644
--- a/arch/arm/mach-msm/smd.c
+++ b/arch/arm/mach-msm/smd.c
@@ -660,9 +660,11 @@
 	if (smsm_info.state) {
 		writel_relaxed(0, SMSM_STATE_ADDR(restart_pid));
 
-		/* clear apps SMSM to restart SMSM init handshake */
-		if (restart_pid == SMSM_MODEM)
-			writel_relaxed(0, SMSM_STATE_ADDR(SMSM_APPS));
+		/* restart SMSM init handshake */
+		if (restart_pid == SMSM_MODEM) {
+			smsm_change_state(SMSM_APPS_STATE,
+					SMSM_INIT | SMSM_SMD_LOOPBACK, 0);
+		}
 
 		/* notify SMSM processors */
 		smsm_irq_handler(0, 0);