perf: add OMAP support for the new power events
[pandora-kernel.git] / arch / arm / mach-omap2 / pm34xx.c
index 3d6a00e..93e78a3 100644 (file)
@@ -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();