diff options
author | Joseph Lo <josephl@nvidia.com> | 2013-07-19 05:25:25 -0400 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2013-07-19 12:07:14 -0400 |
commit | 1b9e6b2745621984b4aad49b0386814815fb15e7 (patch) | |
tree | 3b258ce7b8cdfe8cfb3c06d120bbba4dbedfcf70 | |
parent | 7e8b15dbc392cf3097f2d2e6dfbbf2e97318c553 (diff) |
ARM: tegra114: add low level support for CPU idle powered-down mode
The flow controller would take care the power sequence when CPU idle in
powered-down mode. It powered gate the CPU when CPU runs into WFI
instruction. And wake up the CPU when event be triggered.
The sequence is below.
* setting wfi bitmap for the CPU as the halt event in the
FLOW_CTRL_CPU_HALT_REG to monitor the CPU running into WFI,then power
gate it
* setting IRQ and FIQ as wake up event to wake up CPU when event triggered
Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/flowctrl.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/sleep-tegra30.S | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/flowctrl.h b/arch/arm/mach-tegra/flowctrl.h index 7a29bae799a7..e56a950920f6 100644 --- a/arch/arm/mach-tegra/flowctrl.h +++ b/arch/arm/mach-tegra/flowctrl.h | |||
@@ -28,6 +28,8 @@ | |||
28 | #define FLOW_CTRL_SCLK_RESUME (1 << 27) | 28 | #define FLOW_CTRL_SCLK_RESUME (1 << 27) |
29 | #define FLOW_CTRL_HALT_CPU_IRQ (1 << 10) | 29 | #define FLOW_CTRL_HALT_CPU_IRQ (1 << 10) |
30 | #define FLOW_CTRL_HALT_CPU_FIQ (1 << 8) | 30 | #define FLOW_CTRL_HALT_CPU_FIQ (1 << 8) |
31 | #define FLOW_CTRL_HALT_GIC_IRQ (1 << 9) | ||
32 | #define FLOW_CTRL_HALT_GIC_FIQ (1 << 8) | ||
31 | #define FLOW_CTRL_CPU0_CSR 0x8 | 33 | #define FLOW_CTRL_CPU0_CSR 0x8 |
32 | #define FLOW_CTRL_CSR_INTR_FLAG (1 << 15) | 34 | #define FLOW_CTRL_CSR_INTR_FLAG (1 << 15) |
33 | #define FLOW_CTRL_CSR_EVENT_FLAG (1 << 14) | 35 | #define FLOW_CTRL_CSR_EVENT_FLAG (1 << 14) |
diff --git a/arch/arm/mach-tegra/sleep-tegra30.S b/arch/arm/mach-tegra/sleep-tegra30.S index ada8821b48be..5877f268fa97 100644 --- a/arch/arm/mach-tegra/sleep-tegra30.S +++ b/arch/arm/mach-tegra/sleep-tegra30.S | |||
@@ -99,6 +99,8 @@ flow_ctrl_setting_for_lp2: | |||
99 | cmp r10, #TEGRA30 | 99 | cmp r10, #TEGRA30 |
100 | moveq r3, #FLOW_CTRL_WAIT_FOR_INTERRUPT @ For LP2 | 100 | moveq r3, #FLOW_CTRL_WAIT_FOR_INTERRUPT @ For LP2 |
101 | movne r3, #FLOW_CTRL_WAITEVENT | 101 | movne r3, #FLOW_CTRL_WAITEVENT |
102 | orrne r3, r3, #FLOW_CTRL_HALT_GIC_IRQ | ||
103 | orrne r3, r3, #FLOW_CTRL_HALT_GIC_FIQ | ||
102 | flow_ctrl_done: | 104 | flow_ctrl_done: |
103 | cmp r10, #TEGRA30 | 105 | cmp r10, #TEGRA30 |
104 | str r3, [r2] | 106 | str r3, [r2] |