All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/5] NAND: Really ignore bad blocks when scrubbing
Date: Tue, 27 Sep 2011 13:54:08 -0500	[thread overview]
Message-ID: <20110927185407.GA10082@schlenkerla.am.freescale.net> (raw)
In-Reply-To: <1315800250-19761-2-git-send-email-marek.vasut@gmail.com>

On Mon, Sep 12, 2011 at 06:04:06AM +0200, Marek Vasut wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Scott Wood <scottwood@freescale.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Detlev Zundel <dzu@denx.de>
> ---
>  drivers/mtd/nand/nand_base.c |    2 +-
>  drivers/mtd/nand/nand_util.c |   22 +++++-----------------
>  include/linux/mtd/mtd.h      |    1 +
>  3 files changed, 7 insertions(+), 18 deletions(-)

Applied to u-boot-nand-flash next with this change to remove the
chip/priv_nand redundancy:

diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
index 0c3b7f7..60c778e 100644
--- a/drivers/mtd/nand/nand_util.c
+++ b/drivers/mtd/nand/nand_util.c
@@ -79,7 +79,6 @@ int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts)
 	const char *mtd_device = meminfo->name;
 	struct mtd_oob_ops oob_opts;
 	struct nand_chip *chip = meminfo->priv;
-	struct nand_chip *priv_nand = meminfo->priv;
 
 	if ((opts->offset & (meminfo->writesize - 1)) != 0) {
 		printf("Attempt to erase non page aligned data\n");
@@ -109,10 +108,10 @@ int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts)
 		 * We don't need the bad block table anymore...
 		 * after scrub, there are no bad blocks left!
 		 */
-		if (priv_nand->bbt) {
-			kfree(priv_nand->bbt);
+		if (chip->bbt) {
+			kfree(chip->bbt);
 		}
-		priv_nand->bbt = NULL;
+		chip->bbt = NULL;
 	}
 
 	for (erased_length = 0;
@@ -197,7 +196,7 @@ int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts)
 		printf("\n");
 
 	if (opts->scrub)
-		priv_nand->scan_bbt(meminfo);
+		chip->scan_bbt(meminfo);
 
 	return 0;
 }

-Scott

  reply	other threads:[~2011-09-27 18:54 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-12  4:04 [U-Boot] [PATCH 0/5 V2] Random NAND fixes and improvements Marek Vasut
2011-09-12  4:04 ` [U-Boot] [PATCH 1/5] NAND: Really ignore bad blocks when scrubbing Marek Vasut
2011-09-27 18:54   ` Scott Wood [this message]
2011-09-12  4:04 ` [U-Boot] [PATCH 2/5] NAND: Add nand read.raw and write.raw commands Marek Vasut
2011-09-21 18:48   ` Scott Wood
2011-09-22  1:55   ` [U-Boot] [PATCH 2/5 V2] " Marek Vasut
2011-09-22 16:03     ` Scott Wood
2011-09-22 18:36     ` [U-Boot] [PATCH 2/5 V3] " Marek Vasut
2011-09-22 18:40       ` Scott Wood
2011-09-23 13:43       ` [U-Boot] [PATCH 2/5 V4] " Marek Vasut
2011-09-27 18:57         ` Scott Wood
2011-09-12  4:04 ` [U-Boot] [PATCH 3/5] NAND: Allow per-buffer allocation Marek Vasut
2011-09-21 18:50   ` Scott Wood
2011-09-21 19:49     ` Wolfgang Denk
2011-09-21 19:55       ` Scott Wood
2011-09-21 20:16         ` Wolfgang Denk
2011-09-22  1:34           ` Marek Vasut
2011-09-22  7:41           ` Stefano Babic
2011-09-22  8:51             ` Marek Vasut
2011-09-23 17:35               ` Scott Wood
2011-09-24 12:37                 ` Marek Vasut
2011-09-26 18:33                   ` Scott Wood
2011-09-26 18:49                     ` Marek Vasut
2011-09-12  4:04 ` [U-Boot] [PATCH 4/5] NAND: Make page, erase, oob size available via cmd_nand Marek Vasut
2011-09-21 18:55   ` Scott Wood
2011-09-21 19:52     ` Wolfgang Denk
2011-09-22  1:57   ` [U-Boot] [PATCH 4/5 V2] " Marek Vasut
2011-09-27 19:01     ` Scott Wood
2011-09-27 19:38       ` Marek Vasut
2011-09-27 19:51         ` Scott Wood
2011-09-27 20:07           ` Marek Vasut
2011-09-27 20:53             ` Scott Wood
2011-09-27 21:04               ` Marek Vasut
2011-09-27 21:14     ` Scott Wood
2011-09-12  4:04 ` [U-Boot] [PATCH 5/5] NAND: Add scrub.quiet command option Marek Vasut
2011-09-12 16:45   ` Mike Frysinger
2011-09-12 17:45     ` Marek Vasut
2011-09-12 18:06       ` Scott Wood
2011-09-12 18:24         ` Marek Vasut
2011-09-12 18:31           ` Scott Wood
2011-09-12 18:36             ` Marek Vasut
2011-09-12 19:19               ` Scott Wood
2011-09-12 19:28                 ` Marek Vasut
2011-09-12 19:36                   ` Scott Wood
2011-09-12 19:42                     ` Marek Vasut
2011-09-12 23:24                       ` Scott Wood
2011-09-13  1:02                         ` Marek Vasut
2011-09-13  4:25                           ` Wolfgang Denk
2011-09-13  4:36                             ` Marek Vasut
2011-09-13 22:22                           ` Scott Wood
2011-09-13 22:41                             ` Marek Vasut
2011-09-13 22:53                               ` Scott Wood
2011-09-12 18:37       ` Wolfgang Denk
2011-09-12 18:50         ` Marek Vasut
2011-09-12 20:33       ` Mike Frysinger
2011-09-12 22:59         ` Marek Vasut
2011-09-13 22:20   ` [U-Boot] [PATCH 5/5] NAND: Add -y option to nand scrub command Marek Vasut
2011-09-13 22:28     ` Mike Frysinger
2011-09-27 19:03     ` Scott Wood
  -- strict thread matches above, loose matches on Subject: below --
2011-09-08 20:39 [U-Boot] [PATCH 0/5] Random NAND fixes and improvements Marek Vasut
2011-09-08 20:39 ` [U-Boot] [PATCH 1/5] NAND: Really ignore bad blocks when scrubbing Marek Vasut

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=20110927185407.GA10082@schlenkerla.am.freescale.net \
    --to=scottwood@freescale.com \
    --cc=u-boot@lists.denx.de \
    /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.