Re: [U-Boot] [PATCH v3 07/72] dm: core: Rename of_device_is_compatible()

2017-05-24 Thread sjg
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 
---

Changes in v3: None
Changes in v2: None

 drivers/core/device.c | 2 +-
 drivers/firmware/psci.c   | 4 ++--
 drivers/mmc/xenon_sdhci.c | 2 +-
 drivers/net/cpsw-common.c | 4 ++--
 drivers/net/mvneta.c  | 2 +-
 drivers/phy/marvell/comphy_core.c | 4 ++--
 drivers/usb/host/ehci-marvell.c   | 2 +-
 drivers/usb/host/xhci-rockchip.c  | 2 +-
 include/dm/device.h   | 4 ++--
 9 files changed, 13 insertions(+), 13 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 07/72] dm: core: Rename of_device_is_compatible()

2017-05-18 Thread Simon Glass
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 
---

Changes in v3: None
Changes in v2: None

 drivers/core/device.c | 2 +-
 drivers/firmware/psci.c   | 4 ++--
 drivers/mmc/xenon_sdhci.c | 2 +-
 drivers/net/cpsw-common.c | 4 ++--
 drivers/net/mvneta.c  | 2 +-
 drivers/phy/marvell/comphy_core.c | 4 ++--
 drivers/usb/host/ehci-marvell.c   | 2 +-
 drivers/usb/host/xhci-rockchip.c  | 2 +-
 include/dm/device.h   | 4 ++--
 9 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/core/device.c b/drivers/core/device.c
index 363c1833e9..f5e85413f7 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -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;
 
diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index 7652cc27aa..451fbdebba 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -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 */
diff --git a/drivers/mmc/xenon_sdhci.c b/drivers/mmc/xenon_sdhci.c
index 6cd176f9f8..2b7cb7f6b6 100644
--- a/drivers/mmc/xenon_sdhci.c
+++ b/drivers/mmc/xenon_sdhci.c
@@ -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",
diff --git a/drivers/net/cpsw-common.c b/drivers/net/cpsw-common.c
index 55f56d9555..8970ee00af 100644
--- a/drivers/net/cpsw-common.c
+++ b/drivers/net/cpsw-common.c
@@ -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"))
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index af07b281e8..50577d7f07 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -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);
diff --git a/drivers/phy/marvell/comphy_core.c 
b/drivers/phy/marvell/comphy_core.c
index ccf024b792..426db30f73 100644
--- a/drivers/phy/marvell/comphy_core.c
+++ b/drivers/phy/marvell/comphy_core.c
@@ -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;
 
/*
diff --git a/drivers/usb/host/ehci-marvell.c b/drivers/usb/host/ehci-marvell.c
index 56409df26e..7a0f2083ad 100644
--- a/drivers/usb/host/ehci-marvell.c
+++ b/drivers/usb/host/ehci-marvell.c
@@ -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