Re: [PATCH V2] DTC: Remove support for the legacy DTS source file format.
On Thu, Aug 14, 2008 at 7:29 PM, David Gibson [EMAIL PROTECTED] wrote: On Thu, Aug 14, 2008 at 06:02:43PM -0500, Jon Loeliger wrote: Now that all in-kernel-tree DTS files are properly /dts-v1/, remove direct support for the older, un-numbered DTS source file format. Um.. why? I just don't see a compelling reason to remove this backwards compatibility. It costs us very little to keep it around indefinitely. I agree, why are we removing backwards compatibility? The dts-v1 format isn't that old, so I'm sure there are plenty of device trees out there, especially on our BSPs, that haven't been updated yet. How about just printing a warning and saying that the device tree should be updated with the conversion tool? -- Timur Tabi Linux kernel developer at Freescale ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH V2] DTC: Remove support for the legacy DTS source file format.
On Thu, Aug 14, 2008 at 7:29 PM, David Gibson [EMAIL PROTECTED] wrote: On Thu, Aug 14, 2008 at 06:02:43PM -0500, Jon Loeliger wrote: Now that all in-kernel-tree DTS files are properly /dts-v1/, remove direct support for the older, un-numbered DTS source file format. Um.. why? I just don't see a compelling reason to remove this backwards compatibility. It costs us very little to keep it around indefinitely. Because we are going to get rid of the cruft, simplify things, and move forward. Really. This was the plan from the onset. I agree, why are we removing backwards compatibility? The dts-v1 format isn't that old, so I'm sure there are plenty of device trees out there, especially on our BSPs, that haven't been updated yet. They can run the conversion tool and be fine. How about just printing a warning and saying that the device tree should be updated with the conversion tool? How about all the in-tree DTS files are already V1? jdl ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH V2] DTC: Remove support for the legacy DTS source file format.
On Fri, Aug 15, 2008 at 10:44:33AM -0500, Jon Loeliger wrote: On Thu, Aug 14, 2008 at 7:29 PM, David Gibson [EMAIL PROTECTED] wrote: On Thu, Aug 14, 2008 at 06:02:43PM -0500, Jon Loeliger wrote: Now that all in-kernel-tree DTS files are properly /dts-v1/, remove direct support for the older, un-numbered DTS source file format. Um.. why? I just don't see a compelling reason to remove this backwards compatibility. It costs us very little to keep it around indefinitely. Because we are going to get rid of the cruft, simplify things, and move forward. Really. This was the plan from the onset. Uh.. removing compatibility for the old format was never part of *my* plan for the change. Discourage any further use of the v0 format, yes, remove support for, no. I just don't see a benefit to this. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH V2] DTC: Remove support for the legacy DTS source file format.
Now that all in-kernel-tree DTS files are properly /dts-v1/, remove direct support for the older, un-numbered DTS source file format. Convert existing tests to /dts-v1/ and remove support for the conversion tests themselves. For now, though, the conversion tool still exists. Signed-off-by: Jon Loeliger [EMAIL PROTECTED] --- Bah. Forgot to eliminate the legacy BASE and LITERAL tokens in the first version of this patch. There's still a bit more improvement possible WRT the initial dts_versio value and lexer state. Later. dtc-lexer.l | 23 -- dtc-parser.y | 46 - tests/base01.dts | 24 -- tests/empty.dts |2 + tests/escapes.dts |2 + tests/label01.dts | 38 +++- tests/references_dts0.dts | 12 ++ tests/run_tests.sh| 27 +- tests/test01.dts | 38 +++- tests/test_tree1_dts0.dts | 18 +--- 10 files changed, 75 insertions(+), 155 deletions(-) diff --git a/dtc-lexer.l b/dtc-lexer.l index 6f8b7dd..e12a4ef 100644 --- a/dtc-lexer.l +++ b/dtc-lexer.l @@ -110,29 +110,6 @@ static int pop_input_file(void); return DT_LABEL; } -INITIAL[bodh]# { - yylloc.file = srcpos_file; - yylloc.first_line = yylineno; - if (*yytext == 'b') - yylval.cbase = 2; - else if (*yytext == 'o') - yylval.cbase = 8; - else if (*yytext == 'd') - yylval.cbase = 10; - else - yylval.cbase = 16; - DPRINT(Base: %d\n, yylval.cbase); - return DT_BASE; - } - -INITIAL[0-9a-fA-F]+ { - yylloc.file = srcpos_file; - yylloc.first_line = yylineno; - yylval.literal = strdup(yytext); - DPRINT(Literal: '%s'\n, yylval.literal); - return DT_LEGACYLITERAL; - } - V1[0-9]+|0[xX][0-9a-fA-F]+ { yylloc.file = srcpos_file; yylloc.first_line = yylineno; diff --git a/dtc-parser.y b/dtc-parser.y index b2ab562..3762181 100644 --- a/dtc-parser.y +++ b/dtc-parser.y @@ -55,7 +55,6 @@ static unsigned long long eval_literal(const char *s, int base, int bits); %token DT_MEMRESERVE %token propnodename DT_PROPNODENAME %token literal DT_LITERAL -%token literal DT_LEGACYLITERAL %token cbase DT_BASE %token byte DT_BYTE %token data DT_STRING @@ -67,11 +66,8 @@ static unsigned long long eval_literal(const char *s, int base, int bits); %type data propdataprefix %type re memreserve %type re memreserves -%type re v0_memreserve -%type re v0_memreserves %type addr addr %type data celllist -%type cbase cellbase %type cell cellval %type data bytestring %type prop propdef @@ -90,10 +86,6 @@ sourcefile: { the_boot_info = build_boot_info($3, $4, 0); } - | v0_memreserves devicetree - { - the_boot_info = build_boot_info($1, $2, 0); - } ; memreserves: @@ -114,37 +106,11 @@ memreserve: } ; -v0_memreserves: - /* empty */ - { - $$ = NULL; - } - | v0_memreserve v0_memreserves - { - $$ = chain_reserve_entry($1, $2); - }; - ; - -v0_memreserve: - memreserve - { - $$ = $1; - } - | label DT_MEMRESERVE addr '-' addr ';' - { - $$ = build_reserve_entry($3, $5 - $3 + 1, $1); - } - ; - addr: DT_LITERAL { $$ = eval_literal($1, 0, 64); } - | DT_LEGACYLITERAL - { - $$ = eval_literal($1, 16, 64); - } ; devicetree: @@ -269,23 +235,11 @@ celllist: } ; -cellbase: - /* empty */ - { - $$ = 16; - } - | DT_BASE - ; - cellval: DT_LITERAL { $$ = eval_literal($1, 0, 32); } - | cellbase DT_LEGACYLITERAL - { - $$ = eval_literal($2, $1, 32); - } ; bytestring: diff --git a/tests/base01.dts b/tests/base01.dts index f84bc49..97a5dd5 100644 --- a/tests/base01.dts +++ b/tests/base01.dts @@ -1,3 +1,5 @@ +/dts-v1/; + / { model = SomeModel;
Re: [PATCH V2] DTC: Remove support for the legacy DTS source file format.
On Thu, Aug 14, 2008 at 06:02:43PM -0500, Jon Loeliger wrote: Now that all in-kernel-tree DTS files are properly /dts-v1/, remove direct support for the older, un-numbered DTS source file format. Um.. why? I just don't see a compelling reason to remove this backwards compatibility. It costs us very little to keep it around indefinitely. Convert existing tests to /dts-v1/ and remove support for the conversion tests themselves. For now, though, the conversion tool still exists. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev