Lines Matching full:overlay

41 static void adjust_overlay_phandles(struct device_node *overlay,  in adjust_overlay_phandles()  argument
49 if (overlay->phandle != 0 && overlay->phandle != OF_PHANDLE_ILLEGAL) in adjust_overlay_phandles()
50 overlay->phandle += phandle_delta; in adjust_overlay_phandles()
53 for_each_property_of_node(overlay, prop) { in adjust_overlay_phandles()
66 *(__be32 *)prop->value = cpu_to_be32(overlay->phandle); in adjust_overlay_phandles()
69 for_each_child_of_node(overlay, child) in adjust_overlay_phandles()
73 static int update_usages_of_a_phandle_reference(struct device_node *overlay, in update_usages_of_a_phandle_reference() argument
107 refnode = __of_find_node_by_full_path(of_node_get(overlay), node_path); in update_usages_of_a_phandle_reference()
142 * Subtree @local_fixups, which is overlay node __local_fixups__,
143 * mirrors the fragment node structure at the root of the overlay.
151 const struct device_node *overlay, int phandle_delta) in adjust_local_phandle_references() argument
173 for_each_property_of_node(overlay, prop) { in adjust_local_phandle_references()
194 * The roots of the subtrees are the overlay's __local_fixups__ node in adjust_local_phandle_references()
195 * and the overlay's root node. in adjust_local_phandle_references()
199 for_each_child_of_node(overlay, overlay_child) in adjust_local_phandle_references()
218 * of_resolve_phandles - Relocate and resolve overlay against live tree
220 * @overlay: Pointer to devicetree overlay to relocate and resolve
222 * Modify (relocate) values of local phandles in @overlay to a range that
224 * to the local phandles in @overlay. Update (resolve) phandle references
225 * in @overlay that refer to the live expanded devicetree.
228 * 1 .. live_tree_max_phandle(). The range of phandle values in the overlay
229 * also begin with at 1. Adjust the phandle values in the overlay to begin
233 * The name of each property in the "__fixups__" node in the overlay matches
236 * overlay that need to be updated to contain the phandle reference
238 * the overlay with the phandle values in the live tree.
240 * @overlay must be detached.
242 * Resolving and applying @overlay to the live expanded devicetree must be
250 int of_resolve_phandles(struct device_node *overlay) in of_resolve_phandles() argument
261 if (!overlay) { in of_resolve_phandles()
262 pr_err("null overlay\n"); in of_resolve_phandles()
267 if (!of_node_check_flag(overlay, OF_DETACHED)) { in of_resolve_phandles()
268 pr_err("overlay not detached\n"); in of_resolve_phandles()
274 adjust_overlay_phandles(overlay, phandle_delta); in of_resolve_phandles()
276 for_each_child_of_node(overlay, local_fixups) in of_resolve_phandles()
280 err = adjust_local_phandle_references(local_fixups, overlay, phandle_delta); in of_resolve_phandles()
286 for_each_child_of_node(overlay, child) { in of_resolve_phandles()
326 err = update_usages_of_a_phandle_reference(overlay, prop, phandle); in of_resolve_phandles()
333 pr_err("overlay phandle fixup failed: %d\n", err); in of_resolve_phandles()