mbox series

[RFC,0/2] spi: spi-mem: Add a direct mapping API

Message ID 20180601143603.4047-1-boris.brezillon@bootlin.com
Headers show
Series spi: spi-mem: Add a direct mapping API | expand

Message

Boris Brezillon June 1, 2018, 2:36 p.m. UTC
Hello,

I know this topic has come up several times during the development of
the spi-mem layer, so I'm finally proposing something to expose this
feature to SPI mem drivers.

Right now it's a rather simple implementation where only on spi_mem_op
operation can be attached to a direct mapping, meaning that write
access to SPI NOR devices will still require manually sending the WR_EN
operation before using the direct mapping, but it should still improve
perfs overall, and should match how most SPI controller drivers describe
direct mappings (a SPI memory operation attached to the range of memory
that you want to directly map in the CPU address space).

Feel free to comment on this implementation.

Thanks,

Boris

Boris Brezillon (2):
  spi: spi-mem: Add a new API to support direct mapping
  mtd: m25p80: Use the SPI mem direct API to possibly improve
    performances

 drivers/mtd/devices/m25p80.c | 149 ++++++++++++++----------
 drivers/spi/spi-mem.c        | 267 +++++++++++++++++++++++++++++++++++++++----
 include/linux/spi/spi-mem.h  |  72 ++++++++++++
 3 files changed, 407 insertions(+), 81 deletions(-)