RTEMS 7.0-rc1
Loading...
Searching...
No Matches
libfdt.h
1/* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) */
2#ifndef LIBFDT_H
3#define LIBFDT_H
4/*
5 * libfdt - Flat Device Tree manipulation
6 * Copyright (C) 2006 David Gibson, IBM Corporation.
7 */
8
9#include <libfdt_env.h>
10#include <fdt.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#define FDT_FIRST_SUPPORTED_VERSION 0x02
17#define FDT_LAST_COMPATIBLE_VERSION 0x10
18#define FDT_LAST_SUPPORTED_VERSION 0x11
19
20/* Error codes: informative error codes */
21#define FDT_ERR_NOTFOUND 1
22 /* FDT_ERR_NOTFOUND: The requested node or property does not exist */
23#define FDT_ERR_EXISTS 2
24 /* FDT_ERR_EXISTS: Attempted to create a node or property which
25 * already exists */
26#define FDT_ERR_NOSPACE 3
27 /* FDT_ERR_NOSPACE: Operation needed to expand the device
28 * tree, but its buffer did not have sufficient space to
29 * contain the expanded tree. Use fdt_open_into() to move the
30 * device tree to a buffer with more space. */
31
32/* Error codes: codes for bad parameters */
33#define FDT_ERR_BADOFFSET 4
34 /* FDT_ERR_BADOFFSET: Function was passed a structure block
35 * offset which is out-of-bounds, or which points to an
36 * unsuitable part of the structure for the operation. */
37#define FDT_ERR_BADPATH 5
38 /* FDT_ERR_BADPATH: Function was passed a badly formatted path
39 * (e.g. missing a leading / for a function which requires an
40 * absolute path) */
41#define FDT_ERR_BADPHANDLE 6
42 /* FDT_ERR_BADPHANDLE: Function was passed an invalid phandle.
43 * This can be caused either by an invalid phandle property
44 * length, or the phandle value was either 0 or -1, which are
45 * not permitted. */
46#define FDT_ERR_BADSTATE 7
47 /* FDT_ERR_BADSTATE: Function was passed an incomplete device
48 * tree created by the sequential-write functions, which is
49 * not sufficiently complete for the requested operation. */
50
51/* Error codes: codes for bad device tree blobs */
52#define FDT_ERR_TRUNCATED 8
53 /* FDT_ERR_TRUNCATED: FDT or a sub-block is improperly
54 * terminated (overflows, goes outside allowed bounds, or
55 * isn't properly terminated). */
56#define FDT_ERR_BADMAGIC 9
57 /* FDT_ERR_BADMAGIC: Given "device tree" appears not to be a
58 * device tree at all - it is missing the flattened device
59 * tree magic number. */
60#define FDT_ERR_BADVERSION 10
61 /* FDT_ERR_BADVERSION: Given device tree has a version which
62 * can't be handled by the requested operation. For
63 * read-write functions, this may mean that fdt_open_into() is
64 * required to convert the tree to the expected version. */
65#define FDT_ERR_BADSTRUCTURE 11
66 /* FDT_ERR_BADSTRUCTURE: Given device tree has a corrupt
67 * structure block or other serious error (e.g. misnested
68 * nodes, or subnodes preceding properties). */
69#define FDT_ERR_BADLAYOUT 12
70 /* FDT_ERR_BADLAYOUT: For read-write functions, the given
71 * device tree has it's sub-blocks in an order that the
72 * function can't handle (memory reserve map, then structure,
73 * then strings). Use fdt_open_into() to reorganize the tree
74 * into a form suitable for the read-write operations. */
75
76/* "Can't happen" error indicating a bug in libfdt */
77#define FDT_ERR_INTERNAL 13
78 /* FDT_ERR_INTERNAL: libfdt has failed an internal assertion.
79 * Should never be returned, if it is, it indicates a bug in
80 * libfdt itself. */
81
82/* Errors in device tree content */
83#define FDT_ERR_BADNCELLS 14
84 /* FDT_ERR_BADNCELLS: Device tree has a #address-cells, #size-cells
85 * or similar property with a bad format or value */
86
87#define FDT_ERR_BADVALUE 15
88 /* FDT_ERR_BADVALUE: Device tree has a property with an unexpected
89 * value. For example: a property expected to contain a string list
90 * is not NUL-terminated within the length of its value. */
91
92#define FDT_ERR_BADOVERLAY 16
93 /* FDT_ERR_BADOVERLAY: The device tree overlay, while
94 * correctly structured, cannot be applied due to some
95 * unexpected or missing value, property or node. */
96
97#define FDT_ERR_NOPHANDLES 17
98 /* FDT_ERR_NOPHANDLES: The device tree doesn't have any
99 * phandle available anymore without causing an overflow */
100
101#define FDT_ERR_BADFLAGS 18
102 /* FDT_ERR_BADFLAGS: The function was passed a flags field that
103 * contains invalid flags or an invalid combination of flags. */
104
105#define FDT_ERR_ALIGNMENT 19
106 /* FDT_ERR_ALIGNMENT: The device tree base address is not 8-byte
107 * aligned. */
108
109#define FDT_ERR_MAX 19
110
111/* constants */
112#define FDT_MAX_PHANDLE 0xfffffffe
113 /* Valid values for phandles range from 1 to 2^32-2. */
114
115/**********************************************************************/
116/* Low-level functions (you probably don't need these) */
117/**********************************************************************/
118
119#ifndef SWIG /* This function is not useful in Python */
120const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int checklen);
121#endif
122static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen)
123{
124 return (void *)(uintptr_t)fdt_offset_ptr(fdt, offset, checklen);
125}
126
127uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset);
128
129/*
130 * External helpers to access words from a device tree blob. They're built
131 * to work even with unaligned pointers on platforms (such as ARMv5) that don't
132 * like unaligned loads and stores.
133 */
134static inline uint16_t fdt16_ld(const fdt16_t *p)
135{
136 const uint8_t *bp = (const uint8_t *)p;
137
138 return ((uint16_t)bp[0] << 8) | bp[1];
139}
140
141static inline uint32_t fdt32_ld(const fdt32_t *p)
142{
143 const uint8_t *bp = (const uint8_t *)p;
144
145 return ((uint32_t)bp[0] << 24)
146 | ((uint32_t)bp[1] << 16)
147 | ((uint32_t)bp[2] << 8)
148 | bp[3];
149}
150
151static inline void fdt32_st(void *property, uint32_t value)
152{
153 uint8_t *bp = (uint8_t *)property;
154
155 bp[0] = value >> 24;
156 bp[1] = (value >> 16) & 0xff;
157 bp[2] = (value >> 8) & 0xff;
158 bp[3] = value & 0xff;
159}
160
161static inline uint64_t fdt64_ld(const fdt64_t *p)
162{
163 const uint8_t *bp = (const uint8_t *)p;
164
165 return ((uint64_t)bp[0] << 56)
166 | ((uint64_t)bp[1] << 48)
167 | ((uint64_t)bp[2] << 40)
168 | ((uint64_t)bp[3] << 32)
169 | ((uint64_t)bp[4] << 24)
170 | ((uint64_t)bp[5] << 16)
171 | ((uint64_t)bp[6] << 8)
172 | bp[7];
173}
174
175static inline void fdt64_st(void *property, uint64_t value)
176{
177 uint8_t *bp = (uint8_t *)property;
178
179 bp[0] = value >> 56;
180 bp[1] = (value >> 48) & 0xff;
181 bp[2] = (value >> 40) & 0xff;
182 bp[3] = (value >> 32) & 0xff;
183 bp[4] = (value >> 24) & 0xff;
184 bp[5] = (value >> 16) & 0xff;
185 bp[6] = (value >> 8) & 0xff;
186 bp[7] = value & 0xff;
187}
188
189/**********************************************************************/
190/* Traversal functions */
191/**********************************************************************/
192
193int fdt_next_node(const void *fdt, int offset, int *depth);
194
202int fdt_first_subnode(const void *fdt, int offset);
203
215int fdt_next_subnode(const void *fdt, int offset);
216
239#define fdt_for_each_subnode(node, fdt, parent) \
240 for (node = fdt_first_subnode(fdt, parent); \
241 node >= 0; \
242 node = fdt_next_subnode(fdt, node))
243
244/**********************************************************************/
245/* General functions */
246/**********************************************************************/
247#define fdt_get_header(fdt, field) \
248 (fdt32_ld(&((const struct fdt_header *)(fdt))->field))
249#define fdt_magic(fdt) (fdt_get_header(fdt, magic))
250#define fdt_totalsize(fdt) (fdt_get_header(fdt, totalsize))
251#define fdt_off_dt_struct(fdt) (fdt_get_header(fdt, off_dt_struct))
252#define fdt_off_dt_strings(fdt) (fdt_get_header(fdt, off_dt_strings))
253#define fdt_off_mem_rsvmap(fdt) (fdt_get_header(fdt, off_mem_rsvmap))
254#define fdt_version(fdt) (fdt_get_header(fdt, version))
255#define fdt_last_comp_version(fdt) (fdt_get_header(fdt, last_comp_version))
256#define fdt_boot_cpuid_phys(fdt) (fdt_get_header(fdt, boot_cpuid_phys))
257#define fdt_size_dt_strings(fdt) (fdt_get_header(fdt, size_dt_strings))
258#define fdt_size_dt_struct(fdt) (fdt_get_header(fdt, size_dt_struct))
259
260#define fdt_set_hdr_(name) \
261 static inline void fdt_set_##name(void *fdt, uint32_t val) \
262 { \
263 struct fdt_header *fdth = (struct fdt_header *)fdt; \
264 fdth->name = cpu_to_fdt32(val); \
265 }
266fdt_set_hdr_(magic)
267fdt_set_hdr_(totalsize)
268fdt_set_hdr_(off_dt_struct)
269fdt_set_hdr_(off_dt_strings)
270fdt_set_hdr_(off_mem_rsvmap)
271fdt_set_hdr_(version)
272fdt_set_hdr_(last_comp_version)
273fdt_set_hdr_(boot_cpuid_phys)
274fdt_set_hdr_(size_dt_strings)
275fdt_set_hdr_(size_dt_struct)
276#undef fdt_set_hdr_
277
284size_t fdt_header_size(const void *fdt);
285
292size_t fdt_header_size_(uint32_t version);
293
310int fdt_check_header(const void *fdt);
311
331int fdt_move(const void *fdt, void *buf, int bufsize);
332
333/**********************************************************************/
334/* Read-only functions */
335/**********************************************************************/
336
337int fdt_check_full(const void *fdt, size_t bufsize);
338
353const char *fdt_get_string(const void *fdt, int stroffset, int *lenp);
354
367const char *fdt_string(const void *fdt, int stroffset);
368
381int fdt_find_max_phandle(const void *fdt, uint32_t *phandle);
382
398static inline uint32_t fdt_get_max_phandle(const void *fdt)
399{
400 uint32_t phandle;
401 int err;
402
403 err = fdt_find_max_phandle(fdt, &phandle);
404 if (err < 0)
405 return (uint32_t)-1;
406
407 return phandle;
408}
409
422int fdt_generate_phandle(const void *fdt, uint32_t *phandle);
423
435int fdt_num_mem_rsv(const void *fdt);
436
454int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size);
455
470#ifndef SWIG /* Not available in Python */
471int fdt_subnode_offset_namelen(const void *fdt, int parentoffset,
472 const char *name, int namelen);
473#endif
498int fdt_subnode_offset(const void *fdt, int parentoffset, const char *name);
499
511#ifndef SWIG /* Not available in Python */
512int fdt_path_offset_namelen(const void *fdt, const char *path, int namelen);
513#endif
514
563int fdt_path_offset(const void *fdt, const char *path);
564
588const char *fdt_get_name(const void *fdt, int nodeoffset, int *lenp);
589
608int fdt_first_property_offset(const void *fdt, int nodeoffset);
609
629int fdt_next_property_offset(const void *fdt, int offset);
630
653#define fdt_for_each_property_offset(property, fdt, node) \
654 for (property = fdt_first_property_offset(fdt, node); \
655 property >= 0; \
656 property = fdt_next_property_offset(fdt, property))
657
685const struct fdt_property *fdt_get_property_by_offset(const void *fdt,
686 int offset,
687 int *lenp);
688static inline struct fdt_property *fdt_get_property_by_offset_w(void *fdt,
689 int offset,
690 int *lenp)
691{
692 return (struct fdt_property *)(uintptr_t)
693 fdt_get_property_by_offset(fdt, offset, lenp);
694}
695
710#ifndef SWIG /* Not available in Python */
711const struct fdt_property *fdt_get_property_namelen(const void *fdt,
712 int nodeoffset,
713 const char *name,
714 int namelen, int *lenp);
715static inline struct fdt_property *
716fdt_get_property_namelen_w(void *fdt, int nodeoffset, const char *name,
717 int namelen, int *lenp)
718{
719 return (struct fdt_property *)(uintptr_t)fdt_get_property_namelen(
720 fdt, nodeoffset, name, namelen, lenp);
721}
722#endif
723
752const struct fdt_property *fdt_get_property(const void *fdt, int nodeoffset,
753 const char *name, int *lenp);
754static inline struct fdt_property *fdt_get_property_w(void *fdt, int nodeoffset,
755 const char *name,
756 int *lenp)
757{
758 return (struct fdt_property *)(uintptr_t)
759 fdt_get_property(fdt, nodeoffset, name, lenp);
760}
761
793#ifndef SWIG /* This function is not useful in Python */
794const void *fdt_getprop_by_offset(const void *fdt, int offset,
795 const char **namep, int *lenp);
796#endif
797
811#ifndef SWIG /* Not available in Python */
812const void *fdt_getprop_namelen(const void *fdt, int nodeoffset,
813 const char *name, int namelen, int *lenp);
814static inline void *fdt_getprop_namelen_w(void *fdt, int nodeoffset,
815 const char *name, int namelen,
816 int *lenp)
817{
818 return (void *)(uintptr_t)fdt_getprop_namelen(fdt, nodeoffset, name,
819 namelen, lenp);
820}
821#endif
822
851const void *fdt_getprop(const void *fdt, int nodeoffset,
852 const char *name, int *lenp);
853static inline void *fdt_getprop_w(void *fdt, int nodeoffset,
854 const char *name, int *lenp)
855{
856 return (void *)(uintptr_t)fdt_getprop(fdt, nodeoffset, name, lenp);
857}
858
871uint32_t fdt_get_phandle(const void *fdt, int nodeoffset);
872
885#ifndef SWIG /* Not available in Python */
886const char *fdt_get_alias_namelen(const void *fdt,
887 const char *name, int namelen);
888#endif
889
902const char *fdt_get_alias(const void *fdt, const char *name);
903
916#ifndef SWIG /* Not available in Python */
917const char *fdt_get_symbol_namelen(const void *fdt,
918 const char *name, int namelen);
919#endif
920
938const char *fdt_get_symbol(const void *fdt, const char *name);
939
965int fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen);
966
997int fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset,
998 int supernodedepth, int *nodedepth);
999
1019int fdt_node_depth(const void *fdt, int nodeoffset);
1020
1042int fdt_parent_offset(const void *fdt, int nodeoffset);
1043
1082int fdt_node_offset_by_prop_value(const void *fdt, int startoffset,
1083 const char *propname,
1084 const void *propval, int proplen);
1085
1105int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle);
1106
1128int fdt_node_check_compatible(const void *fdt, int nodeoffset,
1129 const char *compatible);
1130
1165int fdt_node_offset_by_compatible(const void *fdt, int startoffset,
1166 const char *compatible);
1167
1180int fdt_stringlist_contains(const char *strlist, int listlen, const char *str);
1181
1193int fdt_stringlist_count(const void *fdt, int nodeoffset, const char *property);
1194
1214int fdt_stringlist_search(const void *fdt, int nodeoffset, const char *property,
1215 const char *string);
1216
1241const char *fdt_stringlist_get(const void *fdt, int nodeoffset,
1242 const char *property, int index,
1243 int *lenp);
1244
1245/**********************************************************************/
1246/* Read-only functions (addressing related) */
1247/**********************************************************************/
1248
1258#define FDT_MAX_NCELLS 4
1259
1278int fdt_address_cells(const void *fdt, int nodeoffset);
1279
1299int fdt_size_cells(const void *fdt, int nodeoffset);
1300
1301
1302/**********************************************************************/
1303/* Write-in-place functions */
1304/**********************************************************************/
1305
1324#ifndef SWIG /* Not available in Python */
1325int fdt_setprop_inplace_namelen_partial(void *fdt, int nodeoffset,
1326 const char *name, int namelen,
1327 uint32_t idx, const void *val,
1328 int len);
1329#endif
1330
1359#ifndef SWIG /* Not available in Python */
1360int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name,
1361 const void *val, int len);
1362#endif
1363
1392static inline int fdt_setprop_inplace_u32(void *fdt, int nodeoffset,
1393 const char *name, uint32_t val)
1394{
1395 fdt32_t tmp = cpu_to_fdt32(val);
1396 return fdt_setprop_inplace(fdt, nodeoffset, name, &tmp, sizeof(tmp));
1397}
1398
1427static inline int fdt_setprop_inplace_u64(void *fdt, int nodeoffset,
1428 const char *name, uint64_t val)
1429{
1430 fdt64_t tmp = cpu_to_fdt64(val);
1431 return fdt_setprop_inplace(fdt, nodeoffset, name, &tmp, sizeof(tmp));
1432}
1433
1444static inline int fdt_setprop_inplace_cell(void *fdt, int nodeoffset,
1445 const char *name, uint32_t val)
1446{
1447 return fdt_setprop_inplace_u32(fdt, nodeoffset, name, val);
1448}
1449
1474int fdt_nop_property(void *fdt, int nodeoffset, const char *name);
1475
1498int fdt_nop_node(void *fdt, int nodeoffset);
1499
1500/**********************************************************************/
1501/* Sequential write functions */
1502/**********************************************************************/
1503
1504/* fdt_create_with_flags flags */
1505#define FDT_CREATE_FLAG_NO_NAME_DEDUP 0x1
1506 /* FDT_CREATE_FLAG_NO_NAME_DEDUP: Do not try to de-duplicate property
1507 * names in the fdt. This can result in faster creation times, but
1508 * a larger fdt. */
1509
1510#define FDT_CREATE_FLAGS_ALL (FDT_CREATE_FLAG_NO_NAME_DEDUP)
1511
1528int fdt_create_with_flags(void *buf, int bufsize, uint32_t flags);
1529
1541int fdt_create(void *buf, int bufsize);
1542
1543int fdt_resize(void *fdt, void *buf, int bufsize);
1544int fdt_add_reservemap_entry(void *fdt, uint64_t addr, uint64_t size);
1545int fdt_finish_reservemap(void *fdt);
1546int fdt_begin_node(void *fdt, const char *name);
1547int fdt_property(void *fdt, const char *name, const void *val, int len);
1548static inline int fdt_property_u32(void *fdt, const char *name, uint32_t val)
1549{
1550 fdt32_t tmp = cpu_to_fdt32(val);
1551 return fdt_property(fdt, name, &tmp, sizeof(tmp));
1552}
1553static inline int fdt_property_u64(void *fdt, const char *name, uint64_t val)
1554{
1555 fdt64_t tmp = cpu_to_fdt64(val);
1556 return fdt_property(fdt, name, &tmp, sizeof(tmp));
1557}
1558
1559#ifndef SWIG /* Not available in Python */
1560static inline int fdt_property_cell(void *fdt, const char *name, uint32_t val)
1561{
1562 return fdt_property_u32(fdt, name, val);
1563}
1564#endif
1565
1579int fdt_property_placeholder(void *fdt, const char *name, int len, void **valp);
1580
1581#define fdt_property_string(fdt, name, str) \
1582 fdt_property(fdt, name, str, strlen(str)+1)
1583int fdt_end_node(void *fdt);
1584int fdt_finish(void *fdt);
1585
1586/**********************************************************************/
1587/* Read-write functions */
1588/**********************************************************************/
1589
1590int fdt_create_empty_tree(void *buf, int bufsize);
1591int fdt_open_into(const void *fdt, void *buf, int bufsize);
1592int fdt_pack(void *fdt);
1593
1617int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size);
1618
1641int fdt_del_mem_rsv(void *fdt, int n);
1642
1667int fdt_set_name(void *fdt, int nodeoffset, const char *name);
1668
1698int fdt_setprop_namelen(void *fdt, int nodeoffset, const char *name,
1699 int namelen, const void *val, int len);
1700
1729static inline int fdt_setprop(void *fdt, int nodeoffset, const char *name,
1730 const void *val, int len)
1731{
1732 return fdt_setprop_namelen(fdt, nodeoffset, name, strlen(name), val,
1733 len);
1734}
1735
1765int fdt_setprop_placeholder_namelen(void *fdt, int nodeoffset, const char *name,
1766 int namelen, int len, void **prop_data);
1767
1796static inline int fdt_setprop_placeholder(void *fdt, int nodeoffset,
1797 const char *name, int len,
1798 void **prop_data)
1799{
1800 return fdt_setprop_placeholder_namelen(fdt, nodeoffset, name,
1801 strlen(name), len, prop_data);
1802}
1803
1832static inline int fdt_setprop_u32(void *fdt, int nodeoffset, const char *name,
1833 uint32_t val)
1834{
1835 fdt32_t tmp = cpu_to_fdt32(val);
1836 return fdt_setprop(fdt, nodeoffset, name, &tmp, sizeof(tmp));
1837}
1838
1867static inline int fdt_setprop_u64(void *fdt, int nodeoffset, const char *name,
1868 uint64_t val)
1869{
1870 fdt64_t tmp = cpu_to_fdt64(val);
1871 return fdt_setprop(fdt, nodeoffset, name, &tmp, sizeof(tmp));
1872}
1873
1885static inline int fdt_setprop_cell(void *fdt, int nodeoffset, const char *name,
1886 uint32_t val)
1887{
1888 return fdt_setprop_u32(fdt, nodeoffset, name, val);
1889}
1890
1919#define fdt_setprop_string(fdt, nodeoffset, name, str) \
1920 fdt_setprop((fdt), (nodeoffset), (name), (str), strlen(str)+1)
1921
1951#define fdt_setprop_namelen_string(fdt, nodeoffset, name, namelen, str) \
1952 fdt_setprop_namelen((fdt), (nodeoffset), (name), (namelen), (str), \
1953 strlen(str) + 1)
1954
1981#define fdt_setprop_empty(fdt, nodeoffset, name) \
1982 fdt_setprop((fdt), (nodeoffset), (name), NULL, 0)
1983
2011int fdt_appendprop(void *fdt, int nodeoffset, const char *name,
2012 const void *val, int len);
2013
2042static inline int fdt_appendprop_u32(void *fdt, int nodeoffset,
2043 const char *name, uint32_t val)
2044{
2045 fdt32_t tmp = cpu_to_fdt32(val);
2046 return fdt_appendprop(fdt, nodeoffset, name, &tmp, sizeof(tmp));
2047}
2048
2077static inline int fdt_appendprop_u64(void *fdt, int nodeoffset,
2078 const char *name, uint64_t val)
2079{
2080 fdt64_t tmp = cpu_to_fdt64(val);
2081 return fdt_appendprop(fdt, nodeoffset, name, &tmp, sizeof(tmp));
2082}
2083
2095static inline int fdt_appendprop_cell(void *fdt, int nodeoffset,
2096 const char *name, uint32_t val)
2097{
2098 return fdt_appendprop_u32(fdt, nodeoffset, name, val);
2099}
2100
2128#define fdt_appendprop_string(fdt, nodeoffset, name, str) \
2129 fdt_appendprop((fdt), (nodeoffset), (name), (str), strlen(str)+1)
2130
2165int fdt_appendprop_addrrange(void *fdt, int parent, int nodeoffset,
2166 const char *name, uint64_t addr, uint64_t size);
2167
2190int fdt_delprop(void *fdt, int nodeoffset, const char *name);
2191
2207#ifndef SWIG /* Not available in Python */
2208int fdt_add_subnode_namelen(void *fdt, int parentoffset,
2209 const char *name, int namelen);
2210#endif
2211
2242int fdt_add_subnode(void *fdt, int parentoffset, const char *name);
2243
2265int fdt_del_node(void *fdt, int nodeoffset);
2266
2296int fdt_overlay_apply(void *fdt, void *fdto);
2297
2313int fdt_overlay_target_offset(const void *fdt, const void *fdto,
2314 int fragment_offset, char const **pathp);
2315
2316/**********************************************************************/
2317/* Debugging / informational functions */
2318/**********************************************************************/
2319
2320const char *fdt_strerror(int errval);
2321
2322#ifdef __cplusplus
2323}
2324#endif
2325
2326#endif /* LIBFDT_H */
Definition: fdt.h:41