linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Boris Brezillon <boris.brezillon@collabora.com>
Cc: Michal Simek <monstr@monstr.eu>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Tudor Ambarus <Tudor.Ambarus@microchip.com>,
	Richard Weinberger <richard@nod.at>,
	linux-mtd@lists.infradead.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Naga Sureshkumar Relli <nagasure@xilinx.com>
Subject: Re: [PATCH v2 08/11] mtd: rawnand: jedec: Adapt the parameter page read to constraint controllers
Date: Mon, 4 May 2020 10:02:45 +0200	[thread overview]
Message-ID: <20200504100245.6fa81a31@xps13> (raw)
In-Reply-To: <20200503214403.5f68fb93@collabora.com>


Boris Brezillon <boris.brezillon@collabora.com> wrote on Sun, 3 May
2020 21:44:03 +0200:

> On Sun, 3 May 2020 21:06:23 +0200
> Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> 
> > Hi Boris,
> > 
> > Boris Brezillon <boris.brezillon@collabora.com> wrote on Wed, 29 Apr
> > 2020 18:04:05 +0200:
> >   
> > > On Wed, 29 Apr 2020 17:55:37 +0200
> > > Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> > >     
> > > > We already know that there are controllers not able to read the three
> > > > copies of the parameter page in one go. The workaround was to first
> > > > request the controller to assert command and address cycles on the
> > > > NAND bus to trigger a parameter page read, and then do a read
> > > > operation for each page.
> > > > 
> > > > But there are also controllers which are not able to split the
> > > > parameter page read between the command/address cycles and the actual
> > > > data operation.
> > > > 
> > > > All controllers are expected to be able to change the read column
> > > > though. So let's use a regular parameter page read operation for the
> > > > first iteration and use a change read column operation for the
> > > > following copies.
> > > > 
> > > > The extra command and address cycles sent over the NAND bus are
> > > > negligible compared to the amount of data that is being transferred
> > > > anyway.
> > > > 
> > > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > > > ---
> > > >  drivers/mtd/nand/raw/nand_jedec.c | 28 +++++++++++++++-------------
> > > >  1 file changed, 15 insertions(+), 13 deletions(-)
> > > > 
> > > > diff --git a/drivers/mtd/nand/raw/nand_jedec.c b/drivers/mtd/nand/raw/nand_jedec.c
> > > > index 15937e02c64f..b2be9056759a 100644
> > > > --- a/drivers/mtd/nand/raw/nand_jedec.c
> > > > +++ b/drivers/mtd/nand/raw/nand_jedec.c
> > > > @@ -25,7 +25,7 @@ int nand_jedec_detect(struct nand_chip *chip)
> > > >  {
> > > >  	struct mtd_info *mtd = nand_to_mtd(chip);
> > > >  	struct nand_memory_organization *memorg;
> > > > -	struct nand_jedec_params *p;
> > > > +	struct nand_jedec_params *p = NULL, *pbuf;      
> > > 
> > > Looks like you've merged 2 different commits here. I remember you had a
> > > separate commit adding pbuf to avoid an extra memcpy().    
> > 
> > Actually this was only fixed in the onfi detection routine. The jedec
> > equivalent does not copy the page (the copy came from the 3-way merge
> > that has only been added to onfi detection).
> > 
> > Here pbuf represents the buffer containing the three pages while p now
> > only points to the actual page that is correct.  
> 
> Oh, I see. Looks like the p = pbuf assignment is wrong BTW (should be
> p = &pbuf[i]).

Good catch!

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2020-05-04  8:03 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 15:55 [PATCH v2 00/11] Supporting restricted NAND controllers Miquel Raynal
2020-04-29 15:55 ` [PATCH v2 01/11] mtd: rawnand: Translate obscure bitfields into readable macros Miquel Raynal
2020-04-29 15:55 ` [PATCH v2 02/11] mtd: rawnand: Reorder the nand_chip->options flags Miquel Raynal
2020-04-29 15:55 ` [PATCH v2 03/11] mtd: rawnand: Rename a NAND chip option Miquel Raynal
2020-04-29 16:08   ` Boris Brezillon
2020-04-29 16:22     ` Miquel Raynal
2020-04-29 16:32       ` Boris Brezillon
2020-04-29 16:36         ` Boris Brezillon
2020-04-29 16:54           ` Miquel Raynal
2020-04-29 18:55             ` Boris Brezillon
2020-04-29 15:55 ` [PATCH v2 04/11] mtd: rawnand: Fix comments about the use of bufpoi Miquel Raynal
2020-04-29 15:55 ` [PATCH v2 05/11] mtd: rawnand: Rename the use_bufpoi variables Miquel Raynal
2020-04-29 15:55 ` [PATCH v2 06/11] mtd: rawnand: Avoid indirect access to ->data_buf() Miquel Raynal
2020-04-29 15:55 ` [PATCH v2 07/11] mtd: rawnand: onfi: Adapt the parameter page read to constraint controllers Miquel Raynal
2020-04-29 16:09   ` Boris Brezillon
2020-05-02  8:12   ` Boris Brezillon
2020-05-04  8:16     ` Miquel Raynal
2020-04-29 15:55 ` [PATCH v2 08/11] mtd: rawnand: jedec: " Miquel Raynal
2020-04-29 16:04   ` Boris Brezillon
2020-04-29 16:23     ` Miquel Raynal
2020-05-03 19:06     ` Miquel Raynal
2020-05-03 19:44       ` Boris Brezillon
2020-05-04  8:02         ` Miquel Raynal [this message]
2020-04-29 15:55 ` [PATCH v2 09/11] mtd: rawnand: Expose monolithic read/write_page_raw() helpers Miquel Raynal
2020-04-29 16:15   ` Boris Brezillon
2020-04-29 16:26     ` Miquel Raynal
2020-04-29 16:31       ` Boris Brezillon
2020-04-29 16:52         ` Miquel Raynal
2020-04-29 19:03           ` Boris Brezillon
2020-04-29 15:55 ` [PATCH v2 10/11] mtd: rawnand: Allow controllers to overload soft ECC hooks Miquel Raynal
2020-04-29 16:15   ` Boris Brezillon
2020-04-29 15:55 ` [PATCH v2 11/11] mtd: rawnand: micron: Allow controllers to overload raw accessors Miquel Raynal
2020-04-29 16:16   ` Boris Brezillon

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=20200504100245.6fa81a31@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=Tudor.Ambarus@microchip.com \
    --cc=boris.brezillon@collabora.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=monstr@monstr.eu \
    --cc=nagasure@xilinx.com \
    --cc=richard@nod.at \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vigneshr@ti.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;
as well as URLs for NNTP newsgroup(s).