Skip to content

Commit

Permalink
usb: dwc3: gadget: disable U1/U2 on disconnect
Browse files Browse the repository at this point in the history
If we get a disconnect IRQ, we should take
the core out of low power mode so we can
reconnect afterwards.

Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Jun 3, 2012
1 parent fcc023c commit c4430a2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1906,19 +1906,16 @@ static void dwc3_clear_stall_all_ep(struct dwc3 *dwc)

static void dwc3_gadget_disconnect_interrupt(struct dwc3 *dwc)
{
int reg;

dev_vdbg(dwc->dev, "%s\n", __func__);
#if 0
XXX
U1/U2 is powersave optimization. Skip it for now. Anyway we need to
enable it before we can disable it.

reg = dwc3_readl(dwc->regs, DWC3_DCTL);
reg &= ~DWC3_DCTL_INITU1ENA;
dwc3_writel(dwc->regs, DWC3_DCTL, reg);

reg &= ~DWC3_DCTL_INITU2ENA;
dwc3_writel(dwc->regs, DWC3_DCTL, reg);
#endif

dwc3_stop_active_transfers(dwc);
dwc3_disconnect_gadget(dwc);
Expand Down

0 comments on commit c4430a2

Please sign in to comment.