Jffs2 issue on latest mtd for Sibley NOR

Nicolas Pitre nico at cam.org
Wed Nov 23 13:09:03 EST 2005


On Tue, 22 Nov 2005, Menon, Nishanth wrote:

> Hi All,
> I have been trying Sibley NOR flash and the latest (as of today) MTD
> tree on my kernel.
> When I use the character device, I am able to unlock, erase, write and
> read from it successfully. Unfortunately, when I try to use jffs2 on it,
> I face the following issue:
> root at 128.247.81.110:/mnt# cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 00020000 00020000 "bootloader"
> mtd1: 00020000 00020000 "params"
> mtd2: 00200000 00020000 "kernel"
> mtd3: 03dc0000 00020000 "filesystem"
> mtd4: 00040000 00040000 "bootloader"
> mtd5: 00040000 00040000 "params"
> mtd6: 00200000 00040000 "kernel"
> mtd7: 07d80000 00040000 "filesystem"
> 
> The first 4 are my strata flash partitions which work fine - even
> jffs2 works on it.

Do you have separate master MTD devices for them before registering 
partitions?  In other words, how do you probe them (what does your map 
driver look like)?

If you have only a single do_map_probe() for both chip types then you're 
in trouble.  A single do_map_probe() can indeed detect and handle 
multiple flash chips as long as they are of the same model.  Otherwise 
you'll have to provide two map objects covering a single chip model each 
and register separate MTD objects.

I just tested JFFS2 over Sibley flash using linux 2.6.15-rc2 and 
everything just worked fine with this simple test:

root at mainstone:~# flash_unlock /dev/mtd2
root at mainstone:~# flash_eraseall /dev/mtd2
Erased 61184 Kibyte @ 0 -- 100% complete.
root at mainstone:~# mount -t jffs2 /dev/mtdblock2 /mnt
root at mainstone:~# touch /mnt/test
root at mainstone:~# echo "Hello World" > /mnt/test2
root at mainstone:~# umount /mnt
root at mainstone:~# mount -t jffs2 /dev/mtdblock2 /mnt
root at mainstone:~# ls -l /mnt
total 1
-rw-r--r--    1 root     root            0 Nov 23 17:59 test
-rw-r--r--    1 root     root           12 Nov 23 17:59 test2
root at mainstone:~# cat /mnt/test2
Hello World


Nicolas




More information about the linux-mtd mailing list