[U-Boot] [PATCH v4 1/2] ARMV7: Add support for Samsung ORIGEN board
chander.kashyap at linaro.org
Thu Aug 11 04:17:49 UTC 2011
On 10 August 2011 15:48, Detlev Zundel <dzu at denx.de> wrote:
> Hi Chander,
> >>> lease get rid of all these magic hard coded constants. Use symbolic
> >>> names instead. If needed, auto-generate these from the respective C
> >>> structs. If needed, create the C structs.
> >> I will change hard coded values to symbolic names
> > While doing this, I find that the values written to the registers are
> > just once. So do you still prefer to have them as macros ? I did convert
> > register offsets and addresses to macros, but did not find it right to
> > macros for register values that are used just once. Please advise.
> Most of all we want to get rid of address constants in code. For
> _values_ that are written to some register, my personal preference is
> not so strong, alas if you _do_ use macros, usually already the macro
> name carries documentation as to what this is and it will make code
> reuse easier for the people having to maintain or build upon your code
> in the future.
Thanks for the inputs.
> Zivilisation ist der Zaubertrick, der uns unsere wahre Natur verbirgt.
> -- Salman Rushdie
> DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
with warm regards,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the linaro-dev