[U-Boot] [PATCH 0/4 V2] Add basic NVIDIA Tegra2 SoC support

Wolfgang Denk wd at denx.de
Tue Jan 18 00:27:46 CET 2011


Dear Tom Warren,

In message <AANLkTi=f-14JNam_DY5c1sGTT0nMqM-pNOk6gDg4d80d at mail.gmail.com> you wrote:
>
> 1) IO access functions - I pre-reviewed my patch series with Wolfgang
> (to hopefully catch any blatant errors and smooth
> the process) and he indicated that C structs and I/O accessor funcs or
> macros were preferred to my base+offset original code.

I don't think I said "preferred".

I apologize if I really should have been unclear. Fact is, the use of
I/O accessors is mandatory for any new code going in.

> Since the ARM is 32-bit, and all of our registers are I/O mapped, it
> made sense just to cast the necessary HW mem-mapped
> regs as volatile structs and access the members directly. Works well,
> is easy to read & understand, etc. Let me know (with
> examples, if possible) how I can make it better.

It does NOT make sense. Please read the
linux/Documentation/volatile-considered-harmful.txt document, and see
recent dicussion in the "ARM: Avoid compiler optimization for usages
of readb, writeb and friends." thread about what happens when you use
just volatile pointers.

> 2) Compiling out support for UARTA or UARTD - didn't seem necessary -
> size isn't an issue at this point with Tegra2 U-Boot,

Maybe you don't care, but we do.

Please see http://www.denx.de/wiki/U-Boot/DesignPrinciples, item 5

> I was going to respond to your review w/a direct, inline reply, but I
> thought it better to get the V2 patch out there before the
> weekend (we're off for MLK, as well). I'm under some pressure to get a
> baseline Tegra2 patchset in before the merge window
> closes.  I'll be sure to respond to each issue directly on the list in
> the future, though.

Please also make sure to maintain a changelog of in each of your
patches (see second bullet in
http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions).




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
IMPORTANT NOTICE TO PURCHASERS: The Entire Physical Universe,  Inclu-
ding  This Product, May One Day Collapse Back into an Infinitesimally
Small Space. Should  Another  Universe  Subsequently  Re-emerge,  the
Existence of This Product in That Universe Cannot Be Guaranteed.


More information about the U-Boot mailing list