]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: tegra114: add low level support for CPU idle powered-down mode
authorJoseph Lo <josephl@nvidia.com>
Fri, 19 Jul 2013 09:25:25 +0000 (17:25 +0800)
committerStephen Warren <swarren@nvidia.com>
Fri, 19 Jul 2013 16:07:14 +0000 (10:07 -0600)
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>
arch/arm/mach-tegra/flowctrl.h
arch/arm/mach-tegra/sleep-tegra30.S

index 7a29bae799a7fc4cc674e5703ead29cfb94182ac..e56a950920f6a0295f196faff7fce308739726cf 100644 (file)
@@ -28,6 +28,8 @@
 #define FLOW_CTRL_SCLK_RESUME          (1 << 27)
 #define FLOW_CTRL_HALT_CPU_IRQ         (1 << 10)
 #define        FLOW_CTRL_HALT_CPU_FIQ          (1 << 8)
+#define FLOW_CTRL_HALT_GIC_IRQ         (1 << 9)
+#define FLOW_CTRL_HALT_GIC_FIQ         (1 << 8)
 #define FLOW_CTRL_CPU0_CSR             0x8
 #define        FLOW_CTRL_CSR_INTR_FLAG         (1 << 15)
 #define FLOW_CTRL_CSR_EVENT_FLAG       (1 << 14)
index ada8821b48be932a2cf1c81dbb7b388f98da8498..5877f268fa9701856dd9309286491131f40a6fc6 100644 (file)
@@ -99,6 +99,8 @@ flow_ctrl_setting_for_lp2:
        cmp     r10, #TEGRA30
        moveq   r3, #FLOW_CTRL_WAIT_FOR_INTERRUPT       @ For LP2
        movne   r3, #FLOW_CTRL_WAITEVENT
+       orrne   r3, r3, #FLOW_CTRL_HALT_GIC_IRQ
+       orrne   r3, r3, #FLOW_CTRL_HALT_GIC_FIQ
 flow_ctrl_done:
        cmp     r10, #TEGRA30
        str     r3, [r2]