summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/powerdomain.c
diff options
context:
space:
mode:
authorJean Pihet <jean.pihet@newoldbits.com>2013-01-26 08:58:13 +0100
committerPaul Walmsley <paul@pwsan.com>2013-01-29 22:59:57 +0100
commitc165a14023ecec8a68f3b87d0c3c822426065937 (patch)
tree768eb15ffa9b977572fec6cab008eeea85801b83 /arch/arm/mach-omap2/powerdomain.c
parentARM: OMAP4: MPUSS PM: remove unnecessary shim functions for powerdomain control (diff)
downloadlinux-c165a14023ecec8a68f3b87d0c3c822426065937.tar.xz
linux-c165a14023ecec8a68f3b87d0c3c822426065937.zip
ARM: OMAP2+: powerdomain: fix powerdomain trace integration
Fix the trace in the case a power domain did not hit the desired state, as reported by Paul Walmsley. Reported-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Jean Pihet <j-pihet@ti.com> [paul@pwsan.com: split this fix off from the patch "ARM: OMAP2+: PM debug: trace the functional power domains states"] Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/powerdomain.c')
-rw-r--r--arch/arm/mach-omap2/powerdomain.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index dea62a9aad07..92388c04f83d 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -143,7 +143,7 @@ static void _update_logic_membank_counters(struct powerdomain *pwrdm)
static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag)
{
- int prev, state, trace_state = 0;
+ int prev, next, state, trace_state = 0;
if (pwrdm == NULL)
return -EINVAL;
@@ -164,9 +164,10 @@ static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag)
* If the power domain did not hit the desired state,
* generate a trace event with both the desired and hit states
*/
- if (state != prev) {
+ next = pwrdm_read_next_pwrst(pwrdm);
+ if (next != prev) {
trace_state = (PWRDM_TRACE_STATES_FLAG |
- ((state & OMAP_POWERSTATE_MASK) << 8) |
+ ((next & OMAP_POWERSTATE_MASK) << 8) |
((prev & OMAP_POWERSTATE_MASK) << 0));
trace_power_domain_target(pwrdm->name, trace_state,
smp_processor_id());