Lines Matching refs:hcd

23 #include <linux/usb/hcd.h>
380 struct usb_hcd *hcd[2];
498 static inline struct oxu_hcd *hcd_to_oxu(struct usb_hcd *hcd)
500 return (struct oxu_hcd *) (hcd->hcd_priv);
671 static int oxu_hub_control(struct usb_hcd *hcd,
2856 static irqreturn_t oxu210_hcd_irq(struct usb_hcd *hcd)
2858 struct oxu_hcd *oxu = hcd_to_oxu(hcd);
2874 if (!status || unlikely(hcd->state == HC_STATE_HALT)) {
2908 usb_hcd_resume_root_hub(hcd);
2926 mod_timer(&hcd->rh_timer, oxu->reset_done[i]);
2941 usb_hc_died(hcd);
2953 usb_hcd_poll_rh_status(hcd);
2957 static irqreturn_t oxu_irq(struct usb_hcd *hcd)
2959 struct oxu_hcd *oxu = hcd_to_oxu(hcd);
2962 u32 status = oxu_readl(hcd->regs, OXU_CHIPIRQSTATUS);
2963 u32 enable = oxu_readl(hcd->regs, OXU_CHIPIRQEN_SET);
2966 oxu_writel(hcd->regs, OXU_CHIPIRQEN_CLR, enable);
2970 oxu210_hcd_irq(hcd);
2975 oxu_writel(hcd->regs, OXU_CHIPIRQEN_SET, enable);
3009 static int oxu_hcd_init(struct usb_hcd *hcd)
3011 struct oxu_hcd *oxu = hcd_to_oxu(hcd);
3086 static int oxu_reset(struct usb_hcd *hcd)
3088 struct oxu_hcd *oxu = hcd_to_oxu(hcd);
3095 oxu->caps = hcd->regs + OXU_OTG_CAP_OFFSET;
3096 oxu->regs = hcd->regs + OXU_OTG_CAP_OFFSET + \
3099 oxu->mem = hcd->regs + OXU_SPH_MEM;
3101 oxu->caps = hcd->regs + OXU_SPH_CAP_OFFSET;
3102 oxu->regs = hcd->regs + OXU_SPH_CAP_OFFSET + \
3105 oxu->mem = hcd->regs + OXU_OTG_MEM;
3111 return oxu_hcd_init(hcd);
3114 static int oxu_run(struct usb_hcd *hcd)
3116 struct oxu_hcd *oxu = hcd_to_oxu(hcd);
3120 hcd->uses_new_polling = 1;
3158 hcd->state = HC_STATE_RUNNING;
3173 static void oxu_stop(struct usb_hcd *hcd)
3175 struct oxu_hcd *oxu = hcd_to_oxu(hcd);
3184 if (HC_IS_RUNNING(hcd->state))
3208 static void oxu_shutdown(struct usb_hcd *hcd)
3210 struct oxu_hcd *oxu = hcd_to_oxu(hcd);
3225 * urb + dev is in hcd.self.controller.urb_list
3228 * hcd-specific init for hcpriv hasn't been done yet
3233 static int __oxu_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
3236 struct oxu_hcd *oxu = hcd_to_oxu(hcd);
3265 static int oxu_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
3268 struct oxu_hcd *oxu = hcd_to_oxu(hcd);
3276 return __oxu_urb_enqueue(hcd, urb, mem_flags);
3288 return __oxu_urb_enqueue(hcd, urb, mem_flags);
3317 ret = __oxu_urb_enqueue(hcd, murb, mem_flags);
3345 ret = __oxu_urb_enqueue(hcd, murb, mem_flags);
3356 static int oxu_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
3358 struct oxu_hcd *oxu = hcd_to_oxu(hcd);
3392 && HC_IS_RUNNING(hcd->state)) {
3402 dev_err(hcd->self.controller,
3416 static void oxu_endpoint_disable(struct usb_hcd *hcd,
3419 struct oxu_hcd *oxu = hcd_to_oxu(hcd);
3440 if (!HC_IS_RUNNING(hcd->state))
3479 static int oxu_get_frame(struct usb_hcd *hcd)
3481 struct oxu_hcd *oxu = hcd_to_oxu(hcd);
3488 static int oxu_hub_status_data(struct usb_hcd *hcd, char *buf)
3490 struct oxu_hcd *oxu = hcd_to_oxu(hcd);
3496 if (!HC_IS_RUNNING(hcd->state))
3564 static int oxu_hub_control(struct usb_hcd *hcd, u16 typeReq,
3567 struct oxu_hcd *oxu = hcd_to_oxu(hcd);
3797 if (device_may_wakeup(&hcd->self.root_hub->dev))
3857 static int oxu_bus_suspend(struct usb_hcd *hcd)
3859 struct oxu_hcd *oxu = hcd_to_oxu(hcd);
3872 if (HC_IS_RUNNING(hcd->state)) {
3874 hcd->state = HC_STATE_QUIESCING;
3900 if (device_may_wakeup(&hcd->self.root_hub->dev))
3917 hcd->state = HC_STATE_SUSPENDED;
3921 if (!device_may_wakeup(&hcd->self.root_hub->dev))
3932 static int oxu_bus_resume(struct usb_hcd *hcd)
3934 struct oxu_hcd *oxu = hcd_to_oxu(hcd);
4004 hcd->state = HC_STATE_RUNNING;
4015 static int oxu_bus_suspend(struct usb_hcd *hcd)
4020 static int oxu_bus_resume(struct usb_hcd *hcd)
4133 struct usb_hcd *hcd;
4142 hcd = usb_create_hcd(&oxu_hc_driver, dev,
4144 if (!hcd)
4147 hcd->rsrc_start = memstart;
4148 hcd->rsrc_len = memlen;
4149 hcd->regs = base;
4150 hcd->irq = irq;
4151 hcd->state = HC_STATE_HALT;
4153 oxu = hcd_to_oxu(hcd);
4156 ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
4158 usb_put_hcd(hcd);
4162 device_wakeup_enable(hcd->self.controller);
4163 return hcd;
4171 struct usb_hcd *hcd;
4184 hcd = oxu_create(pdev, memstart, memlen, base, irq, 1);
4185 if (IS_ERR(hcd)) {
4187 ret = PTR_ERR(hcd);
4190 info->hcd[0] = hcd;
4193 hcd = oxu_create(pdev, memstart, memlen, base, irq, 0);
4194 if (IS_ERR(hcd)) {
4196 ret = PTR_ERR(hcd);
4199 info->hcd[1] = hcd;
4207 usb_remove_hcd(info->hcd[0]);
4208 usb_put_hcd(info->hcd[0]);
4274 static void oxu_remove(struct platform_device *pdev, struct usb_hcd *hcd)
4276 usb_remove_hcd(hcd);
4277 usb_put_hcd(hcd);
4284 oxu_remove(pdev, info->hcd[0]);
4285 oxu_remove(pdev, info->hcd[1]);
4298 struct usb_hcd *hcd = dev_get_drvdata(dev);
4306 struct usb_hcd *hcd = dev_get_drvdata(dev);
4322 .name = "oxu210hp-hcd",