/scripts/dtc/libfdt/ |
H A D | libfdt_internal.h | 53 #include <fdt.h> 58 #define FDT_CHECK_HEADER(fdt) \ 61 if ((err = fdt_check_header(fdt)) != 0) \ 65 uint32_t _fdt_next_tag(const void *fdt, int startoffset, int *nextoffset); 66 int _fdt_check_node_offset(const void *fdt, int offset); 68 int _fdt_node_end_offset(void *fdt, int nodeoffset); 70 static inline const void *_fdt_offset_ptr(const void *fdt, int offset) argument 72 return (const char *)fdt + fdt_off_dt_struct(fdt) + offset; 75 static inline void *_fdt_offset_ptr_w(void *fdt, in argument 80 _fdt_mem_rsv(const void *fdt, int n) argument 88 _fdt_mem_rsv_w(void *fdt, int n) argument [all...] |
H A D | libfdt.h | 55 #include <fdt.h> 125 const void *fdt_offset_ptr(const void *fdt, int offset, int checklen); 126 static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen) argument 128 return (void *)(uintptr_t)fdt_offset_ptr(fdt, offset, checklen); 131 uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset); 137 int fdt_next_node(const void *fdt, int offset, int *depth); 143 #define fdt_get_header(fdt, field) \ 144 (fdt32_to_cpu(((const struct fdt_header *)(fdt))->field)) 145 #define fdt_magic(fdt) (fdt_get_header(fdt, magi 374 fdt_get_property_w(void *fdt, int nodeoffset, const char *name, int *lenp) argument 411 fdt_getprop_w(void *fdt, int nodeoffset, const char *name, int *lenp) argument 723 fdt_setprop_inplace_cell(void *fdt, int nodeoffset, const char *name, uint32_t val) argument 789 fdt_property_cell(void *fdt, const char *name, uint32_t val) argument 939 fdt_setprop_cell(void *fdt, int nodeoffset, const char *name, uint32_t val) argument [all...] |
H A D | fdt_rw.c | 53 #include <fdt.h> 58 static int _fdt_blocks_misordered(const void *fdt, argument 61 return (fdt_off_mem_rsvmap(fdt) < FDT_ALIGN(sizeof(struct fdt_header), 8)) 62 || (fdt_off_dt_struct(fdt) < 63 (fdt_off_mem_rsvmap(fdt) + mem_rsv_size)) 64 || (fdt_off_dt_strings(fdt) < 65 (fdt_off_dt_struct(fdt) + struct_size)) 66 || (fdt_totalsize(fdt) < 67 (fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt))); 70 _fdt_rw_check_header(void *fdt) argument 92 _fdt_data_size(void *fdt) argument 97 _fdt_splice(void *fdt, void *splicepoint, int oldlen, int newlen) argument 110 _fdt_splice_mem_rsv(void *fdt, struct fdt_reserve_entry *p, int oldn, int newn) argument 123 _fdt_splice_struct(void *fdt, void *p, int oldlen, int newlen) argument 137 _fdt_splice_string(void *fdt, int newlen) argument 150 _fdt_find_add_string(void *fdt, const char *s) argument 172 fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size) argument 189 fdt_del_mem_rsv(void *fdt, int n) argument 205 _fdt_resize_property(void *fdt, int nodeoffset, const char *name, int len, struct fdt_property **prop) argument 223 _fdt_add_property(void *fdt, int nodeoffset, const char *name, int len, struct fdt_property **prop) argument 251 fdt_set_name(void *fdt, int nodeoffset, const char *name) argument 274 fdt_setprop(void *fdt, int nodeoffset, const char *name, const void *val, int len) argument 292 fdt_delprop(void *fdt, int nodeoffset, const char *name) argument 307 fdt_add_subnode_namelen(void *fdt, int parentoffset, const char *name, int namelen) argument 348 fdt_add_subnode(void *fdt, int parentoffset, const char *name) argument 353 fdt_del_node(void *fdt, int nodeoffset) argument 389 fdt_open_into(const void *fdt, void *buf, int bufsize) argument 451 fdt_pack(void *fdt) argument [all...] |
H A D | fdt_sw.c | 53 #include <fdt.h> 58 static int _fdt_sw_check_header(void *fdt) argument 60 if (fdt_magic(fdt) != FDT_SW_MAGIC) 66 #define FDT_SW_CHECK_HEADER(fdt) \ 69 if ((err = _fdt_sw_check_header(fdt)) != 0) \ 73 static void *_fdt_grab_space(void *fdt, int len) argument 75 int offset = fdt_size_dt_struct(fdt); 78 spaceleft = fdt_totalsize(fdt) - fdt_off_dt_struct(fdt) 79 - fdt_size_dt_strings(fdt); 90 void *fdt = buf; local 110 fdt_add_reservemap_entry(void *fdt, uint64_t addr, uint64_t size) argument 133 fdt_finish_reservemap(void *fdt) argument 138 fdt_begin_node(void *fdt, const char *name) argument 154 fdt_end_node(void *fdt) argument 168 _fdt_find_add_string(void *fdt, const char *s) argument 191 fdt_property(void *fdt, const char *name, const void *val, int len) argument 213 fdt_finish(void *fdt) argument [all...] |
H A D | fdt.c | 53 #include <fdt.h> 58 int fdt_check_header(const void *fdt) argument 60 if (fdt_magic(fdt) == FDT_MAGIC) { 62 if (fdt_version(fdt) < FDT_FIRST_SUPPORTED_VERSION) 64 if (fdt_last_comp_version(fdt) > FDT_LAST_SUPPORTED_VERSION) 66 } else if (fdt_magic(fdt) == FDT_SW_MAGIC) { 68 if (fdt_size_dt_struct(fdt) == 0) 77 const void *fdt_offset_ptr(const void *fdt, int offset, int len) argument 81 if (fdt_version(fdt) >= 0x11) 83 || ((offset + len) > fdt_size_dt_struct(fdt))) 93 fdt_next_tag(const void *fdt, int offset, int *nextoffset) argument 132 _fdt_check_node_offset(const void *fdt, int offset) argument 141 fdt_next_node(const void *fdt, int offset, int *depth) argument 192 fdt_move(const void *fdt, void *buf, int bufsize) argument [all...] |
H A D | fdt_ro.c | 53 #include <fdt.h> 58 static int _fdt_nodename_eq(const void *fdt, int offset, argument 61 const char *p = fdt_offset_ptr(fdt, offset + FDT_TAGSIZE, len+1); 78 const char *fdt_string(const void *fdt, int stroffset) argument 80 return (const char *)fdt + fdt_off_dt_strings(fdt) + stroffset; 83 int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size) argument 85 FDT_CHECK_HEADER(fdt); 86 *address = fdt64_to_cpu(_fdt_mem_rsv(fdt, n)->address); 87 *size = fdt64_to_cpu(_fdt_mem_rsv(fdt, 91 fdt_num_mem_rsv(const void *fdt) argument 100 fdt_subnode_offset_namelen(const void *fdt, int offset, const char *name, int namelen) argument 123 fdt_subnode_offset(const void *fdt, int parentoffset, const char *name) argument 129 fdt_path_offset(const void *fdt, const char *path) argument 161 fdt_get_name(const void *fdt, int nodeoffset, int *len) argument 181 fdt_get_property(const void *fdt, int nodeoffset, const char *name, int *lenp) argument 244 fdt_getprop(const void *fdt, int nodeoffset, const char *name, int *lenp) argument 256 fdt_get_phandle(const void *fdt, int nodeoffset) argument 268 fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen) argument 321 fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset, int supernodedepth, int *nodedepth) argument 357 fdt_node_depth(const void *fdt, int nodeoffset) argument 368 fdt_parent_offset(const void *fdt, int nodeoffset) argument 378 fdt_node_offset_by_prop_value(const void *fdt, int startoffset, const char *propname, const void *propval, int proplen) argument 405 fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle) argument 431 fdt_node_check_compatible(const void *fdt, int nodeoffset, const char *compatible) argument 446 fdt_node_offset_by_compatible(const void *fdt, int startoffset, const char *compatible) argument [all...] |
H A D | fdt_wip.c | 53 #include <fdt.h> 58 int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name, argument 64 propval = fdt_getprop_w(fdt, nodeoffset, name, &proplen); 83 int fdt_nop_property(void *fdt, int nodeoffset, const char *name) argument 88 prop = fdt_get_property_w(fdt, nodeoffset, name, &len); 97 int _fdt_node_end_offset(void *fdt, int nodeoffset) argument 103 tag = fdt_next_tag(fdt, nodeoffset, &nextoffset); 108 tag = fdt_next_tag(fdt, offset, &nextoffset); 134 int fdt_nop_node(void *fdt, int nodeoffset) argument 138 endoffset = _fdt_node_end_offset(fdt, nodeoffse [all...] |
H A D | fdt_strerror.c | 53 #include <fdt.h>
|
/scripts/dtc/ |
H A D | flattree.c | 334 static void make_fdt_header(struct fdt_header *fdt, argument 343 memset(fdt, 0xff, sizeof(*fdt)); 345 fdt->magic = cpu_to_fdt32(FDT_MAGIC); 346 fdt->version = cpu_to_fdt32(vi->version); 347 fdt->last_comp_version = cpu_to_fdt32(vi->last_comp_version); 352 fdt->off_mem_rsvmap = cpu_to_fdt32(reserve_off); 353 fdt->off_dt_struct = cpu_to_fdt32(reserve_off + reservesize); 354 fdt->off_dt_strings = cpu_to_fdt32(reserve_off + reservesize 356 fdt 374 struct fdt_header fdt; local 810 struct fdt_header *fdt; local [all...] |
H A D | dtc.h | 35 #include <fdt.h>
|