summaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include
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/include
parent0fbd88ca20a68a633b565e1f5ba18ca64afb0c78 (diff)
downloadblackbird-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/include')
-rw-r--r--arch/blackfin/include/asm/dpmc.h14
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 @@
#define PM_SYS_PUSH16(n, x) _PM_PUSH(n, x, w, SYSMMR_BASE)
#define PM_SYS_POP16(n, x) _PM_POP(n, x, w, SYSMMR_BASE)
+ .macro bfin_init_pm_bench_cycles
+#ifdef CONFIG_BFIN_PM_WAKEUP_TIME_BENCH
+ R4 = 0;
+ CYCLES = R4;
+ CYCLES2 = R4;
+ R4 = SYSCFG;
+ BITSET(R4, 1);
+ SYSCFG = R4;
+#endif
+ .endm
.macro bfin_cpu_reg_save
/*
@@ -98,8 +108,10 @@
r7 = RETI;
[--sp] = RETS;
[--sp] = ASTAT;
+#ifndef CONFIG_BFIN_PM_WAKEUP_TIME_BENCH
[--sp] = CYCLES;
[--sp] = CYCLES2;
+#endif
[--sp] = SYSCFG;
[--sp] = RETX;
[--sp] = SEQSTAT;
@@ -115,8 +127,10 @@
SEQSTAT = [sp++];
RETX = [sp++];
SYSCFG = [sp++];
+#ifndef CONFIG_BFIN_PM_WAKEUP_TIME_BENCH
CYCLES2 = [sp++];
CYCLES = [sp++];
+#endif
ASTAT = [sp++];
RETS = [sp++];
OpenPOWER on IntegriCloud