Code: Select all
gpio_map = (uint32_t *)mmap( (caddr_t)gpio_mem, BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, mem_fd, GPIO_BASE);
*(gpio_map+offset) =valueFor MIPS the GPIO is accessed through bus address using ioremap function instead of mmap of ARM.
the memory address from ioremap of MIPS cannot be directly derefenced like ARm. It must use readl and writel to access those memory location..
So, the question is why the difference and two different approach between the two. why can't MIPS use mmap or why can't ARM use ioremap?