io.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * include/asm-arm/arch-orion/io.h
  3. *
  4. * Tzachi Perelstein <tzachi@marvell.com>
  5. *
  6. * This file is licensed under the terms of the GNU General Public
  7. * License version 2. This program is licensed "as is" without any
  8. * warranty of any kind, whether express or implied.
  9. */
  10. #ifndef __ASM_ARM_ARCH_IO_H
  11. #define __ASM_ARM_ARCH_IO_H
  12. #include "orion.h"
  13. #define IO_SPACE_LIMIT 0xffffffff
  14. #define IO_SPACE_REMAP ORION_PCI_SYS_IO_BASE
  15. static inline void __iomem *__io(unsigned long addr)
  16. {
  17. return (void __iomem *)addr;
  18. }
  19. #define __io(a) __io(a)
  20. #define __mem_pci(a) (a)
  21. /*****************************************************************************
  22. * Helpers to access Orion registers
  23. ****************************************************************************/
  24. #define orion_read(r) __raw_readl(r)
  25. #define orion_write(r, val) __raw_writel(val, r)
  26. /*
  27. * These are not preempt-safe. Locks, if needed, must be taken
  28. * care of by the caller.
  29. */
  30. #define orion_setbits(r, mask) orion_write((r), orion_read(r) | (mask))
  31. #define orion_clrbits(r, mask) orion_write((r), orion_read(r) & ~(mask))
  32. #endif