diff options
Diffstat (limited to 'MdePkg/Library/BaseFdtLib/FdtLib.c')
-rw-r--r-- | MdePkg/Library/BaseFdtLib/FdtLib.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseFdtLib/FdtLib.c b/MdePkg/Library/BaseFdtLib/FdtLib.c index c9514af673..9b1ceac551 100644 --- a/MdePkg/Library/BaseFdtLib/FdtLib.c +++ b/MdePkg/Library/BaseFdtLib/FdtLib.c @@ -442,3 +442,23 @@ FdtNodeDepth ( {
return fdt_node_depth (Fdt, NodeOffset);
}
+
+/**
+ Find nodes with a given 'compatible' value.
+
+ @param[in] Fdt The pointer to FDT blob.
+ @param[in] StartOffset Only find nodes after this offset.
+ @param[in] Compatible The string to match against.
+
+ @retval The offset of the first node after StartOffset.
+**/
+INT32
+EFIAPI
+FdtNodeOffsetByCompatible (
+ IN CONST VOID *Fdt,
+ IN INT32 StartOffset,
+ IN CONST CHAR8 *Compatible
+ )
+{
+ return fdt_node_offset_by_compatible (Fdt, StartOffset, Compatible);
+}
|