static irqreturn_t usb_hcd_superh_hcim_irq(int irq, void *__hcd, struct pt_regs *r) { struct usb_hcd *hcd = __hcd; return usb_hcd_irq(irq, hcd, r); }
static int __dwc3_start_host(struct usb_hcd *hcd) { int ret = -EINVAL; struct xhci_hcd *xhci; struct usb_hcd *xhci_shared_hcd; if (!hcd) return ret; if (hcd->rh_registered) { dev_dbg(hcd->self.controller, "%s() - Already registered", __func__); return 0; } if (dwc3_xhci.comp_test_enable) { dev_dbg(hcd->self.controller, "%s() - Now is in comp test mode", __func__); return 0; } pm_runtime_get_sync(hcd->self.controller); dwc_core_reset(hcd); dwc_silicon_wa(hcd); dwc_set_host_mode(hcd); dwc_set_ssphy_p3_clockrate(hcd); /* Clear the hcd->flags. * To prevent incorrect flags set during last time. */ hcd->flags = 0; ret = usb_add_hcd(hcd, dwc3_xhci.otg_irqnum, IRQF_SHARED); if (ret) return -EINVAL; xhci = hcd_to_xhci(hcd); dwc3_xhci.xhci = xhci; xhci->reset_hcd_work = &dwc3_xhci.reset_hcd; xhci->shared_hcd = usb_create_shared_hcd(&xhci_dwc_hc_driver, hcd->self.controller, dev_name(hcd->self.controller), hcd); if (!xhci->shared_hcd) { ret = -ENOMEM; goto dealloc_usb2_hcd; } /* Set the xHCI pointer before xhci_pci_setup() (aka hcd_driver.reset) * is called by usb_add_hcd(). */ *((struct xhci_hcd **) xhci->shared_hcd->hcd_priv) = xhci; xhci->shared_hcd->regs = hcd->regs; xhci->shared_hcd->rsrc_start = hcd->rsrc_start; xhci->shared_hcd->rsrc_len = hcd->rsrc_len; ret = usb_add_hcd(xhci->shared_hcd, dwc3_xhci.otg_irqnum, IRQF_SHARED); if (ret) goto put_usb3_hcd; dwc3_link_issue_wa(xhci); pm_runtime_put(hcd->self.controller); dwc3_xhci_driver.shutdown = usb_hcd_platform_shutdown; return ret; put_usb3_hcd: if (xhci->shared_hcd) { xhci_shared_hcd = xhci->shared_hcd; usb_remove_hcd(xhci_shared_hcd); usb_put_hcd(xhci_shared_hcd); } dealloc_usb2_hcd: local_irq_disable(); usb_hcd_irq(0, hcd); local_irq_enable(); usb_remove_hcd(hcd); kfree(xhci); *((struct xhci_hcd **) hcd->hcd_priv) = NULL; pm_runtime_put(hcd->self.controller); return ret; }
static void ehci_hsic_remove(struct pci_dev *pdev) { struct usb_hcd *hcd = pci_get_drvdata(pdev); struct ehci_hcd *ehci = hcd_to_ehci(hcd); if (!hcd) return; hsic.hsic_stopped = 1; hsic_enable = 0; if (pci_dev_run_wake(pdev)) pm_runtime_get_noresume(&pdev->dev); if (!enabling_disabling) { if (!pci_dev_run_wake(pdev)) pm_runtime_get_noresume(&pdev->dev); pm_runtime_forbid(&pdev->dev); } /* Free the aux irq */ hsic_aux_irq_free(); hsic_wakeup_irq_free(); /* Fake an interrupt request in order to give the driver a chance * to test whether the controller hardware has been removed (e.g., * cardbus physical eject). */ local_irq_disable(); usb_hcd_irq(0, hcd); local_irq_enable(); usb_remove_hcd(hcd); #if 0 ehci_hsic_port_power(ehci, 0); #endif /* Set phy low power mode, disable phy clock */ ehci_hsic_phy_power(ehci, 1); if (hcd->driver->flags & HCD_MEMORY) { iounmap(hcd->regs); release_mem_region(hcd->rsrc_start, hcd->rsrc_len); } else { release_region(hcd->rsrc_start, hcd->rsrc_len); } usb_put_hcd(hcd); gpio_free(hsic.aux_gpio); gpio_free(hsic.wakeup_gpio); pci_disable_device(pdev); cancel_delayed_work_sync(&hsic.wakeup_work); destroy_workqueue(hsic.work_queue); wake_lock_destroy(&(hsic.resume_wake_lock)); wake_lock_destroy(&hsic.s3_wake_lock); usb_unregister_notify(&hsic.hsic_pm_nb); unregister_pm_notifier(&hsic.hsic_s3_entry_nb); hsic_debugfs_cleanup(); }
static irqreturn_t host_irq(struct ci_hdrc *ci) { return usb_hcd_irq(ci->irq, ci->hcd); }