Commit c497dd55 authored by Roman Tereshonkov's avatar Roman Tereshonkov Committed by Tony Lindgren

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: default avatarRoman Tereshonkov <roman.tereshonkov@nokia.com>
Acked-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 5714b7ed
...@@ -148,11 +148,9 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state) ...@@ -148,11 +148,9 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state)
wait_err("controller error", state, ctrl, intr); wait_err("controller error", state, ctrl, intr);
return -EIO; return -EIO;
} }
if ((intr & intr_flags) != intr_flags) { if ((intr & intr_flags) == intr_flags)
wait_err("timeout", state, ctrl, intr); return 0;
return -EIO; /* Continue in wait for interrupt branch */
}
return 0;
} }
if (state != FL_READING) { if (state != FL_READING) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment