Handling multiple NAND chips -- take 2

J.D. Bakker bakker at thorgal.et.tudelft.nl
Wed Feb 25 14:35:51 EST 2004


At 6:29 PM +0000 25/2/04, jasmine at linuxgrrls.org wrote:
>  > I think that's acceptable. It's _definitely_ OK on NOR. On NAND we may
>>  be sharing some control lines between different chips, but I still think
>>  it's OK and we can deal with that in the board-level driver.
>
>What if you have a board with an onboard NAND (for the OS) and a
>SmartMedia slot?  That's surprisingly common.  It's very difficult to buy
>consistent Smartmedia cards, too-  they often have different parts in
>them during a run.

That's true, but would you want the SmartMedia card to be part of the 
linear array ? What I'm doing here is to do for NAND devices what the 
linear (or possibly RAID0) driver does for disks. In both cases is 
the array size/configuration fixed on creation, in neither case will 
you have anything useful/usable when one of the components goes away.

It could well make sense to treat the (hot-plugged) SM card as a 
separate entity, with its own partitions and all. This, however, is 
not what I'm trying to achieve. What I want is the reverse, deal with 
multiple NAND chips as if they were one, larger, NAND device. I can't 
see how hot-plugging et al would be useful in such a scenario (but 
I'm open to any and all demonstrations of the narrow-mindedness of 
such an approach).

>  > > chip = global_page_addr / pages_per_chip;
>>  > page = global_page_addr % pages_per_chip;
>>
>>  I think so. I prefer it to the other.
>
>divide not shift?

I'd gladly shift if anyone can guarantee that pages_per_chip is a 
power of two, for all present, past and future NAND devices. 
Seriously, I don't know NAND well enough to know if this is true or 
not.

JDB.
-- 
Jan-Derk Bakker, bakker at mmc.et.tudelft.nl

The lazy man's proverb:
     'There's no business like slow business !'



More information about the linux-mtd mailing list