Skip to content
Commit 86a6585f authored by Pratyush Yadav's avatar Pratyush Yadav Committed by Xulin Sun
Browse files

ubi: Do not zero out EC and VID on ECC-ed NOR flashes

commit 3904d33b0e259c3995cfaae1f9323bc2bc634ca7 from
git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git

commit f669e74b

 upstream.

For NOR flashes EC and VID are zeroed out before an erase is issued to
make sure UBI does not mistakenly treat the PEB as used and associate it
with an LEB.

But on some flashes, like the Cypress Semper S28 SPI NOR flash family,
multi-pass page programming is not allowed on the default ECC scheme.
This means zeroing out these magic numbers will result in the flash
throwing a page programming error.

Do not zero out EC and VID for such flashes. A writesize > 1 is an
indication of an ECC-ed flash.

Signed-off-by: default avatarPratyush Yadav <p.yadav@ti.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarVignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: default avatarXulin Sun <xulin.sun@windriver.com>
parent da166595
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