[RFC PATCH 0/3] ARM: use C pre-processor with dtc

Tony Lindgren tony at atomide.com
Wed Sep 26 09:46:16 EST 2012


* Stephen Warren <swarren at wwwdotorg.org> [120925 12:53]:
> On 09/25/2012 01:35 PM, Scott Wood wrote:
> > 
> > Do you have an example of where you'd actually benefit from this?  I'd
> > think most things could either be done reasonably well with what's built
> > into DTC (see what we've done in arch/powerpc/boot/dts/fsl), or would
> > need math expression support in DTC (or has that been added?).
> 
> Yes, support for basic integer math in cell values has indeed been
> recently added to upstream dtc. I don't believe this has been ported
> into the in-kernel dtc yet though.
> 
> The primary motivation here is probably naming constants and associated
> readability. For example, instead of:
> 
> nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */
> 
> You could write:
> 
> nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO_PV1 0>;
> 
> No more opaque numbers!

This would be nice indeed.

Regards,

Tony


More information about the devicetree-discuss mailing list