[U-Boot] [PATCH v1 (WIP) 00/16] [Timer]API Rewrite

Wolfgang Denk wd at denx.de
Fri Jul 15 20:34:35 CEST 2011


Dear "J. William Campbell",

In message <4E208227.6010903 at comcast.net> you wrote:
>
>        If the I2C protocol must be available before interrupts are 
> available, then udelay must be used. In the above examples, there are 
> some loops in i2c and spi that appear to be waiting a full second. I 
> assume they are using udelay because the get_timer feature is not yet 
> available to them. I also assume that the example in common/usb.c uses 

No, this is usually not the case.  This long delay is the error case,
which most probably will never happen.  For the normal case, you want
a tight spinning loop that introduces as little additional delay as
possible.

> True, although I expect you will find the statement "on all the other 
> architectures" to be false. Many other architectures, yes, all, no. 
> These other architectures just don't have spi or I2C yet, or if they do, 
> they don't use it "early".

Are you aware of another architecture that cannot provide
sub-microsecond timer resolution?  Which is it?

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
Make it right before you make it faster.


More information about the U-Boot mailing list