Wedson Almeida Filho | 987c0ff | 2018-06-20 16:34:38 +0100 | [diff] [blame^] | 1 | #ifndef _FDT_H |
| 2 | #define _FDT_H |
| 3 | |
| 4 | #include <stdbool.h> |
| 5 | #include <stdint.h> |
| 6 | |
| 7 | struct fdt_node { |
| 8 | /* TODO: What do we need here? */ |
| 9 | const struct fdt_header *hdr; |
| 10 | const char *begin; |
| 11 | const char *end; |
| 12 | const char *strs; |
| 13 | }; |
| 14 | |
| 15 | void fdt_dump(struct fdt_header *hdr); |
| 16 | void fdt_root_node(struct fdt_node *node, const struct fdt_header *hdr); |
| 17 | bool fdt_find_child(struct fdt_node *node, const char *child); |
| 18 | bool fdt_read_property(const struct fdt_node *node, const char *name, |
| 19 | const char **buf, uint32_t *size); |
| 20 | |
| 21 | void fdt_add_mem_reservation(struct fdt_header *hdr, uint64_t addr, uint64_t len); |
| 22 | |
| 23 | #endif /* _FDT_H */ |