io.h 998 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
  3. */
  4. /*
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. */
  9. #ifndef __ASM_ARCH_MXC_IO_H__
  10. #define __ASM_ARCH_MXC_IO_H__
  11. /* Allow IO space to be anywhere in the memory */
  12. #define IO_SPACE_LIMIT 0xffffffff
  13. #define __arch_ioremap __imx_ioremap
  14. #define __arch_iounmap __iounmap
  15. #define addr_in_module(addr, mod) \
  16. ((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)
  17. extern void __iomem *(*imx_ioremap)(unsigned long, size_t, unsigned int);
  18. static inline void __iomem *
  19. __imx_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
  20. {
  21. if (imx_ioremap != NULL)
  22. return imx_ioremap(phys_addr, size, mtype);
  23. else
  24. return __arm_ioremap(phys_addr, size, mtype);
  25. }
  26. /* io address mapping macro */
  27. #define __io(a) __typesafe_io(a)
  28. #define __mem_pci(a) (a)
  29. #endif