public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: <linux-mtd@lists.infradead.org>
Cc: Brian Norris <computersforpeace@gmail.com>
Subject: [PATCH 02/12] mtd: nand: lpc32xx_slc: don't call nand_default_bbt directly
Date: Wed,  4 Sep 2013 11:25:16 -0700	[thread overview]
Message-ID: <1378319126-24473-3-git-send-email-computersforpeace@gmail.com> (raw)
In-Reply-To: <1378319126-24473-1-git-send-email-computersforpeace@gmail.com>

This driver is doing some strange logic here. If it doesn't have
flash-based BBT enabled, it allows nand_scan_tail() to scan the BBT. But
if it is using flash-based BBT, it tells nand_scan_tail() to skip
scanning, then it immediately calls the default BBT scanning function
itself.

As I read it, this logic is equivalent to the default nand_scan_tail()
behavior without interfering with NAND_SKIP_BBTSCAN or calling
nand_default_bbt() directly at all.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
 drivers/mtd/nand/lpc32xx_slc.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/mtd/nand/lpc32xx_slc.c b/drivers/mtd/nand/lpc32xx_slc.c
index add7570..6d5f8c5 100644
--- a/drivers/mtd/nand/lpc32xx_slc.c
+++ b/drivers/mtd/nand/lpc32xx_slc.c
@@ -893,7 +893,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
 
 	/* Avoid extra scan if using BBT, setup BBT support */
 	if (host->ncfg->use_bbt) {
-		chip->options |= NAND_SKIP_BBTSCAN;
 		chip->bbt_options |= NAND_BBT_USE_FLASH;
 
 		/*
@@ -915,13 +914,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
 		goto err_exit3;
 	}
 
-	/* Standard layout in FLASH for bad block tables */
-	if (host->ncfg->use_bbt) {
-		if (nand_default_bbt(mtd) < 0)
-			dev_err(&pdev->dev,
-			       "Error initializing default bad block tables\n");
-	}
-
 	mtd->name = "nxp_lpc3220_slc";
 	ppdata.of_node = pdev->dev.of_node;
 	res = mtd_device_parse_register(mtd, NULL, &ppdata, host->ncfg->parts,
-- 
1.8.4

  parent reply	other threads:[~2013-09-04 18:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 18:25 [PATCH 00/12] mtd: miscellaneous fixes Brian Norris
2013-09-04 18:25 ` [PATCH 01/12] nand: docg4: use nand_base's default BBT scan Brian Norris
2013-09-05 20:09   ` Mike Dunn
2013-09-04 18:25 ` Brian Norris [this message]
2013-09-04 18:25 ` [PATCH 03/12] mtd: nandsim: don't call nand_default_bbt() directly Brian Norris
2013-09-04 18:25 ` [PATCH 04/12] mtd: nand: stop exporting nand_default_bbt Brian Norris
2013-09-04 18:25 ` [PATCH 05/12] mtd: dataflash: remove unused field Brian Norris
2013-09-04 18:25 ` [PATCH 06/12] mtd: denali: make init function static Brian Norris
2013-09-04 18:25 ` [PATCH 07/12] mtd: nand: return failure when failing to get ECC from ONFI Brian Norris
2013-09-05  2:34   ` Huang Shijie
2013-09-11 21:43     ` Brian Norris
2013-09-11 23:02       ` Ezequiel Garcia
2013-09-04 18:25 ` [PATCH 08/12] mtd: nand: don't print ONFI buswidth errors unless we need to Brian Norris
2013-09-04 18:25 ` [PATCH 09/12] mtd: onenand: remove redundant offset check Brian Norris
2013-09-04 18:25 ` [PATCH 10/12] mtd: nand: remove obsolete 'ecclayout' field Brian Norris
2013-09-04 18:25 ` [PATCH 11/12] mtd: onenand: remove unused variable assignments Brian Norris
2013-09-04 18:25 ` [PATCH 12/12] mtd: lpddr_cmds: make function static Brian Norris
2013-09-11 22:27 ` [PATCH 00/12] mtd: miscellaneous fixes Brian Norris

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=1378319126-24473-3-git-send-email-computersforpeace@gmail.com \
    --to=computersforpeace@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    /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