cmd: mtd: add nand_read_test command support
authorMikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Wed, 24 Sep 2025 04:20:33 +0000 (07:20 +0300)
committerMichael Trimarchi <michael@amarulasolutions.com>
Sun, 5 Oct 2025 18:26:46 +0000 (20:26 +0200)
commit642f150bcd5f0ae271d2b99b428e8487b5adf070
treeefadafd04dff6c305440da8357da1300c858dc6c
parentb89b0f3c471114679fd92e01d3ae9e67504d96b3
cmd: mtd: add nand_read_test command support

This patch implements read-only test of nand flash devices.

Test reads blocks of NAND flash in normal and raw modes and compares
results. The following statuses can be returned for a block:
 * non-ecc reading failed,
 * ecc reading failed,
 * block is bad,
 * bitflips is above maximum,
 * actual number of biflips above reported one,
 * bitflips reached it maximum value,
 * bitflips above threshold,
 * block is ok.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
cmd/Kconfig
cmd/mtd.c