aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2020-02-19 00:24:10 +0300
committerTudor Ambarus <tudor.ambarus@microchip.com>2020-02-19 09:17:33 +0200
commitdf5c21002cf4bb9c755c6330d101487c5d530c10 (patch)
treea5de3b00b4d3f1f7c744d5d8ef5a0ac178210fdf /include/linux/mtd
parentmtd: spi-nor: split spi_nor_spimem_xfer_data() (diff)
downloadwireguard-linux-df5c21002cf4bb9c755c6330d101487c5d530c10.tar.xz
wireguard-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/linux/mtd')
-rw-r--r--include/linux/mtd/spi-nor.h6
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;
};