[U-Boot] [PATCH] ARM AT91 new board EB+CPUx9K2

Wolfgang Denk wd at denx.de
Tue Oct 27 19:35:06 CET 2009


Dear Jens Scharsig,

In message <hc6pk5$tvs$1 at ger.gmane.org> you wrote:
>
> > Please use I/O accessors to access device registers. Please fix
> > globally.
> Do you mean change to
> 
> writel(AT91C_PA23_TXD2, ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_OER);
> 
> like notation

Close, but please also get rid of this "((AT91PS_PIO) AT91C_BASE_PIOA)"
thing, especialy the cast is nasty. Declare a real pointer variable to
the respective data structure, and use that.

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If the odds are a million to one against something occuring,  chances
are 50-50 it will.


More information about the U-Boot mailing list