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 <jdl@freescale.com>
This commit is contained in:
Jon Loeliger 2008-08-14 17:19:37 -05:00
parent e5c8e1dcd7
commit 4e1a0a0129
10 changed files with 77 additions and 164 deletions

View file

@ -52,15 +52,10 @@ LINECOMMENT "//".*\n
#define DPRINT(fmt, ...) do { } while (0)
#endif
static int dts_version; /* = 0 */
static int dts_version = 1;
#define BEGIN_DEFAULT() if (dts_version == 0) { \
DPRINT("<INITIAL>\n"); \
BEGIN(INITIAL); \
} else { \
DPRINT("<V1>\n"); \
#define BEGIN_DEFAULT() DPRINT("<V1>\n"); \
BEGIN(V1); \
}
static void push_input_file(const char *filename);
static int pop_input_file(void);
@ -106,25 +101,6 @@ static int pop_input_file(void);
return DT_LABEL;
}
<INITIAL>[bodh]# {
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]+ {
yylval.literal = xstrdup(yytext);
DPRINT("Literal: '%s'\n", yylval.literal);
return DT_LEGACYLITERAL;
}
<V1>[0-9]+|0[xX][0-9a-fA-F]+ {
yylval.literal = xstrdup(yytext);
DPRINT("Literal: '%s'\n", yylval.literal);
@ -144,12 +120,6 @@ static int pop_input_file(void);
return DT_REF;
}
<INITIAL>"&/"{PATHCHAR}+ { /* old-style path reference */
DPRINT("Ref: %s\n", yytext+1);
yylval.labelref = xstrdup(yytext+1);
return DT_REF;
}
<BYTESTRING>[0-9a-fA-F]{2} {
yylval.byte = strtol(yytext, NULL, 16);
DPRINT("Byte: %02x\n", (int)yylval.byte);