]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/usb/gadget/ci_udc.h
Merge branch 'u-boot-sh/rmobile' into 'u-boot-arm/master'
[karo-tx-uboot.git] / drivers / usb / gadget / ci_udc.h
index 4425fd9345703d116e9e9d7638acb8f526bb8ac7..c2144021e6750c56badd300e31e01814a92e42e8 100644 (file)
@@ -77,19 +77,28 @@ struct ci_udc {
 #define CTRL_TXT_BULK  (2 << 18)
 #define CTRL_RXT_BULK  (2 << 2)
 
+struct ci_req {
+       struct usb_request      req;
+       struct list_head        queue;
+       /* Bounce buffer allocated if needed to align the transfer */
+       uint8_t *b_buf;
+       uint32_t b_len;
+       /* Buffer for the current transfer. Either req.buf/len or b_buf/len */
+       uint8_t *hw_buf;
+       uint32_t hw_len;
+};
+
 struct ci_ep {
        struct usb_ep ep;
        struct list_head queue;
+       bool req_primed;
        const struct usb_endpoint_descriptor *desc;
-
-       struct usb_request req;
-       uint8_t *b_buf;
-       uint32_t b_len;
-       uint8_t b_fast[64] __aligned(ARCH_DMA_MINALIGN);
 };
 
 struct ci_drv {
        struct usb_gadget               gadget;
+       struct ci_req                   *ep0_req;
+       bool                            ep0_data_phase;
        struct usb_gadget_driver        *driver;
        struct ehci_ctrl                *ctrl;
        struct ept_queue_head           *epts;