aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/ci13xxx_udc.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/ci13xxx_udc.h')
-rw-r--r--drivers/usb/gadget/ci13xxx_udc.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/gadget/ci13xxx_udc.h b/drivers/usb/gadget/ci13xxx_udc.h
index a2492b65f98c..23707775cb43 100644
--- a/drivers/usb/gadget/ci13xxx_udc.h
+++ b/drivers/usb/gadget/ci13xxx_udc.h
@@ -33,6 +33,7 @@ struct ci13xxx_td {
33 /* 0 */ 33 /* 0 */
34 u32 next; 34 u32 next;
35#define TD_TERMINATE BIT(0) 35#define TD_TERMINATE BIT(0)
36#define TD_ADDR_MASK (0xFFFFFFEUL << 5)
36 /* 1 */ 37 /* 1 */
37 u32 token; 38 u32 token;
38#define TD_STATUS (0x00FFUL << 0) 39#define TD_STATUS (0x00FFUL << 0)
@@ -74,6 +75,8 @@ struct ci13xxx_req {
74 struct list_head queue; 75 struct list_head queue;
75 struct ci13xxx_td *ptr; 76 struct ci13xxx_td *ptr;
76 dma_addr_t dma; 77 dma_addr_t dma;
78 struct ci13xxx_td *zptr;
79 dma_addr_t zdma;
77}; 80};
78 81
79/* Extension of usb_ep */ 82/* Extension of usb_ep */
@@ -125,6 +128,10 @@ struct ci13xxx {
125 u32 ep0_dir; /* ep0 direction */ 128 u32 ep0_dir; /* ep0 direction */
126#define ep0out ci13xxx_ep[0] 129#define ep0out ci13xxx_ep[0]
127#define ep0in ci13xxx_ep[16] 130#define ep0in ci13xxx_ep[16]
131 u8 remote_wakeup; /* Is remote wakeup feature
132 enabled by the host? */
133 u8 suspended; /* suspended by the host */
134 u8 test_mode; /* the selected test mode */
128 135
129 struct usb_gadget_driver *driver; /* 3rd party gadget driver */ 136 struct usb_gadget_driver *driver; /* 3rd party gadget driver */
130 struct ci13xxx_udc_driver *udc_driver; /* device controller driver */ 137 struct ci13xxx_udc_driver *udc_driver; /* device controller driver */
@@ -152,6 +159,7 @@ struct ci13xxx {
152#define USBCMD_RS BIT(0) 159#define USBCMD_RS BIT(0)
153#define USBCMD_RST BIT(1) 160#define USBCMD_RST BIT(1)
154#define USBCMD_SUTW BIT(13) 161#define USBCMD_SUTW BIT(13)
162#define USBCMD_ATDTW BIT(14)
155 163
156/* USBSTS & USBINTR */ 164/* USBSTS & USBINTR */
157#define USBi_UI BIT(0) 165#define USBi_UI BIT(0)
@@ -165,6 +173,7 @@ struct ci13xxx {
165#define DEVICEADDR_USBADR (0x7FUL << 25) 173#define DEVICEADDR_USBADR (0x7FUL << 25)
166 174
167/* PORTSC */ 175/* PORTSC */
176#define PORTSC_FPR BIT(6)
168#define PORTSC_SUSP BIT(7) 177#define PORTSC_SUSP BIT(7)
169#define PORTSC_HSP BIT(9) 178#define PORTSC_HSP BIT(9)
170#define PORTSC_PTC (0x0FUL << 16) 179#define PORTSC_PTC (0x0FUL << 16)