aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSuneel Garapati2019-10-19 15:19:35 -0700
committerStefan Roese2020-08-25 05:41:09 +0200
commit1db7ee464f28d72bd1af87b1136c9c158833da13 (patch)
tree03c6756b34b2d3f8ac9cbf0aa5d44a066bdb8529 /include
parent1aa3966173fe92fa3c46638ee8eb8b8491f521d6 (diff)
fdtdec: Add API to read pci bus-range property
Add fdtdec_get_pci_bus_range to read bus-range property values. Signed-off-by: Suneel Garapati <sgarapati@marvell.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/fdtdec.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h
index bc79389260a..152eb07b9e0 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -445,6 +445,19 @@ int fdtdec_get_pci_bar32(const struct udevice *dev, struct fdt_pci_addr *addr,
u32 *bar);
/**
+ * Look at the bus range property of a device node and return the pci bus
+ * range for this node.
+ * The property must hold one fdt_pci_addr with a length.
+ * @param blob FDT blob
+ * @param node node to examine
+ * @param res the resource structure to return the bus range
+ * @return 0 if ok, negative on error
+ */
+
+int fdtdec_get_pci_bus_range(const void *blob, int node,
+ struct fdt_resource *res);
+
+/**
* Look up a 32-bit integer property in a node and return it. The property
* must have at least 4 bytes of data. The value of the first cell is
* returned.