summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r--arch/arm/mach-tegra/Makefile2
-rw-r--r--arch/arm/mach-tegra/sleep-t2.S2
-rw-r--r--arch/arm/mach-tegra/sleep.S59
3 files changed, 31 insertions, 32 deletions
diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile
index c736a83900fc..4cb2984e5753 100644
--- a/arch/arm/mach-tegra/Makefile
+++ b/arch/arm/mach-tegra/Makefile
@@ -15,10 +15,8 @@ obj-y += delay.o
obj-y += powergate.o
obj-y += pm.o
obj-$(CONFIG_PM_SLEEP) += pm-irq.o
-ifeq ($(CONFIG_PM_SLEEP),y)
obj-y += sleep.o
obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += sleep-t2.o
-endif
obj-y += fuse.o
obj-y += kfuse.o
obj-$(CONFIG_TEGRA_LEGACY_AUDIO) += tegra_i2s_audio.o
diff --git a/arch/arm/mach-tegra/sleep-t2.S b/arch/arm/mach-tegra/sleep-t2.S
index e683680384d6..8dc0f363caac 100644
--- a/arch/arm/mach-tegra/sleep-t2.S
+++ b/arch/arm/mach-tegra/sleep-t2.S
@@ -98,6 +98,7 @@ ENTRY(tegra2_sleep_reset)
mov pc, lr
ENDPROC(tegra2_sleep_reset)
+#if defined(CONFIG_PM_SLEEP)
/*
* tegra2_cpu_reset(int cpu)
*
@@ -533,3 +534,4 @@ tegra2_sdram_pad_save:
.globl tegra2_iram_end
tegra2_iram_end:
b .
+#endif
diff --git a/arch/arm/mach-tegra/sleep.S b/arch/arm/mach-tegra/sleep.S
index dd3fcc3571fa..052233a4db4e 100644
--- a/arch/arm/mach-tegra/sleep.S
+++ b/arch/arm/mach-tegra/sleep.S
@@ -105,6 +105,34 @@ ENTRY(tegra_pen_unlock)
ENDPROC(tegra_pen_unlock)
/*
+ * tegra_cpu_wfi
+ *
+ * puts current CPU in clock-gated wfi using the flow controller
+ *
+ * corrupts r0-r3
+ * must be called with MMU on
+ */
+ENTRY(tegra_cpu_wfi)
+ cpu_id r0
+ cpu_to_halt_reg r1, r0
+ cpu_to_csr_reg r2, r0
+ mov32 r0, TEGRA_FLOW_CTRL_VIRT
+ mov r3, #FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG
+ str r3, [r0, r2] @ clear event & interrupt status
+ mov r3, #FLOW_CTRL_STOP_UNTIL_IRQ | FLOW_CTRL_JTAG_RESUME
+ str r3, [r0, r1] @ put flow controller in wait irq mode
+ dsb
+ wfi
+ mov r3, #0
+ str r3, [r0, r1] @ clear flow controller halt status
+ mov r3, #FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG
+ str r3, [r0, r2] @ clear event & interrupt status
+ dsb
+ mov pc, lr
+ENDPROC(tegra_cpu_wfi)
+
+#ifdef CONFIG_PM_SLEEP
+/*
* tegra_cpu_save
*
* r0 = v2p
@@ -148,35 +176,6 @@ ENTRY(tegra_cpu_save)
ENDPROC(tegra_cpu_save)
/*
- * tegra_cpu_wfi
- *
- * puts current CPU in clock-gated wfi using the flow controller
- *
- * corrupts r0-r3
- * must be called with MMU on
- */
-ENTRY(tegra_cpu_wfi)
- cpu_id r0
- cpu_to_halt_reg r1, r0
- cpu_to_csr_reg r2, r0
- mov32 r0, TEGRA_FLOW_CTRL_VIRT
- mov r3, #FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG
- str r3, [r0, r2] @ clear event & interrupt status
- mov r3, #FLOW_CTRL_STOP_UNTIL_IRQ | FLOW_CTRL_JTAG_RESUME
- str r3, [r0, r1] @ put flow controller in wait irq mode
- dsb
- wfi
- mov r3, #0
- str r3, [r0, r1] @ clear flow controller halt status
- mov r3, #FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG
- str r3, [r0, r2] @ clear event & interrupt status
- dsb
- mov pc, lr
-ENDPROC(tegra_cpu_wfi)
-
-.word
-
-/*
* tegra_sleep_cpu(unsigned long v2p)
*
* enters suspend in LP2 by turning off the mmu and jumping to
@@ -285,4 +284,4 @@ ENTRY(tegra_cpu_pllp)
str r0, [r5, #CLK_RESET_CCLK_DIVIDER]
mov pc, lr
ENDPROC(tegra_cpu_pllp)
-
+#endif