diff options
| author | Mikhail Kshevetskiy <[email protected]> | 2025-09-30 03:20:47 +0300 |
|---|---|---|
| committer | Michael Trimarchi <[email protected]> | 2025-10-05 20:25:44 +0200 |
| commit | aecd0bd41237ef0a8852683c848865d514de3fa5 (patch) | |
| tree | 67036a797f0f85bb40fa8655f4aa05ab865981ba /include | |
| parent | ce6a23e7e8946837b1df8d953515e7880fa852a4 (diff) | |
mtd: spinand: Use the spi-mem dirmap API
Make use of the spi-mem direct mapping API to let advanced controllers
optimize read/write operations when they support direct mapping.
Based on a linux commit 981d1aa0697c ("mtd: spinand: Use the spi-mem dirmap API")
created by Boris Brezillon <[email protected]> with additional
fixes taken from Linux 6.10.
Signed-off-by: Mikhail Kshevetskiy <[email protected]>
Reviewed-by: Frieder Schrempf <[email protected]>
Signed-off-by: Michael Trimarchi <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/mtd/spinand.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h index 6fe6fd520a4..163269313f6 100644 --- a/include/linux/mtd/spinand.h +++ b/include/linux/mtd/spinand.h @@ -363,6 +363,11 @@ struct spinand_info { __VA_ARGS__ \ } +struct spinand_dirmap { + struct spi_mem_dirmap_desc *wdesc; + struct spi_mem_dirmap_desc *rdesc; +}; + /** * struct spinand_device - SPI NAND device instance * @base: NAND device instance @@ -406,6 +411,8 @@ struct spinand_device { const struct spi_mem_op *update_cache; } op_templates; + struct spinand_dirmap *dirmaps; + int (*select_target)(struct spinand_device *spinand, unsigned int target); unsigned int cur_target; |
