]> Gentwo Git Trees - linux/.git/commit
mtd: spinand: try a regular dirmap if creating a dirmap for continuous reading fails
authorMikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Wed, 17 Sep 2025 21:54:00 +0000 (00:54 +0300)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 29 Sep 2025 15:53:08 +0000 (17:53 +0200)
commit004f8ea0d9917398aabff7388b3bf62a84a4088b
tree1010c91b24c7a5451c1a96e22d872e7473d91e28
parente4a0cf9f1d90e6888e5373da3314f761024f6c97
mtd: spinand: try a regular dirmap if creating a dirmap for continuous reading fails

Continuous reading may result in multiple flash pages reading in one
operation. Typically only one flash page has read/written (a little bit
more than 2-4 Kb), but continuous reading requires the spi controller
to read up to 512 Kb in one operation without toggling CS in beetween.

Roughly speaking spi controllers can be divided on 2 categories:
 * spi controllers without dirmap acceleration support
 * spi controllers with dirmap acceleration support

Firt of them will have issues with continuous reading if restriction on
the transfer length is implemented in the adjust_op_size() handler.
Second group often supports acceleration of single page only reading.
Thus enabling of continuous reading can break flash reading.

This patch tries to create dirmap for continuous reading first and
fallback to regular reading if spi controller refuses to create it.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/spi/core.c