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 2/3] mtd: rawnand: cafe: Set the NAND_NO_BBM_QUIRK flag
Date: Mon, 27 Apr 2020 21:28:45 +0200 [thread overview]
Message-ID: <20200427212845.068f47fb@xps13> (raw)
In-Reply-To: <20200427072453.375642-2-boris.brezillon@collabora.com>
Hi Boris,
Boris Brezillon <boris.brezillon@collabora.com> wrote on Mon, 27 Apr
2020 09:24:52 +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/cafe_nand.c | 11 ++---------
> 1 file changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/mtd/nand/raw/cafe_nand.c b/drivers/mtd/nand/raw/cafe_nand.c
> index 2d1c22dc88c1..2a0df13df5f3 100644
> --- a/drivers/mtd/nand/raw/cafe_nand.c
> +++ b/drivers/mtd/nand/raw/cafe_nand.c
> @@ -546,11 +546,6 @@ static int cafe_nand_write_page_lowlevel(struct nand_chip *chip,
> return nand_prog_page_end_op(chip);
> }
>
> -static int cafe_nand_block_bad(struct nand_chip *chip, loff_t ofs)
> -{
> - return 0;
> -}
> -
> /* F_2[X]/(X**6+X+1) */
> static unsigned short gf64_mul(u8 a, u8 b)
> {
> @@ -718,10 +713,8 @@ static int cafe_nand_probe(struct pci_dev *pdev,
> /* Enable the following for a flash based bad block table */
> cafe->nand.bbt_options = NAND_BBT_USE_FLASH;
>
> - if (skipbbt) {
> - cafe->nand.options |= NAND_SKIP_BBTSCAN;
> - cafe->nand.legacy.block_bad = cafe_nand_block_bad;
> - }
> + if (skipbbt)
> + cafe->nand.options |= NAND_SKIP_BBTSCAN | NAND_NO_BBM_QUIRK;
>
> if (numtimings && numtimings != 3) {
> dev_warn(&cafe->pdev->dev, "%d timing register values ignored; precisely three are required\n", numtimings);
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2020-04-27 19:29 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 [this message]
2020-04-27 7:24 ` [PATCH 3/3] mtd: rawnand: diskonchip: " Boris Brezillon
2020-04-27 19:30 ` Miquel Raynal
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=20200427212845.068f47fb@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.