Lines Matching full: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; member
63 * @notify_state: most recent notify action used on overlay
65 * @fragments: fragment nodes in the overlay expanded device tree
128 * of_overlay_notifier_register() - Register notifier for overlay operations
131 * Register for notification on overlay operations on device tree nodes. The
146 * of_overlay_notifier_unregister() - Unregister notifier for overlay operations
167 nd.overlay = fragment->overlay; in overlay_notify()
173 pr_err("overlay changeset %s notifier error %d, target: %pOF\n", in overlay_notify()
227 if (fragment->overlay == overlay_node) in dup_and_fixup_symbol_prop()
233 overlay_name_len = snprintf(NULL, 0, "%pOF", fragment->overlay); in dup_and_fixup_symbol_prop()
273 * add_changeset_property() - add @overlay_prop to overlay changeset
274 * @ovcs: overlay changeset
276 * @overlay_prop: property to add or update, from overlay tree
291 * in the overlay must match the values in the live tree.
296 * invalid @overlay.
360 pr_err("WARNING: memory leak will occur if overlay removed, property: %pOF/%s\n", in add_changeset_property()
369 * add_changeset_node() - add @node (and children) to overlay changeset
370 * @ovcs: overlay changeset
372 * @node: node from within overlay device tree fragment
378 * a phandle, the overlay node is not allowed to have a phandle.
384 * not contain the full path in node->full_name. Thus an overlay
390 * the full path in node->full_name. Even though it expects the overlay
393 * to nodes in the live devicetree so that it can apply an overlay to
399 * invalid @overlay.
459 * build_changeset_next_level() - add level of overlay changeset
460 * @ovcs: overlay changeset
462 * @overlay_node: node from within an overlay device tree fragment
593 * @ovcs: Overlay changeset
615 * build_changeset() - populate overlay changeset in @ovcs from @ovcs->fragments
616 * @ovcs: Overlay changeset
619 * overlay device tree fragments in @ovcs->fragments[]. If an error occurs,
624 * invalid overlay in @ovcs->fragments[].
647 fragment->overlay); in build_changeset()
661 fragment->overlay); in build_changeset()
725 * init_overlay_changeset() - initialize overlay changeset from overlay tree
726 * @ovcs: Overlay changeset to build
727 * @target_base: Point to the target node to apply overlay
797 fragment->overlay = overlay_node; in init_overlay_changeset()
800 of_node_put(fragment->overlay); in init_overlay_changeset()
817 fragment->overlay = node; in init_overlay_changeset()
821 pr_err("symbols in overlay, but not in live tree\n"); in init_overlay_changeset()
831 pr_err("no fragments or symbols in overlay\n"); in init_overlay_changeset()
862 of_node_put(ovcs->fragments[i].overlay); in free_overlay_changeset()
868 * ovcs->new_fdt due to the policy that overlay notifiers are not in free_overlay_changeset()
869 * allowed to retain pointers into the overlay devicetree other in free_overlay_changeset()
870 * than during the window from OF_OVERLAY_PRE_APPLY overlay in free_overlay_changeset()
871 * notifiers until the OF_OVERLAY_POST_REMOVE overlay notifiers. in free_overlay_changeset()
887 * of_overlay_apply() - Create and apply an overlay changeset
888 * @ovcs: overlay changeset
889 * @base: point to the target node to apply overlay
891 * Creates and applies an overlay changeset.
893 * If an error is returned by an overlay changeset pre-apply notifier
894 * then no further overlay changeset pre-apply notifier will be called.
896 * If an error is returned by an overlay changeset post-apply notifier
897 * then no further overlay changeset post-apply notifier will be called.
902 * If an error occurred while applying the overlay changeset, then an
906 * following attempt to apply or remove an overlay changeset will be
938 pr_debug("overlay changeset revert error %d\n", in of_overlay_apply()
947 pr_err("overlay apply changeset entry notify error %d\n", ret); in of_overlay_apply()
962 * of_overlay_fdt_apply() - Create and apply an overlay changeset
963 * @overlay_fdt: pointer to overlay FDT
966 * @base: pointer for the target node to apply overlay
968 * Creates and applies an overlay changeset.
973 * the value of overlay changeset id, which can be passed to of_overlay_remove()
974 * to remove the overlay.
994 pr_err("devicetree state suspect, refuse to apply overlay\n"); in of_overlay_fdt_apply()
1093 * node in an overlay changeset more topmost than @remove_ovcs?
1127 * We can safely remove the overlay only if it's the top-most one.
1128 * Newly applied overlays are inserted at the tail of the overlay list,
1129 * so a top most overlay is the one that is closest to the tail.
1132 * affected device node in the log list we check if this overlay is
1133 * the one closest to the tail. If another overlay has affected this
1142 pr_err("overlay #%d is not topmost\n", remove_ovcs->id); in overlay_removal_is_ok()
1151 * of_overlay_remove() - Revert and free an overlay changeset
1152 * @ovcs_id: Pointer to overlay changeset id
1154 * Removes an overlay if it is permissible. @ovcs_id was previously returned
1157 * If an error occurred while attempting to revert the overlay changeset,
1161 * an overlay changeset will be refused.
1165 * - overlay changeset pre-remove notifier
1166 * - overlay changeset entry revert
1168 * If an error is returned by an overlay changeset pre-remove notifier
1169 * then no further overlay changeset pre-remove notifier will be called.
1175 * - overlay changeset entry notifier
1176 * - overlay changeset post-remove notifier
1178 * If an error is returned by an overlay changeset post-remove notifier
1179 * then no further overlay changeset post-remove notifier will be called.
1190 pr_err("suspect devicetree state, refuse to remove overlay\n"); in of_overlay_remove()
1200 pr_err("remove: Could not find overlay #%d\n", *ovcs_id); in of_overlay_remove()
1223 pr_err("overlay remove changeset entry notify error %d\n", ret); in of_overlay_remove()
1229 * Note that the overlay memory will be kfree()ed by in of_overlay_remove()
1243 * overlay related memory. This is a memory leak unless a subsequent in of_overlay_remove()
1244 * of_overlay_remove() of this overlay is successful. in of_overlay_remove()
1256 * of_overlay_remove_all() - Reverts and frees all overlay changesets