18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * linux/arch/arm/mm/iomap.c 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Map IO port and PCI memory spaces so that {read,write}[bwl] can 68c2ecf20Sopenharmony_ci * be used to access this memory. 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci#include <linux/module.h> 98c2ecf20Sopenharmony_ci#include <linux/pci.h> 108c2ecf20Sopenharmony_ci#include <linux/ioport.h> 118c2ecf20Sopenharmony_ci#include <linux/io.h> 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#include <asm/vga.h> 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ciunsigned long vga_base; 168c2ecf20Sopenharmony_ciEXPORT_SYMBOL(vga_base); 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#ifdef __io 198c2ecf20Sopenharmony_civoid __iomem *ioport_map(unsigned long port, unsigned int nr) 208c2ecf20Sopenharmony_ci{ 218c2ecf20Sopenharmony_ci return __io(port); 228c2ecf20Sopenharmony_ci} 238c2ecf20Sopenharmony_ciEXPORT_SYMBOL(ioport_map); 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_civoid ioport_unmap(void __iomem *addr) 268c2ecf20Sopenharmony_ci{ 278c2ecf20Sopenharmony_ci} 288c2ecf20Sopenharmony_ciEXPORT_SYMBOL(ioport_unmap); 298c2ecf20Sopenharmony_ci#endif 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#ifdef CONFIG_PCI 328c2ecf20Sopenharmony_ciunsigned long pcibios_min_io = 0x1000; 338c2ecf20Sopenharmony_ciEXPORT_SYMBOL(pcibios_min_io); 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ciunsigned long pcibios_min_mem = 0x01000000; 368c2ecf20Sopenharmony_ciEXPORT_SYMBOL(pcibios_min_mem); 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_civoid pci_iounmap(struct pci_dev *dev, void __iomem *addr) 398c2ecf20Sopenharmony_ci{ 408c2ecf20Sopenharmony_ci if ((unsigned long)addr >= VMALLOC_START && 418c2ecf20Sopenharmony_ci (unsigned long)addr < VMALLOC_END) 428c2ecf20Sopenharmony_ci iounmap(addr); 438c2ecf20Sopenharmony_ci} 448c2ecf20Sopenharmony_ciEXPORT_SYMBOL(pci_iounmap); 458c2ecf20Sopenharmony_ci#endif 46