summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/pm.c
diff options
context:
space:
mode:
authorScott Williams <scwilliams@nvidia.com>2011-07-21 14:29:58 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:46:57 -0800
commitf68659188e7e7db84db6499813ea7a0f050d5d62 (patch)
tree08096f43960b637f7510aeaca71d82f6e135a252 /arch/arm/mach-tegra/pm.c
parent4f363334677b0323dea4d5c3c13bdc090455de03 (diff)
ARM: tegra: power: Fix CPU complex suspend/resume
- Invoke cpu_pm_enter()/cpu_pm_exit() to save/restore the GIC processor interface registers for the last processor standing from the cluster control interface. - Disable the GIC processor interface on the last processor standing before shutting down the CPU complex so that wakeup interrupts get routed from the legacy interrupt controller to the flow controller. - For Tegra3 enable GIC pass-through mode to prevent WFI failures. Change-Id: Ia866b17bef47fc8e9e75d4e353394b2d1a09259c Signed-off-by: Scott Williams <scwilliams@nvidia.com> DW: Split into logical changes Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: R249fb53a2622218a7128646d68d8a3552268b4f1
Diffstat (limited to 'arch/arm/mach-tegra/pm.c')
-rw-r--r--arch/arm/mach-tegra/pm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c
index abf599d2acff..3fe3ea1c289c 100644
--- a/arch/arm/mach-tegra/pm.c
+++ b/arch/arm/mach-tegra/pm.c
@@ -55,11 +55,12 @@
#include "board.h"
#include "clock.h"
#include "cpuidle.h"
+#include "gic.h"
#include "pm.h"
#include "pm-irq.h"
#include "reset.h"
#include "sleep.h"
-#include "fuse.h"
+#include "timer.h"
struct suspend_context {
/*
@@ -382,6 +383,14 @@ static void suspend_cpu_complex(void)
reg |= FLOW_CTRL_CSR_INTR_FLAG;
flowctrl_writel(reg, FLOW_CTRL_CPU_CSR(i));
}
+
+ tegra_gic_cpu_disable();
+#ifndef CONFIG_ARCH_TEGRA_2x_SOC
+ /* Tegra3 enters LPx states via WFI - do not propagate legacy IRQs
+ to CPU core to avoid fall through WFI (IRQ-to-flow controller wake
+ path is not affected). */
+ tegra_gic_pass_through_disable();
+#endif
}
void tegra_clear_cpu_in_lp2(int cpu)
@@ -451,7 +460,6 @@ unsigned int tegra_idle_lp2_last(unsigned int sleep_time, unsigned int flags)
tegra_lp2_set_trigger(sleep_time);
cpu_complex_pm_enter();
-
suspend_cpu_complex();
tegra_cluster_switch_time(flags, tegra_cluster_switch_time_id_prolog);
flush_cache_all();