[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@infradead.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>

authored by Artem Bityutskiy and committed by David Woodhouse 4a0c50c0 418b2e56

+2 -2
+2 -2
drivers/mtd/nand/nandsim.c
··· 160 160 /* After a command is input, the simulator goes to one of the following states */ 161 161 #define STATE_CMD_READ0 0x00000001 /* read data from the beginning of page */ 162 162 #define STATE_CMD_READ1 0x00000002 /* read data from the second half of page */ 163 - #define STATE_CMD_READSTART 0x00000003 /* read data second command (large page devices) */ 163 + #define STATE_CMD_READSTART 0x00000003 /* read data second command (large page devices) */ 164 164 #define STATE_CMD_PAGEPROG 0x00000004 /* start page programm */ 165 165 #define STATE_CMD_READOOB 0x00000005 /* read OOB area */ 166 166 #define STATE_CMD_ERASE1 0x00000006 /* sector erase first command */ ··· 440 440 } 441 441 } else { 442 442 if (ns->geom.totsz <= (128 << 20)) { 443 - ns->geom.pgaddrbytes = 5; 443 + ns->geom.pgaddrbytes = 4; 444 444 ns->geom.secaddrbytes = 2; 445 445 } else { 446 446 ns->geom.pgaddrbytes = 5;