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:
Leif Lindholm authored and Daniel Kiper committed 2018-06-23 21:40:55 +02:00
1 parent 0083541593
commit e93fd6b776
2 files changed
+15 -15

No files matched your search

+5
View File
@@ -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) \