From: Dima Zavin Date: Fri, 29 Jan 2010 19:43:42 +0000 (-0800) Subject: arm: msm: correctly signal the apps-to-modem irq in smd/proc_comm X-Git-Tag: Ubuntu-5.10.0-12.13~28605^2~38 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=b42dc44afca902d19f86d541cbb665f31b9149a0;p=mirror_ubuntu-hirsute-kernel.git arm: msm: correctly signal the apps-to-modem irq in smd/proc_comm Signed-off-by: Dima Zavin Signed-off-by: Daniel Walker --- 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 @@ #define MSM_AD5_SIZE (SZ_1M*13) +#if defined(CONFIG_ARCH_MSM7X30) +#define MSM_GCC_BASE IOMEM(0xF8009000) +#define MSM_GCC_PHYS 0xC0182000 +#define MSM_GCC_SIZE SZ_4K +#endif + #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 @@ -44,6 +44,9 @@ static struct map_desc msm_io_desc[] __initdata = { MSM_DEVICE(CLK_CTL), #ifdef CONFIG_MSM_DEBUG_UART MSM_DEVICE(DEBUG_UART), +#endif +#ifdef CONFIG_ARCH_MSM7X30 + MSM_DEVICE(GCC), #endif { .virtual = (unsigned long) MSM_SHARED_RAM_BASE, 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 @@ #include "proc_comm.h" -#define MSM_A2M_INT(n) (MSM_CSR_BASE + 0x400 + (n) * 4) +static inline void msm_a2m_int(uint32_t irq) +{ +#if defined(CONFIG_ARCH_MSM7X30) + writel(1 << irq, MSM_GCC_BASE + 0x8); +#else + writel(1, MSM_CSR_BASE + 0x400 + (irq * 4)); +#endif +} static inline void notify_other_proc_comm(void) { - writel(1, MSM_A2M_INT(6)); + msm_a2m_int(6); } #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); static unsigned last_heap_free = 0xffffffff; -#define MSM_A2M_INT(n) (MSM_CSR_BASE + 0x400 + (n) * 4) +static inline void msm_a2m_int(uint32_t irq) +{ +#if defined(CONFIG_ARCH_MSM7X30) + writel(1 << irq, MSM_GCC_BASE + 0x8); +#else + writel(1, MSM_CSR_BASE + 0x400 + (irq * 4)); +#endif +} + static inline void notify_other_smsm(void) { - writel(1, MSM_A2M_INT(5)); + msm_a2m_int(5); #ifdef CONFIG_QDSP6 - writel(1, MSM_A2M_INT(8)); + msm_a2m_int(8); #endif } static inline void notify_modem_smd(void) { - writel(1, MSM_A2M_INT(0)); + msm_a2m_int(0); } static inline void notify_dsp_smd(void) { - writel(1, MSM_A2M_INT(8)); + msm_a2m_int(8); } static void smd_diag(void)