colibri_imx6: fix video stdout in default environment
[oweals/u-boot.git] / include / binman.h
1 /* SPDX-License-Identifier: Intel */
2 /*
3  * Access to binman information at runtime
4  *
5  * Copyright 2019 Google LLC
6  * Written by Simon Glass <sjg@chromium.org>
7  */
8
9 #ifndef _BINMAN_H_
10 #define _BINMAN_H_
11
12 /**
13  *struct binman_entry - information about a binman entry
14  *
15  * @image_pos: Position of entry in the image
16  * @size: Size of entry
17  */
18 struct binman_entry {
19         u32 image_pos;
20         u32 size;
21 };
22
23 /**
24  * binman_entry_find() - Find a binman symbol
25  *
26  * This searches the binman information in the device tree for a symbol of the
27  * given name
28  *
29  * @name: Path to entry to examine (e.g. "/read-only/u-boot")
30  * @entry: Returns information about the entry
31  * @return 0 if OK, -ENOENT if the path is not found, other -ve value if the
32  *      binman information is invalid (missing image-pos or size)
33  */
34 int binman_entry_find(const char *name, struct binman_entry *entry);
35
36 /**
37  * binman_init() - Set up the binman symbol information
38  *
39  * This locates the binary symbol information in the device tree ready for use
40  *
41  * @return 0 if OK, -ENOMEM if out of memory, -EINVAL if there is no binman node
42  */
43 int binman_init(void);
44
45 #endif