2012年1月4日 星期三

Linux I/O access function

In most  systems, I/O access can divided into 2 schemes.
1. memory map I/O
2. I/O port access
Most desktop/notebook seperate I/O space and memory space. To access via I/O need another instructions
ex. in/out
But for most embedded system, I/O is mapped to memory space.

so we have 2 methods to access external device via I/O depends on the platform you choose.
Here i write down the sequence and function for both I/O access method.

1. Memory access
     request_mem_region() -> ioremap -> readb() writeb() -> iouremap() -> release_mem_region()

2. I/O port access
    request_region() -> inb() outb() -> release_region()

沒有留言:

張貼留言