]> www.infradead.org Git - mtd-utils.git/commit
mtd-utils: Add nandflipbits tool
authorBoris Brezillon <boris.brezillon@collabora.com>
Fri, 24 Apr 2020 16:32:09 +0000 (18:32 +0200)
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
Sun, 18 Oct 2020 20:23:16 +0000 (22:23 +0200)
commit9fc8db29cf624b40cd2abeadc882eff8dd4ca65a
treed4b974901c5778163774598e2aaebf17709947a6
parentc4200760da8aaa1d3605007e14cda45c4abec501
mtd-utils: Add nandflipbits tool

The nandflipbits tool is intended to be used when one need to flip one or
several specific bits on a NAND media.
It can be useful to manually recover from an unexpected bit flip on a flash
device, though the main purpose of this tool is to provide a way to test
ECC algorithms robustness.

One typical example I used this tool for is testing HW ECC engines behavior
when bitflips occur in an erased page: most HW engines do not correctly
handle this case, because, most of the time, ECC bits generated for an
empty page are not all 1s, and, empty page detection embedded in such
engines is only validating that all bits are set to 1s (which is not true
when a bit-flip has occurred).

Another use of this tool is replacing nandbiterrs test which
absolutely do not work with MLC-like chips because of the rewriting of
the pages in raw mode to toggle ones into zeroes.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
[miquel: Took Boris' work from 2014, addressed comments from Brian made
         in 2015, updated it, tested more extensively and fixed issues]
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
.gitignore
nand-utils/Makemodule.am
nand-utils/nandflipbits.c [new file with mode: 0644]