From: Artem Bityutskiy Date: Wed, 19 Sep 2007 14:56:47 +0000 (+0300) Subject: [MTD] [NAND] nandsim: bugfix in initialization X-Git-Tag: v2.6.24-rc1~32^2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39e73fc10e916db93c8a2c622f0315d296e66cf4;p=linux-2.6 [MTD] [NAND] nandsim: bugfix in initialization NAND of > 32MiB in size use 4 bytes in address cycle, not 3. Reported-by: bhsong Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index a7574807dc..10490b48d9 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c @@ -511,7 +511,7 @@ static int init_nandsim(struct mtd_info *mtd) } if (ns->options & OPT_SMALLPAGE) { - if (ns->geom.totsz < (64 << 20)) { + if (ns->geom.totsz < (32 << 20)) { ns->geom.pgaddrbytes = 3; ns->geom.secaddrbytes = 2; } else {