diff options
Diffstat (limited to 'arch/alpha/kernel/pci.c')
-rw-r--r-- | arch/alpha/kernel/pci.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c index c9ab94ee1ca8..f3cae275d3f5 100644 --- a/arch/alpha/kernel/pci.c +++ b/arch/alpha/kernel/pci.c | |||
@@ -508,30 +508,7 @@ sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn) | |||
508 | return -EOPNOTSUPP; | 508 | return -EOPNOTSUPP; |
509 | } | 509 | } |
510 | 510 | ||
511 | /* Create an __iomem token from a PCI BAR. Copied from lib/iomap.c with | 511 | /* Destroy an __iomem token. Not copied from lib/iomap.c. */ |
512 | no changes, since we don't want the other things in that object file. */ | ||
513 | |||
514 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) | ||
515 | { | ||
516 | resource_size_t start = pci_resource_start(dev, bar); | ||
517 | resource_size_t len = pci_resource_len(dev, bar); | ||
518 | unsigned long flags = pci_resource_flags(dev, bar); | ||
519 | |||
520 | if (!len || !start) | ||
521 | return NULL; | ||
522 | if (maxlen && len > maxlen) | ||
523 | len = maxlen; | ||
524 | if (flags & IORESOURCE_IO) | ||
525 | return ioport_map(start, len); | ||
526 | if (flags & IORESOURCE_MEM) { | ||
527 | /* Not checking IORESOURCE_CACHEABLE because alpha does | ||
528 | not distinguish between ioremap and ioremap_nocache. */ | ||
529 | return ioremap(start, len); | ||
530 | } | ||
531 | return NULL; | ||
532 | } | ||
533 | |||
534 | /* Destroy that token. Not copied from lib/iomap.c. */ | ||
535 | 512 | ||
536 | void pci_iounmap(struct pci_dev *dev, void __iomem * addr) | 513 | void pci_iounmap(struct pci_dev *dev, void __iomem * addr) |
537 | { | 514 | { |
@@ -539,7 +516,6 @@ void pci_iounmap(struct pci_dev *dev, void __iomem * addr) | |||
539 | iounmap(addr); | 516 | iounmap(addr); |
540 | } | 517 | } |
541 | 518 | ||
542 | EXPORT_SYMBOL(pci_iomap); | ||
543 | EXPORT_SYMBOL(pci_iounmap); | 519 | EXPORT_SYMBOL(pci_iounmap); |
544 | 520 | ||
545 | /* FIXME: Some boxes have multiple ISA bridges! */ | 521 | /* FIXME: Some boxes have multiple ISA bridges! */ |