]> git.sur5r.net Git - u-boot/blobdiff - drivers/usb/host/ehci-mx6.c
Merge branch 'master' of git://git.denx.de/u-boot-sunxi
[u-boot] / drivers / usb / host / ehci-mx6.c
index 7b309b7b9617a95fd5f02429053812fb93b158c7..f348ec9bca9d8ff1c6b4bf0bb8018986e0d384ce 100644 (file)
@@ -17,6 +17,7 @@
 #include <asm/imx-common/iomux-v3.h>
 #include <asm/imx-common/sys_proto.h>
 #include <dm.h>
+#include <asm/mach-types.h>
 #include <power/regulator.h>
 
 #include "ehci.h"
@@ -434,10 +435,10 @@ static const struct ehci_ops mx6_ehci_ops = {
 static int ehci_usb_phy_mode(struct udevice *dev)
 {
        struct usb_platdata *plat = dev_get_platdata(dev);
-       void *__iomem addr = (void *__iomem)dev_get_addr(dev);
+       void *__iomem addr = (void *__iomem)devfdt_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 +485,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;
@@ -504,7 +505,7 @@ static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
 static int ehci_usb_probe(struct udevice *dev)
 {
        struct usb_platdata *plat = dev_get_platdata(dev);
-       struct usb_ehci *ehci = (struct usb_ehci *)dev_get_addr(dev);
+       struct usb_ehci *ehci = (struct usb_ehci *)devfdt_get_addr(dev);
        struct ehci_mx6_priv_data *priv = dev_get_priv(dev);
        enum usb_init_type type = plat->init_type;
        struct ehci_hccr *hccr;