Lines Matching refs:overlay

40 static void adjust_overlay_phandles(struct device_node *overlay,
48 if (overlay->phandle != 0 && overlay->phandle != OF_PHANDLE_ILLEGAL)
49 overlay->phandle += phandle_delta;
52 for_each_property_of_node(overlay, prop) {
65 *(__be32 *)prop->value = cpu_to_be32(overlay->phandle);
68 for_each_child_of_node(overlay, child)
72 static int update_usages_of_a_phandle_reference(struct device_node *overlay,
110 refnode = __of_find_node_by_full_path(of_node_get(overlay), node_path);
151 * Subtree @local_fixups, which is overlay node __local_fixups__,
152 * mirrors the fragment node structure at the root of the overlay.
160 struct device_node *overlay, int phandle_delta)
182 for_each_property_of_node(overlay, prop) {
203 * The roots of the subtrees are the overlay's __local_fixups__ node
204 * and the overlay's root node.
208 for_each_child_of_node(overlay, overlay_child)
231 * of_resolve_phandles - Relocate and resolve overlay against live tree
233 * @overlay: Pointer to devicetree overlay to relocate and resolve
235 * Modify (relocate) values of local phandles in @overlay to a range that
237 * to the local phandles in @overlay. Update (resolve) phandle references
238 * in @overlay that refer to the live expanded devicetree.
241 * 1 .. live_tree_max_phandle(). The range of phandle values in the overlay
242 * also begin with at 1. Adjust the phandle values in the overlay to begin
246 * The name of each property in the "__fixups__" node in the overlay matches
249 * overlay that need to be updated to contain the phandle reference
251 * the overlay with the phandle values in the live tree.
253 * @overlay must be detached.
255 * Resolving and applying @overlay to the live expanded devicetree must be
263 int of_resolve_phandles(struct device_node *overlay)
274 if (!overlay) {
275 pr_err("null overlay\n");
280 if (!of_node_check_flag(overlay, OF_DETACHED)) {
281 pr_err("overlay not detached\n");
287 adjust_overlay_phandles(overlay, phandle_delta);
289 for_each_child_of_node(overlay, local_fixups)
293 err = adjust_local_phandle_references(local_fixups, overlay, phandle_delta);
299 for_each_child_of_node(overlay, child) {
339 err = update_usages_of_a_phandle_reference(overlay, prop, phandle);
346 pr_err("overlay phandle fixup failed: %d\n", err);