[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>
This commit is contained in:
Artem Bityutskiy 2006-12-06 21:52:32 +02:00 committed by David Woodhouse
parent 418b2e56b8
commit 4a0c50c07a

View File

@ -440,7 +440,7 @@ static int init_nandsim(struct mtd_info *mtd)
} }
} else { } else {
if (ns->geom.totsz <= (128 << 20)) { if (ns->geom.totsz <= (128 << 20)) {
ns->geom.pgaddrbytes = 5; ns->geom.pgaddrbytes = 4;
ns->geom.secaddrbytes = 2; ns->geom.secaddrbytes = 2;
} else { } else {
ns->geom.pgaddrbytes = 5; ns->geom.pgaddrbytes = 5;