mtd/drivers/mtd/devices doc2000.c,1.58,1.59 doc2001.c,1.41,1.42
doc2001plus.c,1.7,1.8
gleixner at infradead.org
gleixner at infradead.org
Sun Apr 4 08:36:48 EDT 2004
Update of /home/cvs/mtd/drivers/mtd/devices
In directory phoenix.infradead.org:/tmp/cvs-serv28584
Modified Files:
doc2000.c doc2001.c doc2001plus.c
Log Message:
meet changes in nand_ids.c
Index: doc2000.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/doc2000.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- doc2000.c 5 Nov 2003 16:42:25 -0000 1.58
+++ doc2000.c 4 Apr 2004 12:36:45 -0000 1.59
@@ -19,6 +19,7 @@
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/types.h>
+#include <linux/bitops.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
@@ -409,11 +410,10 @@
if (!doc->mfr) {
doc->mfr = mfr;
doc->id = id;
- doc->chipshift =
- nand_flash_ids[i].chipshift;
+ doc->chipshift =
+ ffs((nand_flash_ids[i].chipsize << 20)) - 1;
doc->page256 = nand_flash_ids[i].page256;
- doc->pageadrlen =
- nand_flash_ids[i].chipshift > 25 ? 3 : 2;
+ doc->pageadrlen = doc->chipshift > 25 ? 3 : 2;
doc->erasesize =
nand_flash_ids[i].erasesize;
return 1;
Index: doc2001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/doc2001.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- doc2001.c 11 Jun 2003 09:45:19 -0000 1.41
+++ doc2001.c 4 Apr 2004 12:36:45 -0000 1.42
@@ -19,6 +19,7 @@
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/types.h>
+#include <linux/bitops.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
@@ -226,7 +227,7 @@
mfr, id, nand_manuf_ids[j].name, nand_flash_ids[i].name);
doc->mfr = mfr;
doc->id = id;
- doc->chipshift = nand_flash_ids[i].chipshift;
+ doc->chipshift = ffs((nand_flash_ids[i].chipsize << 20)) - 1;
break;
}
}
Index: doc2001plus.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/doc2001plus.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- doc2001plus.c 11 Jul 2003 07:36:22 -0000 1.7
+++ doc2001plus.c 4 Apr 2004 12:36:45 -0000 1.8
@@ -23,6 +23,7 @@
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/types.h>
+#include <linux/bitops.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
@@ -336,7 +337,7 @@
nand_manuf_ids[j].name, nand_flash_ids[i].name);
doc->mfr = mfr;
doc->id = id;
- doc->chipshift = nand_flash_ids[i].chipshift;
+ doc->chipshift = ffs((nand_flash_ids[i].chipsize << 20)) - 1;
doc->erasesize = nand_flash_ids[i].erasesize << doc->interleave;
break;
}
More information about the linux-mtd-cvs
mailing list