Large flash concatenation

Thomas Gleixner tglx at linutronix.de
Fri May 28 07:20:53 EDT 2004


On Friday 28 May 2004 12:42, Andy Hawkins wrote:
> Hi,
>
> > 2. The nand driver itself can handle multiple chips now. The scan
> > function supports multiple chip detection. Do not use the concat function
> > for this purpose. The chips are provided as one big device to the MTD
> > layer if you do not use partitions.
>
> How do I do this? Each chip appears at a separate address (we've used
> the lower 6 bits of the address lines to decode the chip selects for
> each chip). At the moment, I'm looping over all the possible addresses
> calling 'nand_scan' at each address. Is this this correct way to do
> this?

nand_scan now takes a parameter maxchips. This tells nand_scan to scan for up 
to maxchips chips.

The selection is simple. Only one chip can be selected at a time. 
All you have to do is write your own select_chip function and set the function 
pointer in the nand chip structure to this function before calling nand_scan

the function gets the chipnr (0 - maxchip-1) which should be selected or -1 to 
deselect.
Inside this function you simply modify the IO_ADDR_R and IO_ADDR_W fields of 
the nand structure so the appropriate chip gets selected.

-- 
Thomas
________________________________________________________________________
Steve Ballmer quotes the statistic that IT pros spend 70 percent of their 
time managing existing systems. That couldn’t have anything to do with 
the fact that 99 percent of these systems run Windows, could it?
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx at linutronix.de





More information about the linux-mtd mailing list