diff mbox

[RESEND,MTD] MLC device check in OneNAND driver

Message ID 001701cb5bdd$3fd69a80$bf83cf80$%hs@samsung.com
State New, archived
Headers show

Commit Message

Rohit Hassan Sathyanarayan Sept. 24, 2010, 11:40 a.m. UTC
Signed-off-by: Rohit HS <rohit.hs@samsung.com>
Signed-off-by: Raghav Gupta <gupta.raghav@samsung.com>
---
 drivers/mtd/onenand/onenand_base.c |    2 +-
 include/mtd/mtd-abi.h              |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

Comments

Artem Bityutskiy Sept. 24, 2010, 11:52 a.m. UTC | #1
On Fri, 2010-09-24 at 17:10 +0530, Rohit Hassan Sathyanarayan wrote:
> Signed-off-by: Rohit HS <rohit.hs@samsung.com>
> Signed-off-by: Raghav Gupta <gupta.raghav@samsung.com>

Almost perfect. However:

1. All mtd patches should have "mtd:" prefix.
2. Add some description about what you do and why into the commit
message.
3. I think combining is not good, better do it old way - first patch
introduces the flag, second uses it in OneNAND

Sorry for being picky, but I really want to show you how to send patches
properly once and later get good series from you.
Rohit Hassan Sathyanarayan Oct. 7, 2010, 4:32 a.m. UTC | #2
Hi Artem,

> -----Original Message-----
> From: Artem Bityutskiy [mailto:dedekind1@gmail.com]
> Sent: Friday, September 24, 2010 5:22 PM
> To: Rohit Hassan Sathyanarayan
> Cc: linux-mtd@lists.infradead.org; gupta.raghav@samsung.com; v.dalal@samsung.com
> Subject: Re: [PATCH RESEND][MTD]MLC device check in OneNAND driver
> 
> On Fri, 2010-09-24 at 17:10 +0530, Rohit Hassan Sathyanarayan wrote:
> > Signed-off-by: Rohit HS <rohit.hs@samsung.com>
> > Signed-off-by: Raghav Gupta <gupta.raghav@samsung.com>
> 
> Almost perfect. However:
> 
> 1. All mtd patches should have "mtd:" prefix.
> 2. Add some description about what you do and why into the commit
> message.
> 3. I think combining is not good, better do it old way - first patch
> introduces the flag, second uses it in OneNAND
> 

  We made changes as per your comments and have posted two patches,
  Links of two patches,
  http://lists.infradead.org/pipermail/linux-mtd/2010-September/032333.html
  http://lists.infradead.org/pipermail/linux-mtd/2010-September/032334.html

   	
> Sorry for being picky, but I really want to show you how to send patches
> properly once and later get good series from you.
> 
> --
> Best Regards,
> Artem Bityutskiy (Артём Битюцкий)
Artem Bityutskiy Oct. 7, 2010, 7:18 p.m. UTC | #3
On Thu, 2010-10-07 at 10:02 +0530, Rohit Hassan Sathyanarayan wrote:
>   We made changes as per your comments and have posted two patches,
>   Links of two patches,
>   http://lists.infradead.org/pipermail/linux-mtd/2010-September/032333.html
>   http://lists.infradead.org/pipermail/linux-mtd/2010-September/032334.html

Yes, I have them in my l2-mtd-2.6.git tree.
diff mbox

Patch

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;
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
index 4debb45..8d8161c 100644
--- a/include/mtd/mtd-abi.h
+++ b/include/mtd/mtd-abi.h
@@ -52,6 +52,7 @@  struct mtd_oob_buf64 {
 #define MTD_NANDFLASH		4
 #define MTD_DATAFLASH		6
 #define MTD_UBIVOLUME		7
+#define MTD_MLCNANDFLASH	8
 
 #define MTD_WRITEABLE		0x400	/* Device is writeable */
 #define MTD_BIT_WRITEABLE	0x800	/* Single bits can be flipped */