Lines Matching refs:hcd

71 static inline struct oxu_hcd *hcd_to_oxu(struct usb_hcd *hcd)  in hcd_to_oxu()  argument
73 return (struct oxu_hcd *) (hcd->hcd_priv); in hcd_to_oxu()
244 static int oxu_hub_control(struct usb_hcd *hcd,
2440 static irqreturn_t oxu210_hcd_irq(struct usb_hcd *hcd) in oxu210_hcd_irq() argument
2442 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu210_hcd_irq()
2458 if (!status || unlikely(hcd->state == HC_STATE_HALT)) { in oxu210_hcd_irq()
2492 usb_hcd_resume_root_hub(hcd); in oxu210_hcd_irq()
2510 mod_timer(&hcd->rh_timer, oxu->reset_done[i]); in oxu210_hcd_irq()
2525 usb_hc_died(hcd); in oxu210_hcd_irq()
2537 usb_hcd_poll_rh_status(hcd); in oxu210_hcd_irq()
2541 static irqreturn_t oxu_irq(struct usb_hcd *hcd) in oxu_irq() argument
2543 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_irq()
2546 u32 status = oxu_readl(hcd->regs, OXU_CHIPIRQSTATUS); in oxu_irq()
2547 u32 enable = oxu_readl(hcd->regs, OXU_CHIPIRQEN_SET); in oxu_irq()
2550 oxu_writel(hcd->regs, OXU_CHIPIRQEN_CLR, enable); in oxu_irq()
2554 oxu210_hcd_irq(hcd); in oxu_irq()
2559 oxu_writel(hcd->regs, OXU_CHIPIRQEN_SET, enable); in oxu_irq()
2593 static int oxu_hcd_init(struct usb_hcd *hcd) in oxu_hcd_init() argument
2595 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_hcd_init()
2670 static int oxu_reset(struct usb_hcd *hcd) in oxu_reset() argument
2672 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_reset()
2679 hcd->self.controller->dma_mask = NULL; in oxu_reset()
2682 oxu->caps = hcd->regs + OXU_OTG_CAP_OFFSET; in oxu_reset()
2683 oxu->regs = hcd->regs + OXU_OTG_CAP_OFFSET + \ in oxu_reset()
2686 oxu->mem = hcd->regs + OXU_SPH_MEM; in oxu_reset()
2688 oxu->caps = hcd->regs + OXU_SPH_CAP_OFFSET; in oxu_reset()
2689 oxu->regs = hcd->regs + OXU_SPH_CAP_OFFSET + \ in oxu_reset()
2692 oxu->mem = hcd->regs + OXU_OTG_MEM; in oxu_reset()
2698 return oxu_hcd_init(hcd); in oxu_reset()
2701 static int oxu_run(struct usb_hcd *hcd) in oxu_run() argument
2703 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_run()
2707 hcd->uses_new_polling = 1; in oxu_run()
2745 hcd->state = HC_STATE_RUNNING; in oxu_run()
2760 static void oxu_stop(struct usb_hcd *hcd) in oxu_stop() argument
2762 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_stop()
2771 if (HC_IS_RUNNING(hcd->state)) in oxu_stop()
2795 static void oxu_shutdown(struct usb_hcd *hcd) in oxu_shutdown() argument
2797 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_shutdown()
2820 static int __oxu_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, in __oxu_urb_enqueue() argument
2823 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in __oxu_urb_enqueue()
2852 static int oxu_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, in oxu_urb_enqueue() argument
2855 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_urb_enqueue()
2864 return __oxu_urb_enqueue(hcd, urb, mem_flags); in oxu_urb_enqueue()
2877 return __oxu_urb_enqueue(hcd, urb, mem_flags); in oxu_urb_enqueue()
2906 ret = __oxu_urb_enqueue(hcd, murb, mem_flags); in oxu_urb_enqueue()
2934 ret = __oxu_urb_enqueue(hcd, murb, mem_flags); in oxu_urb_enqueue()
2945 static int oxu_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) in oxu_urb_dequeue() argument
2947 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_urb_dequeue()
2981 && HC_IS_RUNNING(hcd->state)) { in oxu_urb_dequeue()
2991 dev_err(hcd->self.controller, in oxu_urb_dequeue()
3005 static void oxu_endpoint_disable(struct usb_hcd *hcd, in oxu_endpoint_disable() argument
3008 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_endpoint_disable()
3029 if (!HC_IS_RUNNING(hcd->state)) in oxu_endpoint_disable()
3068 static int oxu_get_frame(struct usb_hcd *hcd) in oxu_get_frame() argument
3070 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_get_frame()
3077 static int oxu_hub_status_data(struct usb_hcd *hcd, char *buf) in oxu_hub_status_data() argument
3079 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_hub_status_data()
3085 if (!HC_IS_RUNNING(hcd->state)) in oxu_hub_status_data()
3153 static int oxu_hub_control(struct usb_hcd *hcd, u16 typeReq, in oxu_hub_control() argument
3156 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_hub_control()
3386 if (device_may_wakeup(&hcd->self.root_hub->dev)) in oxu_hub_control()
3446 static int oxu_bus_suspend(struct usb_hcd *hcd) in oxu_bus_suspend() argument
3448 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_bus_suspend()
3461 if (HC_IS_RUNNING(hcd->state)) { in oxu_bus_suspend()
3463 hcd->state = HC_STATE_QUIESCING; in oxu_bus_suspend()
3489 if (device_may_wakeup(&hcd->self.root_hub->dev)) in oxu_bus_suspend()
3504 hcd->state = HC_STATE_SUSPENDED; in oxu_bus_suspend()
3508 if (!device_may_wakeup(&hcd->self.root_hub->dev)) in oxu_bus_suspend()
3519 static int oxu_bus_resume(struct usb_hcd *hcd) in oxu_bus_resume() argument
3521 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_bus_resume()
3591 hcd->state = HC_STATE_RUNNING; in oxu_bus_resume()
3602 static int oxu_bus_suspend(struct usb_hcd *hcd) in oxu_bus_suspend() argument
3607 static int oxu_bus_resume(struct usb_hcd *hcd) in oxu_bus_resume() argument
3720 struct usb_hcd *hcd; in oxu_create() local
3729 hcd = usb_create_hcd(&oxu_hc_driver, dev, in oxu_create()
3731 if (!hcd) in oxu_create()
3734 hcd->rsrc_start = memstart; in oxu_create()
3735 hcd->rsrc_len = memlen; in oxu_create()
3736 hcd->regs = base; in oxu_create()
3737 hcd->irq = irq; in oxu_create()
3738 hcd->state = HC_STATE_HALT; in oxu_create()
3740 oxu = hcd_to_oxu(hcd); in oxu_create()
3743 ret = usb_add_hcd(hcd, irq, IRQF_SHARED); in oxu_create()
3747 device_wakeup_enable(hcd->self.controller); in oxu_create()
3748 return hcd; in oxu_create()
3756 struct usb_hcd *hcd; in oxu_init() local
3769 hcd = oxu_create(pdev, memstart, memlen, base, irq, 1); in oxu_init()
3770 if (IS_ERR(hcd)) { in oxu_init()
3772 ret = PTR_ERR(hcd); in oxu_init()
3775 info->hcd[0] = hcd; in oxu_init()
3778 hcd = oxu_create(pdev, memstart, memlen, base, irq, 0); in oxu_init()
3779 if (IS_ERR(hcd)) { in oxu_init()
3781 ret = PTR_ERR(hcd); in oxu_init()
3784 info->hcd[1] = hcd; in oxu_init()
3792 usb_remove_hcd(info->hcd[0]); in oxu_init()
3793 usb_put_hcd(info->hcd[0]); in oxu_init()
3864 static void oxu_remove(struct platform_device *pdev, struct usb_hcd *hcd) in oxu_remove() argument
3866 usb_remove_hcd(hcd); in oxu_remove()
3867 usb_put_hcd(hcd); in oxu_remove()
3874 oxu_remove(pdev, info->hcd[0]); in oxu_drv_remove()
3875 oxu_remove(pdev, info->hcd[1]); in oxu_drv_remove()
3890 struct usb_hcd *hcd = dev_get_drvdata(dev);
3898 struct usb_hcd *hcd = dev_get_drvdata(dev);