UBI: avoid program operation on NOR flash after erasure interrupted
nor_erase_prepare() will be called before erase a NOR flash, it will program '0'
into a block to mark this block. But program data into a erasure interrupted block
can cause program timtout(several minutes at most) error, could impact other
operation on NOR flash. So UBIFS can read this block first to avoid unneeded
program operation.

This patch try to put read operation at head of write operation in
nor_erase_prepare(), read out the data.
If the data is already corrupt, then no need to program any data into this block,
just go to erase this block.

This patch is validated on Micron NOR flash, part number is:JS28F512M29EWHA

Signed-off-by: Qi Wang <qiwang@micron.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
1 parent 1c8847c commit e621ee94ba356b1f439ef02eec3de94898d09593
@Qi Wang 王起 (qiwang) Qi Wang 王起 (qiwang) authored on 1 Jan 2014
Sascha Hauer committed on 11 Sep 2014
Showing 1 changed file
View
drivers/mtd/ubi/io.c