Skip to contentSkip to conversation

MLC device check in OneNAND driver

PATCH Superseded Rohit Hassan Sathyanarayan 2 participants 3 messages Sep 23, 2010 – Sep 24, 2010 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 MLC device check in OneNAND driver

Hi Artem,

Adding driver check for MLC flash type.

---
 drivers/mtd/onenand/onenand_base.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/onenand/onenand_base.c +1 -1
index a2bb520..33e0dbb 100644
@@ -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;

--

Regards,
Rohit.H.S

#1 lore raw

Hi,

few minor things. I could just do this all myself, but since this is not the first non-perfect patch you send, I think I'll be a little nasty and ask you should do the exercise :-)

Quoted 7 lines · Rohit Hassan Sathyanarayan

Hi Artem,

Adding driver check for MLC flash type.

1. Do no add extra line between the message and signed off.

2. Ideally, your patches should be applicable with git-am without the need to edit them. Try git am for your patches and see the result - the commit message will contain 'Hi Artem,' phrase, which should not be there.

Quoted 9 lines
---
 drivers/mtd/onenand/onenand_base.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/onenand/onenand_base.c +0 -0
index a2bb520..33e0dbb 100644

drivers/mtd/onenand/onenand_base.c int onenand_scan(struct mtd_info *mtd, int maxchips) · line 4033

Quoted 8 lines
drivers/mtd/onenand/onenand_base.c +1 -1
@@ -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;

The kernel does not compile with this patch. You should make this patch the second, the first one should introduce MTD_MLCNANDFLASH.

The kernel has to be bisectable, you patches should not break bisectability.

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
#2 lore raw

Hi Artem,

Quoted 7 lines

-----Original Message-----
From: Artem Bityutskiy [mailto:[email protected]]
Sent: Friday, September 24, 2010 2:10 PM
To: Rohit Hassan Sathyanarayan
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/2][MTD]MLC device check in OneNAND driver

Quoted 5 lines

Hi,

few minor things. I could just do this all myself, but since this is not the first non-perfect patch you send, I think I'll be a little nasty and ask you should do the exercise :-)

We have combined two patches into one and have posted the same, hope new Patch complies properly.

Quoted 37 lines · Rohit Hassan Sathyanarayan
Quoted 7 lines

Hi Artem,

Adding driver check for MLC flash type.

1. Do no add extra line between the message and signed off.

2. Ideally, your patches should be applicable with git-am without the need to edit them. Try git am for your patches and see the result - the commit message will contain 'Hi Artem,' phrase, which should not be there.

Quoted 9 lines
---
 drivers/mtd/onenand/onenand_base.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/onenand/onenand_base.c +0 -0
index a2bb520..33e0dbb 100644

drivers/mtd/onenand/onenand_base.c int onenand_scan(struct mtd_info *mtd, int maxchips) · line 4033

Quoted 8 lines
drivers/mtd/onenand/onenand_base.c +1 -1
@@ -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;

The kernel does not compile with this patch. You should make this patch the second, the first one should introduce MTD_MLCNANDFLASH.

Quoted 6 lines

The kernel has to be bisectable, you patches should not break bisectability.

--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

Regards,
Rohit.H.S