Lines Matching +full:device +full:- +full:tree
1 /* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) */
5 * libfdt - Flat Device Tree manipulation
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. */
35 * offset which is out-of-bounds, or which points to an
44 * length, or the phandle value was either 0 or -1, which are
47 /* FDT_ERR_BADSTATE: Function was passed an incomplete device
48 * tree created by the sequential-write functions, which is
51 /* Error codes: codes for bad device tree blobs */
53 /* FDT_ERR_TRUNCATED: FDT or a sub-block is improperly
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. */
61 /* FDT_ERR_BADVERSION: Given device tree has a version which
63 * read-write functions, this may mean that fdt_open_into() is
64 * required to convert the tree to the expected version. */
66 /* FDT_ERR_BADSTRUCTURE: Given device tree has a corrupt
70 /* FDT_ERR_BADLAYOUT: For read-write functions, the given
71 * device tree has it's sub-blocks in an order that the
73 * then strings). Use fdt_open_into() to reorganize the tree
74 * into a form suitable for the read-write operations. */
82 /* Errors in device tree content */
84 /* FDT_ERR_BADNCELLS: Device tree has a #address-cells, #size-cells
88 /* FDT_ERR_BADVALUE: Device tree has a property with an unexpected
90 * is not NUL-terminated within the length of its value. */
93 /* FDT_ERR_BADOVERLAY: The device tree overlay, while
98 /* FDT_ERR_NOPHANDLES: The device tree doesn't have any
106 /* FDT_ERR_ALIGNMENT: The device tree base address is not 8-byte
113 /* Valid values for phandles range from 1 to 2^32-2. */
116 /* Low-level functions (you probably don't need these) */
130 * External helpers to access words from a device tree blob. They're built
196 * fdt_first_subnode() - get offset of first direct subnode
200 * Return: offset of first subnode, or -FDT_ERR_NOTFOUND if there is none
205 * fdt_next_subnode() - get offset of next direct subnode
212 * Return: offset of next subnode, or -FDT_ERR_NOTFOUND if there are no more
218 * fdt_for_each_subnode - iterate over all subnodes of a parent
231 * if ((node < 0) && (node != -FDT_ERR_NOTFOUND)) {
248 (fdt32_ld(&((const struct fdt_header *)(fdt))->field))
264 fdth->name = cpu_to_fdt32(val); \
279 * fdt_header_size - return the size of the tree's header
280 * @fdt: pointer to a flattened device tree
287 * fdt_header_size_ - internal function to get header size from a version number
295 * fdt_check_header - sanity check a device tree header
296 * @fdt: pointer to data which might be a flattened device tree
299 * appears to be a flattened device tree, and that the header contains
304 * 0, if the buffer appears to contain a valid device tree
305 * -FDT_ERR_BADMAGIC,
306 * -FDT_ERR_BADVERSION,
307 * -FDT_ERR_BADSTATE,
308 * -FDT_ERR_TRUNCATED, standard meanings, as above
313 * fdt_move - move a device tree around in memory
314 * @fdt: pointer to the device tree to move
315 * @buf: pointer to memory where the device is to be moved
318 * fdt_move() relocates, if possible, the device tree blob located at
320 * with the existing device tree blob at fdt. Therefore,
326 * -FDT_ERR_NOSPACE, bufsize is insufficient to contain the device tree
327 * -FDT_ERR_BADMAGIC,
328 * -FDT_ERR_BADVERSION,
329 * -FDT_ERR_BADSTATE, standard meanings
334 /* Read-only functions */
340 * fdt_get_string - retrieve a string from the strings block of a device tree
341 * @fdt: pointer to the device tree blob
346 * strings block of the device tree blob at fdt, and optionally also
356 * fdt_string - retrieve a string from the strings block of a device tree
357 * @fdt: pointer to the device tree blob
361 * strings block of the device tree blob at fdt.
370 * fdt_find_max_phandle - find and return the highest phandle in a tree
371 * @fdt: pointer to the device tree blob
372 * @phandle: return location for the highest phandle value found in the tree
374 * fdt_find_max_phandle() finds the highest phandle value in the given device
375 * tree. The value returned in @phandle is only valid if the function returns
384 * fdt_get_max_phandle - retrieves the highest phandle in a tree
385 * @fdt: pointer to the device tree blob
388 * device tree. This will ignore badly formatted phandles, or phandles
389 * with a value of 0 or -1.
395 * 0, if no phandle was found in the device tree
396 * -1, if an error occurred
405 return (uint32_t)-1; in fdt_get_max_phandle()
411 * fdt_generate_phandle - return a new, unused phandle for a device tree blob
412 * @fdt: pointer to the device tree blob
415 * Walks the device tree blob and looks for the highest phandle value. On
417 * highest phandle value in the device tree blob) will be returned in the
420 * Return: 0 on success or a negative error-code on failure
425 * fdt_num_mem_rsv - retrieve the number of memory reserve map entries
426 * @fdt: pointer to the device tree blob
428 * Returns the number of entries in the device tree blob's memory
438 * fdt_get_mem_rsv - retrieve one memory reserve map entry
439 * @fdt: pointer to the device tree blob
441 * @address: pointer to 64-bit variable to hold the start address
442 * @size: pointer to 64-bit variable to hold the size of the entry
445 * the n-th reserve map entry from the device tree blob, in
446 * native-endian format.
450 * -FDT_ERR_BADMAGIC,
451 * -FDT_ERR_BADVERSION,
452 * -FDT_ERR_BADSTATE, standard meanings
457 * fdt_subnode_offset_namelen - find a subnode based on substring
458 * @fdt: pointer to the device tree blob
468 * Return: offset of the subnode or -FDT_ERR_NOTFOUND if name not found.
475 * fdt_subnode_offset - find a subnode of a given node
476 * @fdt: pointer to the device tree blob
489 * -FDT_ERR_NOTFOUND, if the requested subnode does not exist
490 * -FDT_ERR_BADOFFSET, if parentoffset did not point to an FDT_BEGIN_NODE
492 * -FDT_ERR_BADMAGIC,
493 * -FDT_ERR_BADVERSION,
494 * -FDT_ERR_BADSTATE,
495 * -FDT_ERR_BADSTRUCTURE,
496 * -FDT_ERR_TRUNCATED, standard meanings.
501 * fdt_path_offset_namelen - find a tree node by its full path
502 * @fdt: pointer to the device tree blob
516 * fdt_path_offset - find a tree node by its full path
517 * @fdt: pointer to the device tree blob
520 * fdt_path_offset() finds a node of a given path in the device tree.
530 * -FDT_ERR_BADPATH, given path does not begin with '/' or is invalid
531 * -FDT_ERR_NOTFOUND, if the requested node does not exist
532 * -FDT_ERR_BADMAGIC,
533 * -FDT_ERR_BADVERSION,
534 * -FDT_ERR_BADSTATE,
535 * -FDT_ERR_BADSTRUCTURE,
536 * -FDT_ERR_TRUNCATED, standard meanings.
541 * fdt_get_name - retrieve the name of a given node
542 * @fdt: pointer to the device tree blob
547 * device tree node at structure block offset nodeoffset. If lenp is
548 * non-NULL, the length of this name is also returned, in the integer
553 * If lenp is non-NULL, *lenp contains the length of that name
556 * if lenp is non-NULL *lenp contains an error code (<0):
557 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE
559 * -FDT_ERR_BADMAGIC,
560 * -FDT_ERR_BADVERSION,
561 * -FDT_ERR_BADSTATE, standard meanings
566 * fdt_first_property_offset - find the offset of a node's first property
567 * @fdt: pointer to the device tree blob
575 * -FDT_ERR_NOTFOUND, if the requested node has no properties
576 * -FDT_ERR_BADOFFSET, if nodeoffset did not point to an FDT_BEGIN_NODE tag
577 * -FDT_ERR_BADMAGIC,
578 * -FDT_ERR_BADVERSION,
579 * -FDT_ERR_BADSTATE,
580 * -FDT_ERR_BADSTRUCTURE,
581 * -FDT_ERR_TRUNCATED, standard meanings.
586 * fdt_next_property_offset - step through a node's properties
587 * @fdt: pointer to the device tree blob
596 * -FDT_ERR_NOTFOUND, if the given property is the last in its node
597 * -FDT_ERR_BADOFFSET, if nodeoffset did not point to an FDT_PROP tag
598 * -FDT_ERR_BADMAGIC,
599 * -FDT_ERR_BADVERSION,
600 * -FDT_ERR_BADSTATE,
601 * -FDT_ERR_BADSTRUCTURE,
602 * -FDT_ERR_TRUNCATED, standard meanings.
607 * fdt_for_each_property_offset - iterate over all properties of a node
620 * if ((property < 0) && (property != -FDT_ERR_NOTFOUND)) {
634 * fdt_get_property_by_offset - retrieve the property at a given offset
635 * @fdt: pointer to the device tree blob
640 * fdt_property structure within the device tree blob at the given
641 * offset. If lenp is non-NULL, the length of the property value is
644 * Note that this code only works on device tree versions >= 16. fdt_getprop()
649 * if lenp is non-NULL, *lenp contains the length of the property
652 * if lenp is non-NULL, *lenp contains an error code (<0):
653 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_PROP tag
654 * -FDT_ERR_BADMAGIC,
655 * -FDT_ERR_BADVERSION,
656 * -FDT_ERR_BADSTATE,
657 * -FDT_ERR_BADSTRUCTURE,
658 * -FDT_ERR_TRUNCATED, standard meanings
665 * fdt_get_property_namelen - find a property based on substring
666 * @fdt: pointer to the device tree blob
686 * fdt_get_property - find a given property in a given node
687 * @fdt: pointer to the device tree blob
693 * structure within the device tree blob corresponding to the property
695 * non-NULL, the length of the property value is also returned, in the
700 * if lenp is non-NULL, *lenp contains the length of the property
703 * if lenp is non-NULL, *lenp contains an error code (<0):
704 * -FDT_ERR_NOTFOUND, node does not have named property
705 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE
707 * -FDT_ERR_BADMAGIC,
708 * -FDT_ERR_BADVERSION,
709 * -FDT_ERR_BADSTATE,
710 * -FDT_ERR_BADSTRUCTURE,
711 * -FDT_ERR_TRUNCATED, standard meanings
724 * fdt_getprop_by_offset - retrieve the value of a property at a given offset
725 * @fdt: pointer to the device tree blob
732 * to within the device blob itself, not a copy of the value). If
733 * lenp is non-NULL, the length of the property value is also
734 * returned, in the integer pointed to by lenp. If namep is non-NULL,
736 * by namep (this will be a pointer to within the device tree's string
741 * if lenp is non-NULL, *lenp contains the length of the property
743 * if namep is non-NULL *namep contiains a pointer to the property
746 * if lenp is non-NULL, *lenp contains an error code (<0):
747 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_PROP tag
748 * -FDT_ERR_BADMAGIC,
749 * -FDT_ERR_BADVERSION,
750 * -FDT_ERR_BADSTATE,
751 * -FDT_ERR_BADSTRUCTURE,
752 * -FDT_ERR_TRUNCATED, standard meanings
760 * fdt_getprop_namelen - get property value based on substring
761 * @fdt: pointer to the device tree blob
785 * fdt_getprop - retrieve the value of a given property
786 * @fdt: pointer to the device tree blob
793 * pointer to within the device blob itself, not a copy of the value).
794 * If @lenp is non-NULL, the length of the property value is also
799 * if lenp is non-NULL, *lenp contains the length of the property
802 * if lenp is non-NULL, *lenp contains an error code (<0):
803 * -FDT_ERR_NOTFOUND, node does not have named property
804 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE
806 * -FDT_ERR_BADMAGIC,
807 * -FDT_ERR_BADVERSION,
808 * -FDT_ERR_BADSTATE,
809 * -FDT_ERR_BADSTRUCTURE,
810 * -FDT_ERR_TRUNCATED, standard meanings
821 * fdt_get_phandle - retrieve the phandle of a given node
822 * @fdt: pointer to the device tree blob
825 * fdt_get_phandle() retrieves the phandle of the device tree node at
829 * the phandle of the node at nodeoffset, on success (!= 0, != -1)
835 * fdt_get_alias_namelen - get alias based on substring
836 * @fdt: pointer to the device tree blob
852 * fdt_get_alias - retrieve the path referenced by a given alias
853 * @fdt: pointer to the device tree blob
866 * fdt_get_path - determine the full path of a node
867 * @fdt: pointer to the device tree blob
875 * NOTE: This function is expensive, as it must scan the device tree
881 * nodeoffset, as a NUL-terminated string.
882 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
883 * -FDT_ERR_NOSPACE, the path of the given node is longer than (bufsize-1)
885 * -FDT_ERR_BADMAGIC,
886 * -FDT_ERR_BADVERSION,
887 * -FDT_ERR_BADSTATE,
888 * -FDT_ERR_BADSTRUCTURE, standard meanings
893 * fdt_supernode_atdepth_offset - find a specific ancestor of a node
894 * @fdt: pointer to the device tree blob
908 * NOTE: This function is expensive, as it must scan the device tree
914 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
915 * -FDT_ERR_NOTFOUND, supernodedepth was greater than the depth of
917 * -FDT_ERR_BADMAGIC,
918 * -FDT_ERR_BADVERSION,
919 * -FDT_ERR_BADSTATE,
920 * -FDT_ERR_BADSTRUCTURE, standard meanings
926 * fdt_node_depth - find the depth of a given node
927 * @fdt: pointer to the device tree blob
933 * NOTE: This function is expensive, as it must scan the device tree
938 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
939 * -FDT_ERR_BADMAGIC,
940 * -FDT_ERR_BADVERSION,
941 * -FDT_ERR_BADSTATE,
942 * -FDT_ERR_BADSTRUCTURE, standard meanings
947 * fdt_parent_offset - find the parent of a given node
948 * @fdt: pointer to the device tree blob
955 * NOTE: This function is expensive, as it must scan the device tree
961 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
962 * -FDT_ERR_BADMAGIC,
963 * -FDT_ERR_BADVERSION,
964 * -FDT_ERR_BADSTATE,
965 * -FDT_ERR_BADSTRUCTURE, standard meanings
970 * fdt_node_offset_by_prop_value - find nodes with a given property value
971 * @fdt: pointer to the device tree blob
980 * startoffset is -1, the very first such node in the tree.
984 * offset = fdt_node_offset_by_prop_value(fdt, -1, propname,
986 * while (offset != -FDT_ERR_NOTFOUND) {
992 * Note the -1 in the first call to the function, if 0 is used here
999 * -FDT_ERR_NOTFOUND, no node matching the criterion exists in the
1000 * tree after startoffset
1001 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
1002 * -FDT_ERR_BADMAGIC,
1003 * -FDT_ERR_BADVERSION,
1004 * -FDT_ERR_BADSTATE,
1005 * -FDT_ERR_BADSTRUCTURE, standard meanings
1012 * fdt_node_offset_by_phandle - find the node with a given phandle
1013 * @fdt: pointer to the device tree blob
1018 * in the tree with the given phandle (an invalid tree), results are
1023 * -FDT_ERR_NOTFOUND, no node with that phandle exists
1024 * -FDT_ERR_BADPHANDLE, given phandle value was invalid (0 or -1)
1025 * -FDT_ERR_BADMAGIC,
1026 * -FDT_ERR_BADVERSION,
1027 * -FDT_ERR_BADSTATE,
1028 * -FDT_ERR_BADSTRUCTURE, standard meanings
1033 * fdt_node_check_compatible - check a node's compatible property
1034 * @fdt: pointer to the device tree blob
1035 * @nodeoffset: offset of a tree node
1040 * it returns non-zero otherwise, or on error.
1046 * -FDT_ERR_NOTFOUND, if the given node has no 'compatible' property
1047 * -FDT_ERR_BADOFFSET, if nodeoffset does not refer to a BEGIN_NODE tag
1048 * -FDT_ERR_BADMAGIC,
1049 * -FDT_ERR_BADVERSION,
1050 * -FDT_ERR_BADSTATE,
1051 * -FDT_ERR_BADSTRUCTURE, standard meanings
1057 * fdt_node_offset_by_compatible - find nodes with a given 'compatible' value
1058 * @fdt: pointer to the device tree blob
1064 * lists the given compatible string; or if startoffset is -1, the
1065 * very first such node in the tree.
1069 * offset = fdt_node_offset_by_compatible(fdt, -1, compatible);
1070 * while (offset != -FDT_ERR_NOTFOUND) {
1075 * Note the -1 in the first call to the function, if 0 is used here
1082 * -FDT_ERR_NOTFOUND, no node matching the criterion exists in the
1083 * tree after startoffset
1084 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
1085 * -FDT_ERR_BADMAGIC,
1086 * -FDT_ERR_BADVERSION,
1087 * -FDT_ERR_BADSTATE,
1088 * -FDT_ERR_BADSTRUCTURE, standard meanings
1094 * fdt_stringlist_contains - check a string list property for a string
1100 * one or more strings, each terminated by \0, as is found in a device tree
1108 * fdt_stringlist_count - count the number of strings in a string list
1109 * @fdt: pointer to the device tree blob
1110 * @nodeoffset: offset of a tree node
1115 * -FDT_ERR_BADVALUE if the property value is not NUL-terminated
1116 * -FDT_ERR_NOTFOUND if the property does not exist
1121 * fdt_stringlist_search - find a string in a string list and return its index
1122 * @fdt: pointer to the device tree blob
1123 * @nodeoffset: offset of a tree node
1128 * that are not NUL-terminated. That's because the function will stop after
1130 * small-valued cell properties, such as #address-cells, when searching for
1135 * -FDT_ERR_BADVALUE if the property value is not NUL-terminated
1136 * -FDT_ERR_NOTFOUND if the property does not exist or does not contain
1143 * fdt_stringlist_get() - obtain the string at a given index in a string list
1144 * @fdt: pointer to the device tree blob
1145 * @nodeoffset: offset of a tree node
1151 * non-NUL-terminated values. For example on small-valued cell properties
1154 * If non-NULL, the length of the string (on success) or a negative error-code
1160 * location pointed to by the lenp parameter, if non-NULL. On failure one of
1162 * (if non-NULL):
1163 * -FDT_ERR_BADVALUE if the property value is not NUL-terminated
1164 * -FDT_ERR_NOTFOUND if the property does not exist
1171 /* Read-only functions (addressing related) */
1175 * FDT_MAX_NCELLS - maximum value for #address-cells and #size-cells
1177 * This is the maximum value for #address-cells, #size-cells and
1186 * fdt_address_cells - retrieve address size for a bus represented in the tree
1187 * @fdt: pointer to the device tree blob
1190 * When the node has a valid #address-cells property, returns its value.
1194 * 2, if the node has no #address-cells property
1195 * -FDT_ERR_BADNCELLS, if the node has a badly formatted or invalid
1196 * #address-cells property
1197 * -FDT_ERR_BADMAGIC,
1198 * -FDT_ERR_BADVERSION,
1199 * -FDT_ERR_BADSTATE,
1200 * -FDT_ERR_BADSTRUCTURE,
1201 * -FDT_ERR_TRUNCATED, standard meanings
1206 * fdt_size_cells - retrieve address range size for a bus represented in the
1207 * tree
1208 * @fdt: pointer to the device tree blob
1211 * When the node has a valid #size-cells property, returns its value.
1215 * 1, if the node has no #size-cells property
1216 * -FDT_ERR_BADNCELLS, if the node has a badly formatted or invalid
1217 * #size-cells property
1218 * -FDT_ERR_BADMAGIC,
1219 * -FDT_ERR_BADVERSION,
1220 * -FDT_ERR_BADSTATE,
1221 * -FDT_ERR_BADSTRUCTURE,
1222 * -FDT_ERR_TRUNCATED, standard meanings
1228 /* Write-in-place functions */
1232 * fdt_setprop_inplace_namelen_partial - change a property's value,
1234 * @fdt: pointer to the device tree blob
1257 * fdt_setprop_inplace - change a property's value, but not its size
1258 * @fdt: pointer to the device tree blob
1271 * of the tree.
1275 * -FDT_ERR_NOSPACE, if len is not equal to the property's current length
1276 * -FDT_ERR_NOTFOUND, node does not have the named property
1277 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1278 * -FDT_ERR_BADMAGIC,
1279 * -FDT_ERR_BADVERSION,
1280 * -FDT_ERR_BADSTATE,
1281 * -FDT_ERR_BADSTRUCTURE,
1282 * -FDT_ERR_TRUNCATED, standard meanings
1290 * fdt_setprop_inplace_u32 - change the value of a 32-bit integer property
1291 * @fdt: pointer to the device tree blob
1294 * @val: 32-bit integer value to replace the property with
1297 * with the 32-bit integer value in val, converting val to big-endian
1304 * of the tree.
1308 * -FDT_ERR_NOSPACE, if the property's length is not equal to 4
1309 * -FDT_ERR_NOTFOUND, node does not have the named property
1310 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1311 * -FDT_ERR_BADMAGIC,
1312 * -FDT_ERR_BADVERSION,
1313 * -FDT_ERR_BADSTATE,
1314 * -FDT_ERR_BADSTRUCTURE,
1315 * -FDT_ERR_TRUNCATED, standard meanings
1325 * fdt_setprop_inplace_u64 - change the value of a 64-bit integer property
1326 * @fdt: pointer to the device tree blob
1329 * @val: 64-bit integer value to replace the property with
1332 * with the 64-bit integer value in val, converting val to big-endian
1339 * of the tree.
1343 * -FDT_ERR_NOSPACE, if the property's length is not equal to 8
1344 * -FDT_ERR_NOTFOUND, node does not have the named property
1345 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1346 * -FDT_ERR_BADMAGIC,
1347 * -FDT_ERR_BADVERSION,
1348 * -FDT_ERR_BADSTATE,
1349 * -FDT_ERR_BADSTRUCTURE,
1350 * -FDT_ERR_TRUNCATED, standard meanings
1360 * fdt_setprop_inplace_cell - change the value of a single-cell property
1361 * @fdt: pointer to the device tree blob
1364 * @val: new value of the 32-bit cell
1376 * fdt_nop_property - replace a property with nop tags
1377 * @fdt: pointer to the device tree blob
1383 * tree.
1387 * tree.
1391 * -FDT_ERR_NOTFOUND, node does not have the named property
1392 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1393 * -FDT_ERR_BADMAGIC,
1394 * -FDT_ERR_BADVERSION,
1395 * -FDT_ERR_BADSTATE,
1396 * -FDT_ERR_BADSTRUCTURE,
1397 * -FDT_ERR_TRUNCATED, standard meanings
1402 * fdt_nop_node - replace a node (subtree) with nop tags
1403 * @fdt: pointer to the device tree blob
1408 * effectively removing it from the tree.
1412 * move any other part of the tree.
1416 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1417 * -FDT_ERR_BADMAGIC,
1418 * -FDT_ERR_BADVERSION,
1419 * -FDT_ERR_BADSTATE,
1420 * -FDT_ERR_BADSTRUCTURE,
1421 * -FDT_ERR_TRUNCATED, standard meanings
1431 /* FDT_CREATE_FLAG_NO_NAME_DEDUP: Do not try to de-duplicate property
1438 * fdt_create_with_flags - begin creation of a new fdt
1450 * -FDT_ERR_NOSPACE, bufsize is insufficient for a minimal fdt
1451 * -FDT_ERR_BADFLAGS, flags is not valid
1456 * fdt_create - begin creation of a new fdt
1464 * -FDT_ERR_NOSPACE, bufsize is insufficient for a minimal fdt
1492 * fdt_property_placeholder - add a new property and return a ptr to its value
1494 * @fdt: pointer to the device tree blob
1501 * -FDT_ERR_BADMAGIC,
1502 * -FDT_ERR_NOSPACE, standard meanings
1512 /* Read-write functions */
1520 * fdt_add_mem_rsv - add one memory reserve map entry
1521 * @fdt: pointer to the device tree blob
1522 * @address: 64-bit start address of the reserve map entry
1523 * @size: 64-bit size of the reserved region
1533 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1535 * -FDT_ERR_BADMAGIC,
1536 * -FDT_ERR_BADVERSION,
1537 * -FDT_ERR_BADSTATE,
1538 * -FDT_ERR_BADSTRUCTURE,
1539 * -FDT_ERR_BADLAYOUT,
1540 * -FDT_ERR_TRUNCATED, standard meanings
1545 * fdt_del_mem_rsv - remove a memory reserve map entry
1546 * @fdt: pointer to the device tree blob
1549 * fdt_del_mem_rsv() removes the n-th memory reserve map entry from
1557 * -FDT_ERR_NOTFOUND, there is no entry of the given index (i.e. there
1559 * -FDT_ERR_BADMAGIC,
1560 * -FDT_ERR_BADVERSION,
1561 * -FDT_ERR_BADSTATE,
1562 * -FDT_ERR_BADSTRUCTURE,
1563 * -FDT_ERR_BADLAYOUT,
1564 * -FDT_ERR_TRUNCATED, standard meanings
1569 * fdt_set_name - change the name of a given node
1570 * @fdt: pointer to the device tree blob
1585 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob
1587 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1588 * -FDT_ERR_BADMAGIC,
1589 * -FDT_ERR_BADVERSION,
1590 * -FDT_ERR_BADSTATE, standard meanings
1595 * fdt_setprop - create or change a property
1596 * @fdt: pointer to the device tree blob
1611 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1613 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1614 * -FDT_ERR_BADLAYOUT,
1615 * -FDT_ERR_BADMAGIC,
1616 * -FDT_ERR_BADVERSION,
1617 * -FDT_ERR_BADSTATE,
1618 * -FDT_ERR_BADSTRUCTURE,
1619 * -FDT_ERR_BADLAYOUT,
1620 * -FDT_ERR_TRUNCATED, standard meanings
1626 * fdt_setprop_placeholder - allocate space for a property
1627 * @fdt: pointer to the device tree blob
1642 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1644 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1645 * -FDT_ERR_BADLAYOUT,
1646 * -FDT_ERR_BADMAGIC,
1647 * -FDT_ERR_BADVERSION,
1648 * -FDT_ERR_BADSTATE,
1649 * -FDT_ERR_BADSTRUCTURE,
1650 * -FDT_ERR_BADLAYOUT,
1651 * -FDT_ERR_TRUNCATED, standard meanings
1657 * fdt_setprop_u32 - set a property to a 32-bit integer
1658 * @fdt: pointer to the device tree blob
1661 * @val: 32-bit integer value for the property (native endian)
1664 * node to the given 32-bit integer value (converting to big-endian if
1673 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1675 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1676 * -FDT_ERR_BADLAYOUT,
1677 * -FDT_ERR_BADMAGIC,
1678 * -FDT_ERR_BADVERSION,
1679 * -FDT_ERR_BADSTATE,
1680 * -FDT_ERR_BADSTRUCTURE,
1681 * -FDT_ERR_BADLAYOUT,
1682 * -FDT_ERR_TRUNCATED, standard meanings
1692 * fdt_setprop_u64 - set a property to a 64-bit integer
1693 * @fdt: pointer to the device tree blob
1696 * @val: 64-bit integer value for the property (native endian)
1699 * node to the given 64-bit integer value (converting to big-endian if
1708 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1710 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1711 * -FDT_ERR_BADLAYOUT,
1712 * -FDT_ERR_BADMAGIC,
1713 * -FDT_ERR_BADVERSION,
1714 * -FDT_ERR_BADSTATE,
1715 * -FDT_ERR_BADSTRUCTURE,
1716 * -FDT_ERR_BADLAYOUT,
1717 * -FDT_ERR_TRUNCATED, standard meanings
1727 * fdt_setprop_cell - set a property to a single cell value
1728 * @fdt: pointer to the device tree blob
1731 * @val: 32-bit integer value for the property (native endian)
1744 * fdt_setprop_string - set a property to a string value
1745 * @fdt: pointer to the device tree blob
1760 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1762 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1763 * -FDT_ERR_BADLAYOUT,
1764 * -FDT_ERR_BADMAGIC,
1765 * -FDT_ERR_BADVERSION,
1766 * -FDT_ERR_BADSTATE,
1767 * -FDT_ERR_BADSTRUCTURE,
1768 * -FDT_ERR_BADLAYOUT,
1769 * -FDT_ERR_TRUNCATED, standard meanings
1776 * fdt_setprop_empty - set a property to an empty value
1777 * @fdt: pointer to the device tree blob
1790 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1792 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1793 * -FDT_ERR_BADLAYOUT,
1794 * -FDT_ERR_BADMAGIC,
1795 * -FDT_ERR_BADVERSION,
1796 * -FDT_ERR_BADSTATE,
1797 * -FDT_ERR_BADSTRUCTURE,
1798 * -FDT_ERR_BADLAYOUT,
1799 * -FDT_ERR_TRUNCATED, standard meanings
1805 * fdt_appendprop - append to or create a property
1806 * @fdt: pointer to the device tree blob
1820 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1822 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1823 * -FDT_ERR_BADLAYOUT,
1824 * -FDT_ERR_BADMAGIC,
1825 * -FDT_ERR_BADVERSION,
1826 * -FDT_ERR_BADSTATE,
1827 * -FDT_ERR_BADSTRUCTURE,
1828 * -FDT_ERR_BADLAYOUT,
1829 * -FDT_ERR_TRUNCATED, standard meanings
1835 * fdt_appendprop_u32 - append a 32-bit integer value to a property
1836 * @fdt: pointer to the device tree blob
1839 * @val: 32-bit integer value to append to the property (native endian)
1841 * fdt_appendprop_u32() appends the given 32-bit integer value
1842 * (converting to big-endian if necessary) to the value of the named
1851 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1853 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1854 * -FDT_ERR_BADLAYOUT,
1855 * -FDT_ERR_BADMAGIC,
1856 * -FDT_ERR_BADVERSION,
1857 * -FDT_ERR_BADSTATE,
1858 * -FDT_ERR_BADSTRUCTURE,
1859 * -FDT_ERR_BADLAYOUT,
1860 * -FDT_ERR_TRUNCATED, standard meanings
1870 * fdt_appendprop_u64 - append a 64-bit integer value to a property
1871 * @fdt: pointer to the device tree blob
1874 * @val: 64-bit integer value to append to the property (native endian)
1876 * fdt_appendprop_u64() appends the given 64-bit integer value
1877 * (converting to big-endian if necessary) to the value of the named
1886 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1888 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1889 * -FDT_ERR_BADLAYOUT,
1890 * -FDT_ERR_BADMAGIC,
1891 * -FDT_ERR_BADVERSION,
1892 * -FDT_ERR_BADSTATE,
1893 * -FDT_ERR_BADSTRUCTURE,
1894 * -FDT_ERR_BADLAYOUT,
1895 * -FDT_ERR_TRUNCATED, standard meanings
1905 * fdt_appendprop_cell - append a single cell value to a property
1906 * @fdt: pointer to the device tree blob
1909 * @val: 32-bit integer value to append to the property (native endian)
1922 * fdt_appendprop_string - append a string to a property
1923 * @fdt: pointer to the device tree blob
1937 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1939 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1940 * -FDT_ERR_BADLAYOUT,
1941 * -FDT_ERR_BADMAGIC,
1942 * -FDT_ERR_BADVERSION,
1943 * -FDT_ERR_BADSTATE,
1944 * -FDT_ERR_BADSTRUCTURE,
1945 * -FDT_ERR_BADLAYOUT,
1946 * -FDT_ERR_TRUNCATED, standard meanings
1952 * fdt_appendprop_addrrange - append a address range property
1953 * @fdt: pointer to the device tree blob
1965 * Cell sizes are determined by parent's #address-cells and #size-cells.
1972 * -FDT_ERR_BADLAYOUT,
1973 * -FDT_ERR_BADMAGIC,
1974 * -FDT_ERR_BADNCELLS, if the node has a badly formatted or invalid
1975 * #address-cells property
1976 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
1977 * -FDT_ERR_BADSTATE,
1978 * -FDT_ERR_BADSTRUCTURE,
1979 * -FDT_ERR_BADVERSION,
1980 * -FDT_ERR_BADVALUE, addr or size doesn't fit to respective cells size
1981 * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to
1983 * -FDT_ERR_TRUNCATED, standard meanings
1989 * fdt_delprop - delete a property
1990 * @fdt: pointer to the device tree blob
2001 * -FDT_ERR_NOTFOUND, node does not have the named property
2002 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
2003 * -FDT_ERR_BADLAYOUT,
2004 * -FDT_ERR_BADMAGIC,
2005 * -FDT_ERR_BADVERSION,
2006 * -FDT_ERR_BADSTATE,
2007 * -FDT_ERR_BADSTRUCTURE,
2008 * -FDT_ERR_TRUNCATED, standard meanings
2013 * fdt_add_subnode_namelen - creates a new node based on substring
2014 * @fdt: pointer to the device tree blob
2033 * fdt_add_subnode - creates a new node
2034 * @fdt: pointer to the device tree blob
2048 * -FDT_ERR_NOTFOUND, if the requested subnode does not exist
2049 * -FDT_ERR_BADOFFSET, if parentoffset did not point to an FDT_BEGIN_NODE
2051 * -FDT_ERR_EXISTS, if the node at parentoffset already has a subnode of
2053 * -FDT_ERR_NOSPACE, if there is insufficient free space in the
2055 * -FDT_ERR_NOSPACE
2056 * -FDT_ERR_BADLAYOUT
2057 * -FDT_ERR_BADMAGIC,
2058 * -FDT_ERR_BADVERSION,
2059 * -FDT_ERR_BADSTATE,
2060 * -FDT_ERR_BADSTRUCTURE,
2061 * -FDT_ERR_TRUNCATED, standard meanings.
2066 * fdt_del_node - delete a node (subtree)
2067 * @fdt: pointer to the device tree blob
2078 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
2079 * -FDT_ERR_BADLAYOUT,
2080 * -FDT_ERR_BADMAGIC,
2081 * -FDT_ERR_BADVERSION,
2082 * -FDT_ERR_BADSTATE,
2083 * -FDT_ERR_BADSTRUCTURE,
2084 * -FDT_ERR_TRUNCATED, standard meanings
2089 * fdt_overlay_apply - Applies a DT overlay on a base DT
2090 * @fdt: pointer to the base device tree blob
2091 * @fdto: pointer to the device tree overlay blob
2093 * fdt_overlay_apply() will apply the given device tree overlay on the
2094 * given base device tree.
2096 * Expect the base device tree to be modified, even if the function
2101 * -FDT_ERR_NOSPACE, there's not enough space in the base device tree
2102 * -FDT_ERR_NOTFOUND, the overlay points to some inexistant nodes or
2104 * -FDT_ERR_BADPHANDLE,
2105 * -FDT_ERR_BADOVERLAY,
2106 * -FDT_ERR_NOPHANDLES,
2107 * -FDT_ERR_INTERNAL,
2108 * -FDT_ERR_BADLAYOUT,
2109 * -FDT_ERR_BADMAGIC,
2110 * -FDT_ERR_BADOFFSET,
2111 * -FDT_ERR_BADPATH,
2112 * -FDT_ERR_BADVERSION,
2113 * -FDT_ERR_BADSTRUCTURE,
2114 * -FDT_ERR_BADSTATE,
2115 * -FDT_ERR_TRUNCATED, standard meanings