]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
parisc: switch to GENERIC_PCI_IOMAP
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 24 Nov 2011 19:11:16 +0000 (21:11 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 28 Nov 2011 19:13:15 +0000 (21:13 +0200)
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>
arch/parisc/Kconfig
arch/parisc/lib/iomap.c

index fdfd8be29e951021140390d1ba37f1006d8f353d..242a1b7ac759448ba6ab06be9f28d4c9e9bfb69a 100644 (file)
@@ -14,6 +14,7 @@ config PARISC
        select GENERIC_ATOMIC64 if !64BIT
        select HAVE_GENERIC_HARDIRQS
        select GENERIC_IRQ_PROBE
+       select GENERIC_PCI_IOMAP
        select IRQ_PER_CPU
        select ARCH_HAVE_NMI_SAFE_CMPXCHG
 
index 8f470c93b16d10a94706f3f5375f2152db22e582..fb8e10a4fb39d5184b127a934308df1a7aac7900 100644 (file)
@@ -436,28 +436,6 @@ void ioport_unmap(void __iomem *addr)
        }
 }
 
-/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
-void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
-{
-       resource_size_t start = pci_resource_start(dev, bar);
-       resource_size_t len = pci_resource_len(dev, bar);
-       unsigned long flags = pci_resource_flags(dev, bar);
-
-       if (!len || !start)
-               return NULL;
-       if (maxlen && len > maxlen)
-               len = maxlen;
-       if (flags & IORESOURCE_IO)
-               return ioport_map(start, len);
-       if (flags & IORESOURCE_MEM) {
-               if (flags & IORESOURCE_CACHEABLE)
-                       return ioremap(start, len);
-               return ioremap_nocache(start, len);
-       }
-       /* What? */
-       return NULL;
-}
-
 void pci_iounmap(struct pci_dev *dev, void __iomem * addr)
 {
        if (!INDIRECT_ADDR(addr)) {
@@ -483,5 +461,4 @@ EXPORT_SYMBOL(iowrite16_rep);
 EXPORT_SYMBOL(iowrite32_rep);
 EXPORT_SYMBOL(ioport_map);
 EXPORT_SYMBOL(ioport_unmap);
-EXPORT_SYMBOL(pci_iomap);
 EXPORT_SYMBOL(pci_iounmap);