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

login
register
mail settings
Submitter Kyungmin Park
Date Dec. 6, 2010, 12:05 a.m.
Message ID <20101206000518.GA18352@july>
Download mbox | patch
Permalink /patch/74313/
State New
Headers show

Comments

Kyungmin Park - Dec. 6, 2010, 12:05 a.m.
From: Kyungmin Park <kyungmin.park@samsung.com>

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

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
Artem Bityutskiy - Dec. 14, 2010, 4:01 p.m.
On Mon, 2010-12-06 at 09:05 +0900, Kyungmin Park wrote:
> From: Kyungmin Park <kyungmin.park@samsung.com>
> 
> Original 4KiB pagesize chip (SLC) doesn't support Multi block erase at Spec.
> 
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>

Pushed to l2-mtd-2.6.git, thank you!

Patch

diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index c38bf9c..88f23e3 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);