summaryrefslogtreecommitdiff
path: root/arch/blackfin/mach-bf609
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2012-05-17 17:33:00 +0800
committerBob Liu <lliubbo@gmail.com>2012-05-21 14:54:52 +0800
commit72b099ed93989575b0c447023748968d30059e8f (patch)
tree0e5bb7040da26232d66c2fb6c24854566ed9a07a /arch/blackfin/mach-bf609
parent0fbd88ca20a68a633b565e1f5ba18ca64afb0c78 (diff)
blackfin: bf60x: pm: Add a debug option to calculate kernel wakeup time.
Display the total time when kernel resumes normal from standby or suspend to mem mode. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
Diffstat (limited to 'arch/blackfin/mach-bf609')
-rw-r--r--arch/blackfin/mach-bf609/hibernate.S3
-rw-r--r--arch/blackfin/mach-bf609/pm.c12
2 files changed, 15 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf609/hibernate.S b/arch/blackfin/mach-bf609/hibernate.S
index baedd6e6abf4..d37a532519c8 100644
--- a/arch/blackfin/mach-bf609/hibernate.S
+++ b/arch/blackfin/mach-bf609/hibernate.S
@@ -24,6 +24,9 @@ ENTRY(_enter_hibernate)
P0.L = LO(DPM0_CTL);
R3.H = HI(0x00000010);
R3.L = LO(0x00000010);
+
+ bfin_init_pm_bench_cycles;
+
[P0] = R3;
SSYNC;
diff --git a/arch/blackfin/mach-bf609/pm.c b/arch/blackfin/mach-bf609/pm.c
index 79cdf41096c2..849d77e5631c 100644
--- a/arch/blackfin/mach-bf609/pm.c
+++ b/arch/blackfin/mach-bf609/pm.c
@@ -147,6 +147,18 @@ void bfin_deepsleep(unsigned long mask)
"idle;" \
: : \
);
+#ifdef CONFIG_BFIN_PM_WAKEUP_TIME_BENCH
+ __asm__ __volatile__(
+ "%0 = 0;"
+ "CYCLES = %0;"
+ "CYCLES2 = %0;"
+ "%0 = SYSCFG;"
+ "BITSET(%0, 1);"
+ "SYSCFG = %0;"
+ : "=d,a" (dpm0_ctl) :
+ );
+#endif
+
}
__attribute__((l1_text))