Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-26 Thread Andy Shevchenko
On Tue, Jun 26, 2018 at 4:47 PM, Boris Brezillon wrote: > Hi Andy, > > On Tue, 26 Jun 2018 16:18:44 +0300 > Andy Shevchenko wrote: > >> >> > What is wrong? Some newlines are missing here between the MODULE_ macros, >> > but in my original patch it seems correct. >> >> It should be like >> >> MODU

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-26 Thread Boris Brezillon
Hi Andy, On Tue, 26 Jun 2018 16:18:44 +0300 Andy Shevchenko wrote: > > > What is wrong? Some newlines are missing here between the MODULE_ macros, > > but in my original patch it seems correct. > > It should be like > > MODULE_FOO(...); > MODULE_BAR(...); > MODULE_BAZ(...); > > One macro —

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-26 Thread Andy Shevchenko
On Tue, Jun 26, 2018 at 3:26 PM, Frieder Schrempf wrote: > On 08.06.2018 22:27, Andy Shevchenko wrote: >> On Fri, Jun 8, 2018 at 2:54 PM, Yogesh Narayan Gaur >> wrote: >>> +static int fsl_qspi_check_buswidth(struct fsl_qspi *q, u8 width) { >>> + switch (width) { >>> + case 1: >>> +

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-26 Thread Frieder Schrempf
Hi Andy, On 08.06.2018 22:27, Andy Shevchenko wrote: On Fri, Jun 8, 2018 at 2:54 PM, Yogesh Narayan Gaur wrote: Hi Frieder, +#define QUADSPI_MCR_RESERVED_MASK (0xF << 16) GENMASK() Ok. +#define QUADSPI_MCR_END_CFG_MASK (0x3 << 2) +#define QUADSPI_BUF3CR_ADATSZ_MASK

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-26 Thread Frieder Schrempf
Hi Boris, hi Yogesh, first, thank you for testing and debugging the new driver. On 19.06.2018 10:46, Boris Brezillon wrote: On Tue, 19 Jun 2018 08:31:25 + Yogesh Narayan Gaur wrote: [...] On Tue, 19 Jun 2018 07:10:37 + Yogesh Narayan Gaur wrote: Let us take below layout of me

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-19 Thread Boris Brezillon
On Tue, 19 Jun 2018 08:31:25 + Yogesh Narayan Gaur wrote: > > > > Could you please use a mailer that is quoting things correctly. I > > have a hard time differentiating your replies from mine. > > Sorry for this, have changed my mailer settings. Thanks for doing. It's still not perfect,

RE: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-19 Thread Yogesh Narayan Gaur
w...@infradead.org; rich...@nod.at; Prabhakar > Kushwaha ; Han Xu ; linux- > ker...@vger.kernel.org; linux-...@vger.kernel.org; linux- > m...@lists.infradead.org; miquel.ray...@bootlin.com; > computersforpe...@gmail.com > Subject: Re: [PATCH 03/11] spi: Add a driver for the Freescale/

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-19 Thread Boris Brezillon
Hi Yogesh, Could you please use a mailer that is quoting things correctly. I have a hard time differentiating your replies from mine. On Tue, 19 Jun 2018 07:10:37 + Yogesh Narayan Gaur wrote: > Let us take below layout of memory address space map. > QuadSPI Controller can access range from

RE: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-19 Thread Yogesh Narayan Gaur
; linux-...@vger.kernel.org; marek.va...@gmail.com; Frieder Schrempf ; broo...@kernel.org; linux-...@lists.infradead.org; miquel.ray...@bootlin.com; computersforpe...@gmail.com Subject: Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller Hi Yogesh, On Mon, 18 Jun 2018 13:32

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-18 Thread Boris Brezillon
Yogesh, On Wed, 30 May 2018 15:14:32 +0200 Frieder Schrempf wrote: > +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; > + > + if (q->selected == spi->chip_select) > +

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-18 Thread Boris Brezillon
infradead.org > Cc: rich...@nod.at; Prabhakar Kushwaha ; Han Xu > ; linux-kernel@vger.kernel.org; linux-...@vger.kernel.org; > marek.va...@gmail.com; Frieder Schrempf ; > broo...@kernel.org; linux-...@lists.infradead.org; miquel.ray...@bootlin.com; > computersforpe...@gmail.com > S

RE: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-18 Thread Yogesh Narayan Gaur
-...@vger.kernel.org; marek.va...@gmail.com; Frieder Schrempf ; broo...@kernel.org; linux-...@lists.infradead.org; miquel.ray...@bootlin.com; computersforpe...@gmail.com Subject: Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller On Fri, 15 Jun 2018 13:42:12 + Yogesh

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-15 Thread Boris Brezillon
On Fri, 15 Jun 2018 15:55:41 +0200 Boris Brezillon wrote: > On Fri, 15 Jun 2018 13:42:12 + > Yogesh Narayan Gaur wrote: > > > Hi Boris, > > > > I am still debugging the issue. > > With some analysis, able to check that proper values are not being written > > for QUADSPI_SFA2AD/ QUADSPI_SF

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-15 Thread Boris Brezillon
On Fri, 15 Jun 2018 13:42:12 + Yogesh Narayan Gaur wrote: > Hi Boris, > > I am still debugging the issue. > With some analysis, able to check that proper values are not being written > for QUADSPI_SFA2AD/ QUADSPI_SFB1AD/ QUADSPI_SFB2AD register. > > In current code, value of map_addr are b

RE: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-15 Thread Yogesh Narayan Gaur
marek.va...@gmail.com; Frieder Schrempf ; broo...@kernel.org; linux-...@lists.infradead.org; miquel.ray...@bootlin.com; Fabio Estevam ; David Wolfe ; computersforpe...@gmail.com; dw...@infradead.org Subject: Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller On Tue, 12 Jun

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-15 Thread Boris Brezillon
On Tue, 12 Jun 2018 08:51:25 + Yogesh Narayan Gaur wrote: > > I am working on lsxxx platform. With further debugging, I found that my erase > operation for second flash device is not working properly. > Need to have debugging for this in Frieder Patch. Did you find the problem? Could it be

RE: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-12 Thread Yogesh Narayan Gaur
; Frieder Schrempf ; broo...@kernel.org; linux-...@lists.infradead.org; miquel.ray...@bootlin.com; Fabio Estevam ; David Wolfe ; computersforpe...@gmail.com; dw...@infradead.org Subject: Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller On Tue, 12 Jun 2018 06:42:42 +

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-12 Thread Boris Brezillon
On Tue, 12 Jun 2018 06:42:42 + Yogesh Narayan Gaur wrote: > I have tried JFFS2 mounting with smaller partition size but still getting > failure. > For partition size equal or less than 1MB, getting errors as > [ 25.044930] jffs2: Too few erase blocks (4) > Thus, need to have size more

RE: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-11 Thread Yogesh Narayan Gaur
; marek.va...@gmail.com; Frieder Schrempf ; broo...@kernel.org; linux-...@lists.infradead.org; miquel.ray...@bootlin.com; Fabio Estevam ; David Wolfe ; computersforpe...@gmail.com; dw...@infradead.org Subject: RE: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller Hi

RE: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-11 Thread Yogesh Narayan Gaur
; computersforpe...@gmail.com; rich...@nod.at; miquel.ray...@bootlin.com; broo...@kernel.org; David Wolfe ; Fabio Estevam ; Prabhakar Kushwaha ; Han Xu ; linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller On Mon, 11 Jun 2018 09:38:14 +

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-11 Thread Boris Brezillon
On Mon, 11 Jun 2018 09:38:14 + Yogesh Narayan Gaur wrote: > > > Observation 3: > > > As we can support JFFS2 filesystem on NOR flash, so we can expect JFFS2 > > > commands should work fine on NOR flash. > > > But with this driver change my mount command is not working. > > > > > > In my tar

RE: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-11 Thread Yogesh Narayan Gaur
; computersforpe...@gmail.com; rich...@nod.at; miquel.ray...@bootlin.com; broo...@kernel.org; David Wolfe ; Fabio Estevam ; Prabhakar Kushwaha ; Han Xu ; linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller Hi Yogesh, On Mon, 11 Jun 2018 06:31:00

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-11 Thread Boris Brezillon
Hi Yogesh, On Mon, 11 Jun 2018 06:31:00 + Yogesh Narayan Gaur wrote: > > > > > Observation 2: > > I have observed data sanity issue after performing read/write > > operations using MTD interface. Explained below > > > > root:~# mtd_debug erase /dev/mtd0 0x100 0x4 > > Erased 26214

RE: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-10 Thread Yogesh Narayan Gaur
; marek.va...@gmail.com; rich...@nod.at; miquel.ray...@bootlin.com; broo...@kernel.org; David Wolfe ; Fabio Estevam ; Prabhakar Kushwaha ; Han Xu ; linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller Hi Yogesh, On Fri, 8 Jun 2018 11:54:12

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-08 Thread Andy Shevchenko
On Fri, Jun 8, 2018 at 2:54 PM, Yogesh Narayan Gaur wrote: Hi Frieder, > +#define QUADSPI_MCR_RESERVED_MASK (0xF << 16) GENMASK() > +#define QUADSPI_MCR_END_CFG_MASK (0x3 << 2) > +#define QUADSPI_BUF3CR_ADATSZ_MASK (0xFF << QUADSPI_BUF3CR_ADATSZ_SHIFT) > +#define QUADSPI_SMPR_

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-08 Thread Boris Brezillon
Hi Yogesh, On Fri, 8 Jun 2018 11:54:12 + Yogesh Narayan Gaur wrote: > Hi Frieder, > > I have tried to validate your patch on fsl,ls2080a target having 2 Spansion > NOR flash, S25FS512S, as slave device. > Below are my observations: > > Observation 1: > In Linux boot logs after driver prob

RE: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-08 Thread Yogesh Narayan Gaur
Hi Frieder, I have tried to validate your patch on fsl,ls2080a target having 2 Spansion NOR flash, S25FS512S, as slave device. Below are my observations: Observation 1: In Linux boot logs after driver probing is successful, getting below log messages [1.435986] m25p80 spi0.0: found s25fl512

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-05 Thread Boris Brezillon
On Wed, 30 May 2018 15:14:32 +0200 Frieder Schrempf wrote: > + > +static void fsl_qspi_read_ahb(struct fsl_qspi *q, const struct spi_mem_op > *op) > +{ > + static int seq; > + > + /* > + * We want to avoid needing to invalidate the cache by issueing > + * a reset to the AHB and

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-06-01 Thread Frieder Schrempf
Hi Yogesh, On 30.05.2018 16:24, Boris Brezillon wrote: Hi Yogesh, On Wed, 30 May 2018 13:50:51 + Yogesh Narayan Gaur wrote: Hi Frieder, Thanks for migrating the fsl-quadspi.c driver on the new SPI framework. This patch is using dynamic LUT approach to create the LUT at run time instead

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-05-30 Thread Frieder Schrempf
Hi Boris, On 30.05.2018 16:58, Boris Brezillon wrote: Hi Frieder, On Wed, 30 May 2018 15:14:32 +0200 Frieder Schrempf wrote: + +static const char *fsl_qspi_get_name(struct spi_mem *mem) +{ + struct fsl_qspi *q = spi_controller_get_devdata(mem->spi->master); + struct device *dev =

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-05-30 Thread Boris Brezillon
Hi Frieder, On Wed, 30 May 2018 15:14:32 +0200 Frieder Schrempf wrote: > + > +static const char *fsl_qspi_get_name(struct spi_mem *mem) > +{ > + struct fsl_qspi *q = spi_controller_get_devdata(mem->spi->master); > + struct device *dev = &mem->spi->dev; > + const char *name; > + > +

Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-05-30 Thread Boris Brezillon
Hi Yogesh, On Wed, 30 May 2018 13:50:51 + Yogesh Narayan Gaur wrote: > Hi Frieder, > > Thanks for migrating the fsl-quadspi.c driver on the new SPI > framework. This patch is using dynamic LUT approach to create the LUT > at run time instead of fixed static LUT as being used in current > dr

RE: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-05-30 Thread Yogesh Narayan Gaur
Hi Frieder, Thanks for migrating the fsl-quadspi.c driver on the new SPI framework. This patch is using dynamic LUT approach to create the LUT at run time instead of fixed static LUT as being used in current driver present at mtd/spi-nor/fsl-quadspi.c. I have pushed the changes for dynamic LUT