From: Tony Lindgren <tony@atomide.com>
To: ext-eero.nurkkala@nokia.com
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] i2c: i2c-omap: Fix BUFSTAT_REG reading
Date: Thu, 8 Jan 2009 15:37:52 +0200 [thread overview]
Message-ID: <20090108133751.GJ27566@atomide.com> (raw)
In-Reply-To: <12276110261037-git-send-email-ext-eero.nurkkala@nokia.com>
* ext-eero.nurkkala@nokia.com <ext-eero.nurkkala@nokia.com> [081125 13:04]:
> From: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
>
> The number of bytes to be received is read from wrong
> place with all OMAPs with highspeed I2C support,
> which involves a FIFO and BUFSTAT_REG. It is the 6
> bits starting from the bit 8 in the BUFSTAT_REG
> that indicate this amount of bytes to be read.
> Moreover, only the 6 LSB:s are relevant for the
> TXSTAT field.
Pushing to l-o tree and adding to omap-fixes queue.
Tony
> Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
> ---
> drivers/i2c/busses/i2c-omap.c | 10 ++++++----
> 1 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 96f3bed..71b37ed 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -675,8 +675,9 @@ omap_i2c_isr(int this_irq, void *dev_id)
> if (stat & OMAP_I2C_STAT_RRDY)
> num_bytes = dev->fifo_size;
> else
> - num_bytes = omap_i2c_read_reg(dev,
> - OMAP_I2C_BUFSTAT_REG);
> + num_bytes = (omap_i2c_read_reg(dev,
> + OMAP_I2C_BUFSTAT_REG)
> + >> 8) & 0x3F;
> }
> while (num_bytes) {
> num_bytes--;
> @@ -714,8 +715,9 @@ omap_i2c_isr(int this_irq, void *dev_id)
> if (stat & OMAP_I2C_STAT_XRDY)
> num_bytes = dev->fifo_size;
> else
> - num_bytes = omap_i2c_read_reg(dev,
> - OMAP_I2C_BUFSTAT_REG);
> + num_bytes = (omap_i2c_read_reg(dev,
> + OMAP_I2C_BUFSTAT_REG))
> + & 0x3F;
> }
> while (num_bytes) {
> num_bytes--;
> --
> 1.6.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-01-08 13:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-25 11:03 [PATCH] i2c: i2c-omap: Fix BUFSTAT_REG reading ext-eero.nurkkala
2009-01-08 13:37 ` Tony Lindgren [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-11-25 11:02 ext-eero.nurkkala
2008-11-25 6:56 ext-eero.nurkkala
2008-11-25 7:27 ` David Brownell
2008-11-25 9:19 ` Eero Nurkkala
2008-11-25 10:01 ` David Brownell
2008-11-14 8:41 ext-eero.nurkkala
2008-11-14 19:16 ` David Brownell
2008-11-19 12:12 ` Eero Nurkkala
2008-11-19 17:34 ` David Brownell
2008-11-21 22:03 ` Tony Lindgren
2008-11-11 6:51 ext-eero.nurkkala
2008-11-11 9:57 ` shekhar, chandra
2008-11-10 10:46 ext-eero.nurkkala
2008-11-10 12:27 ` Felipe Balbi
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=20090108133751.GJ27566@atomide.com \
--to=tony@atomide.com \
--cc=ext-eero.nurkkala@nokia.com \
--cc=linux-omap@vger.kernel.org \
/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