mtd/drivers/mtd/nand Kconfig,1.26,1.27 nandsim.c,1.8,1.9

Artem Bityuckiy dedekind at infradead.org
Mon May 23 04:50:49 EDT 2005


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

Modified Files:
	Kconfig nandsim.c 
Log Message:
There are two bugs in nandsim. The first is in Kconfig. MTD_NAND_NANDSIM
is defined as a bool value, so it can have a value of 'y' or be
undefined. This way nandsim cannot be compiled as a module, it will
directly go into the kernel.
The second bug is in nandsim.c. Large page chips <=128M use 4 bytes for
addressing, not 5.
Signed-off-by: Patrik Kluba



Index: Kconfig
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/Kconfig,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- Kconfig	5 Jan 2005 12:42:24 -0000	1.26
+++ Kconfig	23 May 2005 08:50:46 -0000	1.27
@@ -197,11 +197,10 @@
  	depends on MTD_NAND	&& ARCH_PXA
  
  config MTD_NAND_NANDSIM
- 	bool "Support for NAND Flash Simulator"
- 	depends on MTD_NAND && MTD_PARTITIONS
-
+	tristate "Support for NAND Flash Simulator"
+	depends on m && MTD_NAND && MTD_PARTITIONS
 	help
 	  The simulator may simulate verious NAND flash chips for the
 	  MTD nand layer.
- 
+
 endmenu

Index: nandsim.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nandsim.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- nandsim.c	19 Mar 2005 15:33:56 -0000	1.8
+++ nandsim.c	23 May 2005 08:50:46 -0000	1.9
@@ -165,7 +165,7 @@
 /* After a command is input, the simulator goes to one of the following states */
 #define STATE_CMD_READ0        0x00000001 /* read data from the beginning of page */
 #define STATE_CMD_READ1        0x00000002 /* read data from the second half of page */
-#define STATE_CMD_READSTART      0x00000003 /* read data second command (large page devices) */
+#define STATE_CMD_READSTART    0x00000003 /* read data second command (large page devices) */
 #define STATE_CMD_PAGEPROG     0x00000004 /* start page programm */
 #define STATE_CMD_READOOB      0x00000005 /* read OOB area */
 #define STATE_CMD_ERASE1       0x00000006 /* sector erase first command */
@@ -406,7 +406,7 @@
 		}
 	} else {
 		if (ns->geom.totsz <= (128 << 20)) {
-			ns->geom.pgaddrbytes  = 5;
+			ns->geom.pgaddrbytes  = 4;
 			ns->geom.secaddrbytes = 2;
 		} else {
 			ns->geom.pgaddrbytes  = 5;





More information about the linux-mtd-cvs mailing list