diff options
| author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-10-17 13:42:42 +0900 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2017-11-17 07:43:32 -0500 |
| commit | 999a78d5cf00dfb8cd8342454933ea492e955377 (patch) | |
| tree | cfbc8301d7c74011244aa42daeee141fc804aaf1 /scripts/dtc/dtc-parser.y | |
| parent | 0d8216182388a5e485aa84b3175ea87d8f9b57c5 (diff) | |
scripts/dtc: Update to upstream version v1.4.5-3-gb1a60033c110
This adds the following commits from upstream:
b1a6003 tests: Add a test for overlays syntactic sugar
737b2df overlay: Add syntactic sugar version of overlays
497432f checks: Use proper format modifier for size_t
22a65c5 dtc: Bump version to v1.4.5
c575d80 Add fdtoverlay to .gitignore
b6a6f94 fdtoverlay: Sanity check blob size
8c1eb15 pylibfdt: Use Python2 explicitly
ee3d26f checks: add interrupts property check
c1e7738 checks: add gpio binding properties check
b3bbac0 checks: add phandle with arg property checks
[ sync with Linux commit: 4201d057ea91c3d6efd2db65219bc91fae413bc2 ]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/dtc/dtc-parser.y')
| -rw-r--r-- | scripts/dtc/dtc-parser.y | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/scripts/dtc/dtc-parser.y b/scripts/dtc/dtc-parser.y index ca3f5003427..affc81a8f9a 100644 --- a/scripts/dtc/dtc-parser.y +++ b/scripts/dtc/dtc-parser.y @@ -182,10 +182,19 @@ devicetree: { struct node *target = get_node_by_ref($1, $2); - if (target) + if (target) { merge_nodes(target, $3); - else - ERROR(&@2, "Label or path %s not found", $2); + } else { + /* + * We rely on the rule being always: + * versioninfo plugindecl memreserves devicetree + * so $-1 is what we want (plugindecl) + */ + if ($<flags>-1 & DTSF_PLUGIN) + add_orphan_node($1, $3, $2); + else + ERROR(&@2, "Label or path %s not found", $2); + } $$ = $1; } | devicetree DT_DEL_NODE DT_REF ';' @@ -200,6 +209,11 @@ devicetree: $$ = $1; } + | /* empty */ + { + /* build empty node */ + $$ = name_node(build_node(NULL, NULL), ""); + } ; nodedef: |
