mbox series

[0/9] mtd: spi-nand: Continuous read support

Message ID 20240821162528.218292-1-miquel.raynal@bootlin.com
Headers show
Series mtd: spi-nand: Continuous read support | expand

Message

Miquel Raynal Aug. 21, 2024, 4:25 p.m. UTC
Hello,

After the raw NAND series, here is an equivalent series bringing
continuous/sequential read support to spi-nand. The goal is to optimize
the reads when several consecutive pages are read. More explanations
about the "physics" in the patch 4 adding continuous read to the core.

The feature stops at the block boundary for two reasons:
* some vendors did not implement more
* NANDs are accessed through UBI these days, and there is absolutely no
guarantee (quite the opposite) two consecutive LEBs will end-up into two
consecutive PEBs.

The feature was tested using Macronix NANDs, and thus the vendor driver
is updated to expose this new feature.

Benchmarks are available in the last commit, but the overall the speed
gains are impressive: up to 45% when reading a block in 1-1-4 mode,
where a substantial time is lost waiting for the chip to be ready.

Cheers,
Miquèl

Miquel Raynal (9):
  mtd: nand: Rename the NAND IO iteration helper
  mtd: nand: Introduce a block iterator
  mtd: spi-nand: Isolate the MTD read logic in a helper
  mtd: spi-nand: Add continuous read support
  mtd: spi-nand: Expose spinand_write_reg_op()
  mtd: spi-nand: macronix: Fix helper name
  mtd: spi-nand: macronix: Extract the bitflip retrieval logic
  mtd: spi-nand: macronix: Add a possible bitflip status flag
  mtd: spi-nand: macronix: Continuous read support

 drivers/mtd/nand/spi/core.c     | 215 ++++++++++++++++++++++++++++----
 drivers/mtd/nand/spi/macronix.c | 122 +++++++++++++-----
 include/linux/mtd/nand.h        |  90 +++++++++++--
 include/linux/mtd/spinand.h     |  11 ++
 4 files changed, 378 insertions(+), 60 deletions(-)