Lines Matching refs:vhub
3 * aspeed-vhub -- Driver for Aspeed SoC "vHub" USB gadget
27 #include "vhub.h"
340 struct ast_vhub *vhub = ep->vhub;
347 dev_warn(&vhub->pdev->dev, "Bogus EPn request ! u_req=%p\n", u_req);
349 dev_warn(&vhub->pdev->dev, "complete=%p internal=%d\n",
381 rc = usb_gadget_map_request_by_dev(&vhub->pdev->dev, u_req,
384 dev_warn(&vhub->pdev->dev,
403 spin_lock_irqsave(&vhub->lock, flags);
414 spin_unlock_irqrestore(&vhub->lock, flags);
440 dev_warn(&ep->vhub->pdev->dev, "Timeout waiting for DMA\n");
475 struct ast_vhub *vhub = ep->vhub;
480 spin_lock_irqsave(&vhub->lock, flags);
499 spin_unlock_irqrestore(&vhub->lock, flags);
518 ep->vhub->regs + AST_VHUB_EP_TOGGLE);
525 struct ast_vhub *vhub = ep->vhub;
537 spin_lock_irqsave(&vhub->lock, flags);
541 spin_unlock_irqrestore(&vhub->lock, flags);
548 spin_unlock_irqrestore(&vhub->lock, flags);
566 struct ast_vhub *vhub = ep->vhub;
572 spin_lock_irqsave(&vhub->lock, flags);
584 ep_ier = readl(vhub->regs + AST_VHUB_EP_ACK_IER);
586 writel(ep_ier, vhub->regs + AST_VHUB_EP_ACK_IER);
587 writel(imask, vhub->regs + AST_VHUB_EP_ACK_ISR);
595 spin_unlock_irqrestore(&vhub->lock, flags);
605 struct ast_vhub *vhub;
633 vhub = ep->vhub;
699 spin_lock_irqsave(&vhub->lock, flags);
743 vhub->regs + AST_VHUB_EP_TOGGLE);
747 writel(imask, vhub->regs + AST_VHUB_EP_ACK_ISR);
748 ep_ier = readl(vhub->regs + AST_VHUB_EP_ACK_IER);
750 writel(ep_ier, vhub->regs + AST_VHUB_EP_ACK_IER);
755 spin_unlock_irqrestore(&vhub->lock, flags);
778 dma_free_coherent(&ep->vhub->pdev->dev,
803 struct ast_vhub *vhub = d->vhub;
809 spin_lock_irqsave(&vhub->lock, flags);
810 for (i = 0; i < vhub->max_epns; i++)
811 if (vhub->epns[i].dev == NULL)
813 if (i >= vhub->max_epns) {
814 spin_unlock_irqrestore(&vhub->lock, flags);
819 ep = &vhub->epns[i];
821 spin_unlock_irqrestore(&vhub->lock, flags);
826 ep->vhub = vhub;
831 ep->epn.regs = vhub->regs + 0x200 + (i * 0x10);
833 ep->buf = dma_alloc_coherent(&vhub->pdev->dev,