summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony LIU <junjie.liu@freescale.com>2012-04-16 15:47:23 +0800
committerFrank Li <Frank.Li@freescale.com>2012-04-16 15:27:52 +0800
commitf8643e00fc4b405dfd69cbc9ab2b1584a503311e (patch)
tree33b5d97a87bd8707933b3997b94d2425a44b890a
parent11c09d944eaa875f73673a750b2f8f21a2b2b9e3 (diff)
ENGR00179679 Fix usb gadget suspend issue connected to usb charger
- the root cause of this issue is during resume process, USB clock is not turned on for this USB charger case so that the second suspend is processed without USB clock, it cause system hang - in udc resume process, at this situation, we should exit low power mode to enable the b session valid intrrupt to close the usb clock when detach from usb charger Signed-off-by: Tony LIU <junjie.liu@freescale.com>
-rwxr-xr-xdrivers/usb/gadget/arcotg_udc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/gadget/arcotg_udc.c b/drivers/usb/gadget/arcotg_udc.c
index 5a1aab94b405..ea81802a3ca6 100755
--- a/drivers/usb/gadget/arcotg_udc.c
+++ b/drivers/usb/gadget/arcotg_udc.c
@@ -3458,7 +3458,11 @@ end:
dr_clk_gate(false);
}
- --udc_controller->suspended;
+
+ if (!(--udc_controller->suspended) && !udc_controller->stopped) {
+ dr_clk_gate(true);
+ dr_phy_low_power_mode(udc_controller, false);
+ }
enable_irq(udc_controller->irq);
mutex_unlock(&udc_resume_mutex);
printk(KERN_DEBUG "USB Gadget resume ends\n");