public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Arnaud Mouiche <arnaud.mouiche@gmail.com>
Cc: Peter Pan <peterpandong@micron.com>,
	richard@nod.at, computersforpeace@gmail.com,
	thomas.petazzoni@free-electrons.com,
	linux-mtd@lists.infradead.org, peterpansjtu@gmail.com,
	linshunquan1@hisilicon.com
Subject: Re: [PATCH v3 5/8] nand: spi: Add bad block support
Date: Fri, 17 Mar 2017 13:31:42 +0100	[thread overview]
Message-ID: <20170317133142.3815f9d0@bbrezillon> (raw)
In-Reply-To: <911b755d-87a1-26c1-8b75-84383b7c0076@gmail.com>

On Fri, 17 Mar 2017 13:22:17 +0100
Arnaud Mouiche <arnaud.mouiche@gmail.com> wrote:

> On 16/03/2017 07:47, Peter Pan wrote:
> > [...]
> > +
> > +/*
> > + * spinand_scan_bbt - scan BBT in SPI NAND device
> > + * @chip: SPI NAND device structure
> > + */
> > +static int spinand_scan_bbt(struct spinand_device *chip)
> > +{
> > +	struct nand_device *nand = &chip->base;
> > +	int ret;
> > +
> > +	nand->bbt.options |= NAND_BBT_USE_FLASH | NAND_BBT_NO_OOB;
> > +	nand->bbt.td = NULL;
> > +	nand->bbt.md = NULL;
> > +
> > +	ret = spinand_create_badblock_pattern(chip);
> > +	if (ret)
> > +		return ret;
> > +
> > +	return nand_scan_bbt(nand);
> > +}
> > +  
> 
> Boris, Peter,
> 
> I'm not a big fan of NAND_BBT_USE_FLASH for small capacity nand flash 
> (eg. 1Gb with 1024 blocks, where a complete bad block scan on boot is 
> fast enough).
> Do you consider NAND_BBT_USE_FLASH as mandatory, or does a optional 
> "of_get_nand_on_flash_bbt(dn))" device tree configuration is something 
> possible ?

It should be optional indeed.

  reply	other threads:[~2017-03-17 12:32 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16  6:47 [PATCH v3 0/8] Introduction to SPI NAND framework Peter Pan
2017-03-16  6:47 ` [PATCH v3 1/8] mtd: nand: add more helpers in nand.h Peter Pan
2017-03-17 13:07   ` Boris Brezillon
2017-03-20  4:51     ` Peter Pan
2017-03-16  6:47 ` [PATCH v3 2/8] mtd: nand: add oob iterator in nand_for_each_page Peter Pan
2017-03-17 13:11   ` Boris Brezillon
2017-03-20  4:52     ` Peter Pan
2017-03-16  6:47 ` [PATCH v3 3/8] nand: spi: add basic blocks for infrastructure Peter Pan
2017-03-16  9:55   ` Boris Brezillon
2017-03-17  5:45     ` Peter Pan
2017-03-17 10:20   ` Arnaud Mouiche
2017-03-17 10:22     ` Peter Pan
2017-03-17 13:38   ` Boris Brezillon
2017-03-20  4:55     ` Peter Pan
2017-03-16  6:47 ` [PATCH v3 4/8] nand: spi: add basic operations support Peter Pan
2017-03-17 10:33   ` Arnaud Mouiche
2017-03-17 10:49     ` Peter Pan
2017-03-17 11:02       ` Boris Brezillon
2017-03-17 11:09         ` Peter Pan
2017-03-17 11:12           ` Boris Brezillon
2017-03-17 11:18             ` Peter Pan
2017-03-16  6:47 ` [PATCH v3 5/8] nand: spi: Add bad block support Peter Pan
2017-03-17 12:22   ` Arnaud Mouiche
2017-03-17 12:31     ` Boris Brezillon [this message]
2017-03-20  4:49       ` Peter Pan
2017-03-16  6:47 ` [PATCH v3 6/8] nand: spi: add Micron spi nand support Peter Pan
2017-03-16  6:47 ` [PATCH v3 7/8] nand: spi: Add generic SPI controller support Peter Pan
2017-03-17 14:20   ` Boris Brezillon
2017-03-17 17:32     ` Arnaud Mouiche
2017-03-17 17:48       ` Boris Brezillon
2017-03-20  4:58         ` Peter Pan
2017-03-20  5:56           ` Boris Brezillon
2017-03-20  7:15             ` Peter Pan
2017-03-16  6:47 ` [PATCH v3 8/8] MAINTAINERS: Add SPI NAND entry Peter Pan
2017-03-17 10:02 ` [PATCH v3 0/8] Introduction to SPI NAND framework Arnaud Mouiche
2017-03-17 10:34   ` Peter Pan

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=20170317133142.3815f9d0@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=arnaud.mouiche@gmail.com \
    --cc=computersforpeace@gmail.com \
    --cc=linshunquan1@hisilicon.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=peterpandong@micron.com \
    --cc=peterpansjtu@gmail.com \
    --cc=richard@nod.at \
    --cc=thomas.petazzoni@free-electrons.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