dma.h 1016 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef __ASM_CPU_SH4_DMA_H
  2. #define __ASM_CPU_SH4_DMA_H
  3. #ifdef CONFIG_CPU_SH4A
  4. #define SH_DMAC_BASE 0xfc808020
  5. #else
  6. #define SH_DMAC_BASE 0xffa00000
  7. #endif
  8. /* Definitions for the SuperH DMAC */
  9. #define TM_BURST 0x0000080
  10. #define TS_8 0x00000010
  11. #define TS_16 0x00000020
  12. #define TS_32 0x00000030
  13. #define TS_64 0x00000000
  14. #define CHCR_TS_MASK 0x30
  15. #define CHCR_TS_SHIFT 4
  16. #define DMAOR_COD 0x00000008
  17. #define DMAOR_INIT ( 0x8000 | DMAOR_DME )
  18. /*
  19. * The SuperH DMAC supports a number of transmit sizes, we list them here,
  20. * with their respective values as they appear in the CHCR registers.
  21. *
  22. * Defaults to a 64-bit transfer size.
  23. */
  24. enum {
  25. XMIT_SZ_64BIT,
  26. XMIT_SZ_8BIT,
  27. XMIT_SZ_16BIT,
  28. XMIT_SZ_32BIT,
  29. XMIT_SZ_256BIT,
  30. };
  31. /*
  32. * The DMA count is defined as the number of bytes to transfer.
  33. */
  34. static unsigned int ts_shift[] __attribute__ ((used)) = {
  35. [XMIT_SZ_64BIT] = 3,
  36. [XMIT_SZ_8BIT] = 0,
  37. [XMIT_SZ_16BIT] = 1,
  38. [XMIT_SZ_32BIT] = 2,
  39. [XMIT_SZ_256BIT] = 5,
  40. };
  41. #endif /* __ASM_CPU_SH4_DMA_H */