[U-Boot] [PATCH RFC] ARMV7: OMAP: I2C driver: Reduce excessively long udelay calls

Steve Sakoman steve at sakoman.com
Fri Oct 15 21:48:57 CEST 2010


On Fri, 2010-10-15 at 21:27 +0200, Wolfgang Denk wrote:
> Dear Steve Sakoman,
> 
> In message <1287158873.7756.66.camel at quadra> you wrote:
> > I've been preparing a patch series for Beagle and Overo that detects expansion
> > board configuration information by reading a 128 byte I2C EEPROM on each
> > expansion board.
> > 
> > Using the OMAP I2C driver in its current form takes about 5-6 seconds to read
> > this small number of bytes!
> > 
> > Examining the code I see that there are a large number of fairly long udelay calls
> > throughout the driver (10 - 50 milliseconds). I looked through the linux driver
> > and did not see equivalent delays in that code.  In fact the longest delay in the
> > linux code was one millisecond.
> 
> Eventually the long delays are needed to make the code work stable
> even under rare conditions, which don't happen to often.  But this may
> be caused by the way the code is written, too...

<snip>

> My feeling is that this driver needs a more thorough rework.

Unfortunately I am inclined to agree with you!

I'll start work on that.

Steve




More information about the U-Boot mailing list