summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/sleep.h
diff options
context:
space:
mode:
authorVarun Wadekar <vwadekar@nvidia.com>2012-03-30 09:43:40 +0530
committerSimone Willett <swillett@nvidia.com>2012-04-05 18:08:36 -0700
commitf31ca2d9e0580b58dc51fde31fc8ace190dd253b (patch)
treec66a1dd86c3254dd45e8673afbf17361547edfe1 /arch/arm/mach-tegra/sleep.h
parente6d0e0ceec7cd1a7b8085eb31d2e70bc4d15684f (diff)
ARM: tegra: rethink the cpu suspend-resume code path
The current kernel methodology expects that tegra_cpu_suspend is actually the last function in the entire suspend sequence. In order to achieve this, the code needs to be remodelled a bit so that we actually execute native cpu_suspend at the end of the suspend sequence. This allows us to leverage all the cpu_suspend code developed by ARM in the upstream kernels. Bug 934368 Change-Id: I94172d7adaa54c10043c479a57b270925d85a16b Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/84481 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/sleep.h')
-rw-r--r--arch/arm/mach-tegra/sleep.h27
1 files changed, 5 insertions, 22 deletions
diff --git a/arch/arm/mach-tegra/sleep.h b/arch/arm/mach-tegra/sleep.h
index 91bf73e6bbe8..59298f1efbe9 100644
--- a/arch/arm/mach-tegra/sleep.h
+++ b/arch/arm/mach-tegra/sleep.h
@@ -123,24 +123,6 @@
#endif
.endm
-.macro push_ctx_regs, tmp1
- push_stack_token \tmp1 @ debug check word
- stmfd sp!, {r4 - r11, lr}
-#if USE_TEGRA_DIAG_REG_SAVE
- mrc p15, 0, r4, c15, c0, 1 @ read diagnostic register
- stmfd sp!, {r4}
-#endif
-.endm
-
-.macro pop_ctx_regs, tmp1, tmp2
-#if USE_TEGRA_DIAG_REG_SAVE
- ldmfd sp!, {r4}
- mcr p15, 0, r4, c15, c0, 1 @ write diagnostic register
-#endif
- ldmfd sp!, {r4 - r11, lr}
- pop_stack_token \tmp1, \tmp2 @ debug stack debug token
-.endm
-
#else /* !defined(__ASSEMBLY__) */
#define FLOW_CTRL_HALT_CPU(cpu) (IO_ADDRESS(TEGRA_FLOW_CTRL_BASE) + \
@@ -163,8 +145,9 @@ static inline void flowctrl_writel(unsigned long val, void __iomem *addr)
void tegra_pen_lock(void);
void tegra_pen_unlock(void);
void tegra_cpu_wfi(void);
-void tegra_sleep_cpu_save(unsigned long v2p);
+int tegra_sleep_cpu_finish(unsigned long v2p);
void tegra_resume(void);
+void tegra_cpu_resume(void);
#ifdef CONFIG_ARCH_TEGRA_2x_SOC
extern void tegra2_iram_start;
@@ -173,14 +156,14 @@ int tegra2_cpu_is_resettable_soon(void);
void tegra2_cpu_reset(int cpu);
void tegra2_cpu_set_resettable_soon(void);
void tegra2_cpu_clear_resettable(void);
-void tegra2_sleep_core(unsigned long v2p);
+int tegra2_sleep_core_finish(unsigned long int);
void tegra2_hotplug_shutdown(void);
void tegra2_sleep_wfi(unsigned long v2p);
#else
extern void tegra3_iram_start;
extern void tegra3_iram_end;
-void tegra3_sleep_core(unsigned long v2p);
-void tegra3_sleep_cpu_secondary(unsigned long v2p);
+int tegra3_sleep_core_finish(unsigned long int);
+int tegra3_sleep_cpu_secondary_finish(unsigned long int);
void tegra3_hotplug_shutdown(void);
#endif