summary refs log tree commit diff
path: root/arch/arm/mach-omap2/pm34xx.c
diff options
context:
space:
mode:
authorJean Pihet <jean.pihet@newoldbits.com>2011-03-03 11:25:43 +0100
committerKevin Hilman <khilman@ti.com>2011-03-11 07:21:44 -0800
commit5e7c58dc8d9b7f31d418cf98c6a8cad84b86f510 (patch)
tree76556b2447f39104ac9a56e9d94182d0f6fce6fb /arch/arm/mach-omap2/pm34xx.c
parenta271e58cfbe345f71d39ebbae063ad2d68892470 (diff)
downloadlinux-5e7c58dc8d9b7f31d418cf98c6a8cad84b86f510.tar.gz
perf: add OMAP support for the new power events
The patch adds the new power management trace points for
the OMAP architecture.

The trace points are for:
- default idle handler. Since the cpuidle framework is
  instrumented in the generic way there is no need to
  add trace points in the OMAP specific cpuidle handler;
- SoC clocks changes (enable, disable, set_rate),
- power domain states: the desired target state and -if different-
  the actually hit state.

Because of the generic nature of the changes, OMAP3 and OMAP4 are supported.

Tested on OMAP3 with suspend/resume, cpuidle, basic DVFS.

Signed-off-by: Jean Pihet <j-pihet@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm34xx.c')
-rw-r--r--arch/arm/mach-omap2/pm34xx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 3d6a00e07a5b..93e78a3dbc17 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -29,6 +29,7 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/console.h>
+#include <trace/events/power.h>
 
 #include <plat/sram.h>
 #include "clockdomain.h"
@@ -519,8 +520,14 @@ static void omap3_pm_idle(void)
 	if (omap_irq_pending() || need_resched())
 		goto out;
 
+	trace_power_start(POWER_CSTATE, 1, smp_processor_id());
+	trace_cpu_idle(1, smp_processor_id());
+
 	omap_sram_idle();
 
+	trace_power_end(smp_processor_id());
+	trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id());
+
 out:
 	local_fiq_enable();
 	local_irq_enable();