Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 58eb8127 authored by Qi Wang (qiwang)'s avatar Qi Wang (qiwang) Committed by Tatyana Brokhman
Browse files

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

Change-Id: I3f072c81ed82a67e237c0a2ff5aa92bbb158ba8d
Signed-off-by: default avatarQi Wang <qiwang@micron.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Git-commit: 2c7ca5cc3624e05a5235f70039adce30725972d6
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarTatyana Brokhman <tlinder@codeaurora.org>
parent 24472ab7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment