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: Richard Weinberger <richard@nod.at>,
	linux-mtd@lists.infradead.org,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Tudor Ambarus <tudor.ambarus@microchip.com>
Subject: Re: [PATCH 3/3] mtd: rawnand: diskonchip: Set the NAND_NO_BBM_QUIRK flag
Date: Mon, 27 Apr 2020 21:30:01 +0200	[thread overview]
Message-ID: <20200427213001.17a6eaa8@xps13> (raw)
In-Reply-To: <20200427072453.375642-3-boris.brezillon@collabora.com>

Hi Boris,

Boris Brezillon <boris.brezillon@collabora.com> wrote on Mon, 27 Apr
2020 09:24:53 +0200:

> We have a dummy block_bad() implementation returning 0. Let's set the
> NAND_NO_BBM_QUIRK flag and let the core take care of that.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
>  drivers/mtd/nand/raw/diskonchip.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/diskonchip.c b/drivers/mtd/nand/raw/diskonchip.c
> index c2a391ad2c35..4c3d04da4cee 100644
> --- a/drivers/mtd/nand/raw/diskonchip.c
> +++ b/drivers/mtd/nand/raw/diskonchip.c
> @@ -776,13 +776,6 @@ static int doc200x_dev_ready(struct nand_chip *this)
>  	}
>  }
>  
> -static int doc200x_block_bad(struct nand_chip *this, loff_t ofs)
> -{
> -	/* This is our last resort if we couldn't find or create a BBT.  Just
> -	   pretend all blocks are good. */
> -	return 0;
> -}
> -
>  static void doc200x_enable_hwecc(struct nand_chip *this, int mode)
>  {
>  	struct doc_priv *doc = nand_get_controller_data(this);
> @@ -1578,7 +1571,6 @@ static int __init doc_probe(unsigned long physadr)
>  	nand->legacy.cmd_ctrl		= doc200x_hwcontrol;
>  	nand->legacy.dev_ready	= doc200x_dev_ready;
>  	nand->legacy.waitfunc	= doc200x_wait;
> -	nand->legacy.block_bad	= doc200x_block_bad;
>  	nand->ecc.hwctl		= doc200x_enable_hwecc;
>  	nand->ecc.calculate	= doc200x_calculate_ecc;
>  	nand->ecc.correct	= doc200x_correct_data;
> @@ -1590,7 +1582,7 @@ static int __init doc_probe(unsigned long physadr)
>  	nand->ecc.options	= NAND_ECC_GENERIC_ERASED_CHECK;
>  	nand->bbt_options	= NAND_BBT_USE_FLASH;
>  	/* Skip the automatic BBT scan so we can run it manually */
> -	nand->options		|= NAND_SKIP_BBTSCAN;
> +	nand->options		|= NAND_SKIP_BBTSCAN | NAND_NO_BBM_QUIRK;
>  
>  	doc->physadr		= physadr;
>  	doc->virtadr		= virtadr;


Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>


Thanks,
Miquèl

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

  reply	other threads:[~2020-04-27 19:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27  7:24 [PATCH 1/3] mtd: rawnand: Add a NAND_NO_BBM_QUIRK flag Boris Brezillon
2020-04-27  7:24 ` [PATCH 2/3] mtd: rawnand: cafe: Set the " Boris Brezillon
2020-04-27 19:28   ` Miquel Raynal
2020-04-27  7:24 ` [PATCH 3/3] mtd: rawnand: diskonchip: " Boris Brezillon
2020-04-27 19:30   ` Miquel Raynal [this message]
2020-04-27  7:28 ` [PATCH 1/3] mtd: rawnand: Add a " Boris Brezillon
2020-04-27 19:30   ` Miquel Raynal
2020-04-27 19:26 ` 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=20200427213001.17a6eaa8@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=boris.brezillon@collabora.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=tudor.ambarus@microchip.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).