linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>,
	linux-mtd@lists.infradead.org,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Tudor Ambarus <Tudor.Ambarus@microchip.com>
Subject: Re: [PATCH v2 7/9] mtd: rawnand: onfi: Drop a useless parameter page read
Date: Sat, 25 Apr 2020 10:26:12 +0200	[thread overview]
Message-ID: <20200425102612.7f90efc8@collabora.com> (raw)
In-Reply-To: <20200424164042.26572-8-miquel.raynal@bootlin.com>

On Fri, 24 Apr 2020 18:40:40 +0200
Miquel Raynal <miquel.raynal@bootlin.com> wrote:

> During detection the logic on the NAND bus is:
> 
>     /* Regular ONFI detection */
>     1/ read the three NAND parameter pages
> 
>     /* Extended parameter page detection */
>     2/ send "read the NAND parameter page" commands without reading
>        actual data
>     3/ move the column pointer to the extended page and read it
> 
> If fact, as long as there is nothing happening on the NAND bus between
> 1/ and 3/, the operation 2/ is redundant so remove it.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>

> ---
>  drivers/mtd/nand/raw/nand_onfi.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/nand_onfi.c b/drivers/mtd/nand/raw/nand_onfi.c
> index 6576b841bc56..2fc71b7c361f 100644
> --- a/drivers/mtd/nand/raw/nand_onfi.c
> +++ b/drivers/mtd/nand/raw/nand_onfi.c
> @@ -47,12 +47,10 @@ static int nand_flash_detect_ext_param_page(struct nand_chip *chip,
>  	if (!ep)
>  		return -ENOMEM;
>  
> -	/* Send our own NAND_CMD_PARAM. */
> -	ret = nand_read_param_page_op(chip, 0, NULL, 0);
> -	if (ret)
> -		goto ext_out;
> -
> -	/* Use the Change Read Column command to skip the ONFI param pages. */
> +	/*
> +	 * Use the Change Read Column command to skip the ONFI param pages and
> +	 * ensure we read at the right location.
> +	 */
>  	ret = nand_change_read_column_op(chip,
>  					 sizeof(*p) * p->num_of_param_pages,
>  					 ep, len, true);


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

  reply	other threads:[~2020-04-25  8:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24 16:40 [PATCH v2 0/9] Misc timing changes Miquel Raynal
2020-04-24 16:40 ` [PATCH v2 1/9] mtd: rawnand: timings: Add mode information to the timings structure Miquel Raynal
2020-04-24 16:40 ` [PATCH v2 2/9] mtd: rawnand: timings: Fix default tR_max and tCCS_min timings Miquel Raynal
2020-04-25  9:40   ` Sergei Shtylyov
2020-04-28  9:10     ` Miquel Raynal
2020-04-24 16:40 ` [PATCH v2 3/9] mtd: rawnand: onfi: Fix redundancy detection check Miquel Raynal
2020-04-25  8:22   ` Boris Brezillon
2020-04-28  8:54     ` Miquel Raynal
2020-04-28  9:10       ` Boris Brezillon
2020-04-24 16:40 ` [PATCH v2 4/9] mtd: rawnand: onfi: Use intermediate variables to improve readability Miquel Raynal
2020-04-24 16:40 ` [PATCH v2 5/9] mtd: rawnand: onfi: Define the number of parameter pages Miquel Raynal
2020-04-25  8:25   ` Boris Brezillon
2020-04-25  8:28     ` Boris Brezillon
2020-04-28  9:36     ` Miquel Raynal
2020-04-28  9:38       ` Boris Brezillon
2020-04-28  9:39         ` Miquel Raynal
2020-04-24 16:40 ` [PATCH v2 6/9] mtd: rawnand: onfi: Avoid doing a copy of the parameter page Miquel Raynal
2020-04-24 16:40 ` [PATCH v2 7/9] mtd: rawnand: onfi: Drop a useless parameter page read Miquel Raynal
2020-04-25  8:26   ` Boris Brezillon [this message]
2020-04-24 16:40 ` [PATCH v2 8/9] mtd: rawnand: jedec: Define the number of parameter pages Miquel Raynal
2020-04-25  8:26   ` Boris Brezillon
2020-04-24 16:40 ` [PATCH v2 9/9] mtd: rawnand: jedec: Use intermediate variables to improve readability Miquel Raynal

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=20200425102612.7f90efc8@collabora.com \
    --to=boris.brezillon@collabora.com \
    --cc=Tudor.Ambarus@microchip.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.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).