]> git.sur5r.net Git - u-boot/blobdiff - drivers/net/cpsw-common.c
pl011: Convert CONFIG_PL011_SERIAL to Kconfig
[u-boot] / drivers / net / cpsw-common.c
index e828e85d8b318fda0b8775e80cdfc5c19fc02f3f..0dc83ab820522bcd870e4fb30b9a83644284b59a 100644 (file)
@@ -20,7 +20,7 @@ static int davinci_emac_3517_get_macid(struct udevice *dev, u16 offset,
                                       int slave, u8 *mac_addr)
 {
        void *fdt = (void *)gd->fdt_blob;
-       int node = dev->of_offset;
+       int node = dev_of_offset(dev);
        u32 macid_lsb;
        u32 macid_msb;
        fdt32_t gmii = 0;
@@ -29,14 +29,14 @@ static int davinci_emac_3517_get_macid(struct udevice *dev, u16 offset,
 
        syscon = fdtdec_lookup_phandle(fdt, node, "syscon");
        if (syscon < 0) {
-               error("Syscon offset not found\n");
+               pr_err("Syscon offset not found\n");
                return -ENOENT;
        }
 
        addr = (u32)map_physmem(fdt_translate_address(fdt, syscon, &gmii),
                                sizeof(u32), MAP_NOCACHE);
        if (addr == FDT_ADDR_T_NONE) {
-               error("Not able to get syscon address to get mac efuse address\n");
+               pr_err("Not able to get syscon address to get mac efuse address\n");
                return -ENOENT;
        }
 
@@ -60,7 +60,7 @@ static int cpsw_am33xx_cm_get_macid(struct udevice *dev, u16 offset, int slave,
                                    u8 *mac_addr)
 {
        void *fdt = (void *)gd->fdt_blob;
-       int node = dev->of_offset;
+       int node = dev_of_offset(dev);
        u32 macid_lo;
        u32 macid_hi;
        fdt32_t gmii = 0;
@@ -69,14 +69,14 @@ static int cpsw_am33xx_cm_get_macid(struct udevice *dev, u16 offset, int slave,
 
        syscon = fdtdec_lookup_phandle(fdt, node, "syscon");
        if (syscon < 0) {
-               error("Syscon offset not found\n");
+               pr_err("Syscon offset not found\n");
                return -ENOENT;
        }
 
        addr = (u32)map_physmem(fdt_translate_address(fdt, syscon, &gmii),
                                sizeof(u32), MAP_NOCACHE);
        if (addr == FDT_ADDR_T_NONE) {
-               error("Not able to get syscon address to get mac efuse address\n");
+               pr_err("Not able to get syscon address to get mac efuse address\n");
                return -ENOENT;
        }
 
@@ -104,13 +104,13 @@ int ti_cm_get_macid(struct udevice *dev, int slave, u8 *mac_addr)
        if (of_machine_is_compatible("ti,am33xx"))
                return cpsw_am33xx_cm_get_macid(dev, 0x630, slave, mac_addr);
 
-       if (of_device_is_compatible(dev, "ti,am3517-emac"))
+       if (device_is_compatible(dev, "ti,am3517-emac"))
                return davinci_emac_3517_get_macid(dev, 0x110, slave, mac_addr);
 
-       if (of_device_is_compatible(dev, "ti,dm816-emac"))
+       if (device_is_compatible(dev, "ti,dm816-emac"))
                return cpsw_am33xx_cm_get_macid(dev, 0x30, slave, mac_addr);
 
-       if (of_machine_is_compatible("ti,am4372"))
+       if (of_machine_is_compatible("ti,am43"))
                return cpsw_am33xx_cm_get_macid(dev, 0x630, slave, mac_addr);
 
        if (of_machine_is_compatible("ti,dra7"))