Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * ppc64 "iomap" interface implementation.
0004  *
0005  * (C) Copyright 2004 Linus Torvalds
0006  */
0007 #include <linux/pci.h>
0008 #include <linux/mm.h>
0009 #include <linux/export.h>
0010 #include <asm/io.h>
0011 #include <asm/pci-bridge.h>
0012 #include <asm/isa-bridge.h>
0013 
0014 void __iomem *ioport_map(unsigned long port, unsigned int len)
0015 {
0016     return (void __iomem *) (port + _IO_BASE);
0017 }
0018 EXPORT_SYMBOL(ioport_map);
0019 
0020 #ifdef CONFIG_PCI
0021 void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
0022 {
0023     if (isa_vaddr_is_ioport(addr))
0024         return;
0025     if (pcibios_vaddr_is_ioport(addr))
0026         return;
0027     iounmap(addr);
0028 }
0029 
0030 EXPORT_SYMBOL(pci_iounmap);
0031 #endif /* CONFIG_PCI */