Lines Matching refs:fdt
111 const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int checklen);
113 static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen) in fdt_offset_ptr_w() argument
115 return (void *)(uintptr_t)fdt_offset_ptr(fdt, offset, checklen); in fdt_offset_ptr_w()
118 uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset);
179 int fdt_next_node(const void *fdt, int offset, int *depth);
188 int fdt_first_subnode(const void *fdt, int offset);
201 int fdt_next_subnode(const void *fdt, int offset);
226 #define fdt_for_each_subnode(node, fdt, parent) \ argument
227 for (node = fdt_first_subnode(fdt, parent); \
229 node = fdt_next_subnode(fdt, node))
234 #define fdt_get_header(fdt, field) \ argument
235 (fdt32_ld(&((const struct fdt_header *)(fdt))->field))
236 #define fdt_magic(fdt) (fdt_get_header(fdt, magic)) argument
237 #define fdt_totalsize(fdt) (fdt_get_header(fdt, totalsize)) argument
238 #define fdt_off_dt_struct(fdt) (fdt_get_header(fdt, off_dt_struct)) argument
239 #define fdt_off_dt_strings(fdt) (fdt_get_header(fdt, off_dt_strings)) argument
240 #define fdt_off_mem_rsvmap(fdt) (fdt_get_header(fdt, off_mem_rsvmap)) argument
241 #define fdt_version(fdt) (fdt_get_header(fdt, version)) argument
242 #define fdt_last_comp_version(fdt) (fdt_get_header(fdt, last_comp_version)) argument
243 #define fdt_boot_cpuid_phys(fdt) (fdt_get_header(fdt, boot_cpuid_phys)) argument
244 #define fdt_size_dt_strings(fdt) (fdt_get_header(fdt, size_dt_strings)) argument
245 #define fdt_size_dt_struct(fdt) (fdt_get_header(fdt, size_dt_struct)) argument
248 static inline void fdt_set_##name(void *fdt, uint32_t val) \
250 struct fdt_header *fdth = (struct fdt_header *)fdt; \
270 static inline size_t fdt_header_size(const void *fdt) in fdt_header_size() argument
272 return fdt_header_size_(fdt_version(fdt)); in fdt_header_size()
292 int fdt_check_header(const void *fdt);
313 int fdt_move(const void *fdt, void *buf, int bufsize);
319 int fdt_check_full(const void *fdt, size_t bufsize);
335 const char *fdt_get_string(const void *fdt, int stroffset, int *lenp);
349 const char *fdt_string(const void *fdt, int stroffset);
363 int fdt_find_max_phandle(const void *fdt, uint32_t *phandle);
380 static inline uint32_t fdt_get_max_phandle(const void *fdt) in fdt_get_max_phandle() argument
385 err = fdt_find_max_phandle(fdt, &phandle); in fdt_get_max_phandle()
405 int fdt_generate_phandle(const void *fdt, uint32_t *phandle);
418 int fdt_num_mem_rsv(const void *fdt);
435 int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size);
450 int fdt_subnode_offset_namelen(const void *fdt, int parentoffset,
477 int fdt_subnode_offset(const void *fdt, int parentoffset, const char *name);
489 int fdt_path_offset_namelen(const void *fdt, const char *path, int namelen);
515 int fdt_path_offset(const void *fdt, const char *path);
540 const char *fdt_get_name(const void *fdt, int nodeoffset, int *lenp);
560 int fdt_first_property_offset(const void *fdt, int nodeoffset);
581 int fdt_next_property_offset(const void *fdt, int offset);
605 #define fdt_for_each_property_offset(property, fdt, node) \ argument
606 for (property = fdt_first_property_offset(fdt, node); \
608 property = fdt_next_property_offset(fdt, property))
637 const struct fdt_property *fdt_get_property_by_offset(const void *fdt,
653 const struct fdt_property *fdt_get_property_namelen(const void *fdt,
687 const struct fdt_property *fdt_get_property(const void *fdt, int nodeoffset,
689 static inline struct fdt_property *fdt_get_property_w(void *fdt, int nodeoffset, in fdt_get_property_w() argument
694 fdt_get_property(fdt, nodeoffset, name, lenp); in fdt_get_property_w()
729 const void *fdt_getprop_by_offset(const void *fdt, int offset,
745 const void *fdt_getprop_namelen(const void *fdt, int nodeoffset,
747 static inline void *fdt_getprop_namelen_w(void *fdt, int nodeoffset, in fdt_getprop_namelen_w() argument
751 return (void *)(uintptr_t)fdt_getprop_namelen(fdt, nodeoffset, name, in fdt_getprop_namelen_w()
784 const void *fdt_getprop(const void *fdt, int nodeoffset,
786 static inline void *fdt_getprop_w(void *fdt, int nodeoffset, in fdt_getprop_w() argument
789 return (void *)(uintptr_t)fdt_getprop(fdt, nodeoffset, name, lenp); in fdt_getprop_w()
804 uint32_t fdt_get_phandle(const void *fdt, int nodeoffset);
816 const char *fdt_get_alias_namelen(const void *fdt,
832 const char *fdt_get_alias(const void *fdt, const char *name);
859 int fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen);
891 int fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset,
913 int fdt_node_depth(const void *fdt, int nodeoffset);
936 int fdt_parent_offset(const void *fdt, int nodeoffset);
976 int fdt_node_offset_by_prop_value(const void *fdt, int startoffset,
999 int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle);
1023 int fdt_node_check_compatible(const void *fdt, int nodeoffset,
1060 int fdt_node_offset_by_compatible(const void *fdt, int startoffset,
1087 int fdt_stringlist_count(const void *fdt, int nodeoffset, const char *property);
1108 int fdt_stringlist_search(const void *fdt, int nodeoffset, const char *property,
1135 const char *fdt_stringlist_get(const void *fdt, int nodeoffset,
1172 int fdt_address_cells(const void *fdt, int nodeoffset);
1193 int fdt_size_cells(const void *fdt, int nodeoffset);
1217 int fdt_setprop_inplace_namelen_partial(void *fdt, int nodeoffset,
1252 int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name,
1284 static inline int fdt_setprop_inplace_u32(void *fdt, int nodeoffset, in fdt_setprop_inplace_u32() argument
1288 return fdt_setprop_inplace(fdt, nodeoffset, name, &tmp, sizeof(tmp)); in fdt_setprop_inplace_u32()
1319 static inline int fdt_setprop_inplace_u64(void *fdt, int nodeoffset, in fdt_setprop_inplace_u64() argument
1323 return fdt_setprop_inplace(fdt, nodeoffset, name, &tmp, sizeof(tmp)); in fdt_setprop_inplace_u64()
1331 static inline int fdt_setprop_inplace_cell(void *fdt, int nodeoffset, in fdt_setprop_inplace_cell() argument
1334 return fdt_setprop_inplace_u32(fdt, nodeoffset, name, val); in fdt_setprop_inplace_cell()
1361 int fdt_nop_property(void *fdt, int nodeoffset, const char *name);
1385 int fdt_nop_node(void *fdt, int nodeoffset);
1430 int fdt_resize(void *fdt, void *buf, int bufsize);
1431 int fdt_add_reservemap_entry(void *fdt, uint64_t addr, uint64_t size);
1432 int fdt_finish_reservemap(void *fdt);
1433 int fdt_begin_node(void *fdt, const char *name);
1434 int fdt_property(void *fdt, const char *name, const void *val, int len);
1435 static inline int fdt_property_u32(void *fdt, const char *name, uint32_t val) in fdt_property_u32() argument
1438 return fdt_property(fdt, name, &tmp, sizeof(tmp)); in fdt_property_u32()
1440 static inline int fdt_property_u64(void *fdt, const char *name, uint64_t val) in fdt_property_u64() argument
1443 return fdt_property(fdt, name, &tmp, sizeof(tmp)); in fdt_property_u64()
1447 static inline int fdt_property_cell(void *fdt, const char *name, uint32_t val) in fdt_property_cell() argument
1449 return fdt_property_u32(fdt, name, val); in fdt_property_cell()
1466 int fdt_property_placeholder(void *fdt, const char *name, int len, void **valp);
1468 #define fdt_property_string(fdt, name, str) \ argument
1469 fdt_property(fdt, name, str, strlen(str)+1)
1470 int fdt_end_node(void *fdt);
1471 int fdt_finish(void *fdt);
1478 int fdt_open_into(const void *fdt, void *buf, int bufsize);
1479 int fdt_pack(void *fdt);
1503 int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size);
1527 int fdt_del_mem_rsv(void *fdt, int n);
1553 int fdt_set_name(void *fdt, int nodeoffset, const char *name);
1583 int fdt_setprop(void *fdt, int nodeoffset, const char *name,
1614 int fdt_setprop_placeholder(void *fdt, int nodeoffset, const char *name,
1645 static inline int fdt_setprop_u32(void *fdt, int nodeoffset, const char *name, in fdt_setprop_u32() argument
1649 return fdt_setprop(fdt, nodeoffset, name, &tmp, sizeof(tmp)); in fdt_setprop_u32()
1680 static inline int fdt_setprop_u64(void *fdt, int nodeoffset, const char *name, in fdt_setprop_u64() argument
1684 return fdt_setprop(fdt, nodeoffset, name, &tmp, sizeof(tmp)); in fdt_setprop_u64()
1692 static inline int fdt_setprop_cell(void *fdt, int nodeoffset, const char *name, in fdt_setprop_cell() argument
1695 return fdt_setprop_u32(fdt, nodeoffset, name, val); in fdt_setprop_cell()
1726 #define fdt_setprop_string(fdt, nodeoffset, name, str) \ argument
1727 fdt_setprop((fdt), (nodeoffset), (name), (str), strlen(str)+1)
1756 #define fdt_setprop_empty(fdt, nodeoffset, name) \ argument
1757 fdt_setprop((fdt), (nodeoffset), (name), NULL, 0)
1786 int fdt_appendprop(void *fdt, int nodeoffset, const char *name,
1817 static inline int fdt_appendprop_u32(void *fdt, int nodeoffset, in fdt_appendprop_u32() argument
1821 return fdt_appendprop(fdt, nodeoffset, name, &tmp, sizeof(tmp)); in fdt_appendprop_u32()
1852 static inline int fdt_appendprop_u64(void *fdt, int nodeoffset, in fdt_appendprop_u64() argument
1856 return fdt_appendprop(fdt, nodeoffset, name, &tmp, sizeof(tmp)); in fdt_appendprop_u64()
1864 static inline int fdt_appendprop_cell(void *fdt, int nodeoffset, in fdt_appendprop_cell() argument
1867 return fdt_appendprop_u32(fdt, nodeoffset, name, val); in fdt_appendprop_cell()
1897 #define fdt_appendprop_string(fdt, nodeoffset, name, str) \ argument
1898 fdt_appendprop((fdt), (nodeoffset), (name), (str), strlen(str)+1)
1934 int fdt_appendprop_addrrange(void *fdt, int parent, int nodeoffset,
1959 int fdt_delprop(void *fdt, int nodeoffset, const char *name);
1974 int fdt_add_subnode_namelen(void *fdt, int parentoffset,
2009 int fdt_add_subnode(void *fdt, int parentoffset, const char *name);
2032 int fdt_del_node(void *fdt, int nodeoffset);
2063 int fdt_overlay_apply(void *fdt, void *fdto);