diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2012-05-17 05:33:00 -0400 |
---|---|---|
committer | Bob Liu <lliubbo@gmail.com> | 2012-05-21 02:54:52 -0400 |
commit | 72b099ed93989575b0c447023748968d30059e8f (patch) | |
tree | 0e5bb7040da26232d66c2fb6c24854566ed9a07a /arch/blackfin/mach-bf609 | |
parent | 0fbd88ca20a68a633b565e1f5ba18ca64afb0c78 (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.S | 3 | ||||
-rw-r--r-- | arch/blackfin/mach-bf609/pm.c | 12 |
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) | |||
24 | P0.L = LO(DPM0_CTL); | 24 | P0.L = LO(DPM0_CTL); |
25 | R3.H = HI(0x00000010); | 25 | R3.H = HI(0x00000010); |
26 | R3.L = LO(0x00000010); | 26 | R3.L = LO(0x00000010); |
27 | |||
28 | bfin_init_pm_bench_cycles; | ||
29 | |||
27 | [P0] = R3; | 30 | [P0] = R3; |
28 | 31 | ||
29 | SSYNC; | 32 | 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) | |||
147 | "idle;" \ | 147 | "idle;" \ |
148 | : : \ | 148 | : : \ |
149 | ); | 149 | ); |
150 | #ifdef CONFIG_BFIN_PM_WAKEUP_TIME_BENCH | ||
151 | __asm__ __volatile__( | ||
152 | "%0 = 0;" | ||
153 | "CYCLES = %0;" | ||
154 | "CYCLES2 = %0;" | ||
155 | "%0 = SYSCFG;" | ||
156 | "BITSET(%0, 1);" | ||
157 | "SYSCFG = %0;" | ||
158 | : "=d,a" (dpm0_ctl) : | ||
159 | ); | ||
160 | #endif | ||
161 | |||
150 | } | 162 | } |
151 | 163 | ||
152 | __attribute__((l1_text)) | 164 | __attribute__((l1_text)) |