[U-Boot] [PATCH-OMAP3] OMAP3: Fix typo and cp_delay
Wolfgang Denk
wd at denx.de
Sun Nov 9 21:03:52 CET 2008
Dear dirk.behme at googlemail.com,
In message <49172e21.0407560a.71cf.ffffba13 at mx.google.com> you wrote:
> Subject: [PATCH-OMAP3] OMAP3: Fix typo and cp_delay
>
> From: Dirk Behme <dirk.behme at gmail.com>
>
> Fix typo and cp_delay. Requested by Wolfgang Denk.
See previous comments.
> Signed-off-by: Dirk Behme <dirk.behme at gmail.com>
>
> ---
>
> Regarding cp_delay there was the comment:
>
> -- cut --
> >+static void cp_delay(void)
> >+{
> >+ volatile int i;
> >+
> >+ /* Many OMAP regs need at least 2 nops */
> >+ for (i = 0; i < 100; i++) ;
>
> There is not much reason for the compiler not to optimize this code away.
> -- cut --
>
> Please note that most of ARM code uses *this* cp_delay() implementation. If I understood correctly at IRC, Scott Wood made some tests and volatile prevents gcc from optimizing loop away.
Now this is actually some interesting information which probably
should be part of the commit message - in the present form, it just
gets lost.
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
"Deliver yesterday, code today, think tomorrow."
More information about the U-Boot
mailing list