cmd: mtd: Enable speed benchmarking
authorMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 4 Aug 2025 09:21:37 +0000 (11:21 +0200)
committerMichael Trimarchi <michael@amarulasolutions.com>
Sat, 23 Aug 2025 14:37:22 +0000 (16:37 +0200)
commitd246e70cf81d0a0d7cc49abd520c93df59d42e16
treee1c287aa1ab2569f979f46a6a7e280cdada8a6d3
parentbb5d3a7a1c83cca588b5795630bf8fb3db950e5e
cmd: mtd: Enable speed benchmarking

Linux features a flash_speed speed test from the mtd-utils suite, U-Boot
does not. Benchmarks are useful for speed improvement developments as
well as troubleshooting or regression testing sometimes.

Enable a benchmark option to enable this feature.

Example of output on a Nuvoton platform:

MA35D1> mtd read nor0 0x81000000 0 0x10000
Reading 65536 byte(s) at offset 0x00000000
MA35D1> mtd read.benchmark nor0 0x81000000 0 0x10000
Reading 65536 byte(s) at offset 0x00000000
Read speed: 3752kiB/s

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
cmd/mtd.c