From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jon Loeliger Subject: Re: DTC failure on /memreserve/ if moved after /include/ Date: Mon, 02 May 2011 16:06:01 -0500 Message-ID: References: <74CDBE0F657A3D45AFBB94109FB122FF0497F1B1BF@HQMAIL01.nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-reply-to: <74CDBE0F657A3D45AFBB94109FB122FF0497F1B1BF-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Stephen Warren Cc: "devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org" List-Id: devicetree@vger.kernel.org > 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