semi-raw access to flash
I'm trying to get semi-raw access to flash in userspace. I'd like to be able to mmap the flash and write to it (with mtd handling the unlock commands) but not have mtd automatically cache and erase blocks, etc for me. /dev/mtd? would be great, but its only a char device, so I can't mmap it. /dev/mtdblock? is mmapable, but it tries to emulate a true block device with its automatic erasing and rewriting.
Quoted 4 lines · [email protected] said:
I'm trying to get semi-raw access to flash in userspace. I'd like to be able to mmap the flash and write to it (with mtd handling the unlock commands) but not have mtd automatically cache and erase blocks, etc for me.
Why? What are you trying to achieve?
--
dwmw2
Quoted 5 lines · Russ Dill
I'm trying to get semi-raw access to flash in userspace. I'd like to be able to mmap the flash and write to it (with mtd handling the unlock commands) but not have mtd automatically cache and erase blocks, etc for me.
/dev/mtd? would be great, but its only a char device, so I can't mmap it.
Nothing prevents you from mmap()'ing a char device. In the MTD case it's only not implemented in the driver.
Nicolas