mtd/drivers/mtd/chips cfi_cmdset_0001.c,1.174,1.175

Nicolas Pitre nico at infradead.org
Fri Apr 1 11:36:29 EST 2005


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

Modified Files:
	cfi_cmdset_0001.c 
Log Message:


Index: cfi_cmdset_0001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_cmdset_0001.c,v
retrieving revision 1.174
retrieving revision 1.175
diff -u -r1.174 -r1.175
--- cfi_cmdset_0001.c	1 Apr 2005 01:59:52 -0000	1.174
+++ cfi_cmdset_0001.c	1 Apr 2005 16:36:25 -0000	1.175
@@ -2062,8 +2062,20 @@
 	/* we need real chips here not virtual ones */
 	devsize = (1 << cfi->cfiq->DevSize) * cfi->interleave;
 	chip_step = devsize >> cfi->chipshift;
+	chip_num = 0;
 
-	for (chip_num = 0; chip_num < cfi->numchips; chip_num += chip_step) {
+	/* Some chips have OTP located in the _top_ partition only.
+	   For example: Intel 28F256L18T (T means top-parameter device) */
+	if (cfi->mfr == MANUFACTURER_INTEL) {
+		switch (cfi->id) {
+		case 0x880b:
+		case 0x880c:
+		case 0x880d:
+			chip_num = chip_step - 1;
+		}
+	}
+
+	for ( ; chip_num < cfi->numchips; chip_num += chip_step) {
 		chip = &cfi->chips[chip_num];
 		otp = (struct cfi_intelext_otpinfo *)&extp->extra[0];
 





More information about the linux-mtd-cvs mailing list