From patchwork Fri Sep 3 10:35:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 168872 Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8AECbig026907 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 10 Sep 2010 14:13:13 GMT Received: from dlep34.itg.ti.com ([157.170.170.115]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o8AECbOR014740 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 10 Sep 2010 09:12:37 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id o8AECZW4022219 for ; Fri, 10 Sep 2010 09:12:36 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id E6A22806DA for ; Fri, 10 Sep 2010 09:12:09 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id CE21D80626 for ; Fri, 3 Sep 2010 05:35:51 -0500 (CDT) Received: from neches.ext.ti.com (localhost [127.0.0.1]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id o83AZpWR011043 for ; Fri, 3 Sep 2010 05:35:51 -0500 (CDT) Received: from psmtp.com (na3sys009amx180.postini.com [74.125.149.161]) by neches.ext.ti.com (8.13.7/8.13.7) with SMTP id o83AZosp007316 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 3 Sep 2010 05:35:50 -0500 Received: from source ([92.198.50.35]) (using TLSv1) by na3sys009amx180.postini.com ([74.125.148.10]) with SMTP; Fri, 03 Sep 2010 03:35:51 PDT Received: from [2001:6f8:1178:2:221:70ff:fe71:1890] (helo=pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.71) (envelope-from ) id 1OrTca-0004pP-HO; Fri, 03 Sep 2010 12:35:48 +0200 From: Wolfram Sang To: linux-mtd@lists.infradead.org Subject: [PATCH] nand/davinci: relax a timeout for ECC-initialization Date: Fri, 3 Sep 2010 12:35:37 +0200 Message-Id: <1283510137-23573-1-git-send-email-w.sang@pengutronix.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1283382898.2209.62.camel@brekeke> References: <1283382898.2209.62.camel@brekeke> X-SA-Exim-Connect-IP: 2001:6f8:1178:2:221:70ff:fe71:1890 X-SA-Exim-Mail-From: w.sang@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: davinci-linux-open-source@linux.davincidsp.com X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:73.05309/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-settings: 2 (0.5000:0.5000) s cv gt3 gt2 gt1 r p m c X-pstn-addresses: from [db-null] X-Mailman-Approved-At: Fri, 10 Sep 2010 09:10:38 -0500 Cc: Artem Bityutskiy , davinci-linux-open-source@linux.davincidsp.com, Wolfram Sang X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 10 Sep 2010 14:13:13 +0000 (UTC) diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c index 53f864a..1ad0eed 100644 --- a/drivers/mtd/nand/davinci_nand.c +++ b/drivers/mtd/nand/davinci_nand.c @@ -313,7 +313,7 @@ static int nand_davinci_correct_4bit(struct mtd_info *mtd, u32 syndrome[4]; u32 ecc_state; unsigned num_errors, corrected; - unsigned long timeo = jiffies + msecs_to_jiffies(100); + unsigned long timeo; /* All bytes 0xff? It's an erased page; ignore its ECC. */ for (i = 0; i < 10; i++) { @@ -373,6 +373,7 @@ compare: * long as ECC_STATE reads less than 4. After that, ECC HW has entered * correction state. */ + timeo = jiffies + usecs_to_jiffies(100); do { ecc_state = (davinci_nand_readl(info, NANDFSR_OFFSET) >> 8) & 0x0f;