summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authormake shi <b15407@freescale.com>2013-01-10 13:16:24 +0800
committermake shi <b15407@freescale.com>2013-01-11 09:59:12 +0800
commit5a5ec76712c17ce4618de2a541d57106d39cd07b (patch)
tree2da4473b016c969800945999c79ca6271ebb10f6 /drivers/usb
parent648dfe433d427a257ee85f9ae95076b41d1d563f (diff)
ENGR00232755 USB: disable clock and abnormal wakeup when remove gadget driver
- In current bsp, the usb clock mismatch when rmmod gadget class driver. The clock should be turn off when gadget class driver unregister. - There is an abnormal usb wakeup interrupt happen if phy is no power without VBUS. If we unplug the usb cable after unregister usb gadget driver, it is difficult to handle the unexpected usb wakeup interrupt. SO we must call dr_discharge_line() to make sure no abnormal usb wakeup interrupt happen in usb unregister gadget class driver. Signed-off-by: make shi <b15407@freescale.com>
Diffstat (limited to 'drivers/usb')
-rwxr-xr-xdrivers/usb/gadget/arcotg_udc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/gadget/arcotg_udc.c b/drivers/usb/gadget/arcotg_udc.c
index 04824da1c07f..d1a2e27bcd56 100755
--- a/drivers/usb/gadget/arcotg_udc.c
+++ b/drivers/usb/gadget/arcotg_udc.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2004-2012 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2004-2013 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -562,6 +562,8 @@ static void dr_controller_stop(struct fsl_udc *udc)
tmp &= ~USB_CMD_RUN_STOP;
fsl_writel(tmp, &dr_regs->usbcmd);
+ /* disable pulldown dp and dm */
+ dr_discharge_line(udc->pdata, true);
return;
}
@@ -2519,6 +2521,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
dr_phy_low_power_mode(udc_controller, true);
+ dr_clk_gate(false);
printk(KERN_INFO "unregistered gadget driver '%s'\r\n",
driver->driver.name);
return 0;