summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/sleep.h
diff options
context:
space:
mode:
authorScott Williams <scwilliams@nvidia.com>2011-08-09 18:01:49 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:47:03 -0800
commitedbca7b945ae72b28008c398f0e366feaec8f3bf (patch)
tree57c17630215c4e494ee5698dd1dc8cc074814e29 /arch/arm/mach-tegra/sleep.h
parent5e9424f10bb02a6e4e1038db179f88e033d312a4 (diff)
ARM: tegra: power: Conditionalize diagnostic register save/restore
Change-Id: I540d7272d585331da0241e7878dbb35557f0bb99 Signed-off-by: Scott Williams <scwilliams@nvidia.com> Rebase-Id: R59fe634cc803ba2c9bb7916046aff5f92120f5c3
Diffstat (limited to 'arch/arm/mach-tegra/sleep.h')
-rw-r--r--arch/arm/mach-tegra/sleep.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/sleep.h b/arch/arm/mach-tegra/sleep.h
index 7e012a10158e..a77fd08e7df5 100644
--- a/arch/arm/mach-tegra/sleep.h
+++ b/arch/arm/mach-tegra/sleep.h
@@ -30,6 +30,9 @@
#else
#define USE_TEGRA_CPU_SUSPEND 0
#endif
+/* FIXME: The core associated with this should be removed if our change to
+ save the diagnostic regsiter in the CPU context is accepted. */
+#define USE_TEGRA_DIAG_REG_SAVE 1
#define TEGRA_POWER_SDRAM_SELFREFRESH (1 << 26) /* SDRAM is in self-refresh */
#define TEGRA_POWER_HOTPLUG_SHUTDOWN (1 << 27) /* Hotplug shutdown */
@@ -122,17 +125,17 @@
.macro push_ctx_regs, tmp1
push_stack_token \tmp1 @ debug check word
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. */
+#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
- /* FIXME: The next two instructions should be removed if our change to
- save the diagnostic regsiter in the CPU context is accepted. */
+#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