From: Roman Tereshonkov Date: Mon, 7 Feb 2011 08:47:01 +0000 (+0200) Subject: mtd: OneNAND: OMAP2: increase multiblock erase verify timeout X-Git-Tag: v2.6.39-rc1~35^2~28^5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c497dd5594ed3ef97bc563b07e8c050618f745a3;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git mtd: OneNAND: OMAP2: increase multiblock erase verify timeout The current multiblock erase verify read timeout 100us is the maximum for none-error case. If errors happen during multibock erase then the specification recommends to run multiblock erase verify command with maximum timeout 10ms (see specs. for KFM4G16Q2A and KFN8G16Q2A). For the most common non-error case we wait 100us in udelay polling loop. In case of timeout the interrupt mode is used to wait for the command end. Signed-off-by: Roman Tereshonkov Acked-by: Artem Bityutskiy Signed-off-by: Tony Lindgren --- diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index 3e1bb95..ec26399 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c @@ -148,11 +148,9 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state) wait_err("controller error", state, ctrl, intr); return -EIO; } - if ((intr & intr_flags) != intr_flags) { - wait_err("timeout", state, ctrl, intr); - return -EIO; - } - return 0; + if ((intr & intr_flags) == intr_flags) + return 0; + /* Continue in wait for interrupt branch */ } if (state != FL_READING) {