]> git.sur5r.net Git - u-boot/blobdiff - drivers/usb/host/ehci-vf.c
Merge git://git.denx.de/u-boot-fsl-qoriq
[u-boot] / drivers / usb / host / ehci-vf.c
index 84241cd17328715f78c18fde40b60c884eb863c1..22e5afad6e01b55c9f35243cc28276fe34171fbe 100644 (file)
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (c) 2015 Sanchayan Maity <sanchayan.maity@toradex.com>
  * Copyright (C) 2015 Toradex AG
  *
  * Based on ehci-mx6 driver
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/crm_regs.h>
-#include <asm/imx-common/iomux-v3.h>
-#include <asm/imx-common/regs-usbphy.h>
+#include <asm/mach-imx/iomux-v3.h>
+#include <asm/mach-imx/regs-usbphy.h>
 #include <usb/ehci-ci.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
 #include <fdtdec.h>
 
 #include "ehci.h"
@@ -223,7 +222,7 @@ static int vf_usb_ofdata_to_platdata(struct udevice *dev)
 
        priv->portnr = dev->seq;
 
-       priv->ehci = (struct usb_ehci *)dev_get_addr(dev);
+       priv->ehci = (struct usb_ehci *)devfdt_get_addr(dev);
        mode = fdt_getprop(dt_blob, node, "dr_mode", NULL);
        if (mode) {
                if (0 == strcmp(mode, "host")) {
@@ -252,8 +251,9 @@ static int vf_usb_ofdata_to_platdata(struct udevice *dev)
        }
 
        if (priv->dr_mode == DR_MODE_OTG) {
-               gpio_request_by_name_nodev(dt_blob, node, "fsl,cdet-gpio", 0,
-                                          &priv->cdet_gpio, GPIOD_IS_IN);
+               gpio_request_by_name_nodev(offset_to_ofnode(node),
+                                          "fsl,cdet-gpio", 0, &priv->cdet_gpio,
+                                          GPIOD_IS_IN);
                if (dm_gpio_is_valid(&priv->cdet_gpio)) {
                        if (dm_gpio_get_value(&priv->cdet_gpio))
                                priv->init_type = USB_INIT_DEVICE;