diff options
author | Simon Glass <sjg@chromium.org> | 2020-07-07 21:32:04 -0600 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2020-07-17 14:32:24 +0800 |
commit | 8f9877df95ae0068ce14a962bd72c22026c1d2e8 (patch) | |
tree | 1e69d065586341d31e78dd8679ca6be934c893d5 /include/binman.h | |
parent | 956a9082d325fae2b8c840d6974b6d090a8a21a7 (diff) |
binman: Add way to locate an entry in memory
Add support for accessing an entry's contents in memory-mapped SPI flash.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include/binman.h')
-rw-r--r-- | include/binman.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/binman.h b/include/binman.h index baf49f7876..e0b92075e2 100644 --- a/include/binman.h +++ b/include/binman.h @@ -9,6 +9,8 @@ #ifndef _BINMAN_H_ #define _BINMAN_H_ +#include <dm/ofnode.h> + /** *struct binman_entry - information about a binman entry * @@ -21,6 +23,18 @@ struct binman_entry { }; /** + * binman_entry_map() - Look up the address of an entry in memory + * + * @parent: Parent binman node + * @name: Name of entry + * @bufp: Returns a pointer to the entry + * @sizep: Returns the size of the entry + * @return 0 on success, -EPERM if the ROM offset is not set, -ENOENT if the + * entry cannot be found, other error code other error + */ +int binman_entry_map(ofnode parent, const char *name, void **bufp, int *sizep); + +/** * binman_set_rom_offset() - Set the ROM memory-map offset * * @rom_offset: Offset from an image_pos to the memory-mapped address. This @@ -42,6 +56,14 @@ void binman_set_rom_offset(int rom_offset); int binman_entry_find(const char *name, struct binman_entry *entry); /** + * binman_section_find_node() - Find a binman node + * + * @name: Name of node to look for + * @return Node that was found, ofnode_null() if not found + */ +ofnode binman_section_find_node(const char *name); + +/** * binman_init() - Set up the binman symbol information * * This locates the binary symbol information in the device tree ready for use |