diff mbox

nand/davinci: relax a timeout for ECC-initialization

Message ID 1283510137-23573-1-git-send-email-w.sang@pengutronix.de
State Accepted
Commit 2bdb053a8119355eada46dfab88782449a26b39d
Headers show

Commit Message

Wolfram Sang Sept. 3, 2010, 10:35 a.m. UTC
Sudhakar found out that 100us are enough. Sadly, his updated patch was
overlooked and an older version still using 100ms was merged. Fix this.

Reference: http://patchwork.ozlabs.org/patch/59180/

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Cc: Sneha Narnakaje <nsnehaprabha@ti.com>
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---

Artem, if you pick up this one, too, then we have what Sudhakar sent as
v3 of his original patch. Except for some minor rewording in the comment.

Sudhakar, I hope it is okay if I send this patch now. I just want to have
the confusion about the different versions gone.

 drivers/mtd/nand/davinci_nand.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Rajashekhara, Sudhakar Sept. 3, 2010, 11:12 a.m. UTC | #1
Hi Wolfram Sang,

On Fri, Sep 03, 2010 at 16:05:37, Wolfram Sang wrote:
> Sudhakar found out that 100us are enough. Sadly, his updated patch was
> overlooked and an older version still using 100ms was merged. Fix this.
> 
> Reference: http://patchwork.ozlabs.org/patch/59180/
> 
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
> Cc: Sneha Narnakaje <nsnehaprabha@ti.com>
> Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> ---
> 
> Artem, if you pick up this one, too, then we have what Sudhakar sent as
> v3 of his original patch. Except for some minor rewording in the comment.
> 
> Sudhakar, I hope it is okay if I send this patch now. I just want to have
> the confusion about the different versions gone.

I was tied up for the past few days, so couldn't work on this patch. Thanks
for taking this up. Can you modify the comment also to match my patch and
re-submit this again?

Thanks,
Sudhakar
Wolfram Sang Sept. 3, 2010, 12:15 p.m. UTC | #2
Hi Sudhakar,

> > Sudhakar, I hope it is okay if I send this patch now. I just want to have
> > the confusion about the different versions gone.
> 
> I was tied up for the past few days, so couldn't work on this patch. Thanks
> for taking this up. Can you modify the comment also to match my patch and
> re-submit this again?

Honestly, I think the comments are similar enough, why another change?

Regards,

   Wolfram
Artem Bityutskiy Sept. 7, 2010, 8 a.m. UTC | #3
On Fri, 2010-09-03 at 12:35 +0200, Wolfram Sang wrote:
> Sudhakar found out that 100us are enough. Sadly, his updated patch was
> overlooked and an older version still using 100ms was merged. Fix this.
> 
> Reference: http://patchwork.ozlabs.org/patch/59180/
> 
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
> Cc: Sneha Narnakaje <nsnehaprabha@ti.com>
> Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

Pushed to l2-mtd-2.6.git, thanks.

FYI, we prefix all MTD patches with "mtd:".
diff mbox

Patch

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;