dtc: import latest upstream dtc
David Gibson
david at gibson.dropbear.id.au
Thu Oct 11 10:09:55 EST 2012
On Wed, Oct 10, 2012 at 09:16:34AM -0600, Stephen Warren wrote:
> On 10/10/2012 01:24 AM, David Gibson wrote:
> > On Tue, Oct 09, 2012 at 10:43:50PM -0600, Warner Losh wrote:
[snip]
> >> .h files include both structs and defines, which are fine for
> >> ordinary C code, but problematic in this context.
> >
> > Right, cpp should be invoked with similar options to the way it's done
> > for asm files which have the same problem. I'm not sure if the
> > current patch does so.
>
> That's probably a reasonable idea, although I imagined that people would
> actually split out the portions of any header file they wanted to use
> with dtc, so that any headers included by *.dts would only include
> #defines. Those headers could be used by both dtc and other .h files (or
> .c files).
Given that header files are right now frequently used in both .c and
.S for the #defines, I don't think we can reasonably expect
differently for dts files. There certainly is the potential for
#include dependency mess, but we cope with it for .S so we can cope
with it for dts as well.
But cpp should definitely be invoked "asm style" for dts files.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
More information about the devicetree-discuss
mailing list