dma.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef _ASM_ARCH_CRIS_DMA_H
  2. #define _ASM_ARCH_CRIS_DMA_H
  3. /* Defines for using and allocating dma channels. */
  4. #define MAX_DMA_CHANNELS 12 /* 8 and 10 not used. */
  5. #define NETWORK_ETH_TX_DMA_NBR 0 /* Ethernet 0 out. */
  6. #define NETWORK_ETH_RX_DMA_NBR 1 /* Ethernet 0 in. */
  7. #define IO_PROC_DMA_TX_DMA_NBR 4 /* IO processor DMA0 out. */
  8. #define IO_PROC_DMA_RX_DMA_NBR 5 /* IO processor DMA0 in. */
  9. #define ASYNC_SER3_TX_DMA_NBR 2 /* Asynchronous serial port 3 out. */
  10. #define ASYNC_SER3_RX_DMA_NBR 3 /* Asynchronous serial port 3 in. */
  11. #define ASYNC_SER2_TX_DMA_NBR 6 /* Asynchronous serial port 2 out. */
  12. #define ASYNC_SER2_RX_DMA_NBR 7 /* Asynchronous serial port 2 in. */
  13. #define ASYNC_SER1_TX_DMA_NBR 4 /* Asynchronous serial port 1 out. */
  14. #define ASYNC_SER1_RX_DMA_NBR 5 /* Asynchronous serial port 1 in. */
  15. #define SYNC_SER_TX_DMA_NBR 6 /* Synchronous serial port 0 out. */
  16. #define SYNC_SER_RX_DMA_NBR 7 /* Synchronous serial port 0 in. */
  17. #define ASYNC_SER0_TX_DMA_NBR 0 /* Asynchronous serial port 0 out. */
  18. #define ASYNC_SER0_RX_DMA_NBR 1 /* Asynchronous serial port 0 in. */
  19. #define STRCOP_TX_DMA_NBR 2 /* Stream co-processor out. */
  20. #define STRCOP_RX_DMA_NBR 3 /* Stream co-processor in. */
  21. #define dma_eth0 dma_eth
  22. #define dma_eth1 dma_eth
  23. enum dma_owner {
  24. dma_eth,
  25. dma_ser0,
  26. dma_ser1,
  27. dma_ser2,
  28. dma_ser3,
  29. dma_ser4,
  30. dma_iop,
  31. dma_sser,
  32. dma_strp,
  33. dma_h264,
  34. dma_jpeg
  35. };
  36. int crisv32_request_dma(unsigned int dmanr, const char *device_id,
  37. unsigned options, unsigned bandwidth, enum dma_owner owner);
  38. void crisv32_free_dma(unsigned int dmanr);
  39. /* Masks used by crisv32_request_dma options: */
  40. #define DMA_VERBOSE_ON_ERROR 1
  41. #define DMA_PANIC_ON_ERROR (2|DMA_VERBOSE_ON_ERROR)
  42. #define DMA_INT_MEM 4
  43. #endif /* _ASM_ARCH_CRIS_DMA_H */