mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
dm: pci: Add a function to get the controller for a bus
A PCI bus may be a bridge device where the controller is the bridge's parent. Add a function to return the controller device, given a PCI device. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
parent
9289db6c60
commit
9f60fb0db4
2 changed files with 16 additions and 0 deletions
|
@ -1122,6 +1122,14 @@ ulong pci_conv_32_to_size(ulong value, uint offset, enum pci_size_t size);
|
|||
ulong pci_conv_size_to_32(ulong old, ulong value, uint offset,
|
||||
enum pci_size_t size);
|
||||
|
||||
/**
|
||||
* pci_get_controller() - obtain the controller to use for a bus
|
||||
*
|
||||
* @dev: Device to check
|
||||
* @return pointer to the controller device for this bus
|
||||
*/
|
||||
struct udevice *pci_get_controller(struct udevice *dev);
|
||||
|
||||
/**
|
||||
* struct dm_pci_emul_ops - PCI device emulator operations
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue