Patchwork [1/2,MTD] MLC device check in OneNAND driver

login
register
mail settings
Submitter Rohit Hassan Sathyanarayan
Date Sept. 14, 2010, 8:06 a.m.
Message ID <000001cb53e3$afc0f090$0f42d1b0$%hs@samsung.com>
Download mbox | patch
Permalink /patch/64676/
State New
Headers show

Comments

Rohit Hassan Sathyanarayan - Sept. 14, 2010, 8:06 a.m.
Hi Artem,

 This MLC device check will be required for adding MLC support in file system.


Signed-off-by: Rohit HS <rohit.hs@samsung.com>
---
 drivers/mtd/onenand/onenand_base.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

---



Regards,
Rohit.H.S

Patch

diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index a2bb520..59af37d 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -4028,7 +4028,8 @@  int onenand_scan(struct mtd_info *mtd, int maxchips)
 
 	/* Fill in remaining MTD driver data */
 	mtd->type = MTD_NANDFLASH;
-	mtd->flags = MTD_CAP_NANDFLASH;
+	mtd->flags = ONENAND_IS_MLC(this) ? MTD_CAP_MLCNANDFLASH
+						: MTD_CAP_NANDFLASH;
 	mtd->erase = onenand_erase;
 	mtd->point = NULL;
 	mtd->unpoint = NULL;