Lines Matching refs:root

359 find_board(Sys_tree *root, int board)  in find_board()  argument
361 Board_node *bnode = root->bd_list; in find_board()
374 insert_board(Sys_tree *root, int board) in insert_board() argument
377 Board_node *temp = root->bd_list; in insert_board()
388 root->bd_list = bnode; in insert_board()
391 root->bd_list = bnode; in insert_board()
398 root->board_cnt++; in insert_board()
453 dev_find_node(Prom_node *root, char *name) in dev_find_node() argument
457 node = dev_find_node_by_type(root, "name", name); in dev_find_node()
463 dev_next_node(Prom_node *root, char *name) in dev_next_node() argument
467 node = dev_next_node_by_type(root, "name", name); in dev_next_node()
477 dev_find_type(Prom_node *root, char *type) in dev_find_type() argument
481 node = dev_find_node_by_type(root, "device_type", type); in dev_find_type()
491 dev_next_type(Prom_node *root, char *type) in dev_next_type() argument
495 node = dev_next_node_by_type(root, "device_type", type); in dev_next_type()
505 find_failed_node(Prom_node * root) in find_failed_node() argument
509 if (root == NULL) in find_failed_node()
512 if (node_failed(root)) { in find_failed_node()
513 return (root); in find_failed_node()
517 if ((pnode = find_failed_node(root->child)) != NULL) in find_failed_node()
521 if ((pnode = find_failed_node(root->sibling)) != NULL) in find_failed_node()
532 next_failed_node(Prom_node * root) in next_failed_node() argument
537 if (root == NULL) in next_failed_node()
541 if ((pnode = find_failed_node(root->child)) != NULL) { in next_failed_node()
546 if ((pnode = find_failed_node(root->sibling)) != NULL) { in next_failed_node()
551 parent = root->parent; in next_failed_node()
638 add_node(Sys_tree *root, Prom_node *pnode) in add_node() argument
651 if ((bnode = find_board(root, board)) == NULL) { in add_node()
652 bnode = insert_board(root, board); in add_node()
695 dev_find_node_by_type(Prom_node *root, char *type, char *property) in dev_find_node_by_type() argument
700 if (root == NULL || property == NULL) in dev_find_node_by_type()
703 type_prop = (char *)get_prop_val(find_prop(root, type)); in dev_find_node_by_type()
707 return (root); in dev_find_node_by_type()
712 if ((node = dev_find_node_by_type(root->child, type, in dev_find_node_by_type()
717 if ((node = dev_find_node_by_type(root->sibling, type, in dev_find_node_by_type()
725 dev_next_node_by_type(Prom_node *root, char *type, char *property) in dev_next_node_by_type() argument
729 if (root == NULL || property == NULL) in dev_next_node_by_type()
733 if ((node = dev_find_node_by_type(root->child, type, in dev_next_node_by_type()
738 if ((node = dev_find_node_by_type(root->sibling, type, in dev_next_node_by_type()
743 if ((node = dev_find_node_by_type(root->parent->sibling, in dev_next_node_by_type()
755 dev_find_node_by_compatible(Prom_node *root, char *compatible) in dev_find_node_by_compatible() argument
762 if (root == NULL || compatible == NULL) in dev_find_node_by_compatible()
765 if ((prop = find_prop(root, "compatible")) != NULL && in dev_find_node_by_compatible()
780 return (root); /* found a match */ in dev_find_node_by_compatible()
787 node = dev_find_node_by_compatible(root->child, compatible); in dev_find_node_by_compatible()
802 return (dev_find_node_by_compatible(root->sibling, compatible)); in dev_find_node_by_compatible()
810 dev_next_node_by_compatible(Prom_node *root, char *compatible) in dev_next_node_by_compatible() argument
814 if (root == NULL || compatible == NULL) in dev_next_node_by_compatible()
817 node = dev_find_node_by_compatible(root->child, compatible); in dev_next_node_by_compatible()
826 node = dev_find_node_by_compatible(root->sibling, compatible); in dev_next_node_by_compatible()
830 return (dev_find_node_by_compatible(root->parent->sibling, compatible)); in dev_next_node_by_compatible()