diff options
Diffstat (limited to 'bsps/shared/ofw/ofw.c')
-rw-r--r-- | bsps/shared/ofw/ofw.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bsps/shared/ofw/ofw.c b/bsps/shared/ofw/ofw.c index 1c3a81785d..f4b8b63931 100644 --- a/bsps/shared/ofw/ofw.c +++ b/bsps/shared/ofw/ofw.c @@ -690,3 +690,15 @@ phandle_t rtems_ofw_find_device_by_compat( const char *compat ) offset = fdt_node_offset_by_compatible(fdtp, -1, compat); return rtems_fdt_offset_to_phandle(offset); } + +bool rtems_ofw_is_node_compatible( + phandle_t node, + const char *compat +) +{ + int offset; + + offset = rtems_fdt_phandle_to_offset(node); + + return fdt_node_check_compatible(fdtp, offset, compat) == 0; +} |