summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/clock.c
diff options
context:
space:
mode:
authorPeter De Schrijver <pdeschrijver@nvidia.com>2011-05-02 15:54:27 +0300
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:42:37 -0800
commit14629ac69c7813ce86fbacbd58fdfb89a3507548 (patch)
treed4cde309e504ac9ebcfe078d7d4e66549254d4a3 /arch/arm/mach-tegra/clock.c
parentad5c0c01152874543f5d9c5c0ab77a1ab66f57c7 (diff)
ARM: tegra: implement events for clock tracing
Original-Change-Id: If6ae23251aa615a678c8edb76d3c1e6463d86f2e Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Original-Change-Id: I50ffa54eacaf5b3973fcd6cb94eee56e46ec81bf Reviewed-on: http://git-master/r/30384 Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Rebase-Id: Rc05e6b5e44c3d337d718d2e62c91a06d4558d044
Diffstat (limited to 'arch/arm/mach-tegra/clock.c')
-rw-r--r--arch/arm/mach-tegra/clock.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c
index 95dd9f499cd3..f73107a4ff37 100644
--- a/arch/arm/mach-tegra/clock.c
+++ b/arch/arm/mach-tegra/clock.c
@@ -29,6 +29,7 @@
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
+#include <trace/events/power.h>
#include <mach/clk.h>
@@ -255,6 +256,7 @@ int clk_enable(struct clk *c)
if (c->ops && c->ops->enable) {
ret = c->ops->enable(c);
+ trace_clock_enable(c->name, 1, smp_processor_id());
if (ret) {
if (c->parent)
clk_disable(c->parent);
@@ -284,9 +286,10 @@ void clk_disable(struct clk *c)
return;
}
if (c->refcnt == 1) {
- if (c->ops && c->ops->disable)
+ if (c->ops && c->ops->disable) {
+ trace_clock_disable(c->name, 0, smp_processor_id());
c->ops->disable(c);
-
+ }
if (c->parent)
clk_disable(c->parent);
@@ -385,6 +388,7 @@ int clk_set_rate_locked(struct clk *c, unsigned long rate)
return ret;
}
+ trace_clock_set_rate(c->name, rate, smp_processor_id());
ret = c->ops->set_rate(c, rate);
if (ret)
return ret;