Skip to content

Commit

Permalink
mtd: OneNAND: Fix multi block erase support at 4KiB pagesize
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kyungmin Park authored and David Woodhouse committed Jan 6, 2011
1 parent beda1d4 commit d983c54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/mtd/onenand/onenand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d983c54

Please sign in to comment.