aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorJean Pihet <jean.pihet@newoldbits.com>2013-01-26 02:58:13 -0500
committerPaul Walmsley <paul@pwsan.com>2013-01-29 16:59:57 -0500
commitc165a14023ecec8a68f3b87d0c3c822426065937 (patch)
tree768eb15ffa9b977572fec6cab008eeea85801b83 /arch/arm/mach-omap2
parent32d174ed1bd793e9be578914cce6b1e45c36843e (diff)
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')
-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)
143static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag) 143static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag)
144{ 144{
145 145
146 int prev, state, trace_state = 0; 146 int prev, next, state, trace_state = 0;
147 147
148 if (pwrdm == NULL) 148 if (pwrdm == NULL)
149 return -EINVAL; 149 return -EINVAL;
@@ -164,9 +164,10 @@ static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag)
164 * If the power domain did not hit the desired state, 164 * If the power domain did not hit the desired state,
165 * generate a trace event with both the desired and hit states 165 * generate a trace event with both the desired and hit states
166 */ 166 */
167 if (state != prev) { 167 next = pwrdm_read_next_pwrst(pwrdm);
168 if (next != prev) {
168 trace_state = (PWRDM_TRACE_STATES_FLAG | 169 trace_state = (PWRDM_TRACE_STATES_FLAG |
169 ((state & OMAP_POWERSTATE_MASK) << 8) | 170 ((next & OMAP_POWERSTATE_MASK) << 8) |
170 ((prev & OMAP_POWERSTATE_MASK) << 0)); 171 ((prev & OMAP_POWERSTATE_MASK) << 0));
171 trace_power_domain_target(pwrdm->name, trace_state, 172 trace_power_domain_target(pwrdm->name, trace_state,
172 smp_processor_id()); 173 smp_processor_id());