RE: [PATCH 1/1] i2c:OMAP3:Errata workaround for spurious RDR event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry about that Jagadeesh, your name should definitely be in there. I was too quick on the "send" trigger :(

BR
Ulrik Bech Hald

 

> -----Original Message-----
> From: Pakaravoor, Jagadeesh
> Sent: Monday, June 22, 2009 3:23 PM
> To: Hald, Ulrik Bech; linux-omap@xxxxxxxxxxxxxxx
> Cc: Hald, Ulrik Bech
> Subject: RE: [PATCH 1/1] i2c:OMAP3:Errata workaround for spurious RDR
> event
> 
> Signed-off-by: Jagadeesh Bhaskar Pakaravoor <j-pakaravoor@xxxxxx>
> 
> > -----Original Message-----
> > From: linux-omap-owner@xxxxxxxxxxxxxxx [mailto:linux-omap-
> > owner@xxxxxxxxxxxxxxx] On Behalf Of Ulrik Bech Hald
> > Sent: Monday, June 22, 2009 3:25 PM
> > To: linux-omap@xxxxxxxxxxxxxxx
> > Cc: Hald, Ulrik Bech
> > Subject: [PATCH 1/1] i2c:OMAP3:Errata workaround for spurious RDR event
> >
> > 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@xxxxxx>
> > ---
> >  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;
> > +			/* 3430 I2C Errata 1.15
> > +			 * RDR could be set when the bus is busy, then
> > +			 * ignore the interrupt, and clear the bit.
> > +			 */
> > +			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@xxxxxxxxxxxxxxx
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux