dde.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * Distributed DMA Engine (DDE) Masks
  3. */
  4. #ifndef __BFIN_PERIPHERAL_DDE__
  5. #define __BFIN_PERIPHERAL_DDE__
  6. /* DMA_CONFIG Masks */
  7. #define DMAEN (1 << DMAEN_P) /* DMA Channel Enable */
  8. #define WNR (1 << WNR_P) /* Channel Direction (W/R*) */
  9. #define SYNC (1 << SYNC_P) /* Sync Work Unit Transitions */
  10. #define CADDR (1 << CADDR_P) /* Use Current Address */
  11. #define PSIZE (7 << PSIZE_P) /* Peripheral Word Size */
  12. #define PSIZE_1 (0 << PSIZE_P)
  13. #define PSIZE_2 (1 << PSIZE_P)
  14. #define PSIZE_4 (2 << PSIZE_P)
  15. #define PSIZE_8 (3 << PSIZE_P)
  16. #define MSIZE (7 << MSIZE_P) /* Memory Transfer Size */
  17. #define MSIZE_1 (0 << MSIZE_P)
  18. #define MSIZE_2 (1 << MSIZE_P)
  19. #define MSIZE_4 (2 << MSIZE_P)
  20. #define MSIZE_8 (3 << MSIZE_P)
  21. #define MSIZE_16 (4 << MSIZE_P)
  22. #define MSIZE_32 (5 << MSIZE_P)
  23. #define FLOW (7 << FLOW_P) /* Next Operation */
  24. #define FLOW_STOP (0 << FLOW_P) /* Stop Mode */
  25. #define FLOW_AUTO (1 << FLOW_P) /* Autobuffer Mode */
  26. #define FLOW_DSCL (4 << FLOW_P) /* Descriptor List */
  27. #define FLOW_DSCA (5 << FLOW_P) /* Descriptor Array */
  28. #define FLOW_DSDL (6 << FLOW_P) /* Descriptor On Demand List */
  29. #define FLOW_DSDA (7 << FLOW_P) /* Descriptor On Demand Array */
  30. #define NDSIZE (7 << NDSIZE_P) /* Next Descriptor Set Size */
  31. #define NDSIZE_1 (0 << NDSIZE_P)
  32. #define NDSIZE_2 (1 << NDSIZE_P)
  33. #define NDSIZE_3 (2 << NDSIZE_P)
  34. #define NDSIZE_4 (3 << NDSIZE_P)
  35. #define NDSIZE_5 (4 << NDSIZE_P)
  36. #define NDSIZE_6 (5 << NDSIZE_P)
  37. #define NDSIZE_7 (6 << NDSIZE_P)
  38. #define DI_EN_X (1 << INT_P)
  39. #define DI_EN_Y (2 << INT_P)
  40. #define DI_EN_P (3 << INT_P)
  41. #define DI_EN (DI_EN_X)
  42. #define DI_XCOUNT_EN (1 << INT_P) /* xcount expires interrupt */
  43. #define TRIG (3 << TRIG_P) /* Generate Trigger */
  44. #define TOVEN (1 << TOVEN_P)
  45. #define DESCIDCPY (1 << DESCIDCPY_P)
  46. #define TWOD (1 << TWOD_P)
  47. #define PDRF (1 << PDRF_P)
  48. #define DMAEN_P 0
  49. #define WNR_P 1
  50. #define SYNC_P 2
  51. #define CADDR_P 3
  52. #define PSIZE_P 4
  53. #define MSIZE_P 8
  54. #define FLOW_P 12
  55. #define TWAIT_P 15
  56. #define NDSIZE_P 16
  57. #define INT_P 20
  58. #define TRIG_P 22
  59. #define TOVEN_P 24
  60. #define DESCIDCPY_P 25
  61. #define TWOD_P 26
  62. #define PDRF_P 28
  63. /* DMA_STATUS Masks */
  64. #define DMA_DONE (1 << DMA_DONE_P) /* Work Unit/Row Done */
  65. #define DMA_ERR (1 << DMA_ERR_P) /* Error Interrupt */
  66. #define DMA_PIRQ (1 << DMA_PIRQ_P) /* Peri Intr Request */
  67. #define DMA_ERRC (7 << DMA_ERRC_P) /* Error Cause */
  68. #define DMA_RUN (7 << DMA_RUN_P) /* Run Status */
  69. #define DMA_PBWIDTH (3 << DMA_PBWIDTH_P) /* Peri Bus Width */
  70. #define DMA_MBWIDTH (3 << DMA_MBWIDTH_P) /* Memory Bus Width */
  71. #define DMA_FIFOFILL (7 << DMA_FIFOFILL_P) /* FIFO Fill Status */
  72. #define DMA_TWAIT (1 << DMA_TWAIT_P) /* Trigger Wait Stat */
  73. #define DMA_DONE_P 0
  74. #define DMA_ERR_P 1
  75. #define DMA_PIRQ_P 2
  76. #define DMA_ERRC_P 4
  77. #define DMA_RUN_P 8
  78. #define DMA_PBWIDTH_P 12
  79. #define DMA_MBWIDTH_P 14
  80. #define DMA_FIFOFILL_P 16
  81. #define DMA_TWAIT_P 20
  82. #endif