aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm/proc_comm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-msm/proc_comm.c')
-rw-r--r--arch/arm/mach-msm/proc_comm.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/arch/arm/mach-msm/proc_comm.c b/arch/arm/mach-msm/proc_comm.c
index 915ee704ed3c..67e701c7f183 100644
--- a/arch/arm/mach-msm/proc_comm.c
+++ b/arch/arm/mach-msm/proc_comm.c
@@ -23,11 +23,18 @@
23 23
24#include "proc_comm.h" 24#include "proc_comm.h"
25 25
26#define MSM_A2M_INT(n) (MSM_CSR_BASE + 0x400 + (n) * 4) 26static inline void msm_a2m_int(uint32_t irq)
27{
28#if defined(CONFIG_ARCH_MSM7X30)
29 writel(1 << irq, MSM_GCC_BASE + 0x8);
30#else
31 writel(1, MSM_CSR_BASE + 0x400 + (irq * 4));
32#endif
33}
27 34
28static inline void notify_other_proc_comm(void) 35static inline void notify_other_proc_comm(void)
29{ 36{
30 writel(1, MSM_A2M_INT(6)); 37 msm_a2m_int(6);
31} 38}
32 39
33#define APP_COMMAND 0x00 40#define APP_COMMAND 0x00
@@ -107,4 +114,17 @@ int msm_proc_comm(unsigned cmd, unsigned *data1, unsigned *data2)
107 return ret; 114 return ret;
108} 115}
109 116
110 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}