summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJun Li <r65092@freescale.com>2009-12-04 23:07:39 +0800
committerJustin Waters <justin.waters@timesys.com>2010-03-25 14:01:34 -0400
commit29895e71124969590d841293c7ce7b7eaa393a35 (patch)
tree3103b95f7caf0e44e5c5a648b83cc748a045fd8b /drivers
parente8a7b89f9635100857e6d151f70c24159a754705 (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')
-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;