diff options
author | Dima Zavin <dima@android.com> | 2010-01-29 14:43:42 -0500 |
---|---|---|
committer | Daniel Walker <dwalker@codeaurora.org> | 2010-05-12 12:15:35 -0400 |
commit | b42dc44afca902d19f86d541cbb665f31b9149a0 (patch) | |
tree | 9660001ed178bfa9dc52a5138b312f02a664cd33 /arch | |
parent | 636eb9cbaef7989ce7809a0d842bf78470a0a1f4 (diff) |
arm: msm: correctly signal the apps-to-modem irq in smd/proc_comm
Signed-off-by: Dima Zavin <dima@android.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-msm/include/mach/msm_iomap.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-msm/io.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-msm/proc_comm.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-msm/smd.c | 18 |
4 files changed, 31 insertions, 7 deletions
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap.h b/arch/arm/mach-msm/include/mach/msm_iomap.h index 9dae1a98c77a..ce1effed5894 100644 --- a/arch/arm/mach-msm/include/mach/msm_iomap.h +++ b/arch/arm/mach-msm/include/mach/msm_iomap.h | |||
@@ -130,4 +130,10 @@ | |||
130 | #define MSM_AD5_SIZE (SZ_1M*13) | 130 | #define MSM_AD5_SIZE (SZ_1M*13) |
131 | 131 | ||
132 | 132 | ||
133 | #if defined(CONFIG_ARCH_MSM7X30) | ||
134 | #define MSM_GCC_BASE IOMEM(0xF8009000) | ||
135 | #define MSM_GCC_PHYS 0xC0182000 | ||
136 | #define MSM_GCC_SIZE SZ_4K | ||
137 | #endif | ||
138 | |||
133 | #endif | 139 | #endif |
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c index 05f96b780aa6..fde5e58b51c3 100644 --- a/arch/arm/mach-msm/io.c +++ b/arch/arm/mach-msm/io.c | |||
@@ -45,6 +45,9 @@ static struct map_desc msm_io_desc[] __initdata = { | |||
45 | #ifdef CONFIG_MSM_DEBUG_UART | 45 | #ifdef CONFIG_MSM_DEBUG_UART |
46 | MSM_DEVICE(DEBUG_UART), | 46 | MSM_DEVICE(DEBUG_UART), |
47 | #endif | 47 | #endif |
48 | #ifdef CONFIG_ARCH_MSM7X30 | ||
49 | MSM_DEVICE(GCC), | ||
50 | #endif | ||
48 | { | 51 | { |
49 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, | 52 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
50 | .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS), | 53 | .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS), |
diff --git a/arch/arm/mach-msm/proc_comm.c b/arch/arm/mach-msm/proc_comm.c index 915ee704ed3c..1cbdebf57c37 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) | 26 | static 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 | ||
28 | static inline void notify_other_proc_comm(void) | 35 | static 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 |
diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c index 086fd77dc891..b6966680a2d8 100644 --- a/arch/arm/mach-msm/smd.c +++ b/arch/arm/mach-msm/smd.c | |||
@@ -69,24 +69,32 @@ static void smd_diag(void); | |||
69 | 69 | ||
70 | static unsigned last_heap_free = 0xffffffff; | 70 | static unsigned last_heap_free = 0xffffffff; |
71 | 71 | ||
72 | #define MSM_A2M_INT(n) (MSM_CSR_BASE + 0x400 + (n) * 4) | 72 | static inline void msm_a2m_int(uint32_t irq) |
73 | { | ||
74 | #if defined(CONFIG_ARCH_MSM7X30) | ||
75 | writel(1 << irq, MSM_GCC_BASE + 0x8); | ||
76 | #else | ||
77 | writel(1, MSM_CSR_BASE + 0x400 + (irq * 4)); | ||
78 | #endif | ||
79 | } | ||
80 | |||
73 | 81 | ||
74 | static inline void notify_other_smsm(void) | 82 | static inline void notify_other_smsm(void) |
75 | { | 83 | { |
76 | writel(1, MSM_A2M_INT(5)); | 84 | msm_a2m_int(5); |
77 | #ifdef CONFIG_QDSP6 | 85 | #ifdef CONFIG_QDSP6 |
78 | writel(1, MSM_A2M_INT(8)); | 86 | msm_a2m_int(8); |
79 | #endif | 87 | #endif |
80 | } | 88 | } |
81 | 89 | ||
82 | static inline void notify_modem_smd(void) | 90 | static inline void notify_modem_smd(void) |
83 | { | 91 | { |
84 | writel(1, MSM_A2M_INT(0)); | 92 | msm_a2m_int(0); |
85 | } | 93 | } |
86 | 94 | ||
87 | static inline void notify_dsp_smd(void) | 95 | static inline void notify_dsp_smd(void) |
88 | { | 96 | { |
89 | writel(1, MSM_A2M_INT(8)); | 97 | msm_a2m_int(8); |
90 | } | 98 | } |
91 | 99 | ||
92 | static void smd_diag(void) | 100 | static void smd_diag(void) |