Bad assumption about ID field definition for Samsung NAND?

Liu Hui-R64343 r64343 at freescale.com
Fri Aug 20 01:38:37 EDT 2010



> -----Original Message-----
> From: linux-mtd-bounces at lists.infradead.org [mailto:linux-mtd-
> bounces at lists.infradead.org] On Behalf Of Kevin Cernekee
> Sent: Friday, August 20, 2010 11:30 AM
> To: Brian Norris
> Cc: linux-mtd at lists.infradead.org; Tilman Sauerbeck
> Subject: Re: Bad assumption about ID field definition for Samsung NAND?
> 
> On Thu, Aug 19, 2010 at 3:28 PM, Brian Norris <norris at broadcom.com> wrote:
> > On 08/19/2010 12:46 PM, Kevin Cernekee wrote:
> >> The code is right; the comment is wrong.
> >
> > In that case, should we fix the comment and add the check that Tilman
> > mentioned previously? (below)
> 
> To clarify - the comment in the code is correct, but the checkin comment
> was inaccurate.
> 
> >> @@ -2852,6 +2852,7 @@ static struct nand_flash_dev
> >> *nand_get_flash_type(struct mtd_info *mtd,
> >>                  */
> >>                 if (id_data[0] == id_data[6] && id_data[1] ==
> >> id_data[7] &&
> >>                                 id_data[0] == NAND_MFR_SAMSUNG &&
> >> +                               (chip->cellinfo &
> >> + NAND_CI_CELLTYPE_MSK) &&
> >>                                 id_data[5] != 0x00) {
> >>                         /* Calc pagesize */
> >>                         mtd->writesize = 2048 << (extid & 0x03);
> 
> This looks OK (at least for K9GAG08U0D).

The temp fix is not the good solution. We can make a fix for Samsung here, what about other vendors?
If we put such kind of fix into nand_base.c file, which will make the code ugly. 

> 
> I wonder if Samsung could provide some firm guidelines for when to use
> the old style vs. the new style.
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/


More information about the linux-mtd mailing list