diff options
author | Simon Glass <sjg@chromium.org> | 2021-01-13 20:29:57 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-27 17:03:16 -0500 |
commit | 1e35a4d2282329093ae384bfbb8df844e23798c6 (patch) | |
tree | 7f6a4d78a00ac3510e0157c5b528a658dbba2a69 /include/binman.h | |
parent | 76b54d8ca159b217be976eef986b76e26409ea4a (diff) | |
download | u-boot-1e35a4d2282329093ae384bfbb8df844e23798c6.tar.gz |
binman: Allow reading entries from a subnode
Some images may have multiple copies of the same thing, e.g. two versions
of the read/write U-Boots. It is necessary to read data from one or other
of these under selection of the verified-boot logic. Add a function to
select the subnode to use.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/binman.h')
-rw-r--r-- | include/binman.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/binman.h b/include/binman.h index 8b89a9666d5..5958dfb4485 100644 --- a/include/binman.h +++ b/include/binman.h @@ -71,6 +71,20 @@ int binman_entry_find(const char *name, struct binman_entry *entry); ofnode binman_section_find_node(const char *name); /** + * binman_select_subnode() - Select a subnode to use to find entries + * + * Normally binman selects the top-level node for future entry requests, such as + * binman_entry_find(). This function allows a subnode to be chosen instead. + * + * @name: Name of subnode, typically a section. This must be in the top-level + * binman node + * @return 0 if OK, -EINVAL if there is no /binman node, -ECHILD if multiple + * images are being used but the first image is not available, -ENOENT if + * the requested subnode cannot be found + */ +int binman_select_subnode(const char *name); + +/** * binman_init() - Set up the binman symbol information * * This locates the binary symbol information in the device tree ready for use |