On Nov 14, 2004, at 10:53 AM, Gilad Rom wrote:
For some reason, I keep getting that magical value, 0x10000001 for EVERY address I try to read, be it SYS_BASE (0xB1900000) or every other address.
It's not working because that is not the address of the device(s). The 0xB1900000 is the Kernel Virtual address of these devices, the real physical address, and the one you have to use with mmap() is the system control block address 0x11900000.
Just be very, very careful with user space access of any IO using this method. The kernel can ensure atomic updates using various methods, but user applications can't and may cause system failures. This is why a GPIO driver is a much better approach.
-- Dan