in reply to Accessing Memory-mapped I/O

You need to publish your C-code to let us demonstrate that it works. I do not think that it does. In any case what you really want to do is to use system-calls to directly map the requested address space ... not rely on /dev/mem.