Go to the documentation of this file.
13 #define VUSBHS_MAX_PORTS 8
15 #define DQH_ALIGNMENT 2048
16 #define DTD_ALIGNMENT 64
17 #define DMA_BOUNDARY 4096
22 #define DMA_ADDR_INVALID (~(dma_addr_t)0)
24 #define EP0_MAX_PKT_SIZE 64
26 #define WAIT_FOR_SETUP 0
27 #define DATA_STATE_XMIT 1
28 #define DATA_STATE_NEED_ZLP 2
29 #define WAIT_FOR_OUT_STATUS 3
30 #define DATA_STATE_RECV 4
32 #define CAPLENGTH_MASK (0xff)
33 #define DCCPARAMS_DEN_MASK (0x1f)
35 #define HCSPARAMS_PPC (0x10)
38 #define USB_FRINDEX_MASKS 0x3fff
41 #define USBCMD_RUN_STOP (0x00000001)
42 #define USBCMD_CTRL_RESET (0x00000002)
43 #define USBCMD_SETUP_TRIPWIRE_SET (0x00002000)
44 #define USBCMD_SETUP_TRIPWIRE_CLEAR (~USBCMD_SETUP_TRIPWIRE_SET)
46 #define USBCMD_ATDTW_TRIPWIRE_SET (0x00004000)
47 #define USBCMD_ATDTW_TRIPWIRE_CLEAR (~USBCMD_ATDTW_TRIPWIRE_SET)
50 #define USBCMD_FRAME_SIZE_1024 (0x00000000)
51 #define USBCMD_FRAME_SIZE_512 (0x00000004)
52 #define USBCMD_FRAME_SIZE_256 (0x00000008)
53 #define USBCMD_FRAME_SIZE_128 (0x0000000C)
54 #define USBCMD_FRAME_SIZE_64 (0x00008000)
55 #define USBCMD_FRAME_SIZE_32 (0x00008004)
56 #define USBCMD_FRAME_SIZE_16 (0x00008008)
57 #define USBCMD_FRAME_SIZE_8 (0x0000800C)
59 #define EPCTRL_TX_ALL_MASK (0xFFFF0000)
60 #define EPCTRL_RX_ALL_MASK (0x0000FFFF)
62 #define EPCTRL_TX_DATA_TOGGLE_RST (0x00400000)
63 #define EPCTRL_TX_EP_STALL (0x00010000)
64 #define EPCTRL_RX_EP_STALL (0x00000001)
65 #define EPCTRL_RX_DATA_TOGGLE_RST (0x00000040)
66 #define EPCTRL_RX_ENABLE (0x00000080)
67 #define EPCTRL_TX_ENABLE (0x00800000)
68 #define EPCTRL_CONTROL (0x00000000)
69 #define EPCTRL_ISOCHRONOUS (0x00040000)
70 #define EPCTRL_BULK (0x00080000)
71 #define EPCTRL_INT (0x000C0000)
72 #define EPCTRL_TX_TYPE (0x000C0000)
73 #define EPCTRL_RX_TYPE (0x0000000C)
74 #define EPCTRL_DATA_TOGGLE_INHIBIT (0x00000020)
75 #define EPCTRL_TX_EP_TYPE_SHIFT (18)
76 #define EPCTRL_RX_EP_TYPE_SHIFT (2)
78 #define EPCOMPLETE_MAX_ENDPOINTS (16)
81 #define USB_EP_LIST_ADDRESS_MASK 0xfffff800
83 #define PORTSCX_W1C_BITS 0x2a
84 #define PORTSCX_PORT_RESET 0x00000100
85 #define PORTSCX_PORT_POWER 0x00001000
86 #define PORTSCX_FORCE_FULL_SPEED_CONNECT 0x01000000
87 #define PORTSCX_PAR_XCVR_SELECT 0xC0000000
88 #define PORTSCX_PORT_FORCE_RESUME 0x00000040
89 #define PORTSCX_PORT_SUSPEND 0x00000080
90 #define PORTSCX_PORT_SPEED_FULL 0x00000000
91 #define PORTSCX_PORT_SPEED_LOW 0x04000000
92 #define PORTSCX_PORT_SPEED_HIGH 0x08000000
93 #define PORTSCX_PORT_SPEED_MASK 0x0C000000
96 #define USBMODE_CTRL_MODE_IDLE 0x00000000
97 #define USBMODE_CTRL_MODE_DEVICE 0x00000002
98 #define USBMODE_CTRL_MODE_HOST 0x00000003
99 #define USBMODE_CTRL_MODE_RSV 0x00000001
100 #define USBMODE_SETUP_LOCK_OFF 0x00000008
101 #define USBMODE_STREAM_DISABLE 0x00000010
104 #define USBSTS_INT 0x00000001
105 #define USBSTS_ERR 0x00000002
106 #define USBSTS_PORT_CHANGE 0x00000004
107 #define USBSTS_FRM_LST_ROLL 0x00000008
108 #define USBSTS_SYS_ERR 0x00000010
109 #define USBSTS_IAA 0x00000020
110 #define USBSTS_RESET 0x00000040
111 #define USBSTS_SOF 0x00000080
112 #define USBSTS_SUSPEND 0x00000100
113 #define USBSTS_HC_HALTED 0x00001000
114 #define USBSTS_RCL 0x00002000
115 #define USBSTS_PERIODIC_SCHEDULE 0x00004000
116 #define USBSTS_ASYNC_SCHEDULE 0x00008000
120 #define USBINTR_INT_EN (0x00000001)
121 #define USBINTR_ERR_INT_EN (0x00000002)
122 #define USBINTR_PORT_CHANGE_DETECT_EN (0x00000004)
124 #define USBINTR_ASYNC_ADV_AAE (0x00000020)
125 #define USBINTR_ASYNC_ADV_AAE_ENABLE (0x00000020)
126 #define USBINTR_ASYNC_ADV_AAE_DISABLE (0xFFFFFFDF)
128 #define USBINTR_RESET_EN (0x00000040)
129 #define USBINTR_SOF_UFRAME_EN (0x00000080)
130 #define USBINTR_DEVICE_SUSPEND (0x00000100)
132 #define USB_DEVICE_ADDRESS_MASK (0xfe000000)
133 #define USB_DEVICE_ADDRESS_BIT_SHIFT (25)
254 #define EP_QUEUE_HEAD_MULT_POS 30
255 #define EP_QUEUE_HEAD_ZLT_SEL 0x20000000
256 #define EP_QUEUE_HEAD_MAX_PKT_LEN_POS 16
257 #define EP_QUEUE_HEAD_MAX_PKT_LEN(ep_info) (((ep_info)>>16)&0x07ff)
258 #define EP_QUEUE_HEAD_IOS 0x00008000
259 #define EP_QUEUE_HEAD_NEXT_TERMINATE 0x00000001
260 #define EP_QUEUE_HEAD_IOC 0x00008000
261 #define EP_QUEUE_HEAD_MULTO 0x00000C00
262 #define EP_QUEUE_HEAD_STATUS_HALT 0x00000040
263 #define EP_QUEUE_HEAD_STATUS_ACTIVE 0x00000080
264 #define EP_QUEUE_CURRENT_OFFSET_MASK 0x00000FFF
265 #define EP_QUEUE_HEAD_NEXT_POINTER_MASK 0xFFFFFFE0
266 #define EP_QUEUE_FRINDEX_MASK 0x000007FF
267 #define EP_MAX_LENGTH_TRANSFER 0x4000
288 #define DTD_NEXT_TERMINATE (0x00000001)
289 #define DTD_IOC (0x00008000)
290 #define DTD_STATUS_ACTIVE (0x00000080)
291 #define DTD_STATUS_HALTED (0x00000040)
292 #define DTD_STATUS_DATA_BUFF_ERR (0x00000020)
293 #define DTD_STATUS_TRANSACTION_ERR (0x00000008)
294 #define DTD_RESERVED_FIELDS (0x00007F00)
295 #define DTD_ERROR_MASK (0x68)
296 #define DTD_ADDR_MASK (0xFFFFFFE0)
297 #define DTD_PACKET_SIZE 0x7FFF0000
298 #define DTD_LENGTH_BIT_POS (16)