Lines Matching refs:xref

91 	phandle_t	xref;
106 * xref-phandle-device lookup helper routines.
109 * of info that cross-references node handles, xref handles, and device_t
111 * with an xref handle, but it is also used to speed up translation between xref
113 * the node tree each time we want to translate between a node and xref handle.
120 phandle_t child, xref;
129 if (OF_getencprop(child, "phandle", &xref, sizeof(xref)) ==
130 -1 && OF_getencprop(child, "ibm,phandle", &xref,
131 sizeof(xref)) == -1 && OF_getencprop(child,
132 "linux,phandle", &xref, sizeof(xref)) == -1)
136 xi->xref = xref;
147 * than any of the clients/consumers of the xref list data, but we do
164 if ((find_by == FIND_BY_XREF && (phandle_t)key == xi->xref) ||
176 xrefinfo_add(phandle_t node, phandle_t xref, device_t dev)
182 xi->xref = xref;
596 OF_child_xref_phandle(phandle_t parent, phandle_t xref)
603 * matches the xref we are looking for.
607 rxref = OF_child_xref_phandle(child, xref);
617 if (rxref == xref)
625 OF_node_from_xref(phandle_t xref)
631 if ((xi = xrefinfo_find(xref, FIND_BY_XREF)) == NULL)
632 return (xref);
636 if ((node = OF_child_xref_phandle(OF_peer(0), xref)) == -1)
637 return (xref);
645 phandle_t xref;
650 return (xi->xref);
653 if (OF_getencprop(node, "phandle", &xref, sizeof(xref)) == -1 &&
654 OF_getencprop(node, "ibm,phandle", &xref, sizeof(xref)) == -1 &&
655 OF_getencprop(node, "linux,phandle", &xref, sizeof(xref)) == -1)
657 return (xref);
661 OF_device_from_xref(phandle_t xref)
666 if ((xi = xrefinfo_find(xref, FIND_BY_XREF)) == NULL)
681 return (xi->xref);
683 panic("Attempt to find xref before xreflist_init");
687 OF_device_register_xref(phandle_t xref, device_t dev)
692 * If the given xref handle doesn't already exist in the list then we
694 * nodes don't contain phandle properties and xref and node handles are
695 * synonymous, so the xref handle is added as the node handle as well.
698 if ((xi = xrefinfo_find(xref, FIND_BY_XREF)) == NULL)
699 xrefinfo_add(xref, xref, dev);