From patchwork Thu Apr 30 21:44:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 6307221 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2FF379F373 for ; Thu, 30 Apr 2015 21:47:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 512FC201DD for ; Thu, 30 Apr 2015 21:47:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7443A20154 for ; Thu, 30 Apr 2015 21:47:37 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YnwGT-0000pr-9j; Thu, 30 Apr 2015 21:45:01 +0000 Received: from mail-ig0-x22b.google.com ([2607:f8b0:4001:c05::22b]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YnwGJ-0000fL-A8 for linux-arm-kernel@lists.infradead.org; Thu, 30 Apr 2015 21:44:52 +0000 Received: by iget9 with SMTP id t9so19014414ige.1 for ; Thu, 30 Apr 2015 14:44:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=BgMLG2S4pl1h7+9eXZUv9yHJKGv/eSbAIQZlfrX2ZUA=; b=NyJgE1xH3EkRcR/HEh0tnOBSlHy5l2VDegXajv2TW/qOKOnmy9vdi8VbS5teq+v/Rr ovbJ6iPBACw4dcH4m4xKvJaYwDTJXpI+TuyckD3Vp+6xjYNg1BBR3gres6kdas8OP0vx 6DN9XmIm6ig4mfAcuYLEIoXTllhVvs1o9faHw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BgMLG2S4pl1h7+9eXZUv9yHJKGv/eSbAIQZlfrX2ZUA=; b=ZP/nJsh1w1Be2/SGaqgrb5+D0vYAJtLnrgMTSVF+p3dpvKqLLCWxZYl/A5Us68N6s3 LQ/YWcnWQUXzRSsiDlVRB8X6pNRTL18dSkhZzrgcXdLZjiRsbcMvtwdu4ZyGMdwq9hgV sPPJXA4hrtomr90Z4PlqA1LW07tkxGzDeVDmVSeqnjOPxpsO5imAWwg3kK4oMa/BU+Pz vYMf3N2d52ujlNrD7z3VkpoD/iH6papNTeN7mXMV2pZjVPrTH3tcyn2qyXxFNqtJINt3 Uxywd1RMghEaWX8+63f0tolIzIZeZPsr5AZOLi+Xbr4ShiO90kd7jY+QMWOWYEqb1m69 gEpQ== X-Gm-Message-State: ALoCoQnvcci6RdzLINyHm3R/Nk7UDv2C6KafB1x8luPCqgt+mk8/E1ewTYqghrJhwHk0dpFG0sq7 X-Received: by 10.50.18.113 with SMTP id v17mr6465302igd.8.1430430267092; Thu, 30 Apr 2015 14:44:27 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by mx.google.com with ESMTPSA id vk8sm1796018igb.4.2015.04.30.14.44.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Apr 2015 14:44:26 -0700 (PDT) From: Doug Anderson To: Wolfram Sang Subject: [PATCH] i2c: rk3x: Increase wait timeout to 1 second Date: Thu, 30 Apr 2015 14:44:07 -0700 Message-Id: <1430430247-9632-1-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150430_144451_428718_0BA622E6 X-CRM114-Status: GOOD ( 11.62 ) X-Spam-Score: -0.8 (/) Cc: Addy Ke , Dmitry Torokhov , Heiko Stuebner , Max Schwarz , Doug Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP While it's not sensible for an i2c command to _actually_ need more than 200ms to complete, let's increase the timeout anyway. Why? It turns out that if you've got a large number of printks going out to a serial console, interrupts on a CPU can be disabled for hundreds of milliseconds. That's not a great situation to be in to start with (maybe we should put a cap in vprintk_emit()) but it's pretty annoying to start seeing unexplained i2c timeouts. A normal system shouldn't see i2c timeouts anyway, so increasing the timeout should help people debugging without hurting other people excessively. Signed-off-by: Doug Anderson Tested-by: Caesar Wang Tested-by: Caesar Wang --- drivers/i2c/busses/i2c-rk3x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c index 019d542..72e97e30 100644 --- a/drivers/i2c/busses/i2c-rk3x.c +++ b/drivers/i2c/busses/i2c-rk3x.c @@ -72,7 +72,7 @@ enum { #define REG_INT_ALL 0x7f /* Constants */ -#define WAIT_TIMEOUT 200 /* ms */ +#define WAIT_TIMEOUT 1000 /* ms */ #define DEFAULT_SCL_RATE (100 * 1000) /* Hz */ enum rk3x_i2c_state {