mbox series

[v3,0/4] rewrite mtk-quadspi spi-nor driver with spi-mem

Message ID 20200306085052.28258-1-gch981213@gmail.com
Headers show
Series rewrite mtk-quadspi spi-nor driver with spi-mem | expand

Message

Chuanhong Guo March 6, 2020, 8:50 a.m. UTC
This patchset adds a spi-mem driver for Mediatek SPI-NOR controller,
which already has limited support by mtk-quadspi. This new driver can
make use of full quadspi capability of this controller.

1st new commit makes spi-max-frequency optional to match current
binding doc and make this new driver compatible with old driver dt
bindings.

Change since v2:
 revert binding example replacement and add a dummy irq binding

Changes since v1:
 two new commits.

Chuanhong Guo (4):
  spi: make spi-max-frequency optional
  spi: add support for mediatek spi-nor controller
  dt-bindings: convert mtk-quadspi binding doc for spi-mtk-nor
  mtd: spi-nor: remove mtk-quadspi driver

 .../mtk-quadspi.txt => spi/spi-mtk-nor.txt}   |  15 +-
 drivers/mtd/spi-nor/Kconfig                   |   8 -
 drivers/mtd/spi-nor/Makefile                  |   1 -
 drivers/mtd/spi-nor/mtk-quadspi.c             | 565 --------------
 drivers/spi/Kconfig                           |  10 +
 drivers/spi/Makefile                          |   1 +
 drivers/spi/spi-mtk-nor.c                     | 689 ++++++++++++++++++
 drivers/spi/spi.c                             |   9 +-
 8 files changed, 708 insertions(+), 590 deletions(-)
 rename Documentation/devicetree/bindings/{mtd/mtk-quadspi.txt => spi/spi-mtk-nor.txt} (75%)
 delete mode 100644 drivers/mtd/spi-nor/mtk-quadspi.c
 create mode 100644 drivers/spi/spi-mtk-nor.c

Comments

Mark Brown March 9, 2020, 12:10 p.m. UTC | #1
On Fri, Mar 06, 2020 at 04:50:52PM +0800, Chuanhong Guo wrote:
> This driver is superseded by the new spi-mtk-nor driver.
> 
> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>

Is this move OK from a MTD point of view - should I apply this when the
rest goes in?  The patch was in prior versions too and is obviously
straightforward.
Tudor Ambarus March 10, 2020, 7:41 a.m. UTC | #2
Hi, Mark,

On Monday, March 9, 2020 2:10:20 PM EET Mark Brown wrote:
> > This driver is superseded by the new spi-mtk-nor driver.
> > 
> > Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
> 
> Is this move OK from a MTD point of view - should I apply this when the
> rest goes in?  The patch was in prior versions too and is obviously
> straightforward.

If you find the rest of the patches ok, this can go through the spi tree, feel 
free to add my
Acked-by: Tudor Ambarus <tudor.ambarus@microchip.com>

There will be a conflict with the following patch https://
patchwork.ozlabs.org/patch/1247791/, but nothing that we can't handle.
I'll try to allocate time for reviewing the remaining patches in this set in 
the following days.

Cheers,
ta
Tudor Ambarus March 10, 2020, 9:11 a.m. UTC | #3
On Tuesday, March 10, 2020 9:41:26 AM EET Tudor.Ambarus@microchip.com wrote:
> Hi, Mark,
> 
> On Monday, March 9, 2020 2:10:20 PM EET Mark Brown wrote:
> > > This driver is superseded by the new spi-mtk-nor driver.
> > > 
> > > Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
> > 
> > Is this move OK from a MTD point of view - should I apply this when the
> > rest goes in?  The patch was in prior versions too and is obviously
> > straightforward.
> 
> If you find the rest of the patches ok, this can go through the spi tree,
> feel free to add my
> Acked-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> 
> There will be a conflict with the following patch https://
> patchwork.ozlabs.org/patch/1247791/, but nothing that we can't handle.

You can also create an immutable tag that I can merge in my spi-nor/next 
branch, so that Linus doesn't have to deal with the conflict.

ta
Mark Brown March 11, 2020, 7:57 p.m. UTC | #4
On Tue, Mar 10, 2020 at 09:11:29AM +0000, Tudor.Ambarus@microchip.com wrote:

> You can also create an immutable tag that I can merge in my spi-nor/next 
> branch, so that Linus doesn't have to deal with the conflict.

The following changes since commit bb6d3fb354c5ee8d6bde2d576eb7220ea09862b9:

  Linux 5.6-rc1 (2020-02-09 16:08:48 -0800)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git tags/mtk-mtd-spi-move

for you to fetch changes up to e11e8473bcec748c3820636f11b986f611c9309b:

  mtd: spi-nor: remove mtk-quadspi driver (2020-03-11 19:56:08 +0000)

----------------------------------------------------------------
spi: Rewrite mtk-quadspi spi-nor driver with spi-mem

This patchset from Chuanhong Guo <gch981213@gmail.com> adds a spi-mem
driver for Mediatek SPI-NOR controller, which already has limited
support by mtk-quadspi. This new driver can make use of full quadspi
capability of this controller.

----------------------------------------------------------------
Chuanhong Guo (4):
      spi: make spi-max-frequency optional
      spi: add support for mediatek spi-nor controller
      dt-bindings: convert mtk-quadspi binding doc for spi-mtk-nor
      mtd: spi-nor: remove mtk-quadspi driver

 .../{mtd/mtk-quadspi.txt => spi/spi-mtk-nor.txt}   |  15 +-
 drivers/mtd/spi-nor/Kconfig                        |   8 -
 drivers/mtd/spi-nor/Makefile                       |   1 -
 drivers/mtd/spi-nor/mtk-quadspi.c                  | 565 -----------------
 drivers/spi/Kconfig                                |  10 +
 drivers/spi/Makefile                               |   1 +
 drivers/spi/spi-mtk-nor.c                          | 689 +++++++++++++++++++++
 drivers/spi/spi.c                                  |   9 +-
 8 files changed, 708 insertions(+), 590 deletions(-)
 rename Documentation/devicetree/bindings/{mtd/mtk-quadspi.txt => spi/spi-mtk-nor.txt} (75%)
 delete mode 100644 drivers/mtd/spi-nor/mtk-quadspi.c
 create mode 100644 drivers/spi/spi-mtk-nor.c