mtd/drivers/mtd/nand diskonchip.c,1.15,1.16

dbrown at infradead.org dbrown at infradead.org
Tue Jun 22 14:27:36 EDT 2004


Update of /home/cvs/mtd/drivers/mtd/nand
In directory phoenix.infradead.org:/tmp/cvs-serv5649

Modified Files:
	diskonchip.c 
Log Message:
Add BBT versioning and reserved page marking for INFTL bbts.


Index: diskonchip.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/diskonchip.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- diskonchip.c	22 Jun 2004 14:08:13 -0000	1.15
+++ diskonchip.c	22 Jun 2004 18:27:34 -0000	1.16
@@ -50,18 +50,22 @@
 #define INFTL_BBT_RESERVED_BLOCKS 4
 
 static struct nand_bbt_descr inftl_bbt_descr0 = {
-        .options =NAND_BBT_LASTBLOCK | NAND_BBT_8BIT,
+        .options =NAND_BBT_LASTBLOCK | NAND_BBT_8BIT | NAND_BBT_VERSION,
         .offs =8,
         .len = 8,
+        .veroffs = 6,
         .maxblocks = INFTL_BBT_RESERVED_BLOCKS,
+        .reserved_block_code = 0x01,
         .pattern = "MSYS_BBT"
 };
 
 static struct nand_bbt_descr inftl_bbt_descr1 = {
-        .options =NAND_BBT_LASTBLOCK | NAND_BBT_8BIT,
+        .options =NAND_BBT_LASTBLOCK | NAND_BBT_8BIT | NAND_BBT_VERSION,
         .offs =8,
         .len = 8,
+        .veroffs = 6,
         .maxblocks = INFTL_BBT_RESERVED_BLOCKS,
+        .reserved_block_code = 0x01,
         .pattern = "TBB_SYSM"
 };
 
@@ -870,7 +874,9 @@
 	   At least as nand_bbt.c is currently written. */
 	if (ret = nand_scan_bbt(mtd, NULL)) return ret;
 	add_mtd_device(mtd);
+#if defined(CONFIG_MTD_PARTITIONS) || defined(CONFIG_MTD_PARTITIONS_MODULE)
 	if (!no_autopart) add_mtd_partitions(mtd, parts, numparts);
+#endif
 	return 0;
 }
 
@@ -897,7 +903,9 @@
 	/* At least for now, require the INFTL Media Header. */
 	if (!numparts) return -EIO;
 	add_mtd_device(mtd);
+#if defined(CONFIG_MTD_PARTITIONS) || defined(CONFIG_MTD_PARTITIONS_MODULE)
 	if (!no_autopart) add_mtd_partitions(mtd, parts, numparts);
+#endif
 	return 0;
 }
 





More information about the linux-mtd-cvs mailing list