io.h 935 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * arch/arm/mach-shark/include/mach/io.h
  3. *
  4. * by Alexander Schulz
  5. *
  6. * derived from:
  7. * arch/arm/mach-ebsa110/include/mach/io.h
  8. * Copyright (C) 1997,1998 Russell King
  9. */
  10. #ifndef __ASM_ARM_ARCH_IO_H
  11. #define __ASM_ARM_ARCH_IO_H
  12. #include <mach/hardware.h>
  13. #define IO_SPACE_LIMIT 0xffffffff
  14. /*
  15. * We use two different types of addressing - PC style addresses, and ARM
  16. * addresses. PC style accesses the PC hardware with the normal PC IO
  17. * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+
  18. * and are translated to the start of IO.
  19. */
  20. #define __PORT_PCIO(x) (!((x) & 0x80000000))
  21. #define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
  22. static inline unsigned int __ioaddr (unsigned int port) \
  23. { \
  24. if (__PORT_PCIO(port)) \
  25. return (unsigned int)(PCIO_BASE + (port)); \
  26. else \
  27. return (unsigned int)(IO_BASE + (port)); \
  28. }
  29. #define __mem_pci(addr) (addr)
  30. #endif