Lines Matching +full:ast2500 +full:- +full:usb +full:- +full:vhub

1 /* SPDX-License-Identifier: GPL-2.0+ */
5 #include <linux/usb.h>
6 #include <linux/usb/ch11.h>
10 * VHUB register definitions *
23 #define AST_VHUB_USBSTS 0x24 /* USB Status Register */
86 /* USB status reg */
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
213 #define AST_VHUB_NUM_GEN_EPs 15 /* Generic non-0 EPs */
214 #define AST_VHUB_NUM_PORTS 5 /* vHub ports */
233 /* A transfer request, either core-originated or internal */
242 * Desc number of the final packet or -1. For non-desc
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
292 /* EP0 (either device or vhub) */
296 * vHub and devices but located in
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 */
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, \
488 * the USB device controller. Due to the latter having a higher in vhub_dma_workaround()
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()
503 * Thankfully the problem is limited to the USB gadget device, other 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);