dma.h 1.1 KB

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