Lines Matching +full:vhub +full:- +full:generic +full:- +full:endpoints
1 /* SPDX-License-Identifier: GPL-2.0+ */
10 * VHUB register definitions *
107 * per-device register definitions *
136 * matching corresponding vHub EP0 control bits
146 * per-endpoint register definitions *
210 * existing AST2400/AST2500 platforms. AST2600 and future vhub revisions
211 * should define number of downstream ports and endpoints in device tree.
213 #define AST_VHUB_NUM_GEN_EPs 15 /* Generic non-0 EPs */
214 #define AST_VHUB_NUM_PORTS 5 /* vHub ports */
216 #define AST_VHUB_EPn_MAX_PACKET 1024 /* Generic EPs max packet size */
225 * DMA descriptor (generic EPs only, currently only used
226 * for IN endpoints
233 /* A transfer request, either core-originated or internal */
242 * Desc number of the final packet or -1. For non-desc
264 * An endpoint, either generic, ep0, actual gadget EP
265 * or internal use vhub EP0. vhub EP1 doesn't have an
277 /* Dev pointer or NULL for vHub EP0 */
280 /* vHub itself */
281 struct ast_vhub *vhub; member
285 * OUT transfers for generic EPs
292 /* EP0 (either device or vhub) */
296 * vHub and devices but located in
310 /* Generic endpoint (aka EPn) */
315 /* Index in global pool (zero-based) */
340 /* A device attached to a vHub port */
342 struct ast_vhub *vhub; member
345 /* Device index (zero-based) and name string */
367 /* Per vhub port stateinfo structure */
383 /* Global vhub structure */
396 /* EP0 of the vhub itself */
399 /* State of vhub ep1 */
402 /* Per-port info */
407 /* Generic EP data structures */
423 /* Standard USB Descriptors of the vhub. */
433 std_req_stall = -1, /* Stall requested */
440 #define UDCVDBG(u, fmt...) dev_dbg(&(u)->pdev->dev, fmt)
443 dev_dbg(&(ep)->vhub->pdev->dev, \
445 (ep)->dev ? (ep)->dev->name : "hub", \
446 (ep)->d_idx, ##__VA_ARGS__); \
450 dev_dbg(&(d)->vhub->pdev->dev, \
451 "%s " fmt, (d)->name, \
462 #define UDCDBG(u, fmt...) dev_dbg(&(u)->pdev->dev, fmt)
465 dev_dbg(&(ep)->vhub->pdev->dev, \
467 (ep)->dev ? (ep)->dev->name : "hub", \
468 (ep)->d_idx, ##__VA_ARGS__); \
472 dev_dbg(&(d)->vhub->pdev->dev, \
473 "%s " fmt, (d)->name, \
496 * - Driver writes to a DMA descriptor (Mbus) in vhub_dma_workaround()
497 * - Driver writes to the MMIO register to start the DMA (AHB) in vhub_dma_workaround()
498 * - The gadget sees the second write and sends a read of the in vhub_dma_workaround()
500 * - The gadget hits memory before the descriptor write in vhub_dma_workaround()
522 void ast_vhub_init_hw(struct ast_vhub *vhub);
528 void ast_vhub_init_ep0(struct ast_vhub *vhub, struct ast_vhub_ep *ep,
538 int ast_vhub_init_hub(struct ast_vhub *vhub);
543 void ast_vhub_device_connect(struct ast_vhub *vhub, unsigned int port,
545 void ast_vhub_hub_suspend(struct ast_vhub *vhub);
546 void ast_vhub_hub_resume(struct ast_vhub *vhub);
547 void ast_vhub_hub_reset(struct ast_vhub *vhub);
548 void ast_vhub_hub_wake_all(struct ast_vhub *vhub);
551 int ast_vhub_init_dev(struct ast_vhub *vhub, unsigned int idx);