blob: fb23c8e0f0ee1ac8ba7bafb252b0730ceae53992 [file] [log] [blame]
Wedson Almeida Filho987c0ff2018-06-20 16:34:38 +01001#ifndef _FDT_H
2#define _FDT_H
3
4#include <stdbool.h>
5#include <stdint.h>
6
7struct 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
15void fdt_dump(struct fdt_header *hdr);
16void fdt_root_node(struct fdt_node *node, const struct fdt_header *hdr);
17bool fdt_find_child(struct fdt_node *node, const char *child);
18bool fdt_read_property(const struct fdt_node *node, const char *name,
19 const char **buf, uint32_t *size);
20
21void fdt_add_mem_reservation(struct fdt_header *hdr, uint64_t addr, uint64_t len);
22
23#endif /* _FDT_H */