All of lore.kernel.org
 help / color / mirror / Atom feed
From: Han Xu <han.xu@nxp.com>
To: Schrempf Frieder <frieder.schrempf@kontron.de>,
	Yogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"boris.brezillon@bootlin.com" <boris.brezillon@bootlin.com>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	Marek Vasut <marek.vasut@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: "dwmw2@infradead.org" <dwmw2@infradead.org>,
	"computersforpeace@gmail.com" <computersforpeace@gmail.com>,
	"richard@nod.at" <richard@nod.at>,
	"miquel.raynal@bootlin.com" <miquel.raynal@bootlin.com>,
	David Wolfe <david.wolfe@nxp.com>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v6 3/9] spi: Add a driver for the Freescale/NXP QuadSPI controller
Date: Thu, 29 Nov 2018 16:30:55 +0000	[thread overview]
Message-ID: <AM6PR04MB496732760F72A0B5B5F4A5A997D20@AM6PR04MB4967.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <f4c584e5-8930-bec3-0c4e-2216a89606b0@kontron.de>



> -----Original Message-----
> From: Schrempf Frieder <frieder.schrempf@kontron.de>
> Sent: Thursday, November 29, 2018 5:54 AM
> To: Yogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com>; linux-
> mtd@lists.infradead.org; boris.brezillon@bootlin.com; linux-
> spi@vger.kernel.org; Marek Vasut <marek.vasut@gmail.com>; Mark Brown
> <broonie@kernel.org>; Han Xu <han.xu@nxp.com>
> Cc: dwmw2@infradead.org; computersforpeace@gmail.com;
> richard@nod.at; miquel.raynal@bootlin.com; David Wolfe
> <david.wolfe@nxp.com>; Fabio Estevam <fabio.estevam@nxp.com>;
> Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>;
> shawnguo@kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v6 3/9] spi: Add a driver for the Freescale/NXP QuadSPI
> controller
> 
> Hi Yogesh,
> 
> On 29.11.18 12:38, Yogesh Narayan Gaur wrote:
> > Hi Frieder,
> >
> >> -----Original Message-----
> >> From: Schrempf Frieder [mailto:frieder.schrempf@kontron.de]
> >> Sent: Wednesday, November 28, 2018 1:58 PM
> >> To: linux-mtd@lists.infradead.org; boris.brezillon@bootlin.com;
> >> linux- spi@vger.kernel.org; Marek Vasut <marek.vasut@gmail.com>;
> Mark
> >> Brown <broonie@kernel.org>; Han Xu <han.xu@nxp.com>
> >> Cc: dwmw2@infradead.org; computersforpeace@gmail.com;
> richard@nod.at;
> >> miquel.raynal@bootlin.com; David Wolfe <david.wolfe@nxp.com>; Fabio
> >> Estevam <fabio.estevam@nxp.com>; Prabhakar Kushwaha
> >> <prabhakar.kushwaha@nxp.com>; Yogesh Narayan Gaur
> >> <yogeshnarayan.gaur@nxp.com>; shawnguo@kernel.org; linux-
> >> kernel@vger.kernel.org
> >> Subject: Re: [PATCH v6 3/9] spi: Add a driver for the Freescale/NXP
> >> QuadSPI controller
> >>
> >> On 27.11.18 11:24, Schrempf Frieder wrote:
> >>> This driver is derived from the SPI NOR driver at
> >>> mtd/spi-nor/fsl-quadspi.c. It uses the new SPI memory interface of
> >>> the SPI framework to issue flash memory operations to up to four
> >>> connected flash chips (2 buses with 2 CS each).
> >>>
> >>> The controller does not support generic SPI messages.
> >>>
> >>> This patch also disables the build of the "old" driver and reuses
> >>> its Kconfig option CONFIG_SPI_FSL_QUADSPI to replace it.
> >>>
> >>> Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
> >>> ---
> >>>    drivers/mtd/spi-nor/Kconfig  |   9 -
> >>>    drivers/mtd/spi-nor/Makefile |   1 -
> >>>    drivers/spi/Kconfig          |  11 +
> >>>    drivers/spi/Makefile         |   1 +
> >>>    drivers/spi/spi-fsl-qspi.c   | 967
> >> ++++++++++++++++++++++++++++++++++++++
> >>>    5 files changed, 979 insertions(+), 10 deletions(-)
> >>>
> >>> diff --git a/drivers/mtd/spi-nor/Kconfig
> >>> b/drivers/mtd/spi-nor/Kconfig index 6cc9c92..d1ca307 100644
> >>> --- a/drivers/mtd/spi-nor/Kconfig
> >>> +++ b/drivers/mtd/spi-nor/Kconfig
> >>> @@ -59,15 +59,6 @@ config SPI_CADENCE_QUADSPI
> >>>    	  device with a Cadence QSPI controller and want to access the
> >>>    	  Flash as an MTD device.
> >>>
> >>> -config SPI_FSL_QUADSPI
> >>> -	tristate "Freescale Quad SPI controller"
> >>> -	depends on ARCH_MXC || SOC_LS1021A || ARCH_LAYERSCAPE ||
> >> COMPILE_TEST
> >>> -	depends on HAS_IOMEM
> >>> -	help
> >>> -	  This enables support for the Quad SPI controller in master mode.
> >>> -	  This controller does not support generic SPI. It only supports
> >>> -	  SPI NOR.
> >>> -
> >>>    config SPI_HISI_SFC
> >>>    	tristate "Hisilicon SPI-NOR Flash Controller(SFC)"
> >>>    	depends on ARCH_HISI || COMPILE_TEST diff --git
> >>> a/drivers/mtd/spi-nor/Makefile b/drivers/mtd/spi-nor/Makefile index
> >>> f4c61d2..3f160c2e3 100644
> >>> --- a/drivers/mtd/spi-nor/Makefile
> >>> +++ b/drivers/mtd/spi-nor/Makefile
> >>> @@ -3,7 +3,6 @@ obj-$(CONFIG_MTD_SPI_NOR)	+= spi-nor.o
> >>>    obj-$(CONFIG_SPI_ASPEED_SMC)	+= aspeed-smc.o
> >>>    obj-$(CONFIG_SPI_ATMEL_QUADSPI)	+= atmel-quadspi.o
> >>>    obj-$(CONFIG_SPI_CADENCE_QUADSPI)	+= cadence-quadspi.o
> >>> -obj-$(CONFIG_SPI_FSL_QUADSPI)	+= fsl-quadspi.o
> >>>    obj-$(CONFIG_SPI_HISI_SFC)	+= hisi-sfc.o
> >>>    obj-$(CONFIG_MTD_MT81xx_NOR)    += mtk-quadspi.o
> >>>    obj-$(CONFIG_SPI_NXP_SPIFI)	+= nxp-spifi.o
> >>> diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index
> >>> 7d3a5c9..8c84186 100644
> >>> --- a/drivers/spi/Kconfig
> >>> +++ b/drivers/spi/Kconfig
> >>> @@ -259,6 +259,17 @@ config SPI_FSL_LPSPI
> >>>    	help
> >>>    	  This enables Freescale i.MX LPSPI controllers in master mode.
> >>>
> >>> +config SPI_FSL_QUADSPI
> >>> +	tristate "Freescale QSPI controller"
> >>> +	depends on ARCH_MXC || SOC_LS1021A || ARCH_LAYERSCAPE ||
> >> COMPILE_TEST
> >>> +	depends on HAS_IOMEM
> >>> +	help
> >>> +	  This enables support for the Quad SPI controller in master mode.
> >>> +	  Up to four flash chips can be connected on two buses with two
> >>> +	  chipselects each.
> >>> +	  This controller does not support generic SPI messages. It only
> >>> +	  supports the high-level SPI memory interface.
> >>> +
> > [...]
> >>> +static void fsl_qspi_select_mem(struct fsl_qspi *q, struct
> >>> +spi_device *spi) {
> >>> +	unsigned long rate = spi->max_speed_hz;
> >>> +	int ret, i;
> >>> +	u32 map_addr;
> >>
> >> Forgot to drop some unused vars here. I will remove them in the next
> >> version.
> >>
> >
> > Yes, below are the build warnings messages coming for this version of the
> patch.
> >
> > 	drivers/spi/spi-fsl-qspi.c: In function ‘fsl_qspi_select_mem’:
> > 	drivers/spi/spi-fsl-qspi.c:500:6: warning: unused variable ‘map_addr’
> [-Wunused-variable]
> > 	  u32 map_addr;
> > 	      ^
> > 	drivers/spi/spi-fsl-qspi.c:499:11: warning: unused variable ‘i’ [-
> Wunused-variable]
> > 	  int ret, i;
> >
> >>> +
> >>> +	if (q->selected == spi->chip_select)
> > [...]
> >
> > Verified this patch series on LayerScape-2.x architecture boards.
> > LS1088ardb, is having two connected flash slave devices on CS0 and CS1.
> >
> > Verified with simple Read/Write/Erase operations along with JFFS2
> mounting and booting from flash MTD partition for both slave devices.
> 
> Thank you for testing! Does this mean I can add your Tested-by tag?
> If you have done a review of any of the patches in this set, please also add a
> Reviewed-by tag.

Hi Schrempf, I am reviewing and testing on some i.MX platforms, please hold on for a while for the result.

> 
> Thanks,
> Frieder

  reply	other threads:[~2018-11-29 16:31 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 10:23 [PATCH v6 0/9] Port the FSL QSPI driver to the SPI framework Schrempf Frieder
2018-11-27 10:24 ` [PATCH v6 1/9] ARM: dts: Reflect change of FSL QSPI driver and remove unused properties Schrempf Frieder
2018-11-27 10:24   ` Schrempf Frieder
2018-11-27 10:24   ` Schrempf Frieder
2018-11-27 11:01   ` Uwe Kleine-König
2018-11-27 11:01     ` Uwe Kleine-König
2018-11-27 11:01     ` Uwe Kleine-König
2018-11-27 11:01     ` Uwe Kleine-König
2018-11-27 11:16     ` Schrempf Frieder
2018-11-27 14:51     ` Schrempf Frieder
2018-11-27 14:51       ` Schrempf Frieder
2018-11-27 14:51       ` Schrempf Frieder
2018-11-27 14:51       ` Schrempf Frieder
2018-11-27 14:51       ` Schrempf Frieder
2018-11-27 10:24 ` [PATCH v6 2/9] arm64: " Schrempf Frieder
2018-11-27 10:24   ` Schrempf Frieder
2018-11-27 10:24   ` Schrempf Frieder
2018-11-27 10:24   ` Schrempf Frieder
2018-11-27 10:24 ` [PATCH v6 3/9] spi: Add a driver for the Freescale/NXP QuadSPI controller Schrempf Frieder
2018-11-28  8:28   ` Schrempf Frieder
2018-11-29 11:38     ` Yogesh Narayan Gaur
2018-11-29 11:53       ` Schrempf Frieder
2018-11-29 16:30         ` Han Xu [this message]
2018-11-29 17:35           ` Schrempf Frieder
2018-12-03 20:54             ` Han Xu
2018-12-04  8:20               ` Schrempf Frieder
2018-11-30  4:33         ` Yogesh Narayan Gaur
2018-11-27 10:24 ` [PATCH v6 4/9] dt-bindings: spi: Move the bindings for the FSL QSPI driver Schrempf Frieder
2018-11-27 10:24 ` [PATCH v6 5/9] dt-bindings: spi: Adjust " Schrempf Frieder
2018-11-27 10:24   ` Schrempf Frieder
2018-11-27 10:24   ` Schrempf Frieder
2018-11-27 10:24 ` [PATCH v6 6/9] mtd: fsl-quadspi: Remove the driver as it was replaced by spi-fsl-qspi.c Schrempf Frieder
2018-11-27 10:24 ` [PATCH v6 7/9] ARM: dts: ls1021a: Remove fsl,qspi-has-second-chip as it is not used Schrempf Frieder
2018-11-27 10:24   ` [PATCH v6 7/9] ARM: dts: ls1021a: Remove fsl, qspi-has-second-chip " Schrempf Frieder
2018-11-27 10:24   ` Schrempf Frieder
2018-11-27 10:24   ` [PATCH v6 7/9] ARM: dts: ls1021a: Remove fsl,qspi-has-second-chip " Schrempf Frieder
2018-11-27 10:24   ` Schrempf Frieder
2018-11-27 10:24 ` [PATCH v6 8/9] ARM64: dts: ls1046a: " Schrempf Frieder
2018-11-27 10:24   ` Schrempf Frieder
2018-11-27 10:24   ` Schrempf Frieder
2018-11-27 10:24   ` Schrempf Frieder
2018-11-27 10:24 ` [PATCH v6 9/9] MAINTAINERS: Move the Freescale QSPI driver to the SPI framework Schrempf Frieder
2018-11-27 10:24   ` Schrempf Frieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM6PR04MB496732760F72A0B5B5F4A5A997D20@AM6PR04MB4967.eurprd04.prod.outlook.com \
    --to=han.xu@nxp.com \
    --cc=boris.brezillon@bootlin.com \
    --cc=broonie@kernel.org \
    --cc=computersforpeace@gmail.com \
    --cc=david.wolfe@nxp.com \
    --cc=dwmw2@infradead.org \
    --cc=fabio.estevam@nxp.com \
    --cc=frieder.schrempf@kontron.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=marek.vasut@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=prabhakar.kushwaha@nxp.com \
    --cc=richard@nod.at \
    --cc=shawnguo@kernel.org \
    --cc=yogeshnarayan.gaur@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.