summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorTony LIU <junjie.liu@freescale.com>2012-04-16 15:47:23 +0800
committerJason Liu <r64343@freescale.com>2012-07-20 13:36:17 +0800
commit966938a8efc1e0ee6a9dd21778e6dfc06387b6d3 (patch)
treeb1f1088bfd66922003dd1e097b5d79d296e881c2 /drivers/usb
parent3ab7d994b19ff1cd32c729c6de91904efea6ffdb (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>
Diffstat (limited to 'drivers/usb')
-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");