From patchwork Fri May 13 10:30:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1487 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:52:20 -0000 Delivered-To: patches@linaro.org Received: by 10.224.61.3 with SMTP id r3cs3556qah; Fri, 13 May 2011 03:33:24 -0700 (PDT) Received: by 10.204.7.74 with SMTP id c10mr1260628bkc.104.1305282647181; Fri, 13 May 2011 03:30:47 -0700 (PDT) Received: from mail.df.lth.se (mail.df.lth.se [194.47.250.12]) by mx.google.com with ESMTPS id td1si7165081bkb.51.2011.05.13.03.30.45 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 May 2011 03:30:46 -0700 (PDT) Received-SPF: pass (google.com: domain of triad@df.lth.se designates 194.47.250.12 as permitted sender) client-ip=194.47.250.12; Authentication-Results: mx.google.com; spf=pass (google.com: domain of triad@df.lth.se designates 194.47.250.12 as permitted sender) smtp.mail=triad@df.lth.se Received: from mer.df.lth.se (mer.df.lth.se [194.47.250.37]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.df.lth.se (Postfix) with ESMTPS id 2C6F965D9D; Fri, 13 May 2011 12:30:45 +0200 (CEST) Received: from mer.df.lth.se (triad@localhost.localdomain [127.0.0.1]) by mer.df.lth.se (8.14.3/8.14.3/Debian-9.4) with ESMTP id p4DAUiXa020891; Fri, 13 May 2011 12:30:44 +0200 Received: (from triad@localhost) by mer.df.lth.se (8.14.3/8.14.3/Submit) id p4DAUiWo020890; Fri, 13 May 2011 12:30:44 +0200 From: Linus Walleij To: Ben Dooks , linux-i2c@vger.kernel.org Cc: Lee Jones , Virupax Sadashivpetimath , Linus Walleij Subject: [PATCH 11/14] i2c/i2c-nomadik: remove the unnecessary delay Date: Fri, 13 May 2011 12:30:42 +0200 Message-Id: <1305282642-20864-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.7.2.5 From: Virupax Sadashivpetimath The delay in the driver seems to be not needed, so remove it. Signed-off-by: Virupax Sadashivpetimath Reviewed-by: Markus Grape Tested-by: Per Persson Tested-by: Chethan Krishna N Reviewed-by: Srinidhi Kasagar Signed-off-by: Linus Walleij --- drivers/i2c/busses/i2c-nomadik.c | 20 ++------------------ 1 files changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c index e3cd62e..b2de1a5 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -105,9 +104,6 @@ /* maximum threshold value */ #define MAX_I2C_FIFO_THRESHOLD 15 -/* per-transfer delay, required for the hardware to stabilize */ -#define I2C_DELAY 150 - enum i2c_status { I2C_NOP, I2C_ON_GOING, @@ -269,12 +265,6 @@ static int init_hw(struct nmk_i2c_dev *dev) dev->cli.operation = I2C_NO_OPERATION; exit: - /* - * TODO: What is this delay for? - * Must be pretty pointless since the hw block - * is frozen. Or? - */ - udelay(I2C_DELAY); return stat; } @@ -652,7 +642,6 @@ static int nmk_i2c_xfer(struct i2c_adapter *i2c_adap, break; } - udelay(I2C_DELAY); } if (status == 0) break; @@ -778,13 +767,8 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg) } } - i2c_set_bit(dev->virtbase + I2C_ICR, I2C_IT_MTD); - i2c_set_bit(dev->virtbase + I2C_ICR, I2C_IT_MTDWS); - - disable_interrupts(dev, - (I2C_IT_TXFNE | I2C_IT_TXFE | I2C_IT_TXFF - | I2C_IT_TXFOVR | I2C_IT_RXFNF - | I2C_IT_RXFF | I2C_IT_RXFE)); + disable_all_interrupts(dev); + clear_all_interrupts(dev); if (dev->cli.count) { dev->result = -EIO;