aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/core.h
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2011-08-27 15:28:36 -0400
committerFelipe Balbi <balbi@ti.com>2011-09-09 06:02:07 -0400
commitc7fcdeb2627c46b7ec3f0bcb2054b10405f9a70e (patch)
treee773414177e516a4e7dfad6bfe03f7e46a7388ea /drivers/usb/dwc3/core.h
parent984f66a6f9b9c02d6cb077ac49ec9fe5445fb1ee (diff)
usb: dwc3: ep0: simplify EP0 state machine
The DesignWare USB3 core tells us which phase of a control transfer should be started, it also tells us which physical endpoint needs that transfer. With these two informations, we have all we need to simply EP0 handling quite a lot and get rid rid of the SW state machine tracking ep0 states. For achieving this perfectly, we needed to add support for situations where we get XferNotReady while endpoint is still busy and XferNotReady while gadget driver still hasn't queued a request. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/core.h')
-rw-r--r--drivers/usb/dwc3/core.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index e7439699f442..01892b12396a 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -373,15 +373,9 @@ enum dwc3_phy {
373 373
374enum dwc3_ep0_state { 374enum dwc3_ep0_state {
375 EP0_UNCONNECTED = 0, 375 EP0_UNCONNECTED = 0,
376 EP0_IDLE, 376 EP0_SETUP_PHASE,
377 EP0_IN_DATA_PHASE, 377 EP0_DATA_PHASE,
378 EP0_OUT_DATA_PHASE, 378 EP0_STATUS_PHASE,
379 EP0_IN_WAIT_GADGET,
380 EP0_OUT_WAIT_GADGET,
381 EP0_IN_WAIT_NRDY,
382 EP0_OUT_WAIT_NRDY,
383 EP0_IN_STATUS_PHASE,
384 EP0_OUT_STATUS_PHASE,
385 EP0_STALL, 379 EP0_STALL,
386}; 380};
387 381