]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.11.6/i2c-omap-clear-ardy-bit-twice.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.11.6 / i2c-omap-clear-ardy-bit-twice.patch
1 From 4cdbf7d346e7461c3b93a26707c852e2c9db3753 Mon Sep 17 00:00:00 2001
2 From: Taras Kondratiuk <taras.kondratiuk@linaro.org>
3 Date: Mon, 7 Oct 2013 13:41:59 +0300
4 Subject: i2c: omap: Clear ARDY bit twice
5
6 From: Taras Kondratiuk <taras.kondratiuk@linaro.org>
7
8 commit 4cdbf7d346e7461c3b93a26707c852e2c9db3753 upstream.
9
10 Initially commit cb527ede1bf6ff2008a025606f25344b8ed7b4ac
11 "i2c-omap: Double clear of ARDY status in IRQ handler"
12 added a workaround for undocumented errata ProDB0017052.
13 But then commit 1d7afc95946487945cc7f5019b41255b72224b70
14 "i2c: omap: ack IRQ in parts" refactored code and missed
15 one of ARDY clearings. So current code violates errata.
16 It causes often i2c bus timeouts on my Pandaboard.
17
18 This patch adds a second clearing in place.
19
20 Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
21 Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
22 Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
23 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24
25 ---
26 drivers/i2c/busses/i2c-omap.c | 3 +++
27 1 file changed, 3 insertions(+)
28
29 --- a/drivers/i2c/busses/i2c-omap.c
30 +++ b/drivers/i2c/busses/i2c-omap.c
31 @@ -944,6 +944,9 @@ omap_i2c_isr_thread(int this_irq, void *
32 /*
33 * ProDB0017052: Clear ARDY bit twice
34 */
35 + if (stat & OMAP_I2C_STAT_ARDY)
36 + omap_i2c_ack_stat(dev, OMAP_I2C_STAT_ARDY);
37 +
38 if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK |
39 OMAP_I2C_STAT_AL)) {
40 omap_i2c_ack_stat(dev, (OMAP_I2C_STAT_RRDY |