@ -56,7 +56,6 @@ static unsigned long long eval_literal(const char *s, int base, int bits);
%token DT_MEMRESERVE
%token DT_MEMRESERVE
%token <propnodename> DT_PROPNODENAME
%token <propnodename> DT_PROPNODENAME
%token <literal> DT_LITERAL
%token <literal> DT_LITERAL
%token <literal> DT_LEGACYLITERAL
%token <cbase> DT_BASE
%token <cbase> DT_BASE
%token <byte> DT_BYTE
%token <byte> DT_BYTE
%token <data> DT_STRING
%token <data> DT_STRING
@ -68,11 +67,8 @@ static unsigned long long eval_literal(const char *s, int base, int bits);
%type <data> propdataprefix
%type <data> propdataprefix
%type <re> memreserve
%type <re> memreserve
%type <re> memreserves
%type <re> memreserves
%type <re> v0_memreserve
%type <re> v0_memreserves
%type <addr> addr
%type <addr> addr
%type <data> celllist
%type <data> celllist
%type <cbase> cellbase
%type <cell> cellval
%type <cell> cellval
%type <data> bytestring
%type <data> bytestring
%type <prop> propdef
%type <prop> propdef
@ -91,10 +87,6 @@ sourcefile:
{
{
the_boot_info = build_boot_info($3, $4, 0);
the_boot_info = build_boot_info($3, $4, 0);
}
}
| v0_memreserves devicetree
{
the_boot_info = build_boot_info($1, $2, 0);
}
;
;
memreserves:
memreserves:
@ -115,37 +107,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:
addr:
DT_LITERAL
DT_LITERAL
{
{
$$ = eval_literal($1, 0, 64);
$$ = eval_literal($1, 0, 64);
}
}
| DT_LEGACYLITERAL
{
$$ = eval_literal($1, 16, 64);
}
;
;
devicetree:
devicetree:
@ -272,23 +238,11 @@ celllist:
}
}
;
;
cellbase:
/* empty */
{
$$ = 16;
}
| DT_BASE
;
cellval:
cellval:
DT_LITERAL
DT_LITERAL
{
{
$$ = eval_literal($1, 0, 32);
$$ = eval_literal($1, 0, 32);
}
}
| cellbase DT_LEGACYLITERAL
{
$$ = eval_literal($2, $1, 32);
}
;
;
bytestring:
bytestring: