summaryrefslogtreecommitdiff
path: root/scripts/dtc
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@gmail.com>2020-04-11 20:43:07 +0200
committerMarek Vasut <marek.vasut+renesas@gmail.com>2020-05-20 13:20:19 +0200
commitc1bde2378a7673c992783b4c00729a52ba18e830 (patch)
treeac8c26693e7bfbdf832117c72fd89377a961e414 /scripts/dtc
parentc2279d784e35fa25ee3a9fa28a74a1ba545f8c1e (diff)
libfdt: Export overlay_apply_node() as fdt_overlay_apply_node()
This function is useful to merge a subset of DT into another DT, for example if some prior-stage firmware passes a DT fragment to U-Boot and U-Boot needs to merge it into its own DT. Export this function to permit implementing such functionality. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'scripts/dtc')
-rw-r--r--scripts/dtc/libfdt/fdt_overlay.c5
-rw-r--r--scripts/dtc/libfdt/libfdt.h7
2 files changed, 12 insertions, 0 deletions
diff --git a/scripts/dtc/libfdt/fdt_overlay.c b/scripts/dtc/libfdt/fdt_overlay.c
index be71873366..c090e6991e 100644
--- a/scripts/dtc/libfdt/fdt_overlay.c
+++ b/scripts/dtc/libfdt/fdt_overlay.c
@@ -879,3 +879,8 @@ err:
return ret;
}
+
+int fdt_overlay_apply_node(void *fdt, int target, void *fdto, int node)
+{
+ return overlay_apply_node(fdt, target, fdto, node);
+}
diff --git a/scripts/dtc/libfdt/libfdt.h b/scripts/dtc/libfdt/libfdt.h
index fa63fffe28..421f90ad93 100644
--- a/scripts/dtc/libfdt/libfdt.h
+++ b/scripts/dtc/libfdt/libfdt.h
@@ -2032,6 +2032,13 @@ int fdt_del_node(void *fdt, int nodeoffset);
*/
int fdt_overlay_apply(void *fdt, void *fdto);
+/**
+ * fdt_overlay_apply_node - Merges a node into the base device tree
+ *
+ * See overlay_apply_node() for details.
+ */
+int fdt_overlay_apply_node(void *fdt, int target, void *fdto, int node);
+
/**********************************************************************/
/* Debugging / informational functions */
/**********************************************************************/