[PATCH v4 0/7] spi: Extend the framework to generically support memory devices

Frieder Schrempf frieder.schrempf at exceet.de
Thu May 3 11:40:25 PDT 2018


Hi Boris,

On 26.04.2018 18:18, Boris Brezillon wrote:
> Hello,
> 
> Shrinking a bit the explanation on why the spi-mem abstraction is
> needed (a detailed explanation is available here [2]). In addition to
> what as been said in my initial explanation I'll add that making it part
> of the SPI framework instead of as an extra independent layer is
> justified by the fact that some controllers support both SPI memory
> operations and regular SPI transfers, and it's cleaner to have both
> features exposed through a single driver.
> 
> For those who want to have the full picture, here is a branch [1]
> containing the SPI NAND framework based on top of this spi-mem layer.
> 
> Thanks,
> 
> Boris
> 
> [1]https://smex12-5-en-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fgithub.com%2fbbrezillon%2flinux%2ftree%2fspi%2dmem&umid=78d7b933-335d-48ad-a7f9-47b716b20fc3&auth=541e45255b6517100d80c2b1b80b6933b203c492-068a43ed6b9776ab1e94d8bfe0b7982ce0a4715d
> [2]https://www.spinics.net/lists/linux-spi/msg12058.html
> 
> Boris Brezillon (7):
>    spi: Extend the core to ease integration of SPI memory controllers
>    spi: Make support for regular transfers optional when ->mem_ops !=
>      NULL
>    spi: bcm-qspi: Implement the spi_mem interface
>    spi: bcm53xx: Implement the spi_mem interface
>    spi: ti-qspi: Implement the spi_mem interface
>    mtd: spi-nor: Use the spi_mem_xx() API
>    spi: Get rid of the spi_flash_read() API

I have been using these patches quite a bit in different setups:

* with your spi_mem port of fsl-quadspi and SPI NAND/NOR
* with a spi_mem port of stm32-quadspi and SPI NOR
* with generic SPI and SPI NOR

So to make this official, I will add R-b/T-b tags in separate replies to 
the individual patches.

Regards,

Frieder

> 
>   drivers/mtd/devices/Kconfig  |   1 +
>   drivers/mtd/devices/m25p80.c | 236 +++++++++----------------
>   drivers/spi/Kconfig          |   7 +
>   drivers/spi/Makefile         |   1 +
>   drivers/spi/spi-bcm-qspi.c   | 162 ++++++++---------
>   drivers/spi/spi-bcm53xx.c    |  37 ++--
>   drivers/spi/spi-mem.c        | 410 +++++++++++++++++++++++++++++++++++++++++++
>   drivers/spi/spi-ti-qspi.c    |  85 +++++----
>   drivers/spi/spi.c            |  90 +++-------
>   include/linux/spi/spi-mem.h  | 249 ++++++++++++++++++++++++++
>   include/linux/spi/spi.h      |  60 +------
>   11 files changed, 941 insertions(+), 397 deletions(-)
>   create mode 100644 drivers/spi/spi-mem.c
>   create mode 100644 include/linux/spi/spi-mem.h
> 



More information about the linux-mtd mailing list