[DTC PATCH] Add support for decimal, octal and binary based cell values.

David Gibson david at gibson.dropbear.id.au
Fri Feb 16 09:14:12 EST 2007


On Thu, Feb 15, 2007 at 12:41:50PM -0600, Kumar Gala wrote:
> 
> On Feb 15, 2007, at 11:49 AM, Yoder Stuart-B08248 wrote:
> 
> >
> >
> >> -----Original Message-----
> >> From: linuxppc-dev-bounces+b08248=freescale.com at ozlabs.org
> >> [mailto:linuxppc-dev-bounces+b08248=freescale.com at ozlabs.org]
> >> On Behalf Of Kumar Gala
> > [snip]
> >>> New syntax d#, b#, o# and h# allow for an explicit prefix
> >>> on cell values to specify their base.  Eg: <d# 123>
> >>>
> >>> Signed-off-by: Jon Loeliger <jdl at freescale.com>
> >>>
> >>> ---
> >>
> >> What are people's thoughts on supporting '0x' and '0X' for hex?
> >
> > Are you saying allow d#1234, h#5678, and 0x5678?  Or use 0x instead
> > of h#?
> 
> I'm saying in addition to supporting the d#, h# notation.
> 
> The reason I'm suggesting support '0x' is its pretty natural from C  
> and I know there have been a number of times when I forget that all  
> int constants in .dts are hex.

I'd prefer not to do this.  I agree it would be nice in some ways, but
I'm worried that if people see 0x all over the place, they'll assume
that things without an 0x are decimal, which they can't be for
compatibility.

-- 
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 Linuxppc-dev mailing list