smartmedia block driver
luca.contini at mediaenabling.com
Wed Nov 19 05:18:02 EST 2003
I've successfully completed the "read" part of a smartmedia driver for the
Samsung board smdk2410.
The Linux kernel is 2.4.18 (mandatory for this board)
The driver is composed by 3 modules:
I've modified these sources in order to read the smartmedia and build up the
logical to physical block address map.
Now I am able to mount a vfat filesystem on the smartmedia:
mount -t vfat /dev/mtdblock0 /mnt/smartmedia
My problem is that I have no idea about how to write sectors to smartmedia.
I have already the low level function nand_write_ecc, but I need help from
the logical side.
When the mtdblock needs a logical sector (req->sector), I just use my table
to translate the logical block address to physical block address (the low
level driver module s3c2410nand.o reads only physical sectors) and pass this
physical address to the nand_read_ecc function.
I suppose that when I write, a new logical or physical address must be
written in the OOB area of the requested block, but which is the logic?
is anybody able to help me?
More information about the linux-mtd