@@ -172,6 +172,7 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
#define PCI_IO_VIRT_BASE 0xfee00000
extern int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr);
+extern void pci_iounmap_io(unsigned int offset);
/*
* Now, pick up the machine-defined IO definitions
@@ -448,4 +448,10 @@ int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr)
__pgprot(get_mem_type(MT_DEVICE)->prot_pte));
}
EXPORT_SYMBOL_GPL(pci_ioremap_io);
+
+void pci_iounmap_io(unsigned int offset)
+{
+ unmap_kernel_range(PCI_IO_VIRT_BASE + offset, SZ_64K);
+}
+EXPORT_SYMBOL_GPL(pci_iounmap_io);
#endif
The new pci_iounmap_io() function can be used to unmap a fixed PCI I/O mapping as established by pci_ioremap_io(). This will be useful to support unbinding of PCI host drivers. Signed-off-by: Thierry Reding <treding@nvidia.com> --- arch/arm/include/asm/io.h | 1 + arch/arm/mm/ioremap.c | 6 ++++++ 2 files changed, 7 insertions(+)