Lines Matching +full:usb3 +full:- +full:lpm +full:- +full:capable
1 // SPDX-License-Identifier: GPL-2.0
3 * host.c - DesignWare USB3 DRD Controller Host Glue
5 * Copyright (C) 2011 Texas Instruments Incorporated - https://www.ti.com
16 #include "../host/xhci-plat.h"
27 pdev = to_platform_device(hcd->self.controller); in dwc3_xhci_plat_start()
28 dwc = dev_get_drvdata(pdev->dev.parent); in dwc3_xhci_plat_start()
40 struct platform_device *pdev = to_platform_device(dwc->dev); in dwc3_host_fill_xhci_irq_res()
41 struct device_node *np = dev_of_node(&pdev->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()
54 struct platform_device *dwc3_pdev = to_platform_device(dwc->dev); in dwc3_host_get_irq()
63 if (irq == -EPROBE_DEFER) in dwc3_host_get_irq()
72 if (irq == -EPROBE_DEFER) in dwc3_host_get_irq()
94 xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO); in dwc3_host_init()
96 dev_err(dwc->dev, "couldn't allocate xHCI device\n"); in dwc3_host_init()
97 return -ENOMEM; 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()
113 props[prop_idx++] = PROPERTY_ENTRY_BOOL("xhci-sg-trb-cache-size-quirk"); in dwc3_host_init()
115 if (dwc->usb3_lpm_capable) in dwc3_host_init()
116 props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb3-lpm-capable"); in dwc3_host_init()
118 if (dwc->usb2_lpm_disable) in dwc3_host_init()
119 props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb2-lpm-disable"); in dwc3_host_init()
131 props[prop_idx++] = PROPERTY_ENTRY_BOOL("quirk-broken-port-ped"); in dwc3_host_init()
134 ret = device_create_managed_software_node(&xhci->dev, props, NULL); 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()
157 device_init_wakeup(&xhci->dev, true); in dwc3_host_init()
168 if (dwc->sys_wakeup) in dwc3_host_exit()
169 device_init_wakeup(&dwc->xhci->dev, false); in dwc3_host_exit()
172 platform_device_unregister(dwc->xhci); in dwc3_host_exit()
173 dwc->xhci = NULL; in dwc3_host_exit()