public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 0/4] ARMV7: OMAP: I2C driver: Restructure code	to eliminate udelay calls and improve performance
Date: Wed, 20 Oct 2010 15:33:42 +0200	[thread overview]
Message-ID: <4CBEEFB6.2010402@denx.de> (raw)
In-Reply-To: <1287580067-12700-1-git-send-email-steve@sakoman.com>

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

      parent reply	other threads:[~2010-10-20 13:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-20 13:07 [U-Boot] [PATCH v2 0/4] ARMV7: OMAP: I2C driver: Restructure code to eliminate udelay calls and improve performance Steve Sakoman
2010-10-20 13:07 ` [U-Boot] [PATCH v2 1/4] ARMV7: OMAP: I2C driver: Use same timeout value as linux kernel driver Steve Sakoman
2010-10-20 13:07 ` [U-Boot] [PATCH v2 2/4] ARMV7: OMAP: I2C driver: Restructure i2c_read_byte function Steve Sakoman
2010-10-20 13:07 ` [U-Boot] [PATCH v2 3/4] ARMV7: OMAP: I2C driver: Restructure i2c_write_byte function Steve Sakoman
2010-10-20 13:07 ` [U-Boot] [PATCH v2 4/4] ARMV7: OMAP: I2C driver: Restructure i2c_probe function Steve Sakoman
2010-10-20 13:33 ` Heiko Schocher [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CBEEFB6.2010402@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox