Hello Steve, Steve Sakoman 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! Executing the i2c probe command takes close > to 10 seconds. > > 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. > > In looking at the TRM I2C section for OMAP3 and OMAP4 I don't see any > requirement > for delays in the programming model description. > > This patch restructures the i2c driver to eliminate most of the udelay calls > by monitoring state changes in the status register. > > The EEPROM reads and the i2c probe execution are now instantaneous. > > This patch series was tested on OMAP3 (Overo) and OMAP4 (Panda). I do not > have access to OMAP2 hardware for testing. > > Steve Sakoman (4): > ARMV7: OMAP: I2C driver: Use same timeout value as linux kernel > driver > ARMV7: OMAP: I2C driver: Restructure i2c_read_byte function > ARMV7: OMAP: I2C driver: Restructure i2c_write_byte function > ARMV7: OMAP: I2C driver: Restructure i2c_probe function > > drivers/i2c/omap24xx_i2c.c | 204 ++++++++++++++++++++++++------------------- > 1 files changed, 114 insertions(+), 90 deletions(-)
Applied v2 to u-boot-i2c.git master Thanks! bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot