From patchwork Tue May 10 23:48:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1438 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:51:59 -0000 Delivered-To: patches@linaro.org Received: by 10.224.61.3 with SMTP id r3cs38949qah; Tue, 10 May 2011 16:48:32 -0700 (PDT) Received: by 10.42.178.74 with SMTP id bl10mr7848031icb.431.1305071312124; Tue, 10 May 2011 16:48:32 -0700 (PDT) Received: from mail-iw0-f178.google.com (mail-iw0-f178.google.com [209.85.214.178]) by mx.google.com with ESMTPS id xi9si21255770icb.94.2011.05.10.16.48.31 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 May 2011 16:48:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linus.ml.walleij@gmail.com designates 209.85.214.178 as permitted sender) client-ip=209.85.214.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linus.ml.walleij@gmail.com designates 209.85.214.178 as permitted sender) smtp.mail=linus.ml.walleij@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by iwn9 with SMTP id 9so7267344iwn.37 for ; Tue, 10 May 2011 16:48:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=kUdJofi4RZkclgTqfA8T8uYf8aaUSMe+89VetM+yoRU=; b=siLBo2RUEAnlzOuoFCl1FLRfc0WCpDcjiXtrpdl/nGOtLPE3zQOMbjT2iBisdw2hz7 pZ3/DebMhNe/POtv9VGpVWzwc7o9ZQzRT9vSg9Upxkh2OnFJaiNp+3jkdyakGsqlBn68 ufcAzqhcDLn2b2WP9g4EJM2Lwo/fjrw+RqfLY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=TYYiGV866qvPSomRtDpIDafvdT0+/PExy8JsP3/LQ3O1uxL+sxjpnaQqT2Dfl0TOAF Tsuf+tjKXYz9wMAiL3FL3t+Q3uDFo+oSdIIlnHpw5tg20TjrdUqP6uZJugNROBqkHYip fuN44doGTqGZmGxHNIblklDyt7CaRQ5vHXbHE= MIME-Version: 1.0 Received: by 10.231.118.81 with SMTP id u17mr6000889ibq.51.1305071311521; Tue, 10 May 2011 16:48:31 -0700 (PDT) Received: by 10.231.20.3 with HTTP; Tue, 10 May 2011 16:48:31 -0700 (PDT) In-Reply-To: <1304977137-31767-1-git-send-email-linus.walleij@linaro.org> References: <1304977137-31767-1-git-send-email-linus.walleij@linaro.org> Date: Wed, 11 May 2011 01:48:31 +0200 Message-ID: Subject: Fwd: [PATCH 11/13] i2c/i2c-nomadik: remove the unnecessary delay From: Linus Walleij To: patches@linaro.org ---------- Forwarded message ---------- From: Linus Walleij Date: 2011/5/9 Subject: [PATCH 11/13] i2c/i2c-nomadik: remove the unnecessary delay To: Ben Dooks , linux-i2c@vger.kernel.org Kopia: Virupax Sadashivpetimath , Linus Walleij 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(-) -- 1.7.5.1 -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@vger.kernel.org More majordomo info at  http://vger.kernel.org/majordomo-info.html diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c index 916e4db..a94445e 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;