From 724578cd732335f2c6749429ea78cde09b8c0b4b Mon Sep 17 00:00:00 2001 From: Peng Du Date: Wed, 11 Sep 2013 16:52:39 -0700 Subject: arm64: mm: ioremap support for PCI Change-Id: I7d4af8b8a88eb663a0f5780a60bbf128df579517 Signed-off-by: Peng Du --- arch/arm64/mm/ioremap.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'arch/arm64/mm/ioremap.c') 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 -- cgit v1.2.3