diff options
author | Julius Werner <jwerner@chromium.org> | 2019-05-07 17:05:28 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-06-21 09:20:10 +0000 |
commit | 735ddc930f77950e1f292c574067106cf38e2e87 (patch) | |
tree | 16e58832a3288fd0e0719383145704753d3923a8 /src/include | |
parent | 2ea1c9b29e0549149905833e66bea875e932c5bf (diff) |
device_tree: Add overlay support
This patch adds support for merging a device tree overlay (as defined in
Documentation/dt-object-internal.txt in the dtc repository) into a base
device tree. It was adapted from depthcharge's
http://crosreview.com/1536387.
Change-Id: Ibec833cd471201bcc7a79eebf360d5f12adb8ff9
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32869
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/device_tree.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/device_tree.h b/src/include/device_tree.h index d9d9613f96..8d86bc5acb 100644 --- a/src/include/device_tree.h +++ b/src/include/device_tree.h @@ -180,6 +180,10 @@ void dt_find_bin_prop(const struct device_tree_node *node, const char *name, const char *dt_find_string_prop(const struct device_tree_node *node, const char *name); +/* Apply an overlay to a base device tree. Ownership of the overlay data passes + to the newly combined base tree -- do not free() or access it afterwards! */ +int dt_apply_overlay(struct device_tree *tree, struct device_tree *overlay); + /* * Fixups to apply to a kernel's device tree before booting it. */ |