[MTD] nandsim: bugfix in page addressing

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Dec 8 08:59:02 EST 2006


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=4a0c50c07a6100ca58d465bac951533347e18d71
Commit:     4a0c50c07a6100ca58d465bac951533347e18d71
Parent:     418b2e56b8a61ea85f7a9c5d327e1a2c61d1b2db
Author:     Artem Bityutskiy <dedekind at infradead.org>
AuthorDate: Wed Dec 6 21:52:32 2006 +0200
Committer:  David Woodhouse <dwmw2 at infradead.org>
CommitDate: Fri Dec 8 13:22:54 2006 +0000

    [MTD] nandsim: bugfix in page addressing
    
    Number of address bytes for 64-128 MiB NANDs is 4, not 5.
    
    Signed-off-by: Artem Bityutskiy <dedekind at infradead.org>
    Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
 drivers/mtd/nand/nandsim.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index 3d39451..c3bca95 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -160,7 +160,7 @@ #define NS_RAW_OFFSET_OOB(ns) (NS_RAW_OF
 /* 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 */
@@ -440,7 +440,7 @@ static int init_nandsim(struct mtd_info 
 		}
 	} 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