[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <VI1PR04MB572644A2AE3214356A62478799D20@VI1PR04MB5726.eurprd04.prod.outlook.com>
Date: Thu, 29 Nov 2018 11:38:05 +0000
From: Yogesh Narayan Gaur <yogeshnarayan.gaur@....com>
To: Schrempf Frieder <frieder.schrempf@...tron.de>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
"boris.brezillon@...tlin.com" <boris.brezillon@...tlin.com>,
"linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
Marek Vasut <marek.vasut@...il.com>,
Mark Brown <broonie@...nel.org>, Han Xu <han.xu@....com>
CC: "dwmw2@...radead.org" <dwmw2@...radead.org>,
"computersforpeace@...il.com" <computersforpeace@...il.com>,
"richard@....at" <richard@....at>,
"miquel.raynal@...tlin.com" <miquel.raynal@...tlin.com>,
David Wolfe <david.wolfe@....com>,
Fabio Estevam <fabio.estevam@....com>,
Prabhakar Kushwaha <prabhakar.kushwaha@....com>,
"shawnguo@...nel.org" <shawnguo@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v6 3/9] spi: Add a driver for the Freescale/NXP QuadSPI
controller
Hi Frieder,
> -----Original Message-----
> From: Schrempf Frieder [mailto:frieder.schrempf@...tron.de]
> Sent: Wednesday, November 28, 2018 1:58 PM
> To: linux-mtd@...ts.infradead.org; boris.brezillon@...tlin.com; linux-
> spi@...r.kernel.org; Marek Vasut <marek.vasut@...il.com>; Mark Brown
> <broonie@...nel.org>; Han Xu <han.xu@....com>
> Cc: dwmw2@...radead.org; computersforpeace@...il.com; richard@....at;
> miquel.raynal@...tlin.com; David Wolfe <david.wolfe@....com>; Fabio
> Estevam <fabio.estevam@....com>; Prabhakar Kushwaha
> <prabhakar.kushwaha@....com>; Yogesh Narayan Gaur
> <yogeshnarayan.gaur@....com>; shawnguo@...nel.org; linux-
> kernel@...r.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@...tron.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.
Thanks.
--
Regards
Yogesh Gaur
Powered by blists - more mailing lists