summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-11-29 13:17:47 -0700
committerSimon Glass <sjg@chromium.org>2016-01-12 10:19:09 -0700
commit21ccce1ba52253d776ecd7003e14910eed93160b (patch)
treeebc6df47b0b7b7928d83def29117deb2d767be46 /drivers/pci
parent2b81e8a3c86697180aa31193345a98af18a733f2 (diff)
downloadblackbird-obmc-uboot-21ccce1ba52253d776ecd7003e14910eed93160b.tar.gz
blackbird-obmc-uboot-21ccce1ba52253d776ecd7003e14910eed93160b.zip
dm: pci: Add a dm_ prefix to pci_get_bdf()
Most driver model PCI functions have a dm_ prefix. At some point, when the old code is converted to driver model and the old functions are removed, we will drop that prefix. For consistency, we should use the dm_ prefix for all driver model functions. Update pci_get_bdf() accordingly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci-uclass.c9
-rw-r--r--drivers/pci/pci_compat.c2
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 5fe30723c2..f6ca58bb7d 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -61,7 +61,7 @@ struct udevice *pci_get_controller(struct udevice *dev)
return dev;
}
-pci_dev_t pci_get_bdf(struct udevice *dev)
+pci_dev_t dm_pci_get_bdf(struct udevice *dev)
{
struct pci_child_platdata *pplat = dev_get_parent_platdata(dev);
struct udevice *bus = dev->parent;
@@ -225,7 +225,8 @@ int dm_pci_write_config(struct udevice *dev, int offset, unsigned long value,
for (bus = dev; device_is_on_pci_bus(bus);)
bus = bus->parent;
- return pci_bus_write_config(bus, pci_get_bdf(dev), offset, value, size);
+ return pci_bus_write_config(bus, dm_pci_get_bdf(dev), offset, value,
+ size);
}
@@ -290,7 +291,7 @@ int dm_pci_read_config(struct udevice *dev, int offset, unsigned long *valuep,
for (bus = dev; device_is_on_pci_bus(bus);)
bus = bus->parent;
- return pci_bus_read_config(bus, pci_get_bdf(dev), offset, valuep,
+ return pci_bus_read_config(bus, dm_pci_get_bdf(dev), offset, valuep,
size);
}
@@ -403,7 +404,7 @@ int pci_auto_config_devices(struct udevice *bus)
int ret;
debug("%s: device %s\n", __func__, dev->name);
- ret = pciauto_config_device(hose, pci_get_bdf(dev));
+ ret = pciauto_config_device(hose, dm_pci_get_bdf(dev));
if (ret < 0)
return ret;
max_bus = ret;
diff --git a/drivers/pci/pci_compat.c b/drivers/pci/pci_compat.c
index 712c48f28f..dd15eb19f8 100644
--- a/drivers/pci/pci_compat.c
+++ b/drivers/pci/pci_compat.c
@@ -34,5 +34,5 @@ pci_dev_t pci_find_devices(struct pci_device_id *ids, int index)
if (pci_find_device_id(ids, index, &dev))
return -1;
- return pci_get_bdf(dev);
+ return dm_pci_get_bdf(dev);
}
OpenPOWER on IntegriCloud