ARM: TC2: disable GIC CPU IF on power down
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 5 Feb 2013 11:09:16 +0000 (11:09 +0000)
committerJon Medhurst <tixy@linaro.org>
Mon, 1 Jul 2013 10:05:12 +0000 (11:05 +0100)
On TC2 testchip the GIC CPU IF must be disabled before powering down a
core since a pending IRQ might cause wfi completion and the processor
would exit wfi state while power controller is taking action to reset or
power up the CPU upon IRQ reception.

This patch adds code that disables the GIC CPU IF in TC2 specific
power API methods.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
arch/arm/mach-vexpress/tc2_pm.c

index 4be2d73cb387349ae46dcfdf8914c31493e14ef8..8be975e4b31d88a08bbd6e5867d3cc7a26b2f4ba 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/kernel.h>
 #include <linux/spinlock.h>
 #include <linux/errno.h>
+#include <linux/irqchip/arm-gic.h>
 
 #include <asm/mcpm.h>
 #include <asm/proc-fns.h>
@@ -116,6 +117,8 @@ static void tc2_pm_power_down(void)
        } else
                BUG();
 
+       gic_cpu_if_down();
+
        if (last_man && __mcpm_outbound_enter_critical(cpu, cluster)) {
                arch_spin_unlock(&tc2_pm_lock);