mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
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>
This commit is contained in:
parent
956a9082d3
commit
8f9877df95
2 changed files with 45 additions and 0 deletions
|
@ -9,6 +9,8 @@
|
|||
#ifndef _BINMAN_H_
|
||||
#define _BINMAN_H_
|
||||
|
||||
#include <dm/ofnode.h>
|
||||
|
||||
/**
|
||||
*struct binman_entry - information about a binman entry
|
||||
*
|
||||
|
@ -20,6 +22,18 @@ struct binman_entry {
|
|||
u32 size;
|
||||
};
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
|
@ -41,6 +55,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
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue