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()
2680 hcd->self.controller->dma_mask = NULL; in oxu_reset()
2683 oxu->caps = hcd->regs + OXU_OTG_CAP_OFFSET; in oxu_reset()
2684 oxu->regs = hcd->regs + OXU_OTG_CAP_OFFSET + \ in oxu_reset()
2687 oxu->mem = hcd->regs + OXU_SPH_MEM; in oxu_reset()
2689 oxu->caps = hcd->regs + OXU_SPH_CAP_OFFSET; in oxu_reset()
2690 oxu->regs = hcd->regs + OXU_SPH_CAP_OFFSET + \ in oxu_reset()
2693 oxu->mem = hcd->regs + OXU_OTG_MEM; in oxu_reset()
2699 ret = oxu_hcd_init(hcd); in oxu_reset()
2706 static int oxu_run(struct usb_hcd *hcd) in oxu_run() argument
2708 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_run()
2712 hcd->uses_new_polling = 1; in oxu_run()
2750 hcd->state = HC_STATE_RUNNING; in oxu_run()
2765 static void oxu_stop(struct usb_hcd *hcd) in oxu_stop() argument
2767 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_stop()
2776 if (HC_IS_RUNNING(hcd->state)) in oxu_stop()
2800 static void oxu_shutdown(struct usb_hcd *hcd) in oxu_shutdown() argument
2802 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_shutdown()
2825 static int __oxu_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, in __oxu_urb_enqueue() argument
2828 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in __oxu_urb_enqueue()
2857 static int oxu_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, in oxu_urb_enqueue() argument
2860 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_urb_enqueue()
2869 return __oxu_urb_enqueue(hcd, urb, mem_flags); in oxu_urb_enqueue()
2882 return __oxu_urb_enqueue(hcd, urb, mem_flags); in oxu_urb_enqueue()
2911 ret = __oxu_urb_enqueue(hcd, murb, mem_flags); in oxu_urb_enqueue()
2939 ret = __oxu_urb_enqueue(hcd, murb, mem_flags); in oxu_urb_enqueue()
2950 static int oxu_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) in oxu_urb_dequeue() argument
2952 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_urb_dequeue()
2986 && HC_IS_RUNNING(hcd->state)) { in oxu_urb_dequeue()
2996 dev_err(hcd->self.controller, in oxu_urb_dequeue()
3010 static void oxu_endpoint_disable(struct usb_hcd *hcd, in oxu_endpoint_disable() argument
3013 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_endpoint_disable()
3034 if (!HC_IS_RUNNING(hcd->state)) in oxu_endpoint_disable()
3073 static int oxu_get_frame(struct usb_hcd *hcd) in oxu_get_frame() argument
3075 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_get_frame()
3082 static int oxu_hub_status_data(struct usb_hcd *hcd, char *buf) in oxu_hub_status_data() argument
3084 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_hub_status_data()
3090 if (!HC_IS_RUNNING(hcd->state)) in oxu_hub_status_data()
3158 static int oxu_hub_control(struct usb_hcd *hcd, u16 typeReq, in oxu_hub_control() argument
3161 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_hub_control()
3391 if (device_may_wakeup(&hcd->self.root_hub->dev)) in oxu_hub_control()
3451 static int oxu_bus_suspend(struct usb_hcd *hcd) in oxu_bus_suspend() argument
3453 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_bus_suspend()
3466 if (HC_IS_RUNNING(hcd->state)) { in oxu_bus_suspend()
3468 hcd->state = HC_STATE_QUIESCING; in oxu_bus_suspend()
3494 if (device_may_wakeup(&hcd->self.root_hub->dev)) in oxu_bus_suspend()
3509 hcd->state = HC_STATE_SUSPENDED; in oxu_bus_suspend()
3513 if (!device_may_wakeup(&hcd->self.root_hub->dev)) in oxu_bus_suspend()
3524 static int oxu_bus_resume(struct usb_hcd *hcd) in oxu_bus_resume() argument
3526 struct oxu_hcd *oxu = hcd_to_oxu(hcd); in oxu_bus_resume()
3596 hcd->state = HC_STATE_RUNNING; in oxu_bus_resume()
3607 static int oxu_bus_suspend(struct usb_hcd *hcd) in oxu_bus_suspend() argument
3612 static int oxu_bus_resume(struct usb_hcd *hcd) in oxu_bus_resume() argument
3725 struct usb_hcd *hcd; in oxu_create() local
3734 hcd = usb_create_hcd(&oxu_hc_driver, dev, in oxu_create()
3736 if (!hcd) in oxu_create()
3739 hcd->rsrc_start = memstart; in oxu_create()
3740 hcd->rsrc_len = memlen; in oxu_create()
3741 hcd->regs = base; in oxu_create()
3742 hcd->irq = irq; in oxu_create()
3743 hcd->state = HC_STATE_HALT; in oxu_create()
3745 oxu = hcd_to_oxu(hcd); in oxu_create()
3748 ret = usb_add_hcd(hcd, irq, IRQF_SHARED); in oxu_create()
3752 device_wakeup_enable(hcd->self.controller); in oxu_create()
3753 return hcd; in oxu_create()
3761 struct usb_hcd *hcd; in oxu_init() local
3774 hcd = oxu_create(pdev, memstart, memlen, base, irq, 1); in oxu_init()
3775 if (IS_ERR(hcd)) { in oxu_init()
3777 ret = PTR_ERR(hcd); in oxu_init()
3780 info->hcd[0] = hcd; in oxu_init()
3783 hcd = oxu_create(pdev, memstart, memlen, base, irq, 0); in oxu_init()
3784 if (IS_ERR(hcd)) { in oxu_init()
3786 ret = PTR_ERR(hcd); in oxu_init()
3789 info->hcd[1] = hcd; in oxu_init()
3797 usb_remove_hcd(info->hcd[0]); in oxu_init()
3798 usb_put_hcd(info->hcd[0]); in oxu_init()
3869 static void oxu_remove(struct platform_device *pdev, struct usb_hcd *hcd) in oxu_remove() argument
3871 usb_remove_hcd(hcd); in oxu_remove()
3872 usb_put_hcd(hcd); in oxu_remove()
3879 oxu_remove(pdev, info->hcd[0]); in oxu_drv_remove()
3880 oxu_remove(pdev, info->hcd[1]); in oxu_drv_remove()
3895 struct usb_hcd *hcd = dev_get_drvdata(dev);
3903 struct usb_hcd *hcd = dev_get_drvdata(dev);