summaryrefslogtreecommitdiff
path: root/rtemsbsd/sys/powerpc/compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'rtemsbsd/sys/powerpc/compat.c')
-rw-r--r--rtemsbsd/sys/powerpc/compat.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/rtemsbsd/sys/powerpc/compat.c b/rtemsbsd/sys/powerpc/compat.c
index 400eac57..c0fdebbd 100644
--- a/rtemsbsd/sys/powerpc/compat.c
+++ b/rtemsbsd/sys/powerpc/compat.c
@@ -90,6 +90,22 @@ of_device_is_compatible(const struct device_node *dn, const char *name)
}
struct device_node *
+of_find_node_by_path(struct device_node *dns, const char *path)
+{
+ const void *fdt = bsp_fdt_get();
+ int node;
+
+ memset(dns, 0, sizeof(*dns));
+
+ node = fdt_path_offset(fdt, path);
+ if (node < 0)
+ return (NULL);
+
+ dns->offset = node;
+ return (dns);
+}
+
+struct device_node *
of_find_compatible_node(struct device_node *dns, const struct device_node *dn,
const char *type, const char *compatible)
{