[U-Boot] [PATCH V2 2/5] ARM: Add Support for Marvell Pantheon Familiy SoCs

Wolfgang Denk wd at denx.de
Wed Jan 26 08:50:29 CET 2011


Dear Lei Wen,

In message <AANLkTin0HQKxKiLas8H4_GHmFsdi1Mt3gPbTK0A17r2d at mail.gmail.com> you wrote:
> 
> >> +       while (loop--);
> >
> > Please write:
> >
> >            while (loop--)
> >                        ;
> 
> Fixed...
> >
> > But then - are you sure the compiler does not optimize this out?   You
> > probably want to use __udelay() instead.
>
> From the practice, we think this loop is enough to make timer stablize...

There is nothing in this code to prevent the cmpiler from optimizing
this out.

You can as well delete these lines then.

If you need a delay, then you must do better.

> Involve the __udelay() may not suitable for the timer functions...

Depends...

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
"The pathology is to want control, not that you ever get it,  because
of course you never do."                            - Gregory Bateson


More information about the U-Boot mailing list