diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2020-02-18 22:24:10 +0100 |
---|---|---|
committer | Tudor Ambarus <tudor.ambarus@microchip.com> | 2020-02-19 08:17:33 +0100 |
commit | df5c21002cf4bb9c755c6330d101487c5d530c10 (patch) | |
tree | a5de3b00b4d3f1f7c744d5d8ef5a0ac178210fdf /include | |
parent | mtd: spi-nor: split spi_nor_spimem_xfer_data() (diff) | |
download | linux-df5c21002cf4bb9c755c6330d101487c5d530c10.tar.xz linux-df5c21002cf4bb9c755c6330d101487c5d530c10.zip |
mtd: spi-nor: use 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 the original patch by Boris Brezillon
<boris.brezillon@bootlin.com>.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mtd/spi-nor.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index 61be6ed33097..de90724f62f1 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -580,6 +580,7 @@ struct flash_info; * The structure includes legacy flash parameters and * settings that can be overwritten by the spi_nor_fixups * hooks, or dynamically when parsing the SFDP tables. + * @dirmap: pointers to struct spi_mem_dirmap_desc for reads/writes. * @priv: the private data */ struct spi_nor { @@ -606,6 +607,11 @@ struct spi_nor { struct spi_nor_flash_parameter params; + struct { + struct spi_mem_dirmap_desc *rdesc; + struct spi_mem_dirmap_desc *wdesc; + } dirmap; + void *priv; }; |