diff options
author | Rob Herring <robh@kernel.org> | 2018-05-08 20:07:49 +0200 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2018-05-15 02:45:01 +0200 |
commit | 50aafd60898a8b3edf2f60e014a8288da3b2e5e3 (patch) | |
tree | 9bbb9713e3cc6e0c2e3cea71943e9338b937e0b7 /scripts/dtc/livetree.c | |
parent | Merge tag 'devicetree-fixes-for-4.17' into dt/next to pick-up fixes (diff) | |
download | linux-50aafd60898a8b3edf2f60e014a8288da3b2e5e3.tar.xz linux-50aafd60898a8b3edf2f60e014a8288da3b2e5e3.zip |
scripts/dtc: Update to upstream version v1.4.6-21-g84e414b0b5bc
This adds the following commits from upstream:
84e414b0b5bc tests: Add a test case for the omit-if-no-ref keyword
4038fd90056e dtc: add ability to make nodes conditional on them being referenced
e1f139ea4900 checks: drop warning for missing PCI bridge bus-range
f4eba68d89ee checks: Print duplicate node name instead of parent name
46df1fb1b211 .travis.yml: Run valgrind checks via Travis
14a3002a1aee tests: Update valgrind suppressions for sw_tree1
02c5fe9debc0 tests: Remove valgrind error from tests/get_path
df536831d02c checks: add graph binding checks
2347c96edcbe checks: add a check for duplicate unit-addresses of child nodes
8f1b35f88395 Correct overlay syntactic sugar for generating target-path fragments
afbddcd418fb Suppress warnings on overlay fragments
119e27300359 Improve tests for dtc overlay generation
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'scripts/dtc/livetree.c')
-rw-r--r-- | scripts/dtc/livetree.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/scripts/dtc/livetree.c b/scripts/dtc/livetree.c index 57b7db2ed153..6e4c367f54b3 100644 --- a/scripts/dtc/livetree.c +++ b/scripts/dtc/livetree.c @@ -134,6 +134,20 @@ struct node *name_node(struct node *node, char *name) return node; } +struct node *omit_node_if_unused(struct node *node) +{ + node->omit_if_unused = 1; + + return node; +} + +struct node *reference_node(struct node *node) +{ + node->is_referenced = 1; + + return node; +} + struct node *merge_nodes(struct node *old_node, struct node *new_node) { struct property *new_prop, *old_prop; @@ -224,10 +238,16 @@ struct node * add_orphan_node(struct node *dt, struct node *new_node, char *ref) struct data d = empty_data; char *name; - d = data_add_marker(d, REF_PHANDLE, ref); - d = data_append_integer(d, 0xffffffff, 32); + if (ref[0] == '/') { + d = data_append_data(d, ref, strlen(ref) + 1); - p = build_property("target", d); + p = build_property("target-path", d); + } else { + d = data_add_marker(d, REF_PHANDLE, ref); + d = data_append_integer(d, 0xffffffff, 32); + + p = build_property("target", d); + } xasprintf(&name, "fragment@%u", next_orphan_fragment++); |