根据Corbet and Rubini,要请求I / O端口,必须使用request_region(unsigned long firstport, unsigned long len, const char *name)
。但是,他们也提到要请求I / O内存,一个人必须使用request_mem_region(unsigned long firstaddr, unsigned long len, const char *name)
,然后使用ioremap(unsigned long phys_addr, unsigned long size)
重新映射它。我怎么知道我需要哪种I / O(内存或端口)?