devices: 8660: route GSBI12 interrupts to DSPS when enabled
DSPS firmware can't config it as the register is now protected
Signed-off-by: Wentao Xu <wentaox@codeaurora.org>
diff --git a/arch/arm/mach-msm/devices-msm8x60.c b/arch/arm/mach-msm/devices-msm8x60.c
index f4bc5f0..8280aa0 100644
--- a/arch/arm/mach-msm/devices-msm8x60.c
+++ b/arch/arm/mach-msm/devices-msm8x60.c
@@ -1461,6 +1461,22 @@
#define MHZ (1000*1000)
+#define TCSR_GSBI_IRQ_MUX_SEL 0x0044
+
+#define GSBI_IRQ_MUX_SEL_MASK 0xF
+#define GSBI_IRQ_MUX_SEL_DSPS 0xB
+
+static void dsps_init1(struct msm_dsps_platform_data *data)
+{
+ int val;
+
+ /* route GSBI12 interrutps to DSPS */
+ val = secure_readl(MSM_TCSR_BASE + TCSR_GSBI_IRQ_MUX_SEL);
+ val &= ~GSBI_IRQ_MUX_SEL_MASK;
+ val |= GSBI_IRQ_MUX_SEL_DSPS;
+ secure_writel(val, MSM_TCSR_BASE + TCSR_GSBI_IRQ_MUX_SEL);
+}
+
static struct dsps_clk_info dsps_clks[] = {
{
.name = "ppss_pclk",
@@ -1503,6 +1519,7 @@
.gpios_num = 0,
.regs = dsps_regs,
.regs_num = ARRAY_SIZE(dsps_regs),
+ .init = dsps_init1,
.signature = DSPS_SIGNATURE,
};
diff --git a/arch/arm/mach-msm/include/mach/msm_dsps.h b/arch/arm/mach-msm/include/mach/msm_dsps.h
index 824ef5f..cfb2024 100644
--- a/arch/arm/mach-msm/include/mach/msm_dsps.h
+++ b/arch/arm/mach-msm/include/mach/msm_dsps.h
@@ -86,6 +86,7 @@
struct dsps_regulator_info *regs;
int regs_num;
int dsps_pwr_ctl_en;
+ void (*init)(struct msm_dsps_platform_data *data);
u32 signature;
};
diff --git a/arch/arm/mach-msm/msm_dsps.c b/arch/arm/mach-msm/msm_dsps.c
index b622e74..bcb777f 100644
--- a/arch/arm/mach-msm/msm_dsps.c
+++ b/arch/arm/mach-msm/msm_dsps.c
@@ -505,6 +505,10 @@
} else {
pr_debug("%s: ppss_wdog not supported.\n", __func__);
}
+
+ if (drv->pdata->init)
+ drv->pdata->init(drv->pdata);
+
return 0;
request_irq_err: