From: Steve Sakoman <steve@sakoman.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH RFC 3/4] ARMV7: OMAP: I2C driver: Restructure i2c_write_byte function
Date: Wed, 20 Oct 2010 06:11:59 -0700 [thread overview]
Message-ID: <1287580319.7756.157.camel@quadra> (raw)
In-Reply-To: <4CBE8748.60300@denx.de>
On Wed, 2010-10-20 at 08:08 +0200, Heiko Schocher wrote:
> Hello Steve,
>
> Steve Sakoman wrote:
> > This patch removes the "magic number" delays and instead
> > monitors state changes in the status register bits.
> >
> > Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
> > ---
> > drivers/i2c/omap24xx_i2c.c | 76 +++++++++++++++++++++++--------------------
> > 1 files changed, 41 insertions(+), 35 deletions(-)
>
> After trying this for the omap3_beagle board, I get an
> compiler warning:
>
> [hs at pollux u-boot]$ ./MAKEALL omap3_beagle
> Configuring for omap3_beagle board...
> omap24xx_i2c.c: In function 'i2c_write_byte':
> omap24xx_i2c.c:221: warning: unused variable 'stat'
Hmm . . . I can swear I fixed that! Must be getting old :-)
> text data bss dec hex filename
> 218103 11412 202384 431899 6971b ./u-boot
>
> --------------------- SUMMARY ----------------------------
> Boards compiled: 1
> Boards with warnings or errors: 1 ( omap3_beagle )
> ----------------------------------------------------------
> [hs at pollux u-boot]$
>
> following patch fixes it.
>
> BTW:
> Just for the record, your patchset works fine and faster
> on the beagle board, for example:
>
> before your after your
> patchset patchset
> i2c probe 9s 0,4s
> i2c md 48 0 100 17s 1s
I'm glad that you see the same speedups!
What tool do you use to measure the speedups?
> would you post a v2 of this patch, and I add my
> "Tested-by" to it, or is it OK, if I add my fix patch
> to u-boot-i2c master?
I've posted v2 with your "Tested-by" and the warning fix.
If it helps, the patches are in my omap4-next-upstream branch:
http://www.sakoman.com/cgi-bin/gitweb.cgi?p=u-boot.git;a=shortlog;h=refs/heads/omap4-next-upstream
Thanks for testing and for the comments!
Steve
> From 01c6c59014c4174ad4d13944d740d3491d9cf137 Mon Sep 17 00:00:00 2001
> From: Heiko Schocher <hs@denx.de>
> Date: Wed, 20 Oct 2010 07:57:05 +0200
> Subject: [PATCH] ARMV7: OMAP: I2C driver: fix compiler warning
>
> Signed-off-by: Heiko Schocher <hs@denx.de>
> ---
> drivers/i2c/omap24xx_i2c.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
> index eb153fb..a72d1a1 100644
> --- a/drivers/i2c/omap24xx_i2c.c
> +++ b/drivers/i2c/omap24xx_i2c.c
> @@ -218,7 +218,7 @@ read_exit:
> static int i2c_write_byte (u8 devaddr, u8 regoffset, u8 value)
> {
> int i2c_error = 0;
> - u16 status, stat;
> + u16 status;
>
> /* wait until bus not busy */
> wait_for_bb ();
>
> bye,
> Heiko
next prev parent reply other threads:[~2010-10-20 13:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 4:35 [U-Boot] [PATCH RFC 0/4] ARMV7: OMAP: I2C driver: Restructure code to eliminate udelay calls and improve performance Steve Sakoman
2010-10-19 4:35 ` [U-Boot] [PATCH RFC 1/4] ARMV7: OMAP: I2C driver: Use same timeout value as linux kernel driver Steve Sakoman
2010-10-20 5:49 ` Heiko Schocher
2010-10-19 4:35 ` [U-Boot] [PATCH RFC 2/4] ARMV7: OMAP: I2C driver: Restructure i2c_read_byte function Steve Sakoman
2010-10-20 5:50 ` Heiko Schocher
2010-10-19 4:35 ` [U-Boot] [PATCH RFC 3/4] ARMV7: OMAP: I2C driver: Restructure i2c_write_byte function Steve Sakoman
2010-10-20 5:50 ` Heiko Schocher
2010-10-20 6:08 ` Heiko Schocher
2010-10-20 13:11 ` Steve Sakoman [this message]
2010-10-20 13:22 ` Heiko Schocher
2010-10-19 4:35 ` [U-Boot] [PATCH RFC 4/4] ARMV7: OMAP: I2C driver: Restructure i2c_probe function Steve Sakoman
2010-10-20 5:51 ` Heiko Schocher
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=1287580319.7756.157.camel@quadra \
--to=steve@sakoman.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.