Merge git://git.denx.de/u-boot-usb
[platform/kernel/u-boot.git] / drivers / usb / host / xhci-dwc3.c
index c1c681c..563db1a 100644 (file)
@@ -9,7 +9,6 @@
 
 #include <common.h>
 #include <dm.h>
-#include <fdtdec.h>
 #include <generic-phy.h>
 #include <usb.h>
 #include <dwc3-uboot.h>
@@ -20,8 +19,7 @@
 #include <linux/usb/otg.h>
 
 struct xhci_dwc3_platdata {
-       struct phy *usb_phys;
-       int num_phys;
+       struct phy_bulk *usb_phys;
 };
 
 void dwc3_set_mode(struct dwc3 *dwc3_reg, u32 mode)
@@ -126,7 +124,7 @@ static int xhci_dwc3_probe(struct udevice *dev)
        hcor = (struct xhci_hcor *)((uintptr_t)hccr +
                        HC_LENGTH(xhci_readl(&(hccr)->cr_capbase)));
 
-       ret = dwc3_setup_phy(dev, &plat->usb_phys, &plat->num_phys);
+       ret = dwc3_setup_phy(dev, plat->usb_phys);
        if (ret && (ret != -ENOTSUPP))
                return ret;
 
@@ -155,7 +153,7 @@ static int xhci_dwc3_probe(struct udevice *dev)
 
        writel(reg, &dwc3_reg->g_usb2phycfg[0]);
 
-       dr_mode = usb_get_dr_mode(dev_of_offset(dev));
+       dr_mode = usb_get_dr_mode(dev->node);
        if (dr_mode == USB_DR_MODE_UNKNOWN)
                /* by default set dual role mode to HOST */
                dr_mode = USB_DR_MODE_HOST;
@@ -169,7 +167,7 @@ static int xhci_dwc3_remove(struct udevice *dev)
 {
        struct xhci_dwc3_platdata *plat = dev_get_platdata(dev);
 
-       dwc3_shutdown_phy(dev, plat->usb_phys, plat->num_phys);
+       dwc3_shutdown_phy(dev, plat->usb_phys);
 
        return xhci_deregister(dev);
 }