diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2012-05-17 17:33:00 +0800 |
---|---|---|
committer | Bob Liu <lliubbo@gmail.com> | 2012-05-21 14:54:52 +0800 |
commit | 72b099ed93989575b0c447023748968d30059e8f (patch) | |
tree | 0e5bb7040da26232d66c2fb6c24854566ed9a07a /arch/blackfin/mach-bf609/pm.c | |
parent | 0fbd88ca20a68a633b565e1f5ba18ca64afb0c78 (diff) | |
download | blackbird-op-linux-72b099ed93989575b0c447023748968d30059e8f.tar.gz blackbird-op-linux-72b099ed93989575b0c447023748968d30059e8f.zip |
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/pm.c')
-rw-r--r-- | arch/blackfin/mach-bf609/pm.c | 12 |
1 files changed, 12 insertions, 0 deletions
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)) |