mtd/util nanddump.c,1.14,1.15
gleixner at infradead.org
gleixner at infradead.org
Sat Sep 11 13:06:42 EDT 2004
Update of /home/cvs/mtd/util
In directory phoenix.infradead.org:/tmp/cvs-serv3179
Modified Files:
nanddump.c
Log Message:
fix it for 2k page size chips
Index: nanddump.c
===================================================================
RCS file: /home/cvs/mtd/util/nanddump.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- nanddump.c 28 Jun 2004 10:27:48 -0000 1.14
+++ nanddump.c 11 Sep 2004 17:06:39 -0000 1.15
@@ -33,8 +33,8 @@
/*
* Buffers for reading data from flash
*/
-unsigned char readbuf[512];
-unsigned char oobbuf[16];
+unsigned char readbuf[2048];
+unsigned char oobbuf[64];
/*
* Main program
@@ -49,7 +49,8 @@
/* Make sure enough arguments were passed */
if (argc < 3) {
- fprintf(stderr, "usage: %s <mtdname> <dumpname> [start addr] [length]\n", argv[0]);
+ fprintf(stdout, "nanddump V1.15");
+ fprintf(stderr, "usage: <mtdname> <dumpname> [start addr] [length]\n");
exit(1);
}
@@ -67,7 +68,8 @@
}
/* Make sure device page sizes are valid */
- if (!(meminfo.oobsize == 16 && meminfo.oobblock == 512) &&
+ if (!(meminfo.oobsize == 64 && meminfo.oobblock == 2048) &&
+ !(meminfo.oobsize == 16 && meminfo.oobblock == 512) &&
!(meminfo.oobsize == 8 && meminfo.oobblock == 256)) {
fprintf(stderr, "Unknown flash (not normal NAND)\n");
close(fd);
More information about the linux-mtd-cvs
mailing list