* [PATCH 0/3] i2c-omap: I2C clean-up patch
@ 2009-08-20 16:21 Moiz Sonasath
[not found] ` <1250785276-31713-1-git-send-email-m-sonasath-l0cyMroinI0@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Moiz Sonasath @ 2009-08-20 16:21 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA,
ben-linux-elnMNo+KYs3YtjvyW6yDsg, Moiz Sonasath, Vikram Pandita
This patch includes the following fixes:
-Fix I2C status ACK
-ACK pending [R/X]DR and [R/X]RDY interrupts in the error/completeion path
-Enable workaround for Errata 1.153 based on I2C IP block
Signed-off-by: Moiz Sonasath <m-sonasath-l0cyMroinI0@public.gmane.org>
Signed-off-by: Vikram Pandita <vikram.pandita-l0cyMroinI0@public.gmane.org>
Moiz Sonasath (3):
i2c-omap: Fix I2C status ACK
i2c-omap: ACK pending [R/X]DR and [R/X]RDY interrupts in the
error/completeion path
i2c-omap: Enable workaround for Errata 1.153 based on I2C IP block
drivers/i2c/busses/i2c-omap.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] i2c-omap: Fix I2C status ACK
[not found] ` <1250785276-31713-1-git-send-email-m-sonasath-l0cyMroinI0@public.gmane.org>
@ 2009-08-20 16:21 ` Moiz Sonasath
2009-08-20 16:21 ` [PATCH 2/3] i2c-omap: ACK pending [R/X]DR and [R/X]RDY interrupts Moiz Sonasath
2009-08-20 21:21 ` [PATCH 0/3] i2c-omap: I2C clean-up patch Ben Dooks
1 sibling, 1 reply; 5+ messages in thread
From: Moiz Sonasath @ 2009-08-20 16:21 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA,
ben-linux-elnMNo+KYs3YtjvyW6yDsg, Nishanth Menon, Moiz Sonasath
From: Nishanth Menon <nm-l0cyMroinI0@public.gmane.org>
I2C status ack for [RX]RDR and [RX]RDY could
cause race conditions of clearing the event
twice and a violation of the programing
sequence as defined in TRM This patch fixes
the same.
Signed-off-by: Nishanth Menon <nm-l0cyMroinI0@public.gmane.org>
Signed-off-by: Moiz Sonasath <m-sonasath-l0cyMroinI0@public.gmane.org>
---
drivers/i2c/busses/i2c-omap.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index d258b02..94639d0 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -674,7 +674,14 @@ omap_i2c_isr(int this_irq, void *dev_id)
err = 0;
complete:
- omap_i2c_write_reg(dev, OMAP_I2C_STAT_REG, stat);
+ /*
+ * Ack the stat in one go, but [R/X]DR and [R/X]RDY should be
+ * acked after the data operation is complete.
+ * Ref: TRM SWPU114Q Figure 18-31
+ */
+ omap_i2c_write_reg(dev, OMAP_I2C_STAT_REG, stat &
+ ~(OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR |
+ OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR));
if (stat & OMAP_I2C_STAT_NACK) {
err |= OMAP_I2C_STAT_NACK;
--
1.5.6.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] i2c-omap: ACK pending [R/X]DR and [R/X]RDY interrupts
2009-08-20 16:21 ` [PATCH 1/3] i2c-omap: Fix I2C status ACK Moiz Sonasath
@ 2009-08-20 16:21 ` Moiz Sonasath
[not found] ` <1250785276-31713-3-git-send-email-m-sonasath-l0cyMroinI0@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Moiz Sonasath @ 2009-08-20 16:21 UTC (permalink / raw)
To: linux-i2c; +Cc: linux-omap, ben-linux, Moiz Sonasath, Vikram Pandita
ACK any pending read/write interrupts before exiting the ISR either after
completing the operation [ARDY interrupt] or in case of an error
[NACK|AL interrupt]
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
---
drivers/i2c/busses/i2c-omap.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 94639d0..16b39f4 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -694,6 +694,9 @@ complete:
}
if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK |
OMAP_I2C_STAT_AL)) {
+ omap_i2c_ack_stat(dev, stat &
+ (OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR |
+ OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR));
omap_i2c_complete_cmd(dev, err);
return IRQ_HANDLED;
}
--
1.5.6.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] i2c-omap: Enable workaround for Errata 1.153 based on
[not found] ` <1250785276-31713-3-git-send-email-m-sonasath-l0cyMroinI0@public.gmane.org>
@ 2009-08-20 16:21 ` Moiz Sonasath
0 siblings, 0 replies; 5+ messages in thread
From: Moiz Sonasath @ 2009-08-20 16:21 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA,
ben-linux-elnMNo+KYs3YtjvyW6yDsg, Moiz Sonasath
Silicon Errata 1.153 has been fixed on OMAP 3630|4430 with the use of a later
version of I2C IP block.
The errata impacts OMAP 2420|2430|3430, enable the workaround for these based
on I2C IP block revision number instead of OMAP CPU type
Signed-off-by: Moiz Sonasath <m-sonasath-l0cyMroinI0@public.gmane.org>
Signed-off-by: Vikram Pandita <vikram.pandita-l0cyMroinI0@public.gmane.org
Reviewed-by: Paul Walmsley <paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org>
---
drivers/i2c/busses/i2c-omap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 16b39f4..827da08 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -784,7 +784,7 @@ complete:
* memory to the I2C interface.
*/
- if (cpu_is_omap34xx()) {
+ if (dev->rev <= OMAP_I2C_REV_ON_3430) {
while (!(stat & OMAP_I2C_STAT_XUDF)) {
if (stat & (OMAP_I2C_STAT_NACK | OMAP_I2C_STAT_AL)) {
omap_i2c_ack_stat(dev, stat & (OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR));
--
1.5.6.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] i2c-omap: I2C clean-up patch
[not found] ` <1250785276-31713-1-git-send-email-m-sonasath-l0cyMroinI0@public.gmane.org>
2009-08-20 16:21 ` [PATCH 1/3] i2c-omap: Fix I2C status ACK Moiz Sonasath
@ 2009-08-20 21:21 ` Ben Dooks
1 sibling, 0 replies; 5+ messages in thread
From: Ben Dooks @ 2009-08-20 21:21 UTC (permalink / raw)
To: Moiz Sonasath
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
ben-linux-elnMNo+KYs3YtjvyW6yDsg, Vikram Pandita
On Thu, Aug 20, 2009 at 11:21:13AM -0500, Moiz Sonasath wrote:
> This patch includes the following fixes:
> -Fix I2C status ACK
> -ACK pending [R/X]DR and [R/X]RDY interrupts in the error/completeion path
> -Enable workaround for Errata 1.153 based on I2C IP block
ok, will add these to my fixes tree.
> Signed-off-by: Moiz Sonasath <m-sonasath-l0cyMroinI0@public.gmane.org>
> Signed-off-by: Vikram Pandita <vikram.pandita-l0cyMroinI0@public.gmane.org>
>
> Moiz Sonasath (3):
> i2c-omap: Fix I2C status ACK
> i2c-omap: ACK pending [R/X]DR and [R/X]RDY interrupts in the
> error/completeion path
> i2c-omap: Enable workaround for Errata 1.153 based on I2C IP block
>
> drivers/i2c/busses/i2c-omap.c | 14 ++++++++++++--
> 1 files changed, 12 insertions(+), 2 deletions(-)
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Ben (ben-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-08-20 21:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-20 16:21 [PATCH 0/3] i2c-omap: I2C clean-up patch Moiz Sonasath
[not found] ` <1250785276-31713-1-git-send-email-m-sonasath-l0cyMroinI0@public.gmane.org>
2009-08-20 16:21 ` [PATCH 1/3] i2c-omap: Fix I2C status ACK Moiz Sonasath
2009-08-20 16:21 ` [PATCH 2/3] i2c-omap: ACK pending [R/X]DR and [R/X]RDY interrupts Moiz Sonasath
[not found] ` <1250785276-31713-3-git-send-email-m-sonasath-l0cyMroinI0@public.gmane.org>
2009-08-20 16:21 ` [PATCH 3/3] i2c-omap: Enable workaround for Errata 1.153 based on Moiz Sonasath
2009-08-20 21:21 ` [PATCH 0/3] i2c-omap: I2C clean-up patch Ben Dooks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).