Ioremap function and iounmap() function

Original post address: http://blog.chinaunix.net/uid-21289517-id-1828602.html

void * __ ioremap(unsigned long phys_ Addr, signed long size, signed long flags)
entry: phys_ Addr: the initial IO address to be mapped;

Size: the size of the space to be mapped;

Flags: marks related to permissions of IO space to be mapped;

Function: map an IO address space to the virtual address space of the kernel for easy access;

*void ioremap(unsigned long offset, unsigned long size);

Parameter:
offset: physical address
size: the size of the space to be mapped

Return value: page mapping, return virtual address


Iounmap() function to unmap the virtual address;
for example: iounmap (gpsetl0);

Read More: