public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Schrempf Frieder <frieder.schrempf@kontron.de>
To: Yogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com>
Cc: Boris Brezillon <boris.brezillon@bootlin.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH v5 3/9] spi: Add a driver for the Freescale/NXP QuadSPI controller
Date: Mon, 19 Nov 2018 08:22:32 +0000	[thread overview]
Message-ID: <902ca455-9d3e-7371-fb8e-2b5cb7ad87cb@kontron.de> (raw)
In-Reply-To: <VI1PR04MB572668C2BCD132D06E53E98C99DD0@VI1PR04MB5726.eurprd04.prod.outlook.com>

Hi Yogesh,

On 16.11.18 11:12, Yogesh Narayan Gaur wrote:
> Hi Frieder,
> 
> I have one more comment, you might add that also in your next version:
> 
> Func fsl_qspi_invalidate() needs to be called for case when we are performing Erase/Write of data from IP bus
> 
> So instead of calling this for call case
>                  qspi_writel(q, QUADSPI_RBCT_WMRK_MASK |
>                              QUADSPI_RBCT_RXBRD_USEIPS, base + QUADSPI_RBCT);
> 
>                  if (op->data.nbytes && op->data.dir == SPI_MEM_DATA_OUT)
>                          fsl_qspi_fill_txfifo(q, op);
> 
>                  err = fsl_qspi_do_op(q, op);
>          }
> 
>          /* Invalidate the data in the AHB buffer. */
>          fsl_qspi_invalidate(q);
> 
>          mutex_unlock(&q->lock);
> 
> You can call that only for case of write/erase operation
> 	/* Invalidate the data in the AHB buffer. */
> 	if (op->data.nbytes && op->data.dir == SPI_MEM_DATA_OUT)
> 	        fsl_qspi_invalidate(q);

Thank you for your feedback.

Unfortunately I can't be sure if the current operation is really a write 
or erase operation on the chip as this information is hidden behind the 
SPI mem layer.

Also in case of SPI NAND the AHB buffer needs to be invalidated as soon 
as its content won't match the on-chip page buffer anymore. This is 
usually the case when a page read op is issued.

So currently it is not possible to easily determine when to invalidate 
the AHB buffer and this is why I do it after each op.
In the future we might add some hook in the SPI mem layer to improve 
this situation.

Also, please keep discussions like this on the mailing list, so others 
can comment if necessary.

Thanks,
Frieder

  parent reply	other threads:[~2018-11-19  8:22 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 13:47 [PATCH v5 0/9] Port the FSL QSPI driver to the SPI framework Schrempf Frieder
2018-11-13 13:47 ` [PATCH v5 1/9] ARM: dts: Reflect change of FSL QSPI driver and remove unused properties Schrempf Frieder
2018-11-13 13:47 ` [PATCH v5 2/9] arm64: " Schrempf Frieder
2018-11-13 13:47 ` [PATCH v5 3/9] spi: Add a driver for the Freescale/NXP QuadSPI controller Schrempf Frieder
2018-11-14  8:39   ` Yogesh Narayan Gaur
2018-11-14  8:50     ` Schrempf Frieder
2018-11-14  9:03       ` Schrempf Frieder
2018-11-14 10:43         ` Yogesh Narayan Gaur
2018-11-14 10:46           ` Boris Brezillon
2018-11-14 11:07           ` Schrempf Frieder
2018-11-15  6:22             ` Yogesh Narayan Gaur
2018-11-15 11:43               ` Schrempf Frieder
2018-11-15 13:12                 ` Boris Brezillon
2018-11-15 14:01                   ` Schrempf Frieder
2018-11-16  5:41                     ` Yogesh Narayan Gaur
2018-11-16  9:42                       ` Schrempf Frieder
2018-11-16  9:46                         ` Yogesh Narayan Gaur
2018-11-16 10:10                           ` Schrempf Frieder
     [not found]                         ` <VI1PR04MB572668C2BCD132D06E53E98C99DD0@VI1PR04MB5726.eurprd04.prod.outlook.com>
2018-11-19  8:22                           ` Schrempf Frieder [this message]
2018-11-13 13:47 ` [PATCH v5 4/9] dt-bindings: spi: Move the bindings for the FSL QSPI driver Schrempf Frieder
2018-11-16 22:59   ` Rob Herring
2018-11-13 13:47 ` [PATCH v5 5/9] dt-bindings: spi: Adjust " Schrempf Frieder
2018-11-16 22:59   ` Rob Herring
2018-11-13 13:47 ` [PATCH v5 6/9] mtd: fsl-quadspi: Remove the driver as it was replaced by spi-fsl-qspi.c Schrempf Frieder
2018-11-13 13:47 ` [PATCH v5 7/9] ARM: dts: ls1021a: Remove fsl, qspi-has-second-chip as it is not used Schrempf Frieder
2018-11-13 13:47 ` [PATCH v5 8/9] ARM64: dts: ls1046a: Remove fsl,qspi-has-second-chip " Schrempf Frieder
2018-11-13 13:48 ` [PATCH v5 9/9] MAINTAINERS: Move the Freescale QSPI driver to the SPI framework 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=902ca455-9d3e-7371-fb8e-2b5cb7ad87cb@kontron.de \
    --to=frieder.schrempf@kontron.de \
    --cc=boris.brezillon@bootlin.com \
    --cc=linux-mtd@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox