diff options
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/Kconfig | 1 | ||||
-rw-r--r-- | drivers/usb/dwc3/dwc3-omap.c | 17 | ||||
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 8 |
3 files changed, 19 insertions, 7 deletions
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index 8eb996e4f058..261c3b428220 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig | |||
@@ -45,6 +45,7 @@ comment "Platform Glue Driver Support" | |||
45 | config USB_DWC3_OMAP | 45 | config USB_DWC3_OMAP |
46 | tristate "Texas Instruments OMAP5 and similar Platforms" | 46 | tristate "Texas Instruments OMAP5 and similar Platforms" |
47 | depends on EXTCON && (ARCH_OMAP2PLUS || COMPILE_TEST) | 47 | depends on EXTCON && (ARCH_OMAP2PLUS || COMPILE_TEST) |
48 | depends on OF | ||
48 | default USB_DWC3 | 49 | default USB_DWC3 |
49 | help | 50 | help |
50 | Some platforms from Texas Instruments like OMAP5, DRA7xxx and | 51 | Some platforms from Texas Instruments like OMAP5, DRA7xxx and |
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 4af4c3567656..07a736acd0f2 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c | |||
@@ -322,7 +322,7 @@ static int dwc3_omap_remove_core(struct device *dev, void *c) | |||
322 | { | 322 | { |
323 | struct platform_device *pdev = to_platform_device(dev); | 323 | struct platform_device *pdev = to_platform_device(dev); |
324 | 324 | ||
325 | platform_device_unregister(pdev); | 325 | of_device_unregister(pdev); |
326 | 326 | ||
327 | return 0; | 327 | return 0; |
328 | } | 328 | } |
@@ -599,7 +599,7 @@ static int dwc3_omap_prepare(struct device *dev) | |||
599 | { | 599 | { |
600 | struct dwc3_omap *omap = dev_get_drvdata(dev); | 600 | struct dwc3_omap *omap = dev_get_drvdata(dev); |
601 | 601 | ||
602 | dwc3_omap_disable_irqs(omap); | 602 | dwc3_omap_write_irqmisc_set(omap, 0x00); |
603 | 603 | ||
604 | return 0; | 604 | return 0; |
605 | } | 605 | } |
@@ -607,8 +607,19 @@ static int dwc3_omap_prepare(struct device *dev) | |||
607 | static void dwc3_omap_complete(struct device *dev) | 607 | static void dwc3_omap_complete(struct device *dev) |
608 | { | 608 | { |
609 | struct dwc3_omap *omap = dev_get_drvdata(dev); | 609 | struct dwc3_omap *omap = dev_get_drvdata(dev); |
610 | u32 reg; | ||
610 | 611 | ||
611 | dwc3_omap_enable_irqs(omap); | 612 | reg = (USBOTGSS_IRQMISC_OEVT | |
613 | USBOTGSS_IRQMISC_DRVVBUS_RISE | | ||
614 | USBOTGSS_IRQMISC_CHRGVBUS_RISE | | ||
615 | USBOTGSS_IRQMISC_DISCHRGVBUS_RISE | | ||
616 | USBOTGSS_IRQMISC_IDPULLUP_RISE | | ||
617 | USBOTGSS_IRQMISC_DRVVBUS_FALL | | ||
618 | USBOTGSS_IRQMISC_CHRGVBUS_FALL | | ||
619 | USBOTGSS_IRQMISC_DISCHRGVBUS_FALL | | ||
620 | USBOTGSS_IRQMISC_IDPULLUP_FALL); | ||
621 | |||
622 | dwc3_omap_write_irqmisc_set(omap, reg); | ||
612 | } | 623 | } |
613 | 624 | ||
614 | static int dwc3_omap_suspend(struct device *dev) | 625 | static int dwc3_omap_suspend(struct device *dev) |
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 9d64dd02c57e..dab7927d1009 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c | |||
@@ -828,10 +828,6 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep, | |||
828 | length, last ? " last" : "", | 828 | length, last ? " last" : "", |
829 | chain ? " chain" : ""); | 829 | chain ? " chain" : ""); |
830 | 830 | ||
831 | /* Skip the LINK-TRB on ISOC */ | ||
832 | if (((dep->free_slot & DWC3_TRB_MASK) == DWC3_TRB_NUM - 1) && | ||
833 | usb_endpoint_xfer_isoc(dep->endpoint.desc)) | ||
834 | dep->free_slot++; | ||
835 | 831 | ||
836 | trb = &dep->trb_pool[dep->free_slot & DWC3_TRB_MASK]; | 832 | trb = &dep->trb_pool[dep->free_slot & DWC3_TRB_MASK]; |
837 | 833 | ||
@@ -843,6 +839,10 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep, | |||
843 | } | 839 | } |
844 | 840 | ||
845 | dep->free_slot++; | 841 | dep->free_slot++; |
842 | /* Skip the LINK-TRB on ISOC */ | ||
843 | if (((dep->free_slot & DWC3_TRB_MASK) == DWC3_TRB_NUM - 1) && | ||
844 | usb_endpoint_xfer_isoc(dep->endpoint.desc)) | ||
845 | dep->free_slot++; | ||
846 | 846 | ||
847 | trb->size = DWC3_TRB_SIZE_LENGTH(length); | 847 | trb->size = DWC3_TRB_SIZE_LENGTH(length); |
848 | trb->bpl = lower_32_bits(dma); | 848 | trb->bpl = lower_32_bits(dma); |