summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRichard Zhu <Richard.Zhu@freescale.com>2014-11-12 09:41:23 +0800
committerRichard Zhu <Richard.Zhu@freescale.com>2014-11-14 08:10:44 +0800
commit1f101ab955bc398a061d559aa5b0c356346b1371 (patch)
tree73763173ca6266f0e09ed313809d855619afe249 /arch
parent75221e217a8dedda8458f2e316768c6dd390ffc9 (diff)
MLK-9836-01 mcc: imx: Set func type of cpu2cpu int to int
mcc_generate_cpu_to_cpu_interrupt maybe failed, set the func type of the mcc_generate_cpu_to_cpu_interrupt to int. Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com> (cherry picked from commit 74b859788792fb59b8751468bd34cd2c6ee9025e)
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/mcc_imx6sx.c9
-rw-r--r--arch/arm/mach-imx/mcc_linux.c9
2 files changed, 13 insertions, 5 deletions
diff --git a/arch/arm/mach-imx/mcc_imx6sx.c b/arch/arm/mach-imx/mcc_imx6sx.c
index b4965bc31d33..cc46d04bc952 100644
--- a/arch/arm/mach-imx/mcc_imx6sx.c
+++ b/arch/arm/mach-imx/mcc_imx6sx.c
@@ -143,7 +143,7 @@ void mcc_clear_cpu_to_cpu_interrupt(unsigned int core)
*
* Platform-specific software triggering the inter-CPU interrupts.
*/
-void mcc_triger_cpu_to_cpu_interrupt(void)
+int mcc_triger_cpu_to_cpu_interrupt(void)
{
int i = 0;
u32 val;
@@ -157,11 +157,14 @@ void mcc_triger_cpu_to_cpu_interrupt(void)
} while (((val & BIT(19)) > 0) && (i++ < 100));
}
- if ((val & BIT(19)) == 0)
+ if ((val & BIT(19)) == 0) {
/* Enable the bit19(GIR3) of MU_ACR */
regmap_update_bits(imx_mu_reg, MU_ACR, BIT(19), BIT(19));
- else
+ return 0;
+ } else {
pr_info("mcc int still be triggered after %d ms polling!\n", i);
+ return -EIO;
+ }
}
/*!
diff --git a/arch/arm/mach-imx/mcc_linux.c b/arch/arm/mach-imx/mcc_linux.c
index 3cd2b6566c21..3e5bdfd05844 100644
--- a/arch/arm/mach-imx/mcc_linux.c
+++ b/arch/arm/mach-imx/mcc_linux.c
@@ -308,13 +308,18 @@ int mcc_register_cpu_to_cpu_isr(void)
*/
int mcc_generate_cpu_to_cpu_interrupt(void)
{
+ int ret;
+
/*
* Assert directed CPU interrupts for all processors except
* the requesting core
*/
- mcc_triger_cpu_to_cpu_interrupt();
+ ret = mcc_triger_cpu_to_cpu_interrupt();
- return MCC_SUCCESS;
+ if (ret == 0)
+ return MCC_SUCCESS;
+ else
+ return ret;
}
/*!