Re: mmap question

Frederic Gobry
2002-07-01T13:14:45Z

[-- Attachment #1: Type: text/plain, Size: 907 bytes --]

I follow-up to my own question: I've managed to use mmap with jffs2
quite successfully, but now I would like to directly use MTD (so that
I can handle the way sectors are erased / written to in order to
ensure good atomicity).

I've seen that the MTD char driver does not provide mmap support. In
order to implement it, I would like to know if I can use the 'point'
function of the mtd_info structure to get the physical address of the
flash device. From the documentation

"For devices which are entirely memory-mapped and which can be
mapped directly into user-space page tables, we may support
execute-in-place (XIP) mapping of data on the flash. The precise
semantics of this are yet to be defined, so it's probably best just
not to either implement or attempt to use these two functions right
at the moment."

So, is it the correct way to go ?

Thanks,