Lines Matching +full:g +full:- +full:tx +full:- +full:fifo +full:- +full:size
1 /* SPDX-License-Identifier: GPL-2.0 */
3 * mtu3.h - MediaTek USB3 DRD header
35 #define MU3D_EP_TXCR0(epnum) (U3D_TX1CSR0 + (((epnum) - 1) * 0x10))
36 #define MU3D_EP_TXCR1(epnum) (U3D_TX1CSR1 + (((epnum) - 1) * 0x10))
37 #define MU3D_EP_TXCR2(epnum) (U3D_TX1CSR2 + (((epnum) - 1) * 0x10))
39 #define MU3D_EP_RXCR0(epnum) (U3D_RX1CSR0 + (((epnum) - 1) * 0x10))
40 #define MU3D_EP_RXCR1(epnum) (U3D_RX1CSR1 + (((epnum) - 1) * 0x10))
41 #define MU3D_EP_RXCR2(epnum) (U3D_RX1CSR2 + (((epnum) - 1) * 0x10))
43 #define USB_QMU_TQHIAR(epnum) (U3D_TXQHIAR1 + (((epnum) - 1) * 0x4))
44 #define USB_QMU_RQHIAR(epnum) (U3D_RXQHIAR1 + (((epnum) - 1) * 0x4))
46 #define USB_QMU_RQCSR(epnum) (U3D_RXQCSR1 + (((epnum) - 1) * 0x10))
47 #define USB_QMU_RQSAR(epnum) (U3D_RXQSAR1 + (((epnum) - 1) * 0x10))
48 #define USB_QMU_RQCPR(epnum) (U3D_RXQCPR1 + (((epnum) - 1) * 0x10))
50 #define USB_QMU_TQCSR(epnum) (U3D_TXQCSR1 + (((epnum) - 1) * 0x10))
51 #define USB_QMU_TQSAR(epnum) (U3D_TXQSAR1 + (((epnum) - 1) * 0x10))
52 #define USB_QMU_TQCPR(epnum) (U3D_TXQCPR1 + (((epnum) - 1) * 0x10))
78 * Normally the device works on HS or SS, to simplify fifo management,
79 * devide fifo into some 512B parts, use bitmap to manage it; And
80 * 128 bits size of bitmap is large enough, that means it can manage
81 * up to 64KB fifo size.
89 * Maximum size of ep0 response buffer for ch9 requests,
112 * @MU3D_EP0_STATE_STALL: ep0 is in stall status, will be auto-cleared
137 * @base: the base address of fifo
138 * @limit: the bitmap size in bits
139 * @bitmap: fifo bitmap in unit of @MTU3_EP_FIFO_UNIT
149 * The format of TX GPD is a little different from RX one.
150 * And the size of GPD is 16 bytes.
160 * bit[23:16]: ([EL] bit[31:24]) extension address (TX ONLY),
167 * (TX): the buffer length of the data to transmit
172 * bit29: ([EL] abandoned) Zero Length Packet (ZLP) (TX ONLY)
187 * NOTE: the size of GPD ring should be >= 2
204 * @role_sw : use USB Role Switch to support dual-role switch, can't use
207 * @is_u3_drd: whether port0 supports usb3.0 dual-role device or not
208 * @manual_drd_enabled: it's true when supports dual-role device by debugfs
229 * host only, device only or dual-role mode
232 * @u2p_dis_msk: mask of disabling usb2 ports, e.g. bit0==1 to
234 * but when use dual-role mode, can't disable u2port0
237 * @dbgfs_root: only used when supports manual dual-role switch via debugfs
286 struct mtu3_fifo_info *fifo; member
311 * struct mtu3 - device driver instance data.
344 struct usb_gadget g; /* the gadget */ member
370 static inline struct mtu3 *gadget_to_mtu3(struct usb_gadget *g) in gadget_to_mtu3() argument
372 return container_of(g, struct mtu3, g); in gadget_to_mtu3()
387 return list_first_entry_or_null(&mep->req_list, struct mtu3_request, in next_request()