xilinx_dma.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Xilinx DMA Engine drivers support header file
  3. *
  4. * Copyright (C) 2010-2014 Xilinx, Inc. All rights reserved.
  5. *
  6. * This is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. */
  11. #ifndef __DMA_XILINX_DMA_H
  12. #define __DMA_XILINX_DMA_H
  13. #include <linux/dma-mapping.h>
  14. #include <linux/dmaengine.h>
  15. /**
  16. * struct xilinx_vdma_config - VDMA Configuration structure
  17. * @frm_dly: Frame delay
  18. * @gen_lock: Whether in gen-lock mode
  19. * @master: Master that it syncs to
  20. * @frm_cnt_en: Enable frame count enable
  21. * @park: Whether wants to park
  22. * @park_frm: Frame to park on
  23. * @coalesc: Interrupt coalescing threshold
  24. * @delay: Delay counter
  25. * @reset: Reset Channel
  26. * @ext_fsync: External Frame Sync source
  27. */
  28. struct xilinx_vdma_config {
  29. int frm_dly;
  30. int gen_lock;
  31. int master;
  32. int frm_cnt_en;
  33. int park;
  34. int park_frm;
  35. int coalesc;
  36. int delay;
  37. int reset;
  38. int ext_fsync;
  39. };
  40. /**
  41. * enum xdma_ip_type: DMA IP type.
  42. *
  43. * XDMA_TYPE_AXIDMA: Axi dma ip.
  44. * XDMA_TYPE_CDMA: Axi cdma ip.
  45. * XDMA_TYPE_VDMA: Axi vdma ip.
  46. *
  47. */
  48. enum xdma_ip_type {
  49. XDMA_TYPE_AXIDMA = 0,
  50. XDMA_TYPE_CDMA,
  51. XDMA_TYPE_VDMA,
  52. };
  53. int xilinx_vdma_channel_set_config(struct dma_chan *dchan,
  54. struct xilinx_vdma_config *cfg);
  55. #endif