From: Kyungmin Park Date: Mon, 6 Dec 2010 00:05:18 +0000 (+0900) Subject: mtd: OneNAND: Fix multi block erase support at 4KiB pagesize X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d983c54ebd875f5f6fd37c154195c1c456a7af70;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Kyungmin Park Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- 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) /* 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);