summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorJun Li <r65092@freescale.com>2009-12-04 23:07:39 +0800
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-02-12 17:19:43 +0100
commitb176df19354a3a6a67283096f3e50b4c774a540e (patch)
tree3103b95f7caf0e44e5c5a648b83cc748a045fd8b /drivers/usb/gadget
parent575610f110adedb204742b7e6b2713d60c76ddb4 (diff)
ENGR00119024 USB OTG nobody cared IRQ when add gadget driver.
When add usb gadget driver in OTG mode, cause nobody cared irq, this pach disable usbintr in udc driver probe. Signed-off-by: Li Jun <r65092@freescale.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/arcotg_udc.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/usb/gadget/arcotg_udc.c b/drivers/usb/gadget/arcotg_udc.c
index 7772c39a1044..4fac79260c38 100644
--- a/drivers/usb/gadget/arcotg_udc.c
+++ b/drivers/usb/gadget/arcotg_udc.c
@@ -109,10 +109,11 @@ dr_wake_up_enable(struct fsl_udc *udc, bool enable)
struct fsl_usb2_platform_data *pdata;
pdata = udc->pdata;
- if (device_may_wakeup(udc_controller->gadget.dev.parent)) {
- if (pdata->wake_up_enable)
- pdata->wake_up_enable(pdata, enable);
- }
+ if (enable && (!device_may_wakeup(udc_controller->gadget.dev.parent)))
+ return;
+
+ if (pdata->wake_up_enable)
+ pdata->wake_up_enable(pdata, enable);
}
#ifdef CONFIG_PPC32
@@ -2855,6 +2856,9 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
last_free_td = NULL;
#endif
+ /* disable all INTR */
+ fsl_writel(0, &dr_regs->usbintr);
+
dr_wake_up_enable(udc_controller, false);
udc_controller->stopped = 1;
@@ -2993,7 +2997,9 @@ out:
-----------------------------------------------------------------*/
static int fsl_udc_suspend(struct platform_device *pdev, pm_message_t state)
{
- if ((udc_controller->usb_state > USB_STATE_POWERED) &&
+ if (((!(udc_controller->gadget.is_otg)) ||
+ (fsl_readl(&dr_regs->otgsc) & OTGSC_STS_USB_ID)) &&
+ (udc_controller->usb_state > USB_STATE_POWERED) &&
(udc_controller->usb_state < USB_STATE_SUSPENDED))
return -EBUSY;