Skip to contentSkip to conversation

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

PATCH Applied Kyungmin Park 2 participants 2 messages Dec 6, 2010 – Dec 14, 2010 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

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

From: Kyungmin Park <[email protected]>

Original 4KiB pagesize chip (SLC) doesn't support Multi block erase at Spec.

---

drivers/mtd/onenand/onenand_base.c +2 -1
index c38bf9c..88f23e3 100644
@@ -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);