aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDaniel Walker <c_dwalke@quicinc.com>2010-03-18 15:31:08 -0400
committerDaniel Walker <dwalker@codeaurora.org>2010-05-12 12:19:33 -0400
commit0aec66d493c1476daa88ec56b1076e51f1ceff0b (patch)
treefed44f8a6e89719dba16dd5a22978368c28394c9 /arch
parentb13525c2637957a757709945fbc9bc8b1065d071 (diff)
arm: msm: smd: fix SMD modem processor sync condition
When booting up we need to wait for the modem processor to partially boot. This is because the modem processor does resource allocation for us. If we don't wait the modem won't honor our requests and we end up crashing or in an unknown state. This change just formalizes the waiting process. Signed-off-by: Daniel Walker <c_dwalke@quicinc.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-msm/proc_comm.c15
-rw-r--r--arch/arm/mach-msm/proc_comm.h3
-rw-r--r--arch/arm/mach-msm/smd.c7
3 files changed, 24 insertions, 1 deletions
diff --git a/arch/arm/mach-msm/proc_comm.c b/arch/arm/mach-msm/proc_comm.c
index 1cbdebf57c37..67e701c7f183 100644
--- a/arch/arm/mach-msm/proc_comm.c
+++ b/arch/arm/mach-msm/proc_comm.c
@@ -114,4 +114,17 @@ int msm_proc_comm(unsigned cmd, unsigned *data1, unsigned *data2)
114 return ret; 114 return ret;
115} 115}
116 116
117 117/*
118 * We need to wait for the ARM9 to at least partially boot
119 * up before we can continue. Since the ARM9 does resource
120 * allocation, if we dont' wait we could end up crashing or in
121 * and unknown state. This function should be called early to
122 * wait on the ARM9.
123 */
124void __init proc_comm_boot_wait(void)
125{
126 void __iomem *base = MSM_SHARED_RAM_BASE;
127
128 proc_comm_wait_for(base + MDM_STATUS, PCOM_READY);
129
130}
diff --git a/arch/arm/mach-msm/proc_comm.h b/arch/arm/mach-msm/proc_comm.h
index 0f5cdd345eb7..12da4cacd4a8 100644
--- a/arch/arm/mach-msm/proc_comm.h
+++ b/arch/arm/mach-msm/proc_comm.h
@@ -16,6 +16,8 @@
16#ifndef _ARCH_ARM_MACH_MSM_PROC_COMM_H_ 16#ifndef _ARCH_ARM_MACH_MSM_PROC_COMM_H_
17#define _ARCH_ARM_MACH_MSM_PROC_COMM_H_ 17#define _ARCH_ARM_MACH_MSM_PROC_COMM_H_
18 18
19#include <linux/init.h>
20
19enum { 21enum {
20 PCOM_CMD_IDLE = 0x0, 22 PCOM_CMD_IDLE = 0x0,
21 PCOM_CMD_DONE, 23 PCOM_CMD_DONE,
@@ -251,5 +253,6 @@ enum {
251 (((drvstr) & 0xF) << 17)) 253 (((drvstr) & 0xF) << 17))
252 254
253int msm_proc_comm(unsigned cmd, unsigned *data1, unsigned *data2); 255int msm_proc_comm(unsigned cmd, unsigned *data1, unsigned *data2);
256void __init proc_comm_boot_wait(void);
254 257
255#endif 258#endif
diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
index de9343ec5cff..cf11d414b425 100644
--- a/arch/arm/mach-msm/smd.c
+++ b/arch/arm/mach-msm/smd.c
@@ -1001,6 +1001,13 @@ static int __init msm_smd_probe(struct platform_device *pdev)
1001{ 1001{
1002 pr_info("smd_init()\n"); 1002 pr_info("smd_init()\n");
1003 1003
1004 /*
1005 * If we haven't waited for the ARM9 to boot up till now,
1006 * then we need to wait here. Otherwise this should just
1007 * return immediately.
1008 */
1009 proc_comm_boot_wait();
1010
1004 INIT_WORK(&probe_work, smd_channel_probe_worker); 1011 INIT_WORK(&probe_work, smd_channel_probe_worker);
1005 1012
1006 if (smd_core_init()) { 1013 if (smd_core_init()) {