[PATCH] [2.6.23] nand_flash_dev - add manufacturer ID

Egor N. Martovetsky egor at pasemi.com
Thu Jul 5 13:44:24 EDT 2007


Thomas Gleixner wrote:

>On Tue, 2007-07-03 at 20:03 -0400, David Woodhouse wrote:
>  
>
>>The difference between LP_OPTIONS and the options you've set for the new
>>chip is just NAND_NO_PADDING | NAND_COPYBACK, right? Neither of which we
>>actually use right now _anyway_.
>>    
>>
that's correct, and the flash works as things are - right now.  However, 
I didn't want to leave
it exposed for possible future addition of these features.

>>I wonder if we should do this differently, and mask certain features in
>>or out according to the manufacturer, after identifying the chip.
>>    
>>
>
>  
>
Right now, there is no way to uniquely identify the device and assign 
options to it.  I saw that
as a potential future problem.  Instead of adding code to 
nand_get_flash_type() to special treat
our device, I thought it would be better to provide a general mechanism, 
which can be used to prevent
this in the future.  This only affects the flashes that need to be 
special cased.  For the rest of them,
manufacturer ID is not specified and the match occurs purely on Device 
ID - as before.

>We do that already:
>
>        /* Check if chip is a not a samsung device. Do not clear the
>         * options for chips which are not having an extended id.
>         */
>        if (*maf_id != NAND_MFR_SAMSUNG && !type->pagesize)
>                chip->options &= ~NAND_SAMSUNG_LP_OPTIONS;
>
>So we should do this for that one as well.
>
>	tglx
>
>
>  
>


-- 
Egor N. Martovetsky




More information about the linux-mtd mailing list