summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/sleep-t3.S
diff options
context:
space:
mode:
authorScott Williams <scwilliams@nvidia.com>2012-03-08 09:35:35 -0800
committerVarun Wadekar <vwadekar@nvidia.com>2012-06-26 11:56:21 +0530
commit46b5734f5a82c8d6c55dbfeaa75dadb69fb1a639 (patch)
tree96edb746b84d711ab77498c3dc209721cf2dbc14 /arch/arm/mach-tegra/sleep-t3.S
parentf7edf53858d4efdf3c3d61741cd80f1cf6228d26 (diff)
ARM: tegra: power: Add support for ARM debug arch v7.1
Bug 885613 Change-Id: I820065478b1a714d42be998fa1bf472813d147ab Signed-off-by: Scott Williams <scwilliams@nvidia.com> Reviewed-on: http://git-master/r/86461 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/sleep-t3.S')
-rw-r--r--arch/arm/mach-tegra/sleep-t3.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/sleep-t3.S b/arch/arm/mach-tegra/sleep-t3.S
index ed697bf3af96..78f97d7d9c80 100644
--- a/arch/arm/mach-tegra/sleep-t3.S
+++ b/arch/arm/mach-tegra/sleep-t3.S
@@ -614,6 +614,18 @@ tegra3_enter_sleep:
dsb
ldr r0, [r6, r2] /* memory barrier */
+#ifndef CONFIG_ARM_SAVE_DEBUG_CONTEXT_NO_LOCK
+ /* Set the Debug OS Double Lock for Debug Arch v7.1 or greater.
+ With this lock set, the debugger is completely locked out.
+ Disable this to debug WFI/powergating failures.
+ */
+ mrc p15, 0, r3, c0, c1, 2 @ ID_DFR0
+ and r3, r3, #0xF @ coprocessor debug model
+ cmp r3, #5 @ debug arch >= v7.1?
+
+ mov32 r1, 0xC5ACCE55
+ mcrge p14, 0, r1, c1, c3, 4 @ DBGOSDLR
+#endif
halted:
isb
dsb