Large flash concatenation

Thomas Gleixner tglx at linutronix.de
Fri May 28 06:27:34 EDT 2004


On Friday 28 May 2004 11:41, Andy Hawkins wrote:
> Hi,
>
> I'm trying to add support to the kernel for concatenating a number of
> large flash devices (1Gb Samsung K9F1G08).
>
> I've added the following line to nand_ids.c:
>
> 	{"NAND 1GiB 3,3V", 0xf1, 30, 0x4000, 0},
>
> and the devices are correctly detected (I've also written the required
> code in drivers/mtd/nand), showing a size of 0x40000000 for each device.

The device size is not 1GiB in words: One GigaByte.
The device size for chips with the id code 0xf1 is
1 GigaBit which is 128 MegaByte

The erasesize is wrong, as it is 64KiB and not 16KiB, but see below (1.)

> However, when I concatenate 15 of these devices, I end up with a
> partition of size 0xc000000. I assume that this is because the total
> size is stored in 32 bits, and as such is overflowing.

15 * 128 Megabyte =  2013265920 Bytes = 0x78000000
which fits into 32 bit

1. Please use the latest NAND code, as the support for the larger devices is 
already there and the old code does not handle the large page devices.
We have actually problems with CVS access (is IPV6 only). I can provide a 
current snapshot on request.

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.

> I want to be able to use these multiple chips as a single flash
> filesystem (probably JFFS2).

It might turn out that JFFS2 is not the first choice for this concatenated 
device size, but it should work. Maybe YAFFS2 would be more suitable. It's 
not released yet AFAIK, but it should be available soon. 

You can join #mtd on irc.freenode.net if you want.

-- 
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