From patchwork Mon Oct 7 10:41:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 20852 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 145FF24697 for ; Mon, 7 Oct 2013 10:42:08 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id ia6sf4338306vcb.7 for ; Mon, 07 Oct 2013 03:42:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=vYotrb1oIgDn0o1c+JIkjIe3cEQoJp9QJSdguLg2dKg=; b=IIB05Cu7igCHn+C4fQZ8E9ZiybozeHbc5NOYEvry62xLjouXv6uzQ8wscCCwCSgwc0 vTeRDBc8bobRHVsyMNwacD8eB4G09Ve0Vr2UFVCAV5wga6+JyGTrDL6T7Gc5fUIT3/TI vi+dtqwmpBfxr64hhmIOBORoWL4iJRI4SfFJmBr2L6TkMol5y0iE5MyptNc7ILZ9hMmy msCJuI01HyvwOyTdvYjODn1rE5Rgry2JB6WVthEmcxbywYNiwanWum2xYi+d7xQG93ZB BZLhl39ox4K+U8/w35PqtCfU+bhPReeyPvlLvlQ8SFrK/eJLCjfnh5FtDHLSwUAGfJOG QCow== X-Received: by 10.236.167.138 with SMTP id i10mr30192242yhl.9.1381142528310; Mon, 07 Oct 2013 03:42:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.48.41 with SMTP id i9ls2349556qen.44.gmail; Mon, 07 Oct 2013 03:42:08 -0700 (PDT) X-Received: by 10.220.43.19 with SMTP id u19mr25858096vce.3.1381142528224; Mon, 07 Oct 2013 03:42:08 -0700 (PDT) Received: from mail-vb0-f41.google.com (mail-vb0-f41.google.com [209.85.212.41]) by mx.google.com with ESMTPS id uc7si7640806vec.51.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Oct 2013 03:42:08 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.41 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.41; Received: by mail-vb0-f41.google.com with SMTP id g17so3528972vbg.28 for ; Mon, 07 Oct 2013 03:42:08 -0700 (PDT) X-Gm-Message-State: ALoCoQmxDvRDpS5BmtqanR3SbHFkwNwnmc7uliV+b7U4T2nh2iGs5bxDHA8K4VMrbsBICDedZD5q X-Received: by 10.52.164.102 with SMTP id yp6mr22524213vdb.14.1381142527892; Mon, 07 Oct 2013 03:42:07 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp114830vcz; Mon, 7 Oct 2013 03:42:07 -0700 (PDT) X-Received: by 10.14.221.73 with SMTP id q49mr2021021eep.64.1381142526805; Mon, 07 Oct 2013 03:42:06 -0700 (PDT) Received: from mail-ea0-f176.google.com (mail-ea0-f176.google.com [209.85.215.176]) by mx.google.com with ESMTPS id z8si22576677eee.263.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Oct 2013 03:42:06 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.176 is neither permitted nor denied by best guess record for domain of taras.kondratiuk@linaro.org) client-ip=209.85.215.176; Received: by mail-ea0-f176.google.com with SMTP id q16so3143870ead.35 for ; Mon, 07 Oct 2013 03:42:06 -0700 (PDT) X-Received: by 10.15.22.2 with SMTP id e2mr232764eeu.89.1381142526114; Mon, 07 Oct 2013 03:42:06 -0700 (PDT) Received: from condor-x220.synapse.com ([195.238.93.36]) by mx.google.com with ESMTPSA id n48sm61871101eeg.17.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Oct 2013 03:42:05 -0700 (PDT) From: Taras Kondratiuk To: linux-omap@vger.kernel.org Cc: patches@linaro.org, steve.mcintyre@linaro.org, Grygorii Strashko , Felipe Balbi , Richard woodruff , Tony Lindgren , Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] i2c: omap: Clear ARDY bit twice Date: Mon, 7 Oct 2013 13:41:59 +0300 Message-Id: <1381142519-29382-1-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: taras.kondratiuk@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.41 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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: Grygorii Strashko Signed-off-by: Taras Kondratiuk --- Cc: Felipe Balbi Cc: Richard woodruff Cc: Tony Lindgren Cc: Wolfram Sang Cc: linux-omap@vger.kernel.org Cc: linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/i2c/busses/i2c-omap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index f5d6de0..d69826e 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 |