diff options
author | Felipe Balbi <balbi@ti.com> | 2012-01-18 18:32:29 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-02-06 11:48:36 +0200 |
commit | 8db7ed15f2557e26371e4b2d98fee290d992b715 (patch) | |
tree | eca914c4562605bbf091f3ede5d55abd2c7c024a /drivers/usb/dwc3/gadget.c | |
parent | 457e84b6624b4d97e6ffae437887ea51a22d54a0 (diff) | |
download | linux-3.10-8db7ed15f2557e26371e4b2d98fee290d992b715.tar.gz linux-3.10-8db7ed15f2557e26371e4b2d98fee290d992b715.tar.bz2 linux-3.10-8db7ed15f2557e26371e4b2d98fee290d992b715.zip |
usb: dwc3: gadget: start core on Rx.Detect
When we set Run/Stop bit, we also move the
core to Rx.Detect state so that USB3 handshake
can start from a known location.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 7913d1b50e3..2c4482f13a1 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1313,10 +1313,13 @@ static void dwc3_gadget_run_stop(struct dwc3 *dwc, int is_on) u32 timeout = 500; reg = dwc3_readl(dwc->regs, DWC3_DCTL); - if (is_on) - reg |= DWC3_DCTL_RUN_STOP; - else + if (is_on) { + reg &= ~DWC3_DCTL_TRGTULST_MASK; + reg |= (DWC3_DCTL_RUN_STOP + | DWC3_DCTL_TRGTULST_RX_DET); + } else { reg &= ~DWC3_DCTL_RUN_STOP; + } dwc3_writel(dwc->regs, DWC3_DCTL, reg); |