X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fusb%2Fhost%2Fehci-vf.c;h=22e5afad6e01b55c9f35243cc28276fe34171fbe;hb=c590e62d3b6f6dd72eae1183614f919e3fd7ffcb;hp=f389bff1718f09b7f5f979907e48cfcc48e307f2;hpb=30aaa774df39971e0f488b7661c8825a45570cd2;p=u-boot diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c index f389bff171..22e5afad6e 100644 --- a/drivers/usb/host/ehci-vf.c +++ b/drivers/usb/host/ehci-vf.c @@ -1,10 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (c) 2015 Sanchayan Maity * Copyright (C) 2015 Toradex AG * * Based on ehci-mx6 driver - * - * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -17,10 +16,10 @@ #include #include #include -#include -#include +#include +#include #include -#include +#include #include #include "ehci.h" @@ -218,12 +217,12 @@ static int vf_usb_ofdata_to_platdata(struct udevice *dev) { struct ehci_vf_priv_data *priv = dev_get_priv(dev); const void *dt_blob = gd->fdt_blob; - int node = dev->of_offset; + int node = dev_of_offset(dev); const char *mode; 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;