The following works in FreeBSD, it should work in Linux also:
#include
#include
#include
#include
#include
#include
#define MMCR_BASE 0xfffef000
/* DANGER DANGER DANGER
Messing directly with physical memory. If you are not careful you WILL
hose your system.
*/
int main(int arg
The MMCR registers are memory-mapped, but you are using the I/O
routines, trying to address them in I/O space. I haven't done this in
Linux, but FreeBSD has a device /dev/elan-mmcr that you can open and
mmap() for direct access. I would imagine you could open /dev/mem and
mmap() the MMCR