summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/sleep.h
diff options
context:
space:
mode:
authorScott Williams <scwilliams@nvidia.com>2011-08-03 21:44:21 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:47:02 -0800
commit381b82041036f33f18a6a4a303e3a985baf24ab6 (patch)
tree47956940ae833398515e85fff2e840f6a741b623 /arch/arm/mach-tegra/sleep.h
parente3e523668c9d6431ba5b2888707cd96b9d3f75b6 (diff)
ARM: tegra: power: Define push/pop context register macros
Define macros to ensure that the behavior of push/pop of the context regsiter set is consistent across all callers. Change-Id: If2e68764e9755979a205a57543b30438e9b7ff96 Signed-off-by: Scott Williams <scwilliams@nvidia.com> Rebase-Id: Rb8f4984258e71c318e93fc709b18d1efdf5b2cc4
Diffstat (limited to 'arch/arm/mach-tegra/sleep.h')
-rw-r--r--arch/arm/mach-tegra/sleep.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/sleep.h b/arch/arm/mach-tegra/sleep.h
index 947d4d8867dd..31547d4522af 100644
--- a/arch/arm/mach-tegra/sleep.h
+++ b/arch/arm/mach-tegra/sleep.h
@@ -93,6 +93,22 @@
dsb
.endm
+.macro push_ctx_regs
+ stmfd sp!, {r4 - r11, lr}
+ /* FIXME: The next two instructions should be removed if our change to
+ save the diagnostic regsiter in the CPU context is accepted. */
+ mrc p15, 0, r4, c15, c0, 1 @ read diagnostic register
+ stmfd sp!, {r4}
+.endm
+
+.macro pop_ctx_regs
+ /* FIXME: The next two instructions should be removed if our change to
+ save the diagnostic regsiter in the CPU context is accepted. */
+ ldmfd sp!, {r4}
+ mcr p15, 0, r4, c15, c0, 1 @ write diagnostic register
+ ldmfd sp!, {r4 - r11, lr}
+.endm
+
#else
#define FLOW_CTRL_HALT_CPU(cpu) (IO_ADDRESS(TEGRA_FLOW_CTRL_BASE) + \