ARM: tegra: add powergating trace event
Peter De Schrijver [Fri, 27 Apr 2012 13:52:16 +0000 (16:52 +0300)]
Add a trace event for powergating. The existing power_domain_target is used.
state 0 is used for off and state 1 is used for on. This patch only traces
non CPU domains. The powerstate of CPU domains is already traced using
power_start events.

bug 976845

Change-Id: Ic9503f7b42b35c0bf70c7b64a7f15c4960637200
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Reviewed-on: http://git-master/r/99416
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Antti Miettinen <amiettinen@nvidia.com>
Reviewed-by: Matthew Longnecker <mlongnecker@nvidia.com>
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>

arch/arm/mach-tegra/powergate.c

index 4f237e1..11f992e 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/io.h>
 #include <linux/seq_file.h>
 #include <linux/spinlock.h>
+#include <trace/events/power.h>
 
 #include <mach/clk.h>
 #include <mach/iomap.h>
@@ -471,6 +472,9 @@ static int tegra_powergate_set(int id, bool new_state)
                return -EBUSY;
        }
 
+       trace_power_domain_target(powergate_partition_info[id].name, new_state,
+                       smp_processor_id());
+
        return 0;
 }