summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/asm_macros.h
diff options
context:
space:
mode:
authorYudong Tan <ytan@nvidia.com>2011-08-18 15:26:52 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:48:39 -0800
commit6d76e260493dc5f8c071f6330f3f6490952125f9 (patch)
tree04e8fb9d7742ccdc9e2010119d4e95c4e5b4803a /arch/arm/mach-tegra/asm_macros.h
parentf93887c0760e4530d3023b7682f2322ea312f3c5 (diff)
ARM: tegra: power: implement LP1 suspend/resume for Tegra3
Bug 862502 Change-Id: If70e54fb32ce14d5f13dde1d7fb4c1f1499a6722 Reviewed-on: http://git-master/r/47398 Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com> Tested-by: Daniel Willemsen <dwillemsen@nvidia.com> Rebase-Id: Ra77a54e6930692bca628a97bf1de10a30408cdef
Diffstat (limited to 'arch/arm/mach-tegra/asm_macros.h')
-rw-r--r--arch/arm/mach-tegra/asm_macros.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/asm_macros.h b/arch/arm/mach-tegra/asm_macros.h
index 61a7028a6cc0..2463d797ce39 100644
--- a/arch/arm/mach-tegra/asm_macros.h
+++ b/arch/arm/mach-tegra/asm_macros.h
@@ -19,6 +19,15 @@
#ifdef __ASSEMBLY__
+/* waits until the microsecond counter (base) ticks, for exact timing loops */
+.macro wait_for_us, rd, base, tmp
+ ldr \rd, [\base]
+1001: ldr \tmp, [\base]
+ cmp \rd, \tmp
+ beq 1001b
+ mov \tmp, \rd
+.endm
+
/* waits until the microsecond counter (base) is > rn */
.macro wait_until, rn, base, tmp
add \rn, \rn, #1