mtd: OneNAND: Fix multi block erase support at 4KiB pagesize
authorKyungmin Park <kyungmin.park@samsung.com>
Mon, 6 Dec 2010 00:05:18 +0000 (09:05 +0900)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 6 Jan 2011 15:16:39 +0000 (15:16 +0000)
Original 4KiB pagesize chip (SLC) doesn't support Multi block erase at Spec.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/onenand/onenand_base.c

index c38bf9c54a11fe7c7a6d5b0b57d79c402981c8de..88f23e3f3014a460c109f914b280755c1e2460c5 100644 (file)
@@ -2492,7 +2492,8 @@ static int onenand_erase(struct mtd_info *mtd, struct erase_info *instr)
        /* Grab the lock and see if the device is available */
        onenand_get_device(mtd, FL_ERASING);
 
-       if (region || instr->len < MB_ERASE_MIN_BLK_COUNT * block_size) {
+       if (ONENAND_IS_4KB_PAGE(this) || region ||
+           instr->len < MB_ERASE_MIN_BLK_COUNT * block_size) {
                /* region is set for Flex-OneNAND (no mb erase) */
                ret = onenand_block_by_block_erase(mtd, instr,
                                                   region, block_size);