diff options
author | Jean Pihet <jean.pihet@newoldbits.com> | 2011-03-03 05:25:43 -0500 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-03-11 10:21:44 -0500 |
commit | 5e7c58dc8d9b7f31d418cf98c6a8cad84b86f510 (patch) | |
tree | 76556b2447f39104ac9a56e9d94182d0f6fce6fb /arch/arm/mach-omap2/clock.c | |
parent | a271e58cfbe345f71d39ebbae063ad2d68892470 (diff) |
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/clock.c')
-rw-r--r-- | arch/arm/mach-omap2/clock.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 46d03ccc2806..180299e4a838 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -22,7 +22,9 @@ | |||
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/bitops.h> | 24 | #include <linux/bitops.h> |
25 | #include <trace/events/power.h> | ||
25 | 26 | ||
27 | #include <asm/cpu.h> | ||
26 | #include <plat/clock.h> | 28 | #include <plat/clock.h> |
27 | #include "clockdomain.h" | 29 | #include "clockdomain.h" |
28 | #include <plat/cpu.h> | 30 | #include <plat/cpu.h> |
@@ -261,8 +263,10 @@ void omap2_clk_disable(struct clk *clk) | |||
261 | 263 | ||
262 | pr_debug("clock: %s: disabling in hardware\n", clk->name); | 264 | pr_debug("clock: %s: disabling in hardware\n", clk->name); |
263 | 265 | ||
264 | if (clk->ops && clk->ops->disable) | 266 | if (clk->ops && clk->ops->disable) { |
267 | trace_clock_disable(clk->name, 0, smp_processor_id()); | ||
265 | clk->ops->disable(clk); | 268 | clk->ops->disable(clk); |
269 | } | ||
266 | 270 | ||
267 | if (clk->clkdm) | 271 | if (clk->clkdm) |
268 | clkdm_clk_disable(clk->clkdm, clk); | 272 | clkdm_clk_disable(clk->clkdm, clk); |
@@ -314,6 +318,7 @@ int omap2_clk_enable(struct clk *clk) | |||
314 | } | 318 | } |
315 | 319 | ||
316 | if (clk->ops && clk->ops->enable) { | 320 | if (clk->ops && clk->ops->enable) { |
321 | trace_clock_enable(clk->name, 1, smp_processor_id()); | ||
317 | ret = clk->ops->enable(clk); | 322 | ret = clk->ops->enable(clk); |
318 | if (ret) { | 323 | if (ret) { |
319 | WARN(1, "clock: %s: could not enable: %d\n", | 324 | WARN(1, "clock: %s: could not enable: %d\n", |
@@ -353,8 +358,10 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate) | |||
353 | pr_debug("clock: set_rate for clock %s to rate %ld\n", clk->name, rate); | 358 | pr_debug("clock: set_rate for clock %s to rate %ld\n", clk->name, rate); |
354 | 359 | ||
355 | /* dpll_ck, core_ck, virt_prcm_set; plus all clksel clocks */ | 360 | /* dpll_ck, core_ck, virt_prcm_set; plus all clksel clocks */ |
356 | if (clk->set_rate) | 361 | if (clk->set_rate) { |
362 | trace_clock_set_rate(clk->name, rate, smp_processor_id()); | ||
357 | ret = clk->set_rate(clk, rate); | 363 | ret = clk->set_rate(clk, rate); |
364 | } | ||
358 | 365 | ||
359 | return ret; | 366 | return ret; |
360 | } | 367 | } |