Skip to contentSkip to conversation

semi-raw access to flash

DISCUSSION Russ Dill 3 participants 3 messages Dec 18, 2001 Memory technology devices (MTD)

lore
Share & tools
lore

Russ Dill

author
#0 lore raw

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.

#1 lore raw
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

#2 lore raw
In reply to Russ Dill
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