diff options
author | Simon Glass <sjg@chromium.org> | 2014-07-23 12:55:16 (GMT) |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-07-23 13:07:26 (GMT) |
commit | 3234aa4babd79bf92239409145db4fda2f505051 (patch) | |
tree | 61691075181b112acc3326a982026f01ea2770c5 /include | |
parent | c910e2e2da49036496a5b8b34425043675218d51 (diff) | |
download | u-boot-3234aa4babd79bf92239409145db4fda2f505051.tar.xz |
fdt: Add a function to get the node offset of an alias
This simple function returns the node offset of a named alias.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/fdtdec.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h index f454f7e..856e6cf 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -363,6 +363,17 @@ int fdtdec_add_aliases_for_id(const void *blob, const char *name, int fdtdec_get_alias_seq(const void *blob, const char *base, int node, int *seqp); +/** + * Get the offset of the given alias node + * + * This looks up an alias in /aliases then finds the offset of that node. + * + * @param blob Device tree blob (if NULL, then error is returned) + * @param name Alias name, e.g. "console" + * @return Node offset referred to by that alias, or -ve FDT_ERR_... + */ +int fdtdec_get_alias_node(const void *blob, const char *name); + /* * Get the name for a compatible ID * |