summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2013-05-02 09:04:18 +0800
committerPeter Chen <peter.chen@freescale.com>2013-05-03 12:49:03 +0800
commit9e774e17d1265d0f34b386312871b86111edee7e (patch)
tree19be01b3cbafaf53f5375bded5548743079c8e75
parent529266241eb7f8be45959f332ad7ddb8e950e06d (diff)
ENGR00261037-1: usb: usb host works abnormal after unload gadget module
If there is usb device on the OTG port when controller works at host mode, and at this time, we unload gadget module, the usbcmd.rs will be cleared, it is unexpected behavior. When the controller works at one mode(eg, host mode), the register should not be written by other mode driver (eg, devcie driver). The OTG driver does not consider this situation, and current i.mx FSL OTG driver does not support fully OTG function, so we remove the caller at fsl_otg_set_peripheral which will touch controller register. Signed-off-by: Peter Chen <peter.chen@freescale.com>
-rwxr-xr-xdrivers/usb/otg/fsl_otg.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/usb/otg/fsl_otg.c b/drivers/usb/otg/fsl_otg.c
index 9fd3c87babfb..00bd2e609525 100755
--- a/drivers/usb/otg/fsl_otg.c
+++ b/drivers/usb/otg/fsl_otg.c
@@ -690,9 +690,16 @@ static int fsl_otg_set_peripheral(struct otg_transceiver *otg_p,
return -ENODEV;
if (!gadget) {
- if (!otg_dev->otg.default_a)
+ /*
+ * At i.mx platform, we still not implement fully
+ * OTG.
+ */
+ /*
+ if (!otg_dev->otg.default_a) {
otg_p->gadget->ops->vbus_draw(otg_p->gadget, 0);
- usb_gadget_vbus_disconnect(otg_dev->otg.gadget);
+ usb_gadget_vbus_disconnect(otg_dev->otg.gadget);
+ }
+ */
otg_dev->otg.gadget = 0;
otg_dev->fsm.b_bus_req = 0;
pdata->port_enables = 0;