1 /* SPDX-License-Identifier: Intel */
3 * Access to binman information at runtime
5 * Copyright 2019 Google LLC
6 * Written by Simon Glass <sjg@chromium.org>
13 *struct binman_entry - information about a binman entry
15 * @image_pos: Position of entry in the image
16 * @size: Size of entry
24 * binman_set_rom_offset() - Set the ROM memory-map offset
26 * @rom_offset: Offset from an image_pos to the memory-mapped address. This
27 * tells binman that ROM image_pos x can be addressed at rom_offset + x
29 void binman_set_rom_offset(int rom_offset);
32 * binman_entry_find() - Find a binman symbol
34 * This searches the binman information in the device tree for a symbol of the
37 * @name: Path to entry to examine (e.g. "/read-only/u-boot")
38 * @entry: Returns information about the entry
39 * @return 0 if OK, -ENOENT if the path is not found, other -ve value if the
40 * binman information is invalid (missing image-pos or size)
42 int binman_entry_find(const char *name, struct binman_entry *entry);
45 * binman_init() - Set up the binman symbol information
47 * This locates the binary symbol information in the device tree ready for use
49 * @return 0 if OK, -ENOMEM if out of memory, -EINVAL if there is no binman node
51 int binman_init(void);