Patchwork [v3,2/2] mtd: MLC device check in OneNAND driver

login
register
mail settings
Submitter Rohit Hassan Sathyanarayan
Date Sept. 27, 2010, 10:32 a.m.
Message ID <002801cb5e2f$3f170c20$bd452460$%hs@samsung.com>
Download mbox | patch
Permalink /patch/65830/
State New
Headers show

Comments

Rohit Hassan Sathyanarayan - Sept. 27, 2010, 10:32 a.m.
The MLC NAND Flash differs from the SLC NAND flash in functioning
and the cell structure. Therefore we are considering it as a

Patch

different Flash type.

Signed-off-by: Rohit H.S <rohit.hs@samsung.com>
Signed-off-by: Raghav Gupta <gupta.raghav@samsung.com>
---
 drivers/mtd/onenand/onenand_base.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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