msm: audio: qdsp6v2: Wait indefinitely for subsystems to be loaded.

Wait indefinitely for lpass or modem to be loaded instead of waiting
for a timeout of 5secs. The reason being downloading of images might
take long time.

CRs-fixed: 302002
Signed-off-by: Bharath Ramachandramurthy <bramacha@codeaurora.org>
diff --git a/arch/arm/mach-msm/qdsp6v2/apr.c b/arch/arm/mach-msm/qdsp6v2/apr.c
index ee73c0d..c4eb205 100644
--- a/arch/arm/mach-msm/qdsp6v2/apr.c
+++ b/arch/arm/mach-msm/qdsp6v2/apr.c
@@ -264,20 +264,24 @@
 
 	if ((dest_id == APR_DEST_QDSP6) &&
 				(atomic_read(&dsp_state) == 0)) {
-		rc = wait_event_timeout(dsp_wait,
-				(atomic_read(&dsp_state) == 1), 5*HZ);
-		if (rc == 0) {
-			pr_err("apr: Still dsp is not Up\n");
+		pr_info("%s: Wait for Lpass to bootup\n", __func__);
+		rc = wait_event_interruptible(dsp_wait,
+				(atomic_read(&dsp_state) == 1));
+		if (rc < 0) {
+			pr_err("%s: DSP is not Up\n", __func__);
 			return NULL;
 		}
+		pr_debug("%s: Lpass Up\n", __func__);
 	} else if ((dest_id == APR_DEST_MODEM) &&
 					(atomic_read(&modem_state) == 0)) {
-		rc = wait_event_timeout(modem_wait,
-			(atomic_read(&modem_state) == 1), 5*HZ);
-		if (rc == 0) {
-			pr_err("apr: Still Modem is not Up\n");
+		pr_info("%s: Wait for modem to bootup\n", __func__);
+		rc = wait_event_interruptible(modem_wait,
+			(atomic_read(&modem_state) == 1));
+		if (rc < 0) {
+			pr_err("%s: Modem is not Up\n", __func__);
 			return NULL;
 		}
+		pr_debug("%s: modem Up\n", __func__);
 	}
 
 	if (!strcmp(svc_name, "AFE")) {