aboutsummaryrefslogtreecommitdiff
path: root/dtc-parser.y
diff options
context:
space:
mode:
authorDavid Gibson <dgibson@sneetch.(none)>2005-10-24 18:18:38 +1000
committerDavid Gibson <dgibson@sneetch.(none)>2005-10-24 18:18:38 +1000
commitf040d95b847c4f7d1fa4c3c6309127b8c1ffd8b3 (patch)
tree1497120f8b1672cc44c203ff0653d1c3de6cb784 /dtc-parser.y
parentfccb194a1451d97a373fc4ab2d66aa985c78b48d (diff)
downloaddtc-f040d95b847c4f7d1fa4c3c6309127b8c1ffd8b3.zip
dtc-f040d95b847c4f7d1fa4c3c6309127b8c1ffd8b3.tar.gz
dtc-f040d95b847c4f7d1fa4c3c6309127b8c1ffd8b3.tar.bz2
Rework tracking of reserve entries during processing. This is initial work
to allow more powerful handling of reserve entries.
Diffstat (limited to 'dtc-parser.y')
-rw-r--r--dtc-parser.y17
1 files changed, 7 insertions, 10 deletions
diff --git a/dtc-parser.y b/dtc-parser.y
index 1bfbfa3..16d2277 100644
--- a/dtc-parser.y
+++ b/dtc-parser.y
@@ -43,7 +43,7 @@ extern struct boot_info *the_boot_info;
int datalen;
int hexlen;
u64 addr;
- struct reserve_entry re;
+ struct reserve_info *re;
}
%token DT_MEMRESERVE
@@ -59,7 +59,7 @@ extern struct boot_info *the_boot_info;
%type <data> propdata
%type <re> memreserve
-%type <data> memreserves
+%type <re> memreserves
%type <data> celllist
%type <data> bytestring
%type <prop> propdef
@@ -79,22 +79,19 @@ sourcefile: memreserves devicetree {
}
;
-memreserves: memreserves memreserve {
- $$ = data_append_addr(data_append_addr($1, $2.address),
- $2.size);
+memreserves: memreserve memreserves {
+ $$ = chain_reserve_entry($1, $2);
}
| /* empty */ {
- $$ = empty_data;
+ $$ = NULL;
}
;
memreserve: DT_MEMRESERVE DT_ADDR DT_ADDR ';' {
- $$.address = $2;
- $$.size = $3;
+ $$ = build_reserve_entry($2, $3, NULL);
}
| DT_MEMRESERVE DT_ADDR '-' DT_ADDR ';' {
- $$.address = $2;
- $$.size = $4 - $2 + 1;
+ $$ = build_reserve_entry($2, $4 - $2 + 1, NULL);
}
;