iomap.c 917 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * linux/arch/arm/mm/iomap.c
  4. *
  5. * Map IO port and PCI memory spaces so that {read,write}[bwl] can
  6. * be used to access this memory.
  7. */
  8. #include <linux/module.h>
  9. #include <linux/pci.h>
  10. #include <linux/ioport.h>
  11. #include <linux/io.h>
  12. #include <asm/vga.h>
  13. unsigned long vga_base;
  14. EXPORT_SYMBOL(vga_base);
  15. #ifdef __io
  16. void __iomem *ioport_map(unsigned long port, unsigned int nr)
  17. {
  18. return __io(port);
  19. }
  20. EXPORT_SYMBOL(ioport_map);
  21. void ioport_unmap(void __iomem *addr)
  22. {
  23. }
  24. EXPORT_SYMBOL(ioport_unmap);
  25. #endif
  26. #ifdef CONFIG_PCI
  27. unsigned long pcibios_min_io = 0x1000;
  28. EXPORT_SYMBOL(pcibios_min_io);
  29. unsigned long pcibios_min_mem = 0x01000000;
  30. EXPORT_SYMBOL(pcibios_min_mem);
  31. void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
  32. {
  33. if ((unsigned long)addr >= VMALLOC_START &&
  34. (unsigned long)addr < VMALLOC_END)
  35. iounmap(addr);
  36. }
  37. EXPORT_SYMBOL(pci_iounmap);
  38. #endif