summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/core.h
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2011-08-27 22:28:36 +0300
committerFelipe Balbi <balbi@ti.com>2011-09-09 13:02:07 +0300
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 e7439699f44..01892b12396 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -373,15 +373,9 @@ enum dwc3_phy {
enum dwc3_ep0_state {
EP0_UNCONNECTED = 0,
- EP0_IDLE,
- EP0_IN_DATA_PHASE,
- EP0_OUT_DATA_PHASE,
- EP0_IN_WAIT_GADGET,
- EP0_OUT_WAIT_GADGET,
- EP0_IN_WAIT_NRDY,
- EP0_OUT_WAIT_NRDY,
- EP0_IN_STATUS_PHASE,
- EP0_OUT_STATUS_PHASE,
+ EP0_SETUP_PHASE,
+ EP0_DATA_PHASE,
+ EP0_STATUS_PHASE,
EP0_STALL,
};