diff options
Diffstat (limited to 'lib/chromeos/fdt_decode.c')
-rw-r--r-- | lib/chromeos/fdt_decode.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/chromeos/fdt_decode.c b/lib/chromeos/fdt_decode.c index 9c42364209b..203b10605ea 100644 --- a/lib/chromeos/fdt_decode.c +++ b/lib/chromeos/fdt_decode.c @@ -13,6 +13,7 @@ #include <chromeos/common.h> #include <chromeos/fdt_decode.h> #include <chromeos/fmap.h> +#include <fdt_decode.h> #include <linux/string.h> #define PREFIX "chromeos/fdt_decode: " @@ -150,3 +151,14 @@ int fdt_decode_chromeos_config_has_prop(const void *blob, const char *name) return fdt_get_property(blob, nodeoffset, name, &len) != NULL; } + +void *fdt_decode_chromeos_alloc_region(const void *blob, + const char *prop_name, size_t *size) +{ + int node = fdt_path_offset(blob, "/chromeos-config"); + + if (node < 0) + return NULL; + + return fdt_decode_alloc_region(blob, node, prop_name, size); +} |