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: 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 v3 08/13] mtd: rawnand: Give the possibility to verify a read operation is supported
Date: Mon, 4 May 2020 10:42:57 +0200	[thread overview]
Message-ID: <20200504104257.7e6f1877@collabora.com> (raw)
In-Reply-To: <20200504082414.7327-9-miquel.raynal@bootlin.com>

On Mon,  4 May 2020 10:24:09 +0200
Miquel Raynal <miquel.raynal@bootlin.com> wrote:

> This can be used to discriminate between two path in the parameter
> page detection: use data_in cycles (like before) if supported, use the
> CHANGE READ COLUMN command otherwise.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  drivers/mtd/nand/raw/fsmc_nand.c    |  2 +-
>  drivers/mtd/nand/raw/marvell_nand.c |  4 +--
>  drivers/mtd/nand/raw/nand_base.c    | 48 +++++++++++++++++------------
>  drivers/mtd/nand/raw/nand_jedec.c   |  2 +-
>  drivers/mtd/nand/raw/nand_legacy.c  |  8 +++--
>  drivers/mtd/nand/raw/nand_micron.c  |  6 ++--
>  drivers/mtd/nand/raw/nand_onfi.c    |  3 +-
>  include/linux/mtd/rawnand.h         |  2 +-
>  8 files changed, 44 insertions(+), 31 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/fsmc_nand.c b/drivers/mtd/nand/raw/fsmc_nand.c
> index 59ef2b6a21b5..735c2216149f 100644
> --- a/drivers/mtd/nand/raw/fsmc_nand.c
> +++ b/drivers/mtd/nand/raw/fsmc_nand.c
> @@ -694,7 +694,7 @@ static int fsmc_read_page_hwecc(struct nand_chip *chip, u8 *buf,
>  	for (i = 0, s = 0; s < eccsteps; s++, i += eccbytes, p += eccsize) {
>  		nand_read_page_op(chip, page, s * eccsize, NULL, 0);
>  		chip->ecc.hwctl(chip, NAND_ECC_READ);
> -		ret = nand_read_data_op(chip, p, eccsize, false);
> +		ret = nand_read_data_op(chip, p, eccsize, false, false);

I feel like we should provide wrappers around those functions that take
a check_only param:

static inline int nand_exec_read_data_op(...)
{
	return nand_read_data_op(..., false);
}

static inline int nand_check_read_data_op(...)
{
	return nand_read_data_op(..., true);
}

but let's keep that for later.

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

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

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

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04  8:24 [PATCH v3 00/13] Supporting restricted NAND controllers Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 01/13] mtd: rawnand: Translate obscure bitfields into readable macros Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 02/13] mtd: rawnand: Reorder the nand_chip->options flags Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 03/13] mtd: rawnand: Rename a NAND chip option Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 04/13] mtd: rawnand: Fix comments about the use of bufpoi Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 05/13] mtd: rawnand: Rename the use_bufpoi variables Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 06/13] mtd: rawnand: Avoid indirect access to ->data_buf() Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 07/13] mtd: rawnand: Add a helper to check supported operations Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 08/13] mtd: rawnand: Give the possibility to verify a read operation is supported Miquel Raynal
2020-05-04  8:42   ` Boris Brezillon [this message]
2020-05-04  8:24 ` [PATCH v3 09/13] mtd: rawnand: onfi: Adapt the parameter page read to constraint controllers Miquel Raynal
2020-05-04  8:47   ` Boris Brezillon
2020-05-04  9:01     ` Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 10/13] mtd: rawnand: jedec: " Miquel Raynal
2020-05-04  8:51   ` Boris Brezillon
2020-05-04  8:57     ` Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 11/13] mtd: rawnand: Expose monolithic read/write_page_raw() helpers Miquel Raynal
2020-05-04  8:54   ` Boris Brezillon
2020-05-04  8:24 ` [PATCH v3 12/13] mtd: rawnand: Allow controllers to overload soft ECC hooks Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 13/13] mtd: rawnand: micron: Allow controllers to overload raw accessors 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=20200504104257.7e6f1877@collabora.com \
    --to=boris.brezillon@collabora.com \
    --cc=Tudor.Ambarus@microchip.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --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).