summaryrefslogtreecommitdiff
path: root/drivers/net
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/net
parent2b81e8a3c86697180aa31193345a98af18a733f2 (diff)
downloadu-boot-imx-21ccce1ba52253d776ecd7003e14910eed93160b.zip
u-boot-imx-21ccce1ba52253d776ecd7003e14910eed93160b.tar.gz
u-boot-imx-21ccce1ba52253d776ecd7003e14910eed93160b.tar.bz2
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/net')
-rw-r--r--drivers/net/designware.c2
-rw-r--r--drivers/net/e1000.c4
-rw-r--r--drivers/net/pch_gbe.c2
-rw-r--r--drivers/net/rtl8169.c11
4 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 04114a1..0fccbc0 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -584,7 +584,7 @@ static int designware_eth_probe(struct udevice *dev)
* or via a PCI bridge, fill in platdata before we probe the hardware.
*/
if (device_is_on_pci_bus(dev)) {
- pci_dev_t bdf = pci_get_bdf(dev);
+ pci_dev_t bdf = dm_pci_get_bdf(dev);
dm_pci_read_config32(dev, PCI_BASE_ADDRESS_0, &iobase);
iobase &= PCI_BASE_ADDRESS_MEM_MASK;
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index 6124bf0..027f2bf 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -5628,8 +5628,8 @@ static int e1000_eth_probe(struct udevice *dev)
int ret;
hw->name = dev->name;
- ret = e1000_init_one(hw, trailing_strtol(dev->name), pci_get_bdf(dev),
- plat->enetaddr);
+ ret = e1000_init_one(hw, trailing_strtol(dev->name),
+ dm_pci_get_bdf(dev), plat->enetaddr);
if (ret < 0) {
printf(pr_fmt("failed to initialize card: %d\n"), ret);
return ret;
diff --git a/drivers/net/pch_gbe.c b/drivers/net/pch_gbe.c
index dfc0100..1b4dd56 100644
--- a/drivers/net/pch_gbe.c
+++ b/drivers/net/pch_gbe.c
@@ -424,7 +424,7 @@ int pch_gbe_probe(struct udevice *dev)
pci_dev_t devno;
u32 iobase;
- devno = pci_get_bdf(dev);
+ devno = dm_pci_get_bdf(dev);
/*
* The priv structure contains the descriptors and frame buffers which
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index 19422c4..f210005 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -576,7 +576,7 @@ int rtl8169_eth_recv(struct udevice *dev, int flags, uchar **packetp)
{
struct rtl8169_private *priv = dev_get_priv(dev);
- return rtl_recv_common(pci_get_bdf(dev), priv->iobase, packetp);
+ return rtl_recv_common(dm_pci_get_bdf(dev), priv->iobase, packetp);
}
#else
static int rtl_recv(struct eth_device *dev)
@@ -661,7 +661,8 @@ int rtl8169_eth_send(struct udevice *dev, void *packet, int length)
{
struct rtl8169_private *priv = dev_get_priv(dev);
- return rtl_send_common(pci_get_bdf(dev), priv->iobase, packet, length);
+ return rtl_send_common(dm_pci_get_bdf(dev), priv->iobase, packet,
+ length);
}
#else
@@ -837,7 +838,7 @@ static int rtl8169_eth_start(struct udevice *dev)
{
struct eth_pdata *plat = dev_get_platdata(dev);
- rtl8169_common_start(pci_get_bdf(dev), plat->enetaddr);
+ rtl8169_common_start(dm_pci_get_bdf(dev), plat->enetaddr);
return 0;
}
@@ -1130,10 +1131,10 @@ static int rtl8169_eth_probe(struct udevice *dev)
region = 1;
break;
}
- pci_read_config32(pci_get_bdf(dev), PCI_BASE_ADDRESS_0 + region * 4,
+ pci_read_config32(dm_pci_get_bdf(dev), PCI_BASE_ADDRESS_0 + region * 4,
&iobase);
iobase &= ~0xf;
- priv->iobase = (int)pci_mem_to_phys(pci_get_bdf(dev), iobase);
+ priv->iobase = (int)pci_mem_to_phys(dm_pci_get_bdf(dev), iobase);
ret = rtl_init(priv->iobase, dev->name, plat->enetaddr);
if (ret < 0) {