iomap.c 895 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. unsigned long vga_base;
  13. EXPORT_SYMBOL(vga_base);
  14. #ifdef __io
  15. void __iomem *ioport_map(unsigned long port, unsigned int nr)
  16. {
  17. return __io(port);
  18. }
  19. EXPORT_SYMBOL(ioport_map);
  20. void ioport_unmap(void __iomem *addr)
  21. {
  22. }
  23. EXPORT_SYMBOL(ioport_unmap);
  24. #endif
  25. #ifdef CONFIG_PCI
  26. unsigned long pcibios_min_io = 0x1000;
  27. EXPORT_SYMBOL(pcibios_min_io);
  28. unsigned long pcibios_min_mem = 0x01000000;
  29. EXPORT_SYMBOL(pcibios_min_mem);
  30. void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
  31. {
  32. if ((unsigned long)addr >= VMALLOC_START &&
  33. (unsigned long)addr < VMALLOC_END)
  34. iounmap(addr);
  35. }
  36. EXPORT_SYMBOL(pci_iounmap);
  37. #endif