Lines Matching refs:tree

12  * particularly with flat tree, where a tree ID is included in ofnode as part of
35 * get_other_oftree() - Convert a flat tree into an oftree object
42 oftree tree;
45 tree = oftree_from_np(uts->of_other);
47 tree = oftree_from_fdt(uts->other_fdt);
49 /* An invalid tree may cause failure or crashes */
50 if (!oftree_valid(tree))
53 return tree;
57 * get_oftree() - Convert a flat tree into an oftree object
60 * @fdt: Pointer to flat tree
61 * @treep: Returns the tree, on success
62 * Return: 0 if OK, 1 if the tree failed to unflatten, -EOVERFLOW if there are
68 oftree tree;
74 tree = oftree_from_np(root);
76 tree = oftree_from_fdt(fdt);
77 if (!oftree_valid(tree))
80 *treep = tree;
88 * @tree: Tree to free
90 void free_oftree(oftree tree)
93 free(tree.np);
254 /* test ofnode_read_prop() with the 'other' tree */
353 /* test ofnode_count_/parse_phandle_with_args() with 'other' tree */
456 /* test ofnode_get_child_count() with 'other' tree */
491 /* test ofnode_is_enabled() with 'other' tree */
542 /* test ofnode_get_addr() with 'other' tree */
577 /* test ofnode_get_path() with 'other' tree */
778 * @id: id value to add to the tree ('id' property in root node)
818 * dm_test_ofnode_root_mult() - Check aliaes on control and 'other' tree
820 * Check that aliases work only with the control FDT, not with 'other' tree.
822 * any tree, then this test should be changed.
827 oftree tree;
835 ut_assertok(get_oftree(uts, fdt, &tree));
836 ut_assert(oftree_valid(tree));
838 /* Make sure they don't work on this new tree */
839 node = oftree_path(tree, "mmc0");
842 /* It should appear in the new tree */
843 node = oftree_path(tree, "/new-mmc");
850 free_oftree(tree);
914 /* change the underlying value, this should mess up the live tree */
934 /* writing the tree with and without copying the property */
946 /* test writing a property to the 'other' tree */
1161 /* check ofnode_by_compatible() on the 'other' tree */
1196 /* test ofnode_find_subnode() on the 'other' tree */
1239 oftree tree;
1243 ret = get_oftree(uts, fdt[i], &tree);
1246 * With flat tree we have the control FDT using one slot. Live
1247 * tree has no limit since it uses pointers, not integer tree
1254 * tree should be invalid when we try to register too
1282 /* reset the compatible so the live tree does not change */
1294 * node in the tree. This doesn't matter with livetree, but with
1295 * flattree any attempt to insert a property earlier in the tree will
1310 /* test ofnode_copy_props() with the 'other' tree */
1353 oftree tree;
1358 tree = oftree_from_fdt(uts->other_fdt);
1359 ut_assert(oftree_valid(tree));
1360 node = oftree_path(tree, "/node/subnode");
1372 oftree tree;
1374 ut_assertok(oftree_new(&tree));
1375 node = oftree_root(tree);
1404 /* reset the compatible so the live tree does not change */
1417 * node in the tree. This doesn't matter with livetree, but with
1418 * flattree any attempt to insert a property earlier in the tree will
1434 /* test ofnode_copy_node() with the 'other' tree */
1455 * dm_test_pre_run() where it sets up the root-tree pointer. So use
1481 oftree tree, check;
1484 tree = oftree_default();
1485 ut_assertok(oftree_to_fdt(tree, &buf));
1488 /* convert it back to a tree and see if it looks OK */