ARM: tegra: add LP1 suspend support for Tegra30
[linux-2.6-block.git] / arch / arm / mach-tegra / sleep.h
index 98b7da698f2b1626d891d9db4a5305c13ae695d4..a4edbb3abd3d17e721fa04893abd157d90b86ec5 100644 (file)
 #define CPU_NOT_RESETTABLE     0
 #endif
 
+/* flag of tegra_disable_clean_inv_dcache to do LoUIS or all */
+#define TEGRA_FLUSH_CACHE_LOUIS        0
+#define TEGRA_FLUSH_CACHE_ALL  1
+
 #ifdef __ASSEMBLY__
+/* waits until the microsecond counter (base) is > rn */
+.macro wait_until, rn, base, tmp
+       add     \rn, \rn, #1
+1001:  ldr     \tmp, [\base]
+       cmp     \tmp, \rn
+       bmi     1001b
+.endm
+
 /* returns the offset of the flow controller halt register for a cpu */
 .macro cpu_to_halt_reg rd, rcpu
        cmp     \rcpu, #0
@@ -144,7 +156,7 @@ void tegra_pen_lock(void);
 void tegra_pen_unlock(void);
 void tegra_resume(void);
 int tegra_sleep_cpu_finish(unsigned long);
-void tegra_disable_clean_inv_dcache(void);
+void tegra_disable_clean_inv_dcache(u32 flag);
 
 #ifdef CONFIG_HOTPLUG_CPU
 void tegra20_hotplug_shutdown(void);