diff options
author | Simon Glass <sjg@chromium.org> | 2015-11-20 03:27:01 (GMT) |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-12-01 13:26:36 (GMT) |
commit | f9260336d0eb3e41ced18f6408e90a32c8825f6c (patch) | |
tree | 45647d035ef024080fc3b755ded4a46e96d7c651 /include | |
parent | 9f60fb0db4b70c65760cb1799b76de1c9b71644d (diff) | |
download | u-boot-f9260336d0eb3e41ced18f6408e90a32c8825f6c.tar.xz |
dm: pci: Add a function to find the regions for a PCI bus
This function looks up the controller and returns a pointer to each region
type.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/pci.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/pci.h b/include/pci.h index f3dda70..9c19482 100644 --- a/include/pci.h +++ b/include/pci.h @@ -1131,6 +1131,18 @@ ulong pci_conv_size_to_32(ulong old, ulong value, uint offset, struct udevice *pci_get_controller(struct udevice *dev); /** + * pci_get_regions() - obtain pointers to all the region types + * + * @dev: Device to check + * @iop: Returns a pointer to the I/O region, or NULL if none + * @memp: Returns a pointer to the memory region, or NULL if none + * @prefp: Returns a pointer to the pre-fetch region, or NULL if none + * @return the number of non-NULL regions returned, normally 3 + */ +int pci_get_regions(struct udevice *dev, struct pci_region **iop, + struct pci_region **memp, struct pci_region **prefp); + +/** * struct dm_pci_emul_ops - PCI device emulator operations */ struct dm_pci_emul_ops { |