[PATCH for mtd-utils 0/4] about the SLC/MLC

Brian Norris computersforpeace at gmail.com
Tue Oct 22 20:28:10 PDT 2013


On Tue, Oct 22, 2013 at 7:29 PM, Huang Shijie <b32955 at freescale.com> wrote:
> 于 2013年10月23日 07:33, Brian Norris 写道:
>
>> You're missing flash_erase.c, which still has:
>>
>>         isNAND = mtd.type == MTD_NANDFLASH ? 1 : 0;
>
> I missed it on purpose.
>
> The "isNAND" is used for the jffs2 to write the cleanmarker.
>
> Since the jffs2 does not support the MLC now, the above line is used to
> check the SLC nand now.
> Only the SLC nand can be written with the cleanmarker.
>
> Am i right?

No, if you look at the code, 'isNAND' is used to help with the bad
block checking. And even for the JFFS2 stuff, all your intentional
omission does is cause MLC to be treated like NOR flash, which is
possibly even worse.

And anyway, the variable name 'isNAND' is currently misleading,
because it now only represents 'isSLC'.

Please fix 'isNAND' to reflect all NAND (SLC or MLC). If you would
like, you can add a separate check to print a nice warning or error
message if the flash is MLC and someone chose flash_erase --jffs2.

Brian



More information about the linux-mtd mailing list