mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
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>
This commit is contained in:
parent
d0a5a0b2d8
commit
4b515e4fc5
3 changed files with 19 additions and 12 deletions
|
@ -807,6 +807,14 @@ struct dm_pci_ops {
|
|||
/* Get access to a PCI bus' operations */
|
||||
#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
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue