Lines Matching full:dwc
22 struct dwc3 *dwc; in dwc3_xhci_plat_start() local
28 dwc = dev_get_drvdata(pdev->dev.parent); in dwc3_xhci_plat_start()
30 dwc3_enable_susphy(dwc, true); in dwc3_xhci_plat_start()
37 static void dwc3_host_fill_xhci_irq_res(struct dwc3 *dwc, in dwc3_host_fill_xhci_irq_res() argument
40 struct platform_device *pdev = to_platform_device(dwc->dev); in dwc3_host_fill_xhci_irq_res()
43 dwc->xhci_resources[1].start = irq; in dwc3_host_fill_xhci_irq_res()
44 dwc->xhci_resources[1].end = irq; in dwc3_host_fill_xhci_irq_res()
45 dwc->xhci_resources[1].flags = IORESOURCE_IRQ | irq_get_trigger_type(irq); in dwc3_host_fill_xhci_irq_res()
47 dwc->xhci_resources[1].name = of_node_full_name(pdev->dev.of_node); in dwc3_host_fill_xhci_irq_res()
49 dwc->xhci_resources[1].name = name; in dwc3_host_fill_xhci_irq_res()
52 static int dwc3_host_get_irq(struct dwc3 *dwc) in dwc3_host_get_irq() argument
54 struct platform_device *dwc3_pdev = to_platform_device(dwc->dev); in dwc3_host_get_irq()
59 dwc3_host_fill_xhci_irq_res(dwc, irq, "host"); in dwc3_host_get_irq()
68 dwc3_host_fill_xhci_irq_res(dwc, irq, "dwc_usb3"); in dwc3_host_get_irq()
77 dwc3_host_fill_xhci_irq_res(dwc, irq, NULL); in dwc3_host_get_irq()
83 int dwc3_host_init(struct dwc3 *dwc) in dwc3_host_init() argument
90 irq = dwc3_host_get_irq(dwc); in dwc3_host_init()
96 dev_err(dwc->dev, "couldn't allocate xHCI device\n"); in dwc3_host_init()
100 xhci->dev.parent = dwc->dev; in dwc3_host_init()
102 dwc->xhci = xhci; in dwc3_host_init()
104 ret = platform_device_add_resources(xhci, dwc->xhci_resources, in dwc3_host_init()
107 dev_err(dwc->dev, "couldn't add resources to xHCI device\n"); in dwc3_host_init()
115 if (dwc->usb3_lpm_capable) in dwc3_host_init()
118 if (dwc->usb2_lpm_disable) in dwc3_host_init()
136 dev_err(dwc->dev, "failed to add properties to xHCI\n"); in dwc3_host_init()
148 dev_err(dwc->dev, "failed to register xHCI device\n"); in dwc3_host_init()
152 if (dwc->sys_wakeup) { in dwc3_host_init()
154 device_wakeup_enable(dwc->sysdev); in dwc3_host_init()
166 void dwc3_host_exit(struct dwc3 *dwc) in dwc3_host_exit() argument
168 if (dwc->sys_wakeup) in dwc3_host_exit()
169 device_init_wakeup(&dwc->xhci->dev, false); in dwc3_host_exit()
171 dwc3_enable_susphy(dwc, false); in dwc3_host_exit()
172 platform_device_unregister(dwc->xhci); in dwc3_host_exit()
173 dwc->xhci = NULL; in dwc3_host_exit()