diff options
author | Stefan Roese <sr@denx.de> | 2020-08-05 13:56:11 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2020-08-25 05:41:09 +0200 |
commit | 68f81b857563e8f739323385795f1e99b3d2e598 (patch) | |
tree | 6daa3394dfc750b11d08e78677ecae407dae9f8e /include | |
parent | 1db7ee464f28d72bd1af87b1136c9c158833da13 (diff) |
dm: core: Add API to read PCI bus-range property
Add dev_read_pci_bus_range() to read bus-range property values
Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/dm/read.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/dm/read.h b/include/dm/read.h index 0a7aacd2d0..67db94adfc 100644 --- a/include/dm/read.h +++ b/include/dm/read.h @@ -680,6 +680,18 @@ int dev_read_alias_highest_id(const char *stem); */ int dev_get_child_count(const struct udevice *dev); +/** + * dev_read_pci_bus_range - Read PCI bus-range resource + * + * Look at the bus range property of a device node and return the pci bus + * range for this node. + * + * @dev: device to examine + * @res returns the resource + * @return 0 if ok, negative on error + */ +int dev_read_pci_bus_range(const struct udevice *dev, struct resource *res); + #else /* CONFIG_DM_DEV_READ_INLINE is enabled */ static inline int dev_read_u32(const struct udevice *dev, |