[PATCH v2 0/3] cmd: mtd: improvements

Mikhail Kshevetskiy mikhail.kshevetskiy at iopsys.eu
Fri Sep 12 03:36:43 CEST 2025


Some nand flashes (like spi-nand one) are registered with mtd
subsystem only, thus nand command can't be used to work with
such flashes. As result some functionality is missing.

This patch series introduce following features:
 * 'mtd markbad' command (clone of 'nand markbad')
 * 'mtd nand_write_test' command (clone of 'nand torture')

Also a new command 'mtd nand_read_test' introduced. It produce readonly
test of flash. It's mostly usefull to:
 * check general flash state,
 * check the correctness of returned number of corrected bits.

Changes v2:
 * added detection of the blocks above ECC bitflip threshold
 * minor cleanups of 'nand_read_test'
 * comments of Michael Trimarchi was addressed

Mikhail Kshevetskiy (3):
  cmd: mtd: add markbad command support
  cmd: mtd: add nand_write_test command support
  cmd: mtd: add nand_read_test command support

 cmd/Kconfig |  38 +++++
 cmd/mtd.c   | 457 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 495 insertions(+)

-- 
2.51.0



More information about the U-Boot mailing list