diff mbox

[RFC] i2c: omap: Clear ARDY bit twice

Message ID 1380711526-20365-1-git-send-email-taras.kondratiuk@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Taras Kondratiuk Oct. 2, 2013, 10:58 a.m. UTC
Initially commit cb527ede1bf6ff2008a025606f25344b8ed7b4ac
"i2c-omap: Double clear of ARDY status in IRQ handler"
added a workaround for undocumented errata ProDB0017052.
But then commit 1d7afc95946487945cc7f5019b41255b72224b70
"i2c: omap: ack IRQ in parts" refactored code and missed
one of ARDY clearings. So current code violates errata.
It causes often i2c bus timeouts on my Pandaboard.

This patch adds a second clearing in place.

Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
---
 drivers/i2c/busses/i2c-omap.c |    3 +++
 1 file changed, 3 insertions(+)

Comments

Woodruff, Richard Oct. 2, 2013, 2:48 p.m. UTC | #1
> From: Taras Kondratiuk [mailto:taras.kondratiuk@linaro.org]
> Sent: Wednesday, October 02, 2013 5:59 AM
> To: Balbi, Felipe
> Cc: Strashko, Grygorii; Woodruff, Richard; linux-omap@vger.kernel.org; Taras
> Kondratiuk
> Subject: [RFC PATCH] i2c: omap: Clear ARDY bit twice
 
> Initially commit cb527ede1bf6ff2008a025606f25344b8ed7b4ac
> "i2c-omap: Double clear of ARDY status in IRQ handler"
> added a workaround for undocumented errata ProDB0017052.
> But then commit 1d7afc95946487945cc7f5019b41255b72224b70
> "i2c: omap: ack IRQ in parts" refactored code and missed one of ARDY
> clearings. So current code violates errata.
> It causes often i2c bus timeouts on my Pandaboard.

History of this was during OMAP3 a couple phone ramps were fixed with path.

Another SOC (non-OMAP) which uses same I2C IP had clear HW root cause in its integration to SOC.

When stuck at customer I went through other SOC erratas and tried them when OMAP did not work.

This was found to be robust and did exist in RTL versions used as such fix was accepted and used on most end customers in that time frame.

At 'that time' there was some internal process blockages around getting waveforms on OMAP integration which kept fix from sticking in errata.

Regards,
Richard W.

--
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
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 6d8308d..9967a6f 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -939,6 +939,9 @@  omap_i2c_isr_thread(int this_irq, void *dev_id)
 		/*
 		 * ProDB0017052: Clear ARDY bit twice
 		 */
+		if (stat & OMAP_I2C_STAT_ARDY)
+			omap_i2c_ack_stat(dev, OMAP_I2C_STAT_ARDY);
+
 		if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK |
 					OMAP_I2C_STAT_AL)) {
 			omap_i2c_ack_stat(dev, (OMAP_I2C_STAT_RRDY |