fdt: Move prop_entry_size to fdt.h
To be able to resuse the prop_entry_size macro, move it to <grub/fdt.h> and rename it grub_fdt_prop_entry_size. Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
0083541593
commit
e93fd6b776
2 changed files with 15 additions and 15 deletions
|
@ -50,6 +50,11 @@ struct grub_fdt_empty_tree {
|
|||
|
||||
#define GRUB_FDT_EMPTY_TREE_SZ sizeof (struct grub_fdt_empty_tree)
|
||||
|
||||
/* Size needed by a property entry: 1 token (FDT_PROPERTY), plus len and nameoff
|
||||
fields, plus the property value, plus padding if needed. */
|
||||
#define grub_fdt_prop_entry_size(prop_len) \
|
||||
(3 * sizeof(grub_uint32_t) + ALIGN_UP(prop_len, sizeof(grub_uint32_t)))
|
||||
|
||||
#define grub_fdt_get_header(fdt, field) \
|
||||
grub_be_to_cpu32(((const grub_fdt_header_t *)(fdt))->field)
|
||||
#define grub_fdt_set_header(fdt, field, value) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue