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/include | |
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/include')
-rw-r--r-- | arch/blackfin/include/asm/dpmc.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/dpmc.h b/arch/blackfin/include/asm/dpmc.h index 528f47685781..e91eae8330a6 100644 --- a/arch/blackfin/include/asm/dpmc.h +++ b/arch/blackfin/include/asm/dpmc.h | |||
@@ -53,6 +53,16 @@ | |||
53 | #define PM_SYS_PUSH16(n, x) _PM_PUSH(n, x, w, SYSMMR_BASE) | 53 | #define PM_SYS_PUSH16(n, x) _PM_PUSH(n, x, w, SYSMMR_BASE) |
54 | #define PM_SYS_POP16(n, x) _PM_POP(n, x, w, SYSMMR_BASE) | 54 | #define PM_SYS_POP16(n, x) _PM_POP(n, x, w, SYSMMR_BASE) |
55 | 55 | ||
56 | .macro bfin_init_pm_bench_cycles | ||
57 | #ifdef CONFIG_BFIN_PM_WAKEUP_TIME_BENCH | ||
58 | R4 = 0; | ||
59 | CYCLES = R4; | ||
60 | CYCLES2 = R4; | ||
61 | R4 = SYSCFG; | ||
62 | BITSET(R4, 1); | ||
63 | SYSCFG = R4; | ||
64 | #endif | ||
65 | .endm | ||
56 | 66 | ||
57 | .macro bfin_cpu_reg_save | 67 | .macro bfin_cpu_reg_save |
58 | /* | 68 | /* |
@@ -98,8 +108,10 @@ | |||
98 | r7 = RETI; | 108 | r7 = RETI; |
99 | [--sp] = RETS; | 109 | [--sp] = RETS; |
100 | [--sp] = ASTAT; | 110 | [--sp] = ASTAT; |
111 | #ifndef CONFIG_BFIN_PM_WAKEUP_TIME_BENCH | ||
101 | [--sp] = CYCLES; | 112 | [--sp] = CYCLES; |
102 | [--sp] = CYCLES2; | 113 | [--sp] = CYCLES2; |
114 | #endif | ||
103 | [--sp] = SYSCFG; | 115 | [--sp] = SYSCFG; |
104 | [--sp] = RETX; | 116 | [--sp] = RETX; |
105 | [--sp] = SEQSTAT; | 117 | [--sp] = SEQSTAT; |
@@ -115,8 +127,10 @@ | |||
115 | SEQSTAT = [sp++]; | 127 | SEQSTAT = [sp++]; |
116 | RETX = [sp++]; | 128 | RETX = [sp++]; |
117 | SYSCFG = [sp++]; | 129 | SYSCFG = [sp++]; |
130 | #ifndef CONFIG_BFIN_PM_WAKEUP_TIME_BENCH | ||
118 | CYCLES2 = [sp++]; | 131 | CYCLES2 = [sp++]; |
119 | CYCLES = [sp++]; | 132 | CYCLES = [sp++]; |
133 | #endif | ||
120 | ASTAT = [sp++]; | 134 | ASTAT = [sp++]; |
121 | RETS = [sp++]; | 135 | RETS = [sp++]; |
122 | 136 | ||