diff mbox

[9/9,v3] usb : musb: Offmode fix for idle path

Message ID 87zkv81h5m.fsf@deeprootsystems.com (mailing list archive)
State Changes Requested
Delegated to: Kevin Hilman
Headers show

Commit Message

Kevin Hilman Sept. 23, 2010, 5:52 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index cf4207f..51fef17 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -125,14 +125,16 @@  static int omap3_enter_idle(struct cpuidle_device *dev,
 
 	current_cx_state = *cx;
 
-	/* Used to keep track of the total time in idle */
-	getnstimeofday(&ts_preidle);
+	pwrdm_set_next_pwrst(mpu_pd, mpu_state);
+	pwrdm_set_next_pwrst(core_pd, core_state);
+
+	omap3_device_idle();
 
 	local_irq_disable();
 	local_fiq_disable();
 
-	pwrdm_set_next_pwrst(mpu_pd, mpu_state);
-	pwrdm_set_next_pwrst(core_pd, core_state);
+	/* Used to keep track of the total time in idle */
+	getnstimeofday(&ts_preidle);
 
 	if (omap_irq_pending() || need_resched())
 		goto return_sleep_time;
@@ -157,6 +159,8 @@  return_sleep_time:
 	local_irq_enable();
 	local_fiq_enable();
 
+	omap3_device_resume();
+
 	return ts_idle.tv_nsec / NSEC_PER_USEC + ts_idle.tv_sec * USEC_PER_SEC;
 }