From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Sakoman Date: Fri, 15 Oct 2010 12:48:57 -0700 Subject: [U-Boot] [PATCH RFC] ARMV7: OMAP: I2C driver: Reduce excessively long udelay calls In-Reply-To: <20101015192718.6340C1365CF@gemini.denx.de> References: <1287158873.7756.66.camel@quadra> <20101015192718.6340C1365CF@gemini.denx.de> Message-ID: <1287172137.7756.72.camel@quadra> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, 2010-10-15 at 21:27 +0200, Wolfgang Denk wrote: > Dear Steve Sakoman, > > In message <1287158873.7756.66.camel@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... > 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