preliminaryDataProcessing.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * arch/arm/include/asm/hardware/sa1111.h
  3. *
  4. * Copyright (C) 2000 John G Dorsey <john+@cs.cmu.edu>
  5. *
  6. * This file contains definitions for the SA-1111 Companion Chip.
  7. * (Structure and naming borrowed from SA-1101.h, by Peter Danielsson.)
  8. *
  9. * Macro that calculates real address for registers in the SA-1111
  10. */
  11. #ifndef _ASM_ARCH_SA1111
  12. #define _ASM_ARCH_SA1111
  13. #include <mach/bitfield.h>
  14. /*
  15. * The SA1111 is always located at virtual 0xf4000000, and is always
  16. * "native" endian.
  17. */
  18. #define SA1111_VBASE 0xf4000000
  19. /* Don't use these! */
  20. #define SA1111_p2v( x ) ((x) - SA1111_BASE + SA1111_VBASE)
  21. #define SA1111_v2p( x ) ((x) - SA1111_VBASE + SA1111_BASE)
  22. #ifndef __ASSEMBLY__
  23. #define _SA1111(x) ((x) + sa1111->resource.start)
  24. #endif
  25. #define sa1111_writel(val,addr) __raw_writel(val, addr)
  26. #define sa1111_readl(addr) __raw_readl(addr)
  27. /*
  28. * 26 bits of the SA-1110 address bus are available to the SA-1111.
  29. * Use these when feeding target addresses to the DMA engines.
  30. */
  31. #define SA1111_ADDR_WIDTH (26)
  32. #define SA1111_ADDR_MASK ((1<<SA1111_ADDR_WIDTH)-1)
  33. #define SA1111_DMA_ADDR(x) ((x)&SA1111_ADDR_MASK)