diff options
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/dwc2.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/ehci-exynos.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ehci-fsl.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ehci-mx6.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ehci-vf.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/usb-uclass.c | 7 | ||||
-rw-r--r-- | drivers/usb/host/xhci-exynos5.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/xhci-rockchip.c | 8 |
9 files changed, 17 insertions, 16 deletions
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c index d08879dc67..d253b946f3 100644 --- a/drivers/usb/host/dwc2.c +++ b/drivers/usb/host/dwc2.c @@ -1199,8 +1199,8 @@ static int dwc2_usb_ofdata_to_platdata(struct udevice *dev) return -EINVAL; priv->regs = (struct dwc2_core_regs *)addr; - prop = fdt_getprop(gd->fdt_blob, dev->of_offset, "disable-over-current", - NULL); + prop = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), + "disable-over-current", NULL); if (prop) priv->oc_disable = true; diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index 53281d78b3..981543e315 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -59,7 +59,7 @@ static int ehci_usb_ofdata_to_platdata(struct udevice *dev) } depth = 0; - node = fdtdec_next_compatible_subnode(blob, dev->of_offset, + node = fdtdec_next_compatible_subnode(blob, dev_of_offset(dev), COMPAT_SAMSUNG_EXYNOS_USB_PHY, &depth); if (node <= 0) { debug("XHCI: Can't get device node for usb3-phy controller\n"); diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 9c32921826..7ad50fccee 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -61,7 +61,7 @@ static int ehci_fsl_ofdata_to_platdata(struct udevice *dev) struct ehci_fsl_priv *priv = dev_get_priv(dev); const void *prop; - prop = fdt_getprop(gd->fdt_blob, dev->of_offset, "phy_type", + prop = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy_type", NULL); if (prop) { priv->phy_type = (char *)prop; diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index 7b309b7b96..55ac162a3c 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -437,7 +437,7 @@ static int ehci_usb_phy_mode(struct udevice *dev) void *__iomem addr = (void *__iomem)dev_get_addr(dev); void *__iomem phy_ctrl, *__iomem phy_status; const void *blob = gd->fdt_blob; - int offset = dev->of_offset, phy_off; + int offset = dev_of_offset(dev), phy_off; u32 val; /* @@ -484,7 +484,7 @@ static int ehci_usb_ofdata_to_platdata(struct udevice *dev) struct usb_platdata *plat = dev_get_platdata(dev); const char *mode; - mode = fdt_getprop(gd->fdt_blob, dev->of_offset, "dr_mode", NULL); + mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "dr_mode", NULL); if (mode) { if (strcmp(mode, "peripheral") == 0) plat->init_type = USB_INIT_DEVICE; diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index e3620da15f..beb3b02796 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -696,7 +696,7 @@ static void config_clock(const u32 timing[]) static int fdt_decode_usb(struct udevice *dev, struct fdt_usb *config) { const void *blob = gd->fdt_blob; - int node = dev->of_offset; + int node = dev_of_offset(dev); const char *phy, *mode; config->reg = (struct usb_ctlr *)dev_get_addr(dev); diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c index f389bff171..84241cd173 100644 --- a/drivers/usb/host/ehci-vf.c +++ b/drivers/usb/host/ehci-vf.c @@ -218,7 +218,7 @@ 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; diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c index be114fc077..5cf1e9a36c 100644 --- a/drivers/usb/host/usb-uclass.c +++ b/drivers/usb/host/usb-uclass.c @@ -686,16 +686,17 @@ int usb_child_post_bind(struct udevice *dev) const void *blob = gd->fdt_blob; int val; - if (dev->of_offset == -1) + if (dev_of_offset(dev) == -1) return 0; /* We only support matching a few things */ - val = fdtdec_get_int(blob, dev->of_offset, "usb,device-class", -1); + val = fdtdec_get_int(blob, dev_of_offset(dev), "usb,device-class", -1); if (val != -1) { plat->id.match_flags |= USB_DEVICE_ID_MATCH_DEV_CLASS; plat->id.bDeviceClass = val; } - val = fdtdec_get_int(blob, dev->of_offset, "usb,interface-class", -1); + val = fdtdec_get_int(blob, dev_of_offset(dev), "usb,interface-class", + -1); if (val != -1) { plat->id.match_flags |= USB_DEVICE_ID_MATCH_INT_CLASS; plat->id.bInterfaceClass = val; diff --git a/drivers/usb/host/xhci-exynos5.c b/drivers/usb/host/xhci-exynos5.c index 82fcd84ef2..b3f48b34e2 100644 --- a/drivers/usb/host/xhci-exynos5.c +++ b/drivers/usb/host/xhci-exynos5.c @@ -68,7 +68,7 @@ static int xhci_usb_ofdata_to_platdata(struct udevice *dev) } depth = 0; - node = fdtdec_next_compatible_subnode(blob, dev->of_offset, + node = fdtdec_next_compatible_subnode(blob, dev_of_offset(dev), COMPAT_SAMSUNG_EXYNOS5_USB3_PHY, &depth); if (node <= 0) { debug("XHCI: Can't get device node for usb3-phy controller\n"); diff --git a/drivers/usb/host/xhci-rockchip.c b/drivers/usb/host/xhci-rockchip.c index 8cbcb8f923..f559830185 100644 --- a/drivers/usb/host/xhci-rockchip.c +++ b/drivers/usb/host/xhci-rockchip.c @@ -90,11 +90,11 @@ static void rockchip_dwc3_phy_setup(struct dwc3 *dwc3_reg, /* Set dwc3 usb2 phy config */ reg = readl(&dwc3_reg->g_usb2phycfg[0]); - if (fdtdec_get_bool(blob, dev->of_offset, + if (fdtdec_get_bool(blob, dev_of_offset(dev), "snps,dis-enblslpm-quirk")) reg &= ~DWC3_GUSB2PHYCFG_ENBLSLPM; - utmi_bits = fdtdec_get_int(blob, dev->of_offset, + utmi_bits = fdtdec_get_int(blob, dev_of_offset(dev), "snps,phyif-utmi-bits", -1); if (utmi_bits == 16) { reg |= DWC3_GUSB2PHYCFG_PHYIF; @@ -106,11 +106,11 @@ static void rockchip_dwc3_phy_setup(struct dwc3 *dwc3_reg, reg |= DWC3_GUSB2PHYCFG_USBTRDTIM_8BIT; } - if (fdtdec_get_bool(blob, dev->of_offset, + if (fdtdec_get_bool(blob, dev_of_offset(dev), "snps,dis-u2-freeclk-exists-quirk")) reg &= ~DWC3_GUSB2PHYCFG_U2_FREECLK_EXISTS; - if (fdtdec_get_bool(blob, dev->of_offset, + if (fdtdec_get_bool(blob, dev_of_offset(dev), "snps,dis-u2-susphy-quirk")) reg &= ~DWC3_GUSB2PHYCFG_SUSPHY; |