Go to the documentation of this file.
12 #define MV_U3D_EP_CONTEXT_ALIGNMENT 32
13 #define MV_U3D_TRB_ALIGNMENT 16
14 #define MV_U3D_DMA_BOUNDARY 4096
15 #define MV_U3D_EP0_MAX_PKT_SIZE 512
18 #define MV_U3D_WAIT_FOR_SETUP 0
19 #define MV_U3D_DATA_STATE_XMIT 1
20 #define MV_U3D_DATA_STATE_NEED_ZLP 2
21 #define MV_U3D_WAIT_FOR_OUT_STATUS 3
22 #define MV_U3D_DATA_STATE_RECV 4
23 #define MV_U3D_STATUS_STAGE 5
25 #define MV_U3D_EP_MAX_LENGTH_TRANSFER 0x10000
28 #define MV_U3D_USBINT_SETUP 0x00000001
29 #define MV_U3D_USBINT_RX_COMPLETE 0x00000002
30 #define MV_U3D_USBINT_TX_COMPLETE 0x00000004
31 #define MV_U3D_USBINT_UNDER_RUN 0x00000008
32 #define MV_U3D_USBINT_RXDESC_ERR 0x00000010
33 #define MV_U3D_USBINT_TXDESC_ERR 0x00000020
34 #define MV_U3D_USBINT_RX_TRB_COMPLETE 0x00000040
35 #define MV_U3D_USBINT_TX_TRB_COMPLETE 0x00000080
36 #define MV_U3D_USBINT_VBUS_VALID 0x00010000
37 #define MV_U3D_USBINT_STORAGE_CMD_FULL 0x00020000
38 #define MV_U3D_USBINT_LINK_CHG 0x01000000
41 #define MV_U3D_INTR_ENABLE_SETUP 0x00000001
42 #define MV_U3D_INTR_ENABLE_RX_COMPLETE 0x00000002
43 #define MV_U3D_INTR_ENABLE_TX_COMPLETE 0x00000004
44 #define MV_U3D_INTR_ENABLE_UNDER_RUN 0x00000008
45 #define MV_U3D_INTR_ENABLE_RXDESC_ERR 0x00000010
46 #define MV_U3D_INTR_ENABLE_TXDESC_ERR 0x00000020
47 #define MV_U3D_INTR_ENABLE_RX_TRB_COMPLETE 0x00000040
48 #define MV_U3D_INTR_ENABLE_TX_TRB_COMPLETE 0x00000080
49 #define MV_U3D_INTR_ENABLE_RX_BUFFER_ERR 0x00000100
50 #define MV_U3D_INTR_ENABLE_VBUS_VALID 0x00010000
51 #define MV_U3D_INTR_ENABLE_STORAGE_CMD_FULL 0x00020000
52 #define MV_U3D_INTR_ENABLE_LINK_CHG 0x01000000
53 #define MV_U3D_INTR_ENABLE_PRIME_STATUS 0x02000000
56 #define MV_U3D_LINK_CHANGE_LINK_UP 0x00000001
57 #define MV_U3D_LINK_CHANGE_SUSPEND 0x00000002
58 #define MV_U3D_LINK_CHANGE_RESUME 0x00000004
59 #define MV_U3D_LINK_CHANGE_WRESET 0x00000008
60 #define MV_U3D_LINK_CHANGE_HRESET 0x00000010
61 #define MV_U3D_LINK_CHANGE_VBUS_INVALID 0x00000020
62 #define MV_U3D_LINK_CHANGE_INACT 0x00000040
63 #define MV_U3D_LINK_CHANGE_DISABLE_AFTER_U0 0x00000080
64 #define MV_U3D_LINK_CHANGE_U1 0x00000100
65 #define MV_U3D_LINK_CHANGE_U2 0x00000200
66 #define MV_U3D_LINK_CHANGE_U3 0x00000400
69 #define MV_U3D_BRIDGE_SETTING_VBUS_VALID (1 << 16)
72 #define MV_U3D_CMD_RUN_STOP 0x00000001
73 #define MV_U3D_CMD_CTRL_RESET 0x00000002
76 #define MV_U3D_EPXCR_EP_TYPE_CONTROL 0
77 #define MV_U3D_EPXCR_EP_TYPE_ISOC 1
78 #define MV_U3D_EPXCR_EP_TYPE_BULK 2
79 #define MV_U3D_EPXCR_EP_TYPE_INT 3
80 #define MV_U3D_EPXCR_EP_ENABLE_SHIFT 4
81 #define MV_U3D_EPXCR_MAX_BURST_SIZE_SHIFT 12
82 #define MV_U3D_EPXCR_MAX_PACKET_SIZE_SHIFT 16
83 #define MV_U3D_USB_BULK_BURST_OUT 6
84 #define MV_U3D_USB_BULK_BURST_IN 14
86 #define MV_U3D_EPXCR_EP_FLUSH (1 << 7)
87 #define MV_U3D_EPXCR_EP_HALT (1 << 1)
88 #define MV_U3D_EPXCR_EP_INIT (1)
91 #define MV_U3D_XFERSTATUS_COMPLETE_SHIFT 24
92 #define MV_U3D_COMPLETE_INVALID 0
93 #define MV_U3D_COMPLETE_SUCCESS 1
94 #define MV_U3D_COMPLETE_BUFF_ERR 2
95 #define MV_U3D_COMPLETE_SHORT_PACKET 3
96 #define MV_U3D_COMPLETE_TRB_ERR 5
97 #define MV_U3D_XFERSTATUS_TRB_LENGTH_MASK (0xFFFFFF)
99 #define MV_U3D_USB_LINK_BYPASS_VBUS 0x8
101 #define MV_U3D_LTSSM_PHY_INIT_DONE 0x80000000
102 #define MV_U3D_LTSSM_NEVER_GO_COMPLIANCE 0x40000000
104 #define MV_U3D_USB3_OP_REGS_OFFSET 0x100
105 #define MV_U3D_USB3_PHY_OFFSET 0xB800
107 #define DCS_ENABLE 0x1
110 #define MV_U3D_RESET_TIMEOUT 10000
111 #define MV_U3D_FLUSH_TIMEOUT 100000
112 #define MV_U3D_OWN_TIMEOUT 10000
113 #define LOOPS_USEC_SHIFT 4
114 #define LOOPS_USEC (1 << LOOPS_USEC_SHIFT)
115 #define LOOPS(timeout) ((timeout) >> LOOPS_USEC_SHIFT)
118 #define MV_U3D_EP_DIR_IN 1
119 #define MV_U3D_EP_DIR_OUT 0
120 #define mv_u3d_ep_dir(ep) (((ep)->ep_num == 0) ? \
121 ((ep)->u3d->ep0_dir) : ((ep)->direction))
216 #define TYPE_NORMAL 1