aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/lib/iomap.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2011-11-24 14:11:16 -0500
committerMichael S. Tsirkin <mst@redhat.com>2011-11-28 14:13:15 -0500
commit629a858160751b670e1376dab4788f0c84138cc6 (patch)
tree0cbaf0f5ac2d1c757a94f8e418df634e5a95e4de /arch/parisc/lib/iomap.c
parenteab90291d35438bcebf7c3dc85be66d0f24e3002 (diff)
parisc: switch to GENERIC_PCI_IOMAP
parisc copied pci_iomap from generic code, probably to avoid pulling the rest of iomap.c in. Since that's in a separate file now, we can reuse the common implementation. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'arch/parisc/lib/iomap.c')
-rw-r--r--arch/parisc/lib/iomap.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/arch/parisc/lib/iomap.c b/arch/parisc/lib/iomap.c
index 8f470c93b16d..fb8e10a4fb39 100644
--- a/arch/parisc/lib/iomap.c
+++ b/arch/parisc/lib/iomap.c
@@ -436,28 +436,6 @@ void ioport_unmap(void __iomem *addr)
436 } 436 }
437} 437}
438 438
439/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
440void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
441{
442 resource_size_t start = pci_resource_start(dev, bar);
443 resource_size_t len = pci_resource_len(dev, bar);
444 unsigned long flags = pci_resource_flags(dev, bar);
445
446 if (!len || !start)
447 return NULL;
448 if (maxlen && len > maxlen)
449 len = maxlen;
450 if (flags & IORESOURCE_IO)
451 return ioport_map(start, len);
452 if (flags & IORESOURCE_MEM) {
453 if (flags & IORESOURCE_CACHEABLE)
454 return ioremap(start, len);
455 return ioremap_nocache(start, len);
456 }
457 /* What? */
458 return NULL;
459}
460
461void pci_iounmap(struct pci_dev *dev, void __iomem * addr) 439void pci_iounmap(struct pci_dev *dev, void __iomem * addr)
462{ 440{
463 if (!INDIRECT_ADDR(addr)) { 441 if (!INDIRECT_ADDR(addr)) {
@@ -483,5 +461,4 @@ EXPORT_SYMBOL(iowrite16_rep);
483EXPORT_SYMBOL(iowrite32_rep); 461EXPORT_SYMBOL(iowrite32_rep);
484EXPORT_SYMBOL(ioport_map); 462EXPORT_SYMBOL(ioport_map);
485EXPORT_SYMBOL(ioport_unmap); 463EXPORT_SYMBOL(ioport_unmap);
486EXPORT_SYMBOL(pci_iomap);
487EXPORT_SYMBOL(pci_iounmap); 464EXPORT_SYMBOL(pci_iounmap);