dma.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef __ASM_CPU_SH3_DMA_H
  2. #define __ASM_CPU_SH3_DMA_H
  3. #if defined(CONFIG_CPU_SUBTYPE_SH7720) || \
  4. defined(CONFIG_CPU_SUBTYPE_SH7721) || \
  5. defined(CONFIG_CPU_SUBTYPE_SH7709)
  6. #define SH_DMAC_BASE 0xa4010020
  7. #define DMTE0_IRQ 48
  8. #define DMTE1_IRQ 49
  9. #define DMTE2_IRQ 50
  10. #define DMTE3_IRQ 51
  11. #define DMTE4_IRQ 76
  12. #define DMTE5_IRQ 77
  13. #else
  14. #define SH_DMAC_BASE 0xa4000020
  15. #endif
  16. /* Definitions for the SuperH DMAC */
  17. #define TM_BURST 0x00000020
  18. #define TS_8 0x00000000
  19. #define TS_16 0x00000008
  20. #define TS_32 0x00000010
  21. #define TS_128 0x00000018
  22. #define CHCR_TS_MASK 0x18
  23. #define CHCR_TS_SHIFT 3
  24. #define DMAOR_INIT DMAOR_DME
  25. /*
  26. * The SuperH DMAC supports a number of transmit sizes, we list them here,
  27. * with their respective values as they appear in the CHCR registers.
  28. */
  29. enum {
  30. XMIT_SZ_8BIT,
  31. XMIT_SZ_16BIT,
  32. XMIT_SZ_32BIT,
  33. XMIT_SZ_128BIT,
  34. };
  35. static unsigned int ts_shift[] __maybe_unused = {
  36. [XMIT_SZ_8BIT] = 0,
  37. [XMIT_SZ_16BIT] = 1,
  38. [XMIT_SZ_32BIT] = 2,
  39. [XMIT_SZ_128BIT] = 4,
  40. };
  41. #endif /* __ASM_CPU_SH3_DMA_H */