diff options
author | David Gibson <dgibson@sneetch.(none)> | 2005-10-24 18:18:38 +1000 |
---|---|---|
committer | David Gibson <dgibson@sneetch.(none)> | 2005-10-24 18:18:38 +1000 |
commit | f040d95b847c4f7d1fa4c3c6309127b8c1ffd8b3 (patch) | |
tree | 1497120f8b1672cc44c203ff0653d1c3de6cb784 /dtc-parser.y | |
parent | fccb194a1451d97a373fc4ab2d66aa985c78b48d (diff) | |
download | dtc-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.y | 17 |
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); } ; |