]> git.sur5r.net Git - u-boot/commitdiff
dm: core: Rename of_device_is_compatible()
authorSimon Glass <sjg@chromium.org>
Fri, 19 May 2017 02:08:57 +0000 (20:08 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 1 Jun 2017 13:03:06 +0000 (07:03 -0600)
The of_ prefix conflicts with the livetree version of this function.
Rename it to avoid problems when we add livetree support.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/device.c
drivers/firmware/psci.c
drivers/mmc/xenon_sdhci.c
drivers/net/cpsw-common.c
drivers/net/mvneta.c
drivers/phy/marvell/comphy_core.c
drivers/usb/host/ehci-marvell.c
drivers/usb/host/xhci-rockchip.c
include/dm/device.h

index 363c1833e98ab369013f5cb1dc86c2d24542e0b5..f5e85413f750622b3ba3565d898a20ea262d444a 100644 (file)
@@ -701,7 +701,7 @@ int device_set_name(struct udevice *dev, const char *name)
        return 0;
 }
 
-bool of_device_is_compatible(struct udevice *dev, const char *compat)
+bool device_is_compatible(struct udevice *dev, const char *compat)
 {
        const void *fdt = gd->fdt_blob;
 
index 7652cc27aa9c44173c30a1f621d323bc1df6d2a4..451fbdebba39e1dd8ea3c071d30ca1df6a489253 100644 (file)
@@ -40,8 +40,8 @@ static unsigned long __invoke_psci_fn_smc(unsigned long function_id,
 static int psci_bind(struct udevice *dev)
 {
        /* No SYSTEM_RESET support for PSCI 0.1 */
-       if (of_device_is_compatible(dev, "arm,psci-0.2") ||
-           of_device_is_compatible(dev, "arm,psci-1.0")) {
+       if (device_is_compatible(dev, "arm,psci-0.2") ||
+           device_is_compatible(dev, "arm,psci-1.0")) {
                int ret;
 
                /* bind psci-sysreset optionally */
index 6cd176f9f809f20f1cab474f3c9302ff9e4200f4..2b7cb7f6b66ab0fe4df9226ddc1fc80d53da0c8b 100644 (file)
@@ -454,7 +454,7 @@ static int xenon_sdhci_ofdata_to_platdata(struct udevice *dev)
        host->name = dev->name;
        host->ioaddr = (void *)devfdt_get_addr(dev);
 
-       if (of_device_is_compatible(dev, "marvell,armada-3700-sdhci"))
+       if (device_is_compatible(dev, "marvell,armada-3700-sdhci"))
                priv->pad_ctrl_reg = (void *)devfdt_get_addr_index(dev, 1);
 
        name = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "marvell,pad-type",
index 55f56d955529b3d1d9f740e80cd1d8471532e41e..8970ee00af30b23caa4343cb7637258ec89723ed 100644 (file)
@@ -104,10 +104,10 @@ 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,am43"))
index af07b281e80c496036c49bcad50db2b89fbcb4eb..50577d7f07ae500a49b692ecdb83cf599994cddb 100644 (file)
@@ -1695,7 +1695,7 @@ static int mvneta_probe(struct udevice *dev)
        pp->base = (void __iomem *)pdata->iobase;
 
        /* Configure MBUS address windows */
-       if (of_device_is_compatible(dev, "marvell,armada-3700-neta"))
+       if (device_is_compatible(dev, "marvell,armada-3700-neta"))
                mvneta_bypass_mbus_windows(pp);
        else
                mvneta_conf_mbus_windows(pp);
index ccf024b792754de4e1d9fd545a780baa259a3feb..426db30f73d956485a3e5f7b62d1318575d44dcb 100644 (file)
@@ -135,10 +135,10 @@ static int comphy_probe(struct udevice *dev)
                return -EINVAL;
        }
 
-       if (of_device_is_compatible(dev, "marvell,comphy-armada-3700"))
+       if (device_is_compatible(dev, "marvell,comphy-armada-3700"))
                chip_cfg->ptr_comphy_chip_init = comphy_a3700_init;
 
-       if (of_device_is_compatible(dev, "marvell,comphy-cp110"))
+       if (device_is_compatible(dev, "marvell,comphy-cp110"))
                chip_cfg->ptr_comphy_chip_init = comphy_cp110_init;
 
        /*
index 56409df26e0518874126473f50854ca74070f0ac..7a0f2083ada46ca52dd0a9e3bd363e922ac819ad 100644 (file)
@@ -121,7 +121,7 @@ static int ehci_mvebu_probe(struct udevice *dev)
         * Also, the address decoder doesn't need to get setup with this
         * SoC, so don't call usb_brg_adrdec_setup().
         */
-       if (of_device_is_compatible(dev, "marvell,armada3700-ehci"))
+       if (device_is_compatible(dev, "marvell,armada3700-ehci"))
                marvell_ehci_ops.powerup_fixup = marvell_ehci_powerup_fixup;
        else
                usb_brg_adrdec_setup((void *)priv->hcd_base);
index 5e7130f0e15d35ff4e94651dfb7605564255aacc..38e1c68db75410f5354171334380feee68dd20bb 100644 (file)
@@ -55,7 +55,7 @@ static int xhci_usb_ofdata_to_platdata(struct udevice *dev)
        /* Get the base address for usbphy from the device node */
        for (device_find_first_child(dev, &child); child;
             device_find_next_child(&child)) {
-               if (!of_device_is_compatible(child, "rockchip,rk3399-usb3-phy"))
+               if (!device_is_compatible(child, "rockchip,rk3399-usb3-phy"))
                        continue;
                plat->phy_base = devfdt_get_addr(child);
                break;
index 489cf33987f3c737c08d25cc0dac159d3808ea6a..4866f7c0028b9c81ad85cc10468ce60713e707a3 100644 (file)
@@ -563,7 +563,7 @@ int device_set_name(struct udevice *dev, const char *name);
 void device_set_name_alloced(struct udevice *dev);
 
 /**
- * of_device_is_compatible() - check if the device is compatible with the compat
+ * device_is_compatible() - check if the device is compatible with the compat
  *
  * This allows to check whether the device is comaptible with the compat.
  *
@@ -572,7 +572,7 @@ void device_set_name_alloced(struct udevice *dev);
  *             device
  * @return true if OK, false if the compatible is not found
  */
-bool of_device_is_compatible(struct udevice *dev, const char *compat);
+bool device_is_compatible(struct udevice *dev, const char *compat);
 
 /**
  * of_machine_is_compatible() - check if the machine is compatible with