mtd/drivers/mtd/nand diskonchip.c,1.24,1.25

dbrown at infradead.org dbrown at infradead.org
Fri Jul 16 09:54:29 EDT 2004


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

Modified Files:
	diskonchip.c 
Log Message:
Fix Millennium support.


Index: diskonchip.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/diskonchip.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- diskonchip.c	15 Jul 2004 17:19:43 -0000	1.24
+++ diskonchip.c	16 Jul 2004 13:54:27 -0000	1.25
@@ -382,7 +382,7 @@
 	ReadDOC(docptr, ReadPipeInit);
 
 	for (i=0; i < len-1; i++)
-		buf[i] = ReadDOC(docptr, Mil_CDSN_IO);
+		buf[i] = ReadDOC(docptr, Mil_CDSN_IO + (i & 0xff));
 
 	/* Terminate read pipeline */
 	buf[i] = ReadDOC(docptr, LastDataRead);
@@ -933,17 +933,6 @@
 		return -EIO;
 	}
 
-	if (mtd->size == (8<<20)) {
-#if 0
-/* This doesn't seem to work for me.  I get ECC errors on every page. */
-		/* The Millennium 8MiB is actually an NFTL device! */
-		mtd->name = "DiskOnChip Millennium 8MiB (NFTL)";
-		return nftl_scan_bbt(mtd);
-#endif
-		printk(KERN_ERR "DiskOnChip Millennium 8MiB is not supported.\n");
-		return -EIO;
-	}
-
 	this->bbt_td->options = NAND_BBT_LASTBLOCK | NAND_BBT_8BIT |
 				NAND_BBT_VERSION;
 	if (inftl_bbt_write)
@@ -1011,7 +1000,6 @@
 	this->write_buf = doc2001_writebuf;
 	this->read_buf = doc2001_readbuf;
 	this->verify_buf = doc2001_verifybuf;
-	this->scan_bbt = inftl_scan_bbt;
 
 	ReadDOC(doc->virtadr, ChipID);
 	ReadDOC(doc->virtadr, ChipID);
@@ -1023,11 +1011,13 @@
 		   can have multiple chips. */
 		doc2000_count_chips(mtd);
 		mtd->name = "DiskOnChip 2000 (INFTL Model)";
+		this->scan_bbt = inftl_scan_bbt;
 		return (4 * doc->chips_per_floor);
 	} else {
 		/* Bog-standard Millennium */
 		doc->chips_per_floor = 1;
 		mtd->name = "DiskOnChip Millennium";
+		this->scan_bbt = nftl_scan_bbt;
 		return 1;
 	}
 }





More information about the linux-mtd-cvs mailing list