summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/fdtdec.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 8b24deb767..99cb353804 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -649,4 +649,15 @@ int fdt_get_named_resource(const void *fdt, int node, const char *property,
const char *prop_names, const char *name,
struct fdt_resource *res);
+/**
+ * Look at the reg property of a device node that represents a PCI device
+ * and parse the bus, device and function number from it.
+ *
+ * @param fdt FDT blob
+ * @param node node to examine
+ * @param bdf returns bus, device, function triplet
+ * @return 0 if ok, negative on error
+ */
+int fdtdec_pci_get_bdf(const void *fdt, int node, int *bdf);
+
#endif
OpenPOWER on IntegriCloud