Lines Matching refs:overlay
9 #define pr_fmt(fmt) "OF: overlay: " fmt
27 * struct target - info about current target node as recursing through overlay
28 * @np: node where current level of overlay will be applied
32 * an overlay fragment, which is a devicetree subtree. Initially @np is a node
33 * in the live devicetree where the overlay subtree is targeted to be grafted
34 * into. When recursing to the next level of the overlay subtree, the target
35 * also recurses to the next level of the live devicetree, as long as overlay
36 * subtree node also exists in the live devicetree. When a node in the overlay
47 * struct fragment - info about fragment nodes in overlay expanded device tree
48 * @overlay: pointer to the __overlay__ node
49 * @target: target of the overlay operation
52 struct device_node *overlay;
63 * @notify_state: most recent notify action used on overlay
65 * @fragments: fragment nodes in the overlay expanded device tree
134 * of_overlay_notifier_register() - Register notifier for overlay operations
137 * Register for notification on overlay operations on device tree nodes. The
152 * of_overlay_notifier_unregister() - Unregister notifier for overlay operations
173 nd.overlay = fragment->overlay;
179 pr_err("overlay changeset %s notifier error %d, target: %pOF\n",
242 if (fragment->overlay == overlay_node)
248 overlay_name_len = snprintf(NULL, 0, "%pOF", fragment->overlay);
288 * add_changeset_property() - add @overlay_prop to overlay changeset
289 * @ovcs: overlay changeset
291 * @overlay_prop: property to add or update, from overlay tree
306 * in the overlay must match the values in the live tree.
311 * invalid @overlay.
373 pr_err("WARNING: memory leak will occur if overlay removed, property: %pOF/%s\n",
382 * add_changeset_node() - add @node (and children) to overlay changeset
383 * @ovcs: overlay changeset
385 * @node: node from within overlay device tree fragment
391 * a phandle, the overlay node is not allowed to have a phandle.
397 * not contain the full path in node->full_name. Thus an overlay
403 * the full path in node->full_name. Even though it expects the overlay
406 * to nodes in the live devicetree so that it can apply an overlay to
412 * invalid @overlay.
472 * build_changeset_next_level() - add level of overlay changeset
473 * @ovcs: overlay changeset
475 * @overlay_node: node from within an overlay device tree fragment
628 * build_changeset() - populate overlay changeset in @ovcs from @ovcs->fragments
632 * overlay device tree fragments in @ovcs->fragments[]. If an error occurs,
637 * invalid overlay in @ovcs->fragments[].
660 fragment->overlay);
674 fragment->overlay);
738 * init_overlay_changeset() - initialize overlay changeset from overlay tree
740 * @target_base: Point to the target node to apply overlay
810 fragment->overlay = overlay_node;
813 of_node_put(fragment->overlay);
830 fragment->overlay = node;
834 pr_err("symbols in overlay, but not in live tree\n");
844 pr_err("no fragments or symbols in overlay\n");
875 of_node_put(ovcs->fragments[i].overlay);
881 * ovcs->new_fdt due to the policy that overlay notifiers are not
882 * allowed to retain pointers into the overlay devicetree other
883 * than during the window from OF_OVERLAY_PRE_APPLY overlay
884 * notifiers until the OF_OVERLAY_POST_REMOVE overlay notifiers.
900 * of_overlay_apply() - Create and apply an overlay changeset
901 * @ovcs: overlay changeset
902 * @base: point to the target node to apply overlay
904 * Creates and applies an overlay changeset.
906 * If an error is returned by an overlay changeset pre-apply notifier
907 * then no further overlay changeset pre-apply notifier will be called.
909 * If an error is returned by an overlay changeset post-apply notifier
910 * then no further overlay changeset post-apply notifier will be called.
915 * If an error occurred while applying the overlay changeset, then an
919 * following attempt to apply or remove an overlay changeset will be
951 pr_debug("overlay changeset revert error %d\n",
960 pr_err("overlay apply changeset entry notify error %d\n", ret);
981 * of_overlay_fdt_apply() - Create and apply an overlay changeset
982 * @overlay_fdt: pointer to overlay FDT
985 * @base: pointer for the target node to apply overlay
987 * Creates and applies an overlay changeset.
992 * the value of overlay changeset id, which can be passed to of_overlay_remove()
993 * to remove the overlay.
1013 pr_err("devicetree state suspect, refuse to apply overlay\n");
1112 * node in an overlay changeset more topmost than @remove_ovcs?
1146 * We can safely remove the overlay only if it's the top-most one.
1147 * Newly applied overlays are inserted at the tail of the overlay list,
1148 * so a top most overlay is the one that is closest to the tail.
1151 * affected device node in the log list we check if this overlay is
1152 * the one closest to the tail. If another overlay has affected this
1161 pr_err("overlay #%d is not topmost\n", remove_ovcs->id);
1170 * of_overlay_remove() - Revert and free an overlay changeset
1171 * @ovcs_id: Pointer to overlay changeset id
1173 * Removes an overlay if it is permissible. @ovcs_id was previously returned
1176 * If an error occurred while attempting to revert the overlay changeset,
1180 * an overlay changeset will be refused.
1184 * - overlay changeset pre-remove notifier
1185 * - overlay changeset entry revert
1187 * If an error is returned by an overlay changeset pre-remove notifier
1188 * then no further overlay changeset pre-remove notifier will be called.
1194 * - overlay changeset entry notifier
1195 * - overlay changeset post-remove notifier
1197 * If an error is returned by an overlay changeset post-remove notifier
1198 * then no further overlay changeset post-remove notifier will be called.
1212 pr_err("suspect devicetree state, refuse to remove overlay\n");
1222 pr_err("remove: Could not find overlay #%d\n", *ovcs_id);
1245 pr_err("overlay remove changeset entry notify error %d\n", ret);
1251 * Note that the overlay memory will be kfree()ed by
1265 * overlay related memory. This is a memory leak unless a subsequent
1266 * of_overlay_remove() of this overlay is successful.
1278 * of_overlay_remove_all() - Reverts and frees all overlay changesets