Skip to contentSkip to conversation

ARM: OMAP2+: Restore MPU power domain if cpu_cluster_pm_enter() fails

PATCH New Tony Lindgren 1 participant 1 message Sep 23, 2020

Subsystems (3)
lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

PATCH 1/1 ARM: OMAP2+: Restore MPU power domain if cpu_cluster_pm_enter() fails

If cpu_cluster_pm_enter() fails, we need to set MPU power domain back to enabled to prevent the next WFI from potentially triggering an undesired MPU power domain state change.

We already do this for omap_enter_idle_smp() but are missing it for omap_enter_idle_coupled().

Fixes 55be2f50336f ("ARM: OMAP2+: Handle errors for cpu_pm")
---
 arch/arm/mach-omap2/cpuidle44xx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/cpuidle44xx.c +3 -1
@@ -174,8 +174,10 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
 		 */
 		if (mpuss_can_lose_context) {
 			error = cpu_cluster_pm_enter();
-			if (error)
+			if (error) {
+				omap_set_pwrdm_state(mpu_pd, PWRDM_POWER_ON);
 				goto cpu_cluster_pm_out;
+			}
 		}
 	}
 
Signature · 1 line
2.28.0