tree d6f41550decccc536dfbbd46dc7ecccbf6105669
parent 2f82ce1eb637c06dfc60f095cd1891ae0ba4894c
author Thomas Gleixner <[EMAIL PROTECTED]> Wed, 09 Feb 2005 12:20:00 +0000
committer Thomas Gleixner <[EMAIL PROTECTED]> Mon, 23 May 2005 12:30:07 +0200

[MTD] NAND: Skip bad block table scan on request

Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>

 drivers/mtd/nand/nand_base.c |    6 +++++-
 include/linux/mtd/nand.h     |    5 +++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -59,7 +59,7 @@
  *     The AG-AND chips have nice features for speed improvement,
  *     which are not supported yet. Read / program 4 pages in one go.
  *
- * $Id: nand_base.c,v 1.130 2005/01/24 03:07:43 dmarlin Exp $
+ * $Id: nand_base.c,v 1.131 2005/02/09 12:19:56 gleixner Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -2631,6 +2631,10 @@ int nand_scan (struct mtd_info *mtd, int
        memcpy(&mtd->oobinfo, this->autooob, sizeof(mtd->oobinfo));
 
        mtd->owner = THIS_MODULE;
+       
+       /* Check, if we should skip the bad block table scan */
+       if (this->options & NAND_SKIP_BBTSCAN)
+               return 0;
 
        /* Build bad block table */
        return this->scan_bbt (mtd);
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -5,7 +5,7 @@
  *                     Steven J. Hill <[EMAIL PROTECTED]>
  *                    Thomas Gleixner <[EMAIL PROTECTED]>
  *
- * $Id: nand.h,v 1.70 2005/01/24 03:07:42 dmarlin Exp $
+ * $Id: nand.h,v 1.71 2005/02/09 12:12:59 gleixner Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -223,7 +223,8 @@ extern int nand_read_raw (struct mtd_inf
  * This can only work if we have the ecc bytes directly behind the 
  * data bytes. Applies for DOC and AG-AND Renesas HW Reed Solomon generators */
 #define NAND_HWECC_SYNDROME    0x00020000
-
+/* This option skips the bbt scan during initialization. */
+#define NAND_SKIP_BBTSCAN      0x00040000
 
 /* Options set by nand scan */
 /* Nand scan has allocated oob_buf */
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to