of_iomap()映射设备树中 reg 属性中描述的资源,执行所有必需的转换。根据平台要求自动选择ioremap_np(),如上。pci_ioremap_bar(), pci_ioremap_wc_bar()映射PCI 基地址中描述的资源,而不必先提取物理地址。pci_iomap(), pci_iomap_wc()与pci_ioremap_bar()/pci_ioremap_bar() 类似,但在与 ioread32()/...
调用ioremap_nocache()函数之后,返回一个线性地址,此时CPU 可以访问设备的内存(已经将其映射到了线性...
return __ioremap(physaddr, size, IOMAP_NOCACHE_SER); } #define ioremap_uc ioremap #define ioremap_wt ioremap_wt static inline void __iomem *ioremap_wt(unsigned long physaddr, unsigned long size) 1 change: 0 additions & 1 deletion 1 arch/mips/include/asm/io.h Original file line number...
9 changes: 9 additions & 0 deletions 9 include/asm-generic/iomap.h Original file line numberDiff line numberDiff line change @@ -101,6 +101,15 @@ extern void ioport_unmap(void __iomem *); #define ioremap_wt ioremap #endif #ifndef ARCH_HAS_IOREMAP_NP /* See the comment in asm-...
void __iomem *pci_iomap(struct pci_dev *dev, int base, unsigned long maxlen);For this function, the base can be either a port number or an I/O memory address, and the right thing will be done. As of 2.6.9-rc2, there are no in-tree users of the new interface. That can be ...
使用ioremap*()也是错误的,因为有一个特定的PCI API,即pci_iomap*()。维护人员只会确保正确的API为...
使用ioremap*()也是错误的,因为有一个特定的PCI API,即pci_iomap*()。维护人员只会确保正确的API为...
通过ioremap 将物理地址映射为虚拟地址后,内核就能通过 ioremap() 返回的虚拟地址,以 虚拟地址->mmu页表映射-> 物理地址 的形式正确地访问到物理地址了。 ARM Linux 引入设备树特性后,一些支持设备树的设备驱动不再使用直接 ioremap(),改用 drivers/of/address.c/of_iomap(),of_iomap() 的内部仍然会调用 ioremap...
* */void__iomem *pci_iomap_wc_range(struct pci_dev *dev,intbar,unsignedlongoffset,unsignedlongmaxlen){resource_size_tstart = pci_resource_start(dev, bar);resource_size_tlen = pci_resource_len(dev, bar);unsignedlongflags = pci_resource_flags(dev, bar);if(flags & IORESOURCE_IO)returnNUL...