diff options
-rw-r--r-- | drivers/mtd/nand/nandsim.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index ce90990cdce2..9e04de043aa3 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c | |||
@@ -336,7 +336,6 @@ struct nandsim { | |||
336 | uint pgsec; /* number of pages per sector */ | 336 | uint pgsec; /* number of pages per sector */ |
337 | uint secshift; /* bits number in sector size */ | 337 | uint secshift; /* bits number in sector size */ |
338 | uint pgshift; /* bits number in page size */ | 338 | uint pgshift; /* bits number in page size */ |
339 | uint oobshift; /* bits number in OOB size */ | ||
340 | uint pgaddrbytes; /* bytes per page address */ | 339 | uint pgaddrbytes; /* bytes per page address */ |
341 | uint secaddrbytes; /* bytes per sector address */ | 340 | uint secaddrbytes; /* bytes per sector address */ |
342 | uint idbytes; /* the number ID bytes that this chip outputs */ | 341 | uint idbytes; /* the number ID bytes that this chip outputs */ |
@@ -689,7 +688,6 @@ static int init_nandsim(struct mtd_info *mtd) | |||
689 | ns->geom.totszoob = ns->geom.totsz + (uint64_t)ns->geom.pgnum * ns->geom.oobsz; | 688 | ns->geom.totszoob = ns->geom.totsz + (uint64_t)ns->geom.pgnum * ns->geom.oobsz; |
690 | ns->geom.secshift = ffs(ns->geom.secsz) - 1; | 689 | ns->geom.secshift = ffs(ns->geom.secsz) - 1; |
691 | ns->geom.pgshift = chip->page_shift; | 690 | ns->geom.pgshift = chip->page_shift; |
692 | ns->geom.oobshift = ffs(ns->geom.oobsz) - 1; | ||
693 | ns->geom.pgsec = ns->geom.secsz / ns->geom.pgsz; | 691 | ns->geom.pgsec = ns->geom.secsz / ns->geom.pgsz; |
694 | ns->geom.secszoob = ns->geom.secsz + ns->geom.oobsz * ns->geom.pgsec; | 692 | ns->geom.secszoob = ns->geom.secsz + ns->geom.oobsz * ns->geom.pgsec; |
695 | ns->options = 0; | 693 | ns->options = 0; |
@@ -773,7 +771,7 @@ static int init_nandsim(struct mtd_info *mtd) | |||
773 | printk("bus width: %u\n", ns->busw); | 771 | printk("bus width: %u\n", ns->busw); |
774 | printk("bits in sector size: %u\n", ns->geom.secshift); | 772 | printk("bits in sector size: %u\n", ns->geom.secshift); |
775 | printk("bits in page size: %u\n", ns->geom.pgshift); | 773 | printk("bits in page size: %u\n", ns->geom.pgshift); |
776 | printk("bits in OOB size: %u\n", ns->geom.oobshift); | 774 | printk("bits in OOB size: %u\n", ffs(ns->geom.oobsz) - 1); |
777 | printk("flash size with OOB: %llu KiB\n", | 775 | printk("flash size with OOB: %llu KiB\n", |
778 | (unsigned long long)ns->geom.totszoob >> 10); | 776 | (unsigned long long)ns->geom.totszoob >> 10); |
779 | printk("page address bytes: %u\n", ns->geom.pgaddrbytes); | 777 | printk("page address bytes: %u\n", ns->geom.pgaddrbytes); |