diff options
author | Tom Rini <trini@konsulko.com> | 2019-08-19 09:21:46 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-08-19 09:21:46 -0400 |
commit | 0ed2e2d825ac70d99ef89e3bb745979a22e2972e (patch) | |
tree | 1ae055f2a6243c62af81ac0ce31fc49db3f8f2e2 /include/cbfs.h | |
parent | 81fed78c0a59af0d5698b13608eb4d26be84f397 (diff) | |
parent | d117f917bfd2ccf4eaf90bddfa256501a554b1a4 (diff) |
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
- QEMU build warning fix when CONFIG_DISTRO_DEFAULTS=n
- Small fixes on x86 reST docs
- Allow CBFS to be used in SPL
- Remove x86 specific GD flags
Diffstat (limited to 'include/cbfs.h')
-rw-r--r-- | include/cbfs.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/cbfs.h b/include/cbfs.h index b8d1dabbf63..6d4c4d4b065 100644 --- a/include/cbfs.h +++ b/include/cbfs.h @@ -91,6 +91,13 @@ extern enum cbfs_result file_cbfs_result; const char *file_cbfs_error(void); /** + * cbfs_get_result() - Get the result of the last CBFS operation + * + *@return last result + */ +enum cbfs_result cbfs_get_result(void); + +/** * file_cbfs_init() - Initialize the CBFS driver and load metadata into RAM. * * @end_of_rom: Points to the end of the ROM the CBFS should be read @@ -128,6 +135,28 @@ void file_cbfs_get_next(const struct cbfs_cachenode **file); */ const struct cbfs_cachenode *file_cbfs_find(const char *name); +struct cbfs_priv *priv; + +/** + * cbfs_find_file() - Find a file in a given CBFS + * + * @cbfs: CBFS to look in (use cbfs_init_mem() to set it up) + * @name: Filename to look for + * @return pointer to CBFS node if found, else NULL + */ +const struct cbfs_cachenode *cbfs_find_file(struct cbfs_priv *cbfs, + const char *name); + +/** + * cbfs_init_mem() - Set up a new CBFS + * + * @base: Base address of CBFS + * @size: Size of CBFS in bytes + * @cbfsp: Returns a pointer to CBFS on success + * @return 0 if OK, -ve on error + */ +int cbfs_init_mem(ulong base, ulong size, struct cbfs_priv **privp); + /***************************************************************************/ /* All of the functions below can be used without first initializing CBFS. */ |