From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pantelis Antoniou Subject: [PATCH v7 5/5] plugin: Transparently support old style syntax Date: Tue, 24 May 2016 20:50:39 +0300 Message-ID: <1464112239-29856-6-git-send-email-pantelis.antoniou@konsulko.com> References: <1464112239-29856-1-git-send-email-pantelis.antoniou@konsulko.com> Return-path: In-Reply-To: <1464112239-29856-1-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> Sender: devicetree-compiler-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: David Gibson Cc: Jon Loeliger , Grant Likely , Rob Herring , Frank Rowand , Mark Rutland , Jan Luebbe , Sascha Hauer , Matt Porter , devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: devicetree@vger.kernel.org The old style syntax for plugins is still out in the wild. This patch transparently support it. Signed-off-by: Pantelis Antoniou --- dtc-parser.y | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/dtc-parser.y b/dtc-parser.y index 2890c1c..4a67baf 100644 --- a/dtc-parser.y +++ b/dtc-parser.y @@ -77,6 +77,7 @@ extern unsigned int the_versionflags; %type propdataprefix %type versioninfo %type plugindecl +%type oldplugindecl %type memreserve %type memreserves %type arrayprefix @@ -107,10 +108,10 @@ extern unsigned int the_versionflags; %% sourcefile: - versioninfo ';' memreserves devicetree + versioninfo ';' oldplugindecl memreserves devicetree { - the_boot_info = build_boot_info($1, $3, $4, - guess_boot_cpuid($4)); + the_boot_info = build_boot_info($1 | $3, $4, $5, + guess_boot_cpuid($5)); } ; @@ -134,6 +135,18 @@ plugindecl: } ; +oldplugindecl: + DT_PLUGIN ';' + { + the_versionflags |= VF_PLUGIN; + $$ = VF_PLUGIN; + } + | /* empty */ + { + $$ = 0; + } + ; + memreserves: /* empty */ { -- 1.7.12