]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
tile: switch to GENERIC_PCI_IOMAP
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 29 Nov 2011 18:42:56 +0000 (20:42 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 4 Dec 2011 14:00:10 +0000 (16:00 +0200)
tile now has working stubs for ioport_map and ioremap
such that the generic pci_iomap will DTRT: cast to
pointer on memory and return NULL and log message on IO map.

Switch it over to GENERIC_PCI_IOMAP.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
arch/tile/Kconfig
arch/tile/include/asm/pci.h
arch/tile/kernel/pci.c

index 70a0de46cd1be8e4bc4c193ef3b4d213f89a368f..11270ca22c0a7b880718cd832a3e890f0b69c28f 100644 (file)
@@ -321,6 +321,7 @@ config PCI
        bool "PCI support"
        default y
        select PCI_DOMAINS
+       select GENERIC_PCI_IOMAP
        ---help---
          Enable PCI root complex support, so PCIe endpoint devices can
          be attached to the Tile chip.  Many, but not all, PCI devices
index 7f03cefed1b92079687a2ca838cd9d700a600a58..1d25fea42e547a554344aa47e25abb107c646aa5 100644 (file)
@@ -16,6 +16,7 @@
 #define _ASM_TILE_PCI_H
 
 #include <linux/pci.h>
+#include <asm-generic/pci_iomap.h>
 
 /*
  * Structure of a PCI controller (host bridge)
@@ -49,7 +50,6 @@ struct pci_controller {
 int __devinit tile_pci_init(void);
 int __devinit pcibios_init(void);
 
-void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
 static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) {}
 
 void __devinit pcibios_fixup_bus(struct pci_bus *bus);
index 2a8014cb1ff52f0ef3e24a58a5e20ddcfeb3c8cc..1b6244e69de4da1e71c7e50833065c2bc40aece9 100644 (file)
@@ -465,27 +465,6 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
        return 0;
 }
 
-void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max)
-{
-       unsigned long start = pci_resource_start(dev, bar);
-       unsigned long len = pci_resource_len(dev, bar);
-       unsigned long flags = pci_resource_flags(dev, bar);
-
-       if (!len)
-               return NULL;
-       if (max && len > max)
-               len = max;
-
-       if (!(flags & IORESOURCE_MEM)) {
-               pr_info("PCI: Trying to map invalid resource %#lx\n", flags);
-               start = 0;
-       }
-
-       return (void __iomem *)start;
-}
-EXPORT_SYMBOL(pci_iomap);
-
-
 /****************************************************************
  *
  * Tile PCI config space read/write routines