Lines Matching defs:fdt
31 #include <fdt.h>
37 int fdt_check_header(const void *fdt)
39 if (fdt_magic(fdt) == FDT_MAGIC) {
41 if (fdt_version(fdt) < FDT_FIRST_SUPPORTED_VERSION)
43 if (fdt_last_comp_version(fdt) > FDT_LAST_SUPPORTED_VERSION)
45 } else if (fdt_magic(fdt) == FDT_SW_MAGIC) {
47 if (fdt_size_dt_struct(fdt) == 0)
56 const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int len)
60 if (fdt_version(fdt) >= 0x11)
62 || ((offset + len) > fdt_size_dt_struct(fdt)))
65 p = _fdt_offset_ptr(fdt, offset);
72 uint32_t fdt_next_tag(const void *fdt, int startoffset, int *nextoffset)
80 tagp = fdt_offset_ptr(fdt, offset, FDT_TAGSIZE);
91 p = fdt_offset_ptr(fdt, offset++, 1);
98 lenp = fdt_offset_ptr(fdt, offset, sizeof(*lenp));
115 if (!fdt_offset_ptr(fdt, startoffset, offset - startoffset))
122 int _fdt_check_node_offset(const void *fdt, int offset)
125 || (fdt_next_tag(fdt, offset, &offset) != FDT_BEGIN_NODE))
131 int _fdt_check_prop_offset(const void *fdt, int offset)
134 || (fdt_next_tag(fdt, offset, &offset) != FDT_PROP))
140 int fdt_next_node(const void *fdt, int offset, int *depth)
146 if ((nextoffset = _fdt_check_node_offset(fdt, offset)) < 0)
151 tag = fdt_next_tag(fdt, offset, &nextoffset);
192 int fdt_move(const void *fdt, void *buf, int bufsize)
194 FDT_CHECK_HEADER(fdt);
196 if (fdt_totalsize(fdt) > bufsize)
199 memmove(buf, fdt, fdt_totalsize(fdt));