Thread (1 message) 1 message, 1 author, 2011-05-02

Re: DTC failure on /memreserve/ if moved after /include/

From: Jon Loeliger <hidden>
Date: 2011-05-02 21:06:01

The following from tegra-harmony.dts compiles fine:

    /dts-v1/;

    /memreserve/ 0x1c000000 0x04000000;
    /include/ "tegra250.dts"

    / {

However, if I re-order this as follows:

    /dts-v1/;
    /include/ "tegra250.dts"

    /memreserve/ 0x1c000000 0x04000000;

    / {

Then dtc fails:

Is this a dtc bug, or does the DTS syntax actually disallow this?

Correct.  The grammar is explicitly:

    sourcefile:
	      DT_V1 ';' memreserves devicetree
	    ;

    memreserves:
	      /* empty */
	    | memreserve memreserves
	    ;

    memreserve:
	      DT_MEMRESERVE addr addr ';'


and then much later devicetree leads to...:


    propdata:
	      propdataprefix DT_STRING
	    | propdataprefix '<' celllist '>'
	    | propdataprefix '[' bytestring ']'
	    | propdataprefix DT_REF
	    | propdataprefix DT_INCBIN '(' DT_STRING ',' addr ',' addr ')'

where INCBIN is the include mechanism.

jdl
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help