aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/lib/iomap.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/lib/iomap.c')
-rw-r--r--arch/sparc/lib/iomap.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/arch/sparc/lib/iomap.c b/arch/sparc/lib/iomap.c
index 9ef37e13a920..c4d42a50ebc0 100644
--- a/arch/sparc/lib/iomap.c
+++ b/arch/sparc/lib/iomap.c
@@ -18,31 +18,8 @@ void ioport_unmap(void __iomem *addr)
18EXPORT_SYMBOL(ioport_map); 18EXPORT_SYMBOL(ioport_map);
19EXPORT_SYMBOL(ioport_unmap); 19EXPORT_SYMBOL(ioport_unmap);
20 20
21/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
22void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
23{
24 resource_size_t start = pci_resource_start(dev, bar);
25 resource_size_t len = pci_resource_len(dev, bar);
26 unsigned long flags = pci_resource_flags(dev, bar);
27
28 if (!len || !start)
29 return NULL;
30 if (maxlen && len > maxlen)
31 len = maxlen;
32 if (flags & IORESOURCE_IO)
33 return ioport_map(start, len);
34 if (flags & IORESOURCE_MEM) {
35 if (flags & IORESOURCE_CACHEABLE)
36 return ioremap(start, len);
37 return ioremap_nocache(start, len);
38 }
39 /* What? */
40 return NULL;
41}
42
43void pci_iounmap(struct pci_dev *dev, void __iomem * addr) 21void pci_iounmap(struct pci_dev *dev, void __iomem * addr)
44{ 22{
45 /* nothing to do */ 23 /* nothing to do */
46} 24}
47EXPORT_SYMBOL(pci_iomap);
48EXPORT_SYMBOL(pci_iounmap); 25EXPORT_SYMBOL(pci_iounmap);