Lines Matching defs:dwc
16 static void dwc3_host_fill_xhci_irq_res(struct dwc3 *dwc,
19 struct platform_device *pdev = to_platform_device(dwc->dev);
22 dwc->xhci_resources[1].start = irq;
23 dwc->xhci_resources[1].end = irq;
24 dwc->xhci_resources[1].flags = IORESOURCE_IRQ | irq_get_trigger_type(irq);
26 dwc->xhci_resources[1].name = of_node_full_name(pdev->dev.of_node);
28 dwc->xhci_resources[1].name = name;
31 static int dwc3_host_get_irq(struct dwc3 *dwc)
33 struct platform_device *dwc3_pdev = to_platform_device(dwc->dev);
38 dwc3_host_fill_xhci_irq_res(dwc, irq, "host");
47 dwc3_host_fill_xhci_irq_res(dwc, irq, "dwc_usb3");
56 dwc3_host_fill_xhci_irq_res(dwc, irq, NULL);
62 int dwc3_host_init(struct dwc3 *dwc)
69 irq = dwc3_host_get_irq(dwc);
75 dev_err(dwc->dev, "couldn't allocate xHCI device\n");
79 xhci->dev.parent = dwc->dev;
81 dwc->xhci = xhci;
83 ret = platform_device_add_resources(xhci, dwc->xhci_resources,
86 dev_err(dwc->dev, "couldn't add resources to xHCI device\n");
94 if (dwc->usb3_lpm_capable)
97 if (dwc->usb2_lpm_disable)
115 dev_err(dwc->dev, "failed to add properties to xHCI\n");
122 dev_err(dwc->dev, "failed to register xHCI device\n");
132 void dwc3_host_exit(struct dwc3 *dwc)
134 platform_device_unregister(dwc->xhci);
135 dwc->xhci = NULL;