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