aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/lib/iomap-pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/lib/iomap-pci.c')
-rw-r--r--arch/mips/lib/iomap-pci.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/arch/mips/lib/iomap-pci.c b/arch/mips/lib/iomap-pci.c
index 2ab899c4b4ce..2635b1a96333 100644
--- a/arch/mips/lib/iomap-pci.c
+++ b/arch/mips/lib/iomap-pci.c
@@ -40,32 +40,6 @@ static void __iomem *ioport_map_pci(struct pci_dev *dev,
40 return (void __iomem *) (ctrl->io_map_base + port); 40 return (void __iomem *) (ctrl->io_map_base + port);
41} 41}
42 42
43/*
44 * Create a virtual mapping cookie for a PCI BAR (memory or IO)
45 */
46void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
47{
48 resource_size_t start = pci_resource_start(dev, bar);
49 resource_size_t len = pci_resource_len(dev, bar);
50 unsigned long flags = pci_resource_flags(dev, bar);
51
52 if (!len || !start)
53 return NULL;
54 if (maxlen && len > maxlen)
55 len = maxlen;
56 if (flags & IORESOURCE_IO)
57 return ioport_map_pci(dev, start, len);
58 if (flags & IORESOURCE_MEM) {
59 if (flags & IORESOURCE_CACHEABLE)
60 return ioremap(start, len);
61 return ioremap_nocache(start, len);
62 }
63 /* What? */
64 return NULL;
65}
66
67EXPORT_SYMBOL(pci_iomap);
68
69void pci_iounmap(struct pci_dev *dev, void __iomem * addr) 43void pci_iounmap(struct pci_dev *dev, void __iomem * addr)
70{ 44{
71 iounmap(addr); 45 iounmap(addr);