diff options
Diffstat (limited to 'drivers/usb/dwc2')
| -rw-r--r-- | drivers/usb/dwc2/core.c | 2 | ||||
| -rw-r--r-- | drivers/usb/dwc2/hcd.c | 11 | ||||
| -rw-r--r-- | drivers/usb/dwc2/platform.c | 3 |
3 files changed, 4 insertions, 12 deletions
diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index 8565d87f94b4..1d129884cc39 100644 --- a/drivers/usb/dwc2/core.c +++ b/drivers/usb/dwc2/core.c | |||
| @@ -216,7 +216,7 @@ static int dwc2_hs_phy_init(struct dwc2_hsotg *hsotg, bool select_phy) | |||
| 216 | int retval = 0; | 216 | int retval = 0; |
| 217 | 217 | ||
| 218 | if (!select_phy) | 218 | if (!select_phy) |
| 219 | return -ENODEV; | 219 | return 0; |
| 220 | 220 | ||
| 221 | usbcfg = readl(hsotg->regs + GUSBCFG); | 221 | usbcfg = readl(hsotg->regs + GUSBCFG); |
| 222 | 222 | ||
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index f59484d43b35..4d918ed8d343 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c | |||
| @@ -2565,25 +2565,14 @@ static void _dwc2_hcd_endpoint_reset(struct usb_hcd *hcd, | |||
| 2565 | struct usb_host_endpoint *ep) | 2565 | struct usb_host_endpoint *ep) |
| 2566 | { | 2566 | { |
| 2567 | struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); | 2567 | struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); |
| 2568 | int is_control = usb_endpoint_xfer_control(&ep->desc); | ||
| 2569 | int is_out = usb_endpoint_dir_out(&ep->desc); | ||
| 2570 | int epnum = usb_endpoint_num(&ep->desc); | ||
| 2571 | struct usb_device *udev; | ||
| 2572 | unsigned long flags; | 2568 | unsigned long flags; |
| 2573 | 2569 | ||
| 2574 | dev_dbg(hsotg->dev, | 2570 | dev_dbg(hsotg->dev, |
| 2575 | "DWC OTG HCD EP RESET: bEndpointAddress=0x%02x\n", | 2571 | "DWC OTG HCD EP RESET: bEndpointAddress=0x%02x\n", |
| 2576 | ep->desc.bEndpointAddress); | 2572 | ep->desc.bEndpointAddress); |
| 2577 | 2573 | ||
| 2578 | udev = to_usb_device(hsotg->dev); | ||
| 2579 | |||
| 2580 | spin_lock_irqsave(&hsotg->lock, flags); | 2574 | spin_lock_irqsave(&hsotg->lock, flags); |
| 2581 | |||
| 2582 | usb_settoggle(udev, epnum, is_out, 0); | ||
| 2583 | if (is_control) | ||
| 2584 | usb_settoggle(udev, epnum, !is_out, 0); | ||
| 2585 | dwc2_hcd_endpoint_reset(hsotg, ep); | 2575 | dwc2_hcd_endpoint_reset(hsotg, ep); |
| 2586 | |||
| 2587 | spin_unlock_irqrestore(&hsotg->lock, flags); | 2576 | spin_unlock_irqrestore(&hsotg->lock, flags); |
| 2588 | } | 2577 | } |
| 2589 | 2578 | ||
diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index d01d0d3f2cf0..eaba547ce26b 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c | |||
| @@ -124,6 +124,9 @@ static int dwc2_driver_probe(struct platform_device *dev) | |||
| 124 | int retval; | 124 | int retval; |
| 125 | int irq; | 125 | int irq; |
| 126 | 126 | ||
| 127 | if (usb_disabled()) | ||
| 128 | return -ENODEV; | ||
| 129 | |||
| 127 | match = of_match_device(dwc2_of_match_table, &dev->dev); | 130 | match = of_match_device(dwc2_of_match_table, &dev->dev); |
| 128 | if (match && match->data) { | 131 | if (match && match->data) { |
| 129 | params = match->data; | 132 | params = match->data; |
