Lines Matching refs:dwc

16 static void dwc3_host_fill_xhci_irq_res(struct dwc3 *dwc,  in dwc3_host_fill_xhci_irq_res()  argument
19 struct platform_device *pdev = to_platform_device(dwc->dev); in dwc3_host_fill_xhci_irq_res()
22 dwc->xhci_resources[1].start = irq; in dwc3_host_fill_xhci_irq_res()
23 dwc->xhci_resources[1].end = irq; in dwc3_host_fill_xhci_irq_res()
24 dwc->xhci_resources[1].flags = IORESOURCE_IRQ | irq_get_trigger_type(irq); in dwc3_host_fill_xhci_irq_res()
26 dwc->xhci_resources[1].name = of_node_full_name(pdev->dev.of_node); in dwc3_host_fill_xhci_irq_res()
28 dwc->xhci_resources[1].name = name; in dwc3_host_fill_xhci_irq_res()
31 static int dwc3_host_get_irq(struct dwc3 *dwc) in dwc3_host_get_irq() argument
33 struct platform_device *dwc3_pdev = to_platform_device(dwc->dev); in dwc3_host_get_irq()
38 dwc3_host_fill_xhci_irq_res(dwc, irq, "host"); in dwc3_host_get_irq()
47 dwc3_host_fill_xhci_irq_res(dwc, irq, "dwc_usb3"); in dwc3_host_get_irq()
56 dwc3_host_fill_xhci_irq_res(dwc, irq, NULL); in dwc3_host_get_irq()
67 int dwc3_host_init(struct dwc3 *dwc) in dwc3_host_init() argument
74 irq = dwc3_host_get_irq(dwc); in dwc3_host_init()
80 dev_err(dwc->dev, "couldn't allocate xHCI device\n"); in dwc3_host_init()
84 xhci->dev.parent = dwc->dev; in dwc3_host_init()
86 dwc->xhci = xhci; in dwc3_host_init()
88 ret = platform_device_add_resources(xhci, dwc->xhci_resources, in dwc3_host_init()
91 dev_err(dwc->dev, "couldn't add resources to xHCI device\n"); in dwc3_host_init()
97 if (dwc->usb3_lpm_capable) in dwc3_host_init()
100 if (dwc->usb2_lpm_disable) in dwc3_host_init()
118 dev_err(dwc->dev, "failed to add properties to xHCI\n"); in dwc3_host_init()
125 dev_err(dwc->dev, "failed to register xHCI device\n"); in dwc3_host_init()
135 void dwc3_host_exit(struct dwc3 *dwc) in dwc3_host_exit() argument
137 platform_device_unregister(dwc->xhci); in dwc3_host_exit()
138 dwc->xhci = NULL; in dwc3_host_exit()