aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/host.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/dwc3/host.c')
-rw-r--r--drivers/usb/dwc3/host.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
index 1c513bf8002e..b426ee177162 100644
--- a/drivers/usb/dwc3/host.c
+++ b/drivers/usb/dwc3/host.c
@@ -126,10 +126,12 @@ out:
int dwc3_host_init(struct dwc3 *dwc)
{
+ struct platform_device *pdev = to_platform_device(dwc->dev);
struct property_entry props[6];
struct platform_device *xhci;
int ret, irq;
int prop_idx = 0;
+ int id;
/*
* Some platforms need to power off all Root hub ports immediately after DWC3 set to host
@@ -141,7 +143,12 @@ int dwc3_host_init(struct dwc3 *dwc)
if (irq < 0)
return irq;
- xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO);
+ id = of_alias_get_id(pdev->dev.of_node, "usb");
+ if (id >= 0)
+ xhci = platform_device_alloc("xhci-hcd", id);
+ else
+ xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO);
+
if (!xhci) {
dev_err(dwc->dev, "couldn't allocate xHCI device\n");
return -ENOMEM;