Commit d983c54e authored by Kyungmin Park's avatar Kyungmin Park Committed by David Woodhouse

mtd: OneNAND: Fix multi block erase support at 4KiB pagesize

Original 4KiB pagesize chip (SLC) doesn't support Multi block erase at Spec.
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent beda1d49
...@@ -2492,7 +2492,8 @@ static int onenand_erase(struct mtd_info *mtd, struct erase_info *instr) ...@@ -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 */ /* Grab the lock and see if the device is available */
onenand_get_device(mtd, FL_ERASING); 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) */ /* region is set for Flex-OneNAND (no mb erase) */
ret = onenand_block_by_block_erase(mtd, instr, ret = onenand_block_by_block_erase(mtd, instr,
region, block_size); region, block_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment