summaryrefslogtreecommitdiff
path: root/include/pci.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-07-06 16:47:46 -0600
committerSimon Glass <sjg@chromium.org>2015-07-21 17:39:39 -0600
commit4b515e4fc53f7675935a40a37ebf0c384e776914 (patch)
tree4d32fa142fc6d0a095a89a932707cd07d2c49db5 /include/pci.h
parentd0a5a0b2d800ddf248a7a843e5efba72d19059cc (diff)
downloadu-boot-imx-4b515e4fc53f7675935a40a37ebf0c384e776914.zip
u-boot-imx-4b515e4fc53f7675935a40a37ebf0c384e776914.tar.gz
u-boot-imx-4b515e4fc53f7675935a40a37ebf0c384e776914.tar.bz2
dm: pci: Add a function to get the BDF for a device
It is useful to be able to find the full PCI address (bus, device and function) for a PCI device. Add a function to provide this. Adjust the existing code to use this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/pci.h')
-rw-r--r--include/pci.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/pci.h b/include/pci.h
index 021928f..94bca97 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -808,6 +808,14 @@ struct dm_pci_ops {
#define pci_get_ops(dev) ((struct dm_pci_ops *)(dev)->driver->ops)
/**
+ * pci_get_bdf() - Get the BDF value for a device
+ *
+ * @dev: Device to check
+ * @return bus/device/function value (see PCI_BDF())
+ */
+pci_dev_t pci_get_bdf(struct udevice *dev);
+
+/**
* pci_bind_bus_devices() - scan a PCI bus and bind devices
*
* Scan a PCI bus looking for devices. Bind each one that is found. If