diff options
-rw-r--r-- | drivers/mtd/onenand/onenand_base.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index c38bf9c54a11..88f23e3f3014 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c | |||
@@ -2492,7 +2492,8 @@ static int onenand_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
2492 | /* Grab the lock and see if the device is available */ | 2492 | /* Grab the lock and see if the device is available */ |
2493 | onenand_get_device(mtd, FL_ERASING); | 2493 | onenand_get_device(mtd, FL_ERASING); |
2494 | 2494 | ||
2495 | if (region || instr->len < MB_ERASE_MIN_BLK_COUNT * block_size) { | 2495 | if (ONENAND_IS_4KB_PAGE(this) || region || |
2496 | instr->len < MB_ERASE_MIN_BLK_COUNT * block_size) { | ||
2496 | /* region is set for Flex-OneNAND (no mb erase) */ | 2497 | /* region is set for Flex-OneNAND (no mb erase) */ |
2497 | ret = onenand_block_by_block_erase(mtd, instr, | 2498 | ret = onenand_block_by_block_erase(mtd, instr, |
2498 | region, block_size); | 2499 | region, block_size); |