summaryrefslogtreecommitdiff
path: root/arch/arm64/mm/ioremap.c
diff options
context:
space:
mode:
authorPeng Du <pdu@nvidia.com>2013-09-11 16:52:39 -0700
committerTom Cherry <tcherry@nvidia.com>2014-01-21 15:13:59 -0800
commit724578cd732335f2c6749429ea78cde09b8c0b4b (patch)
tree1c6a2f45de0365e23d3353280b21eec68519e46b /arch/arm64/mm/ioremap.c
parent54f6149ace88e73eeedcdfda7e62f01573d95066 (diff)
arm64: mm: ioremap support for PCI
Change-Id: I7d4af8b8a88eb663a0f5780a60bbf128df579517 Signed-off-by: Peng Du <pdu@nvidia.com>
Diffstat (limited to 'arch/arm64/mm/ioremap.c')
-rw-r--r--arch/arm64/mm/ioremap.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm64/mm/ioremap.c b/arch/arm64/mm/ioremap.c
index 1725cd6db37a..df749c958aa1 100644
--- a/arch/arm64/mm/ioremap.c
+++ b/arch/arm64/mm/ioremap.c
@@ -82,3 +82,16 @@ void __iounmap(volatile void __iomem *io_addr)
vunmap(addr);
}
EXPORT_SYMBOL(__iounmap);
+
+#ifdef CONFIG_PCI
+int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr)
+{
+ BUG_ON(offset + SZ_64K > IO_SPACE_LIMIT);
+
+ return ioremap_page_range(PCI_IOBASE + offset,
+ PCI_IOBASE + offset + SZ_64K,
+ phys_addr,
+ __pgprot(PROT_DEVICE_nGnRE));
+}
+EXPORT_SYMBOL_GPL(pci_ioremap_io);
+#endif