From: Kevin Hilman <khilman@deeprootsystems.com>
To: Ulrik Bech Hald <ubh@ti.com>
Cc: linux-omap@vger.kernel.org,
Jagadeesh Bhaskar Pakaravoor <j-pakaravoor@ti.com>
Subject: Re: [PATCH v2 1/1] i2c:OMAP3:Errata workaround for spurious RDR event
Date: Mon, 22 Jun 2009 13:56:42 -0700 [thread overview]
Message-ID: <87y6rk0yyd.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1245702865-4459-1-git-send-email-ubh@ti.com> (Ulrik Bech Hald's message of "Mon\, 22 Jun 2009 15\:34\:25 -0500")
Ulrik Bech Hald <ubh@ti.com> writes:
> Under certain rare conditions, I2C_STAT[13].RDR bit may be set,
> and the corresponding interrupt fire, even when there is no
> data in the receive FIFO, or the I2C data transfer is still
> ongoing. These spurious RDR events must be ignored by the
> software.
>
> A check for OMAP_I2C_STAT_BB is introduced in the ISR to
> prevent further processing of RDR interrupt, if the bus is busy.
>
> Signed-off-by: Ulrik Bech Hald <ubh@ti.com>
> Signed-off-by: Jagadeesh Bhaskar Pakaravoor <j-pakaravoor@ti.com>
Minor CodingStyle comments below...
> ---
> drivers/i2c/busses/i2c-omap.c | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index ece0125..88feea1 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -668,6 +668,15 @@ omap_i2c_isr(int this_irq, void *dev_id)
> omap_i2c_complete_cmd(dev, err);
> if (stat & (OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR)) {
> u8 num_bytes = 1;
But the local variable define here, followed by a blank line, and
the assignment to zero is unnecessary.
> + /* 3430 I2C Errata 1.15
> + * RDR could be set when the bus is busy, then
> + * ignore the interrupt, and clear the bit.
> + */
Move the '*/' to the end of the previous line.
> + u8 stat2 = 0;
> + stat2 = omap_i2c_read_reg(dev, OMAP_I2C_STAT_REG);
> + if (stat2 & OMAP_I2C_STAT_BB)
> + return IRQ_HANDLED;
> +
> if (dev->fifo_size) {
> if (stat & OMAP_I2C_STAT_RRDY)
> num_bytes = dev->fifo_size;
> --
> 1.5.4.3
>
> --
> 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-06-22 20:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-22 20:34 [PATCH v2 1/1] i2c:OMAP3:Errata workaround for spurious RDR event Ulrik Bech Hald
2009-06-22 20:56 ` Kevin Hilman [this message]
2009-06-23 1:16 ` Paul Walmsley
2009-06-23 2:49 ` Pakaravoor, Jagadeesh
2009-06-23 3:20 ` Paul Walmsley
2009-06-23 16:34 ` Hald, Ulrik Bech
2009-06-23 18:05 ` Paul Walmsley
2009-06-23 20:26 ` Menon, Nishanth
2009-06-25 18:44 ` Hald, Ulrik Bech
2009-07-02 9:29 ` Paul Walmsley
2009-07-02 11:39 ` Paul Walmsley
2009-06-23 21:17 ` Paul Walmsley
2009-06-25 18:45 ` Hald, Ulrik Bech
2009-06-23 21:29 ` Paul Walmsley
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=87y6rk0yyd.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=j-pakaravoor@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=ubh@ti.com \
/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.