mtd and devfs
David Wuertele
dave-gnus at bfnet.com
Tue Apr 22 18:56:23 EDT 2003
Is there any reason why mtd wouldn't work under devfs?
I'm running 2.4.18 plus some vendor patches. I've got a nand flash
that is recognized on boot:
STWX225 NAND Flash initializing...
PFLASH_CNTL before MOD: 80after MOD: 80
NAND device: Manufacture ID: 0xec, Chip ID: 0x73 (Samsung KM29U128T) Chip size: 2000000
Creating 5 MTD partitions on "Samsung KM29U128T":
0x00000000-0x00200000 : "MTD partition 0"
mtd: Giving out device 0 to MTD partition 0
0x00200000-0x00400000 : "MTD partition 1"
mtd: Giving out device 1 to MTD partition 1
0x00400000-0x00c00000 : "MTD partition 2 - root FS"
mtd: Giving out device 2 to MTD partition 2 - root FS
0x01f00000-0x01ffc000 : "MTD partition 3"
mtd: Giving out device 3 to MTD partition 3
0x01ffc000-0x02000000 : "MTD partition 4"
mtd: Giving out device 4 to MTD partition 4
STW4X225 NAND Flash initialized.
This results in devices under devfs:
# ls -R /dev/mtd
/dev/mtd:
0
0ro
1
1ro
2
2ro
3
3ro
4
4ro
But when I try to read from these, my system hangs before it ever gets
to the nand_read() function:
# head /dev/mtd/0 > fred
Whether I try to read or write to the /dev/mtd/0 device, the system
hangs hard. The nand_read() function has a printk as its first
statement, but the console never prints this, so I think there is
something wrong with the read dispatch. Could there be issues with my
use of devfs?
Thanks,
Dave
More information about the linux-mtd
mailing list