]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[MTD] [NAND] nandsim: bugfix in initialization
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Wed, 19 Sep 2007 14:56:47 +0000 (17:56 +0300)
committerDavid Woodhouse <dwmw2@infradead.org>
Sat, 20 Oct 2007 14:00:29 +0000 (15:00 +0100)
NAND of > 32MiB in size use 4 bytes in address cycle, not 3.

Reported-by: bhsong <bhsong@augustatek.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/nand/nandsim.c

index a7574807dc46a1e2c6ac5697cb1c253cffca8087..10490b48d9f75844c81a00dc8f32825475345afc 100644 (file)
@@ -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 {