mtd/drivers/mtd/nand nand.c,1.74,1.75

gleixner at infradead.org gleixner at infradead.org
Wed Apr 14 15:00:24 EDT 2004


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

Modified Files:
	nand.c 
Log Message:
large page nand support first working version

Index: nand.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- nand.c	31 Mar 2004 07:26:05 -0000	1.74
+++ nand.c	14 Apr 2004 19:00:22 -0000	1.75
@@ -160,6 +160,43 @@
 #include <linux/bitops.h>
 #include <asm/io.h>
 
+/* Define default oob placement schemes for large and small page devices */
+static struct nand_oobinfo nand_oob_8 = {
+	.useecc = MTD_NANDECC_AUTOPLACE,
+	.eccbytes = 3,
+	.eccpos = {0, 1, 2},
+	.oobfree = { {3, 2}, {6, 2} }
+};
+
[...1167 lines suppressed...]
 	}	
+	
+	/* Set the number of read / write steps for one page to ensure ECC generation */
+	switch (this->eccmode) {
+	case NAND_ECC_HW3_512:
+	case NAND_ECC_HW6_512:
+		this->eccsteps = mtd->oobblock / 512;
+		break;
+	case NAND_ECC_HW3_256:
+	case NAND_ECC_SOFT:	
+		this->eccsteps = mtd->oobblock / 256;
+		break;
+		
+	case NAND_ECC_NONE: 
+		this->eccsteps = 1;
+		break;
+	}
 	
 	/* Initialize state, waitqueue and spinlock */
 	this->state = FL_READY;




More information about the linux-mtd-cvs mailing list