From 72b099ed93989575b0c447023748968d30059e8f Mon Sep 17 00:00:00 2001 From: Sonic Zhang Date: Thu, 17 May 2012 17:33:00 +0800 Subject: 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 Signed-off-by: Bob Liu --- arch/blackfin/include/asm/dpmc.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'arch/blackfin/include') diff --git a/arch/blackfin/include/asm/dpmc.h b/arch/blackfin/include/asm/dpmc.h index 528f4768578..e91eae8330a 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++]; -- cgit v1.2.3-18-g5258