All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/12] Port the FSL QSPI driver to the SPI framework
@ 2018-07-05 11:14 ` Frieder Schrempf
  0 siblings, 0 replies; 99+ messages in thread
From: Frieder Schrempf @ 2018-07-05 11:14 UTC (permalink / raw)
  To: linux-mtd, boris.brezillon, linux-spi
  Cc: yogeshnarayan.gaur, richard, prabhakar.kushwaha,
	Frieder Schrempf, shawnguo, marek.vasut, han.xu, broonie,
	miquel.raynal, fabio.estevam, david.wolfe, computersforpeace,
	dwmw2

Now that the SPI memory interface was introduced by Boris [1], it is
possible to move drivers from mtd/spi-nor to the SPI framework in order
to use them for different type of SPI memory chips.

Patch 1 adds a function spi_mem_get_name() to the SPI memory interface
and a ->name field to struct spi_mem.
Patch 2 uses it in m25p80.c to make it possible for SPI controller
drivers to provide a custom naming scheme for the flash chip.
This is needed to avoid breaking compatibility of mtdparts when switching
from the old to the new driver.

Patch 3 adds a driver for the Freescale QSPI controller to the SPI
framework. Together with m25p80.c it can be used to interface SPI
NOR flashes just as the old driver did. For this to work properly a few
minor changes to the devicetrees are necessary (see patches 5 to 7).

Patch 8 changes the defconfigs to use the new driver and patch 9 removes
the old driver.

Patch 10 and 11 remove 'fsl,qspi-has-second-chip' from the devicetrees.
Patch 12 adjusts the MAINTAINERS file.

The new driver was tested with i.MX6UL and a Micron SPI NOR @ 60MHz.
The read performance of the new driver is almost the same or even better
than the old driver, depending on the block size.
The write performance is a bit slower on average (~10-15%).

The new driver was also tested with the SPI NAND framework [2] and a
Winbond W25M02GV flash.

If someone has a board that uses both chips selects and/or both busses,
it would be really nice to have the driver be tested on such a setup.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/commit/?h=for-4.18&id=c36ff266dc82f4ae797a6f3513c6ffa344f7f1c7
[2] https://patchwork.ozlabs.org/cover/913728/

Changes in v2:
==============
* Rebase on top of nand/next
* Add a name field to struct spi_mem and fill it while probing
* Add Yogesh Gaur and Suresh Gupta as authors
* Use GENMASK() for generating bitmasks
* Use callback functions for read/write of registers
* Attach the seq variable to the selected CS
* Avoid using conditional in read/write loop
* Avoid infinite loop and use a timeout instead
* Return error pointer when allocation in fsl_qspi_get_name() fails
* Remove redundant iounmap()
* Put suspend()/resume() in struct dev_pm_ops instead of struct platform_driver
* Split the moving and editing of the dt-bindings in two patches

Frieder Schrempf (12):
  spi: spi-mem: Extend the SPI mem interface to set a custom memory name
  mtd: m25p80: Call spi_mem_get_name() to let controller set a custom
    name
  spi: Add a driver for the Freescale/NXP QuadSPI controller
  dt-bindings: spi: Move the bindings for the FSL QSPI driver
  dt-bindings: spi: Adjust the bindings for the FSL QSPI driver
  ARM: dts: Reflect change of FSL QSPI driver and remove unused
    properties
  arm64: dts: Reflect change of FSL QSPI driver and remove unused
    properties
  ARM: defconfig: Use the new FSL QSPI driver under the SPI framework
  mtd: fsl-quadspi: Remove the driver as it was replaced by
    spi-fsl-qspi.c
  ARM: dts: ls1021a: Remove fsl,qspi-has-second-chip as it is not used
  ARM64: dts: ls1046a: Remove fsl,qspi-has-second-chip as it is not used
  MAINTAINERS: Move the Freescale QSPI driver to the SPI framework

 .../devicetree/bindings/mtd/fsl-quadspi.txt     |   65 -
 .../devicetree/bindings/spi/spi-fsl-qspi.txt    |   65 +
 MAINTAINERS                                     |    4 +-
 arch/arm/boot/dts/imx6sx-sdb-reva.dts           |    8 +-
 arch/arm/boot/dts/imx6sx-sdb.dts                |    8 +-
 arch/arm/boot/dts/imx6ul-14x14-evk.dtsi         |    2 +
 arch/arm/boot/dts/ls1021a-moxa-uc-8410a.dts     |    6 +-
 arch/arm/configs/imx_v6_v7_defconfig            |    2 +-
 arch/arm/configs/multi_v7_defconfig             |    2 +-
 .../boot/dts/freescale/fsl-ls1043a-qds.dts      |    3 +-
 .../boot/dts/freescale/fsl-ls1046a-qds.dts      |    4 +-
 .../boot/dts/freescale/fsl-ls1046a-rdb.dts      |    6 +-
 arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi  |    1 -
 .../boot/dts/freescale/fsl-ls208xa-qds.dtsi     |    4 +
 drivers/mtd/devices/m25p80.c                    |    3 +-
 drivers/mtd/spi-nor/Kconfig                     |    9 -
 drivers/mtd/spi-nor/Makefile                    |    1 -
 drivers/mtd/spi-nor/fsl-quadspi.c               | 1217 ------------------
 drivers/spi/Kconfig                             |   11 +
 drivers/spi/Makefile                            |    1 +
 drivers/spi/spi-fsl-qspi.c                      |  954 ++++++++++++++
 drivers/spi/spi-mem.c                           |   30 +
 include/linux/spi/spi-mem.h                     |    7 +-
 23 files changed, 1100 insertions(+), 1313 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
 create mode 100644 Documentation/devicetree/bindings/spi/spi-fsl-qspi.txt
 delete mode 100644 drivers/mtd/spi-nor/fsl-quadspi.c
 create mode 100644 drivers/spi/spi-fsl-qspi.c

-- 
2.7.4


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 99+ messages in thread

end of thread, other threads:[~2018-11-08  8:57 UTC | newest]

Thread overview: 99+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-05 11:14 [PATCH v2 00/12] Port the FSL QSPI driver to the SPI framework Frieder Schrempf
2018-07-05 11:14 ` Frieder Schrempf
2018-07-05 11:14 ` [PATCH v2 01/12] spi: spi-mem: Extend the SPI mem interface to set a custom memory name Frieder Schrempf
2018-07-05 12:39   ` Boris Brezillon
2018-07-05 12:50     ` Frieder Schrempf
2018-07-05 12:50       ` Frieder Schrempf
2018-07-05 11:14 ` [PATCH v2 02/12] mtd: m25p80: Call spi_mem_get_name() to let controller set a custom name Frieder Schrempf
2018-07-05 12:56   ` Boris Brezillon
2018-07-05 13:06     ` Frieder Schrempf
2018-07-05 13:06       ` Frieder Schrempf
2018-07-05 11:14 ` [PATCH v2 03/12] spi: Add a driver for the Freescale/NXP QuadSPI controller Frieder Schrempf
     [not found]   ` <7e95c72c-2cd1-f138-a687-6cca362c95b7@exceet.de>
2018-08-02 13:09     ` Questions about " Frieder Schrempf
2018-08-02 13:09       ` Frieder Schrempf
2018-08-02 21:58       ` Han Xu
2018-08-02 21:58         ` Han Xu
2018-08-04 13:37         ` Boris Brezillon
2018-08-04 13:37           ` Boris Brezillon
2018-09-03  9:02           ` Frieder Schrempf
2018-09-03  9:02             ` Frieder Schrempf
2018-09-12 17:04             ` Han Xu
2018-09-12 17:04               ` Han Xu
2018-09-12 18:40               ` Frieder Schrempf
2018-09-12 18:40                 ` Frieder Schrempf
2018-09-12 21:04                 ` Han Xu
2018-09-12 21:04                   ` Han Xu
2018-09-13  7:00                   ` Frieder Schrempf
2018-09-13  7:00                     ` Frieder Schrempf
2018-09-18 22:42                     ` Lukasz Majewski
2018-09-18 22:42                       ` Lukasz Majewski
2018-09-19  6:49                       ` Frieder Schrempf
2018-09-19  6:49                         ` Frieder Schrempf
2018-09-19 11:02                         ` Lukasz Majewski
2018-09-19 11:02                           ` Lukasz Majewski
2018-09-20  1:17                           ` Huang Shijie
2018-09-20  1:17                             ` Huang Shijie
2018-09-20 15:00                           ` Lukasz Majewski
2018-09-20 15:00                             ` Lukasz Majewski
2018-09-20 15:41                             ` Frieder Schrempf
2018-09-20 15:41                               ` Frieder Schrempf
2018-09-20 20:37                               ` Lukasz Majewski
2018-09-20 20:37                                 ` Lukasz Majewski
2018-09-20 22:13                               ` Lukasz Majewski
2018-09-20 22:13                                 ` Lukasz Majewski
2018-09-25  6:49                                 ` Frieder Schrempf
2018-09-25  6:49                                   ` Frieder Schrempf
2018-09-25  8:53                                   ` Lukasz Majewski
2018-09-25  8:53                                     ` Lukasz Majewski
2018-09-06 11:11           ` Yogesh Narayan Gaur
2018-09-06 11:11             ` Yogesh Narayan Gaur
2018-09-06 11:36             ` Boris Brezillon
2018-09-06 11:36               ` Boris Brezillon
2018-09-06 12:22               ` Yogesh Narayan Gaur
2018-09-06 12:22                 ` Yogesh Narayan Gaur
2018-07-05 11:15 ` [PATCH v2 04/12] dt-bindings: spi: Move the bindings for the FSL QSPI driver Frieder Schrempf
2018-07-11 15:54   ` Rob Herring
2018-07-12  8:11     ` Frieder Schrempf
2018-07-12  8:11       ` Frieder Schrempf
2018-07-05 11:15 ` [PATCH v2 05/12] dt-bindings: spi: Adjust " Frieder Schrempf
2018-07-11 16:05   ` Rob Herring
2018-07-12  8:13     ` Frieder Schrempf
2018-07-12  8:13       ` Frieder Schrempf
2018-07-12 15:20       ` Rob Herring
2018-07-16  7:04         ` Frieder Schrempf
2018-07-16  7:04           ` Frieder Schrempf
2018-07-05 11:15 ` [PATCH v2 06/12] ARM: dts: Reflect change of FSL QSPI driver and remove unused properties Frieder Schrempf
2018-07-05 11:15   ` Frieder Schrempf
2018-07-05 11:15 ` [PATCH v2 07/12] arm64: " Frieder Schrempf
2018-07-05 11:15   ` Frieder Schrempf
2018-07-05 11:15 ` [PATCH v2 08/12] ARM: defconfig: Use the new FSL QSPI driver under the SPI framework Frieder Schrempf
2018-07-05 11:15   ` Frieder Schrempf
2018-07-05 11:15   ` Frieder Schrempf
2018-07-05 11:15 ` [PATCH v2 09/12] mtd: fsl-quadspi: Remove the driver as it was replaced by spi-fsl-qspi.c Frieder Schrempf
2018-07-05 11:15 ` [PATCH v2 10/12] ARM: dts: ls1021a: Remove fsl,qspi-has-second-chip as it is not used Frieder Schrempf
2018-07-05 11:15   ` [PATCH v2 10/12] ARM: dts: ls1021a: Remove fsl, qspi-has-second-chip " Frieder Schrempf
2018-07-05 11:15 ` [PATCH v2 11/12] ARM64: dts: ls1046a: Remove fsl,qspi-has-second-chip " Frieder Schrempf
2018-07-05 11:15   ` [PATCH v2 11/12] ARM64: dts: ls1046a: Remove fsl, qspi-has-second-chip " Frieder Schrempf
2018-07-05 11:15   ` Frieder Schrempf
2018-07-05 11:15   ` [PATCH v2 11/12] ARM64: dts: ls1046a: Remove fsl,qspi-has-second-chip " Frieder Schrempf
2018-07-05 11:15 ` [PATCH v2 12/12] MAINTAINERS: Move the Freescale QSPI driver to the SPI framework Frieder Schrempf
2018-07-06  5:08 ` [PATCH v2 00/12] Port the FSL " Yogesh Narayan Gaur
2018-07-06  5:08   ` Yogesh Narayan Gaur
2018-10-31 13:40 ` Boris Brezillon
2018-10-31 13:40   ` Boris Brezillon
2018-10-31 13:54   ` Schrempf Frieder
2018-10-31 13:54     ` Schrempf Frieder
2018-10-31 14:31     ` Boris Brezillon
2018-10-31 14:31       ` Boris Brezillon
2018-10-31 16:03       ` Yogesh Narayan Gaur
2018-10-31 16:03         ` Yogesh Narayan Gaur
2018-10-31 16:09         ` Schrempf Frieder
2018-10-31 16:09           ` Schrempf Frieder
2018-11-08  8:15       ` Schrempf Frieder
2018-11-08  8:15         ` Schrempf Frieder
2018-11-08  8:19         ` Boris Brezillon
2018-11-08  8:19           ` Boris Brezillon
2018-11-08  8:35           ` Schrempf Frieder
2018-11-08  8:35             ` Schrempf Frieder
2018-11-08  8:57           ` Schrempf Frieder
2018-11-08  8:57             ` Schrempf Frieder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.