blob: 3ae3000525539bfcbd57e55de0b60390970232d0 [file] [log] [blame]
Srikanth Thokala9cd43602014-04-23 20:23:26 +05301/*
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
12#ifndef __DMA_XILINX_DMA_H
13#define __DMA_XILINX_DMA_H
14
15#include <linux/dma-mapping.h>
16#include <linux/dmaengine.h>
17
18/**
19 * struct xilinx_vdma_config - VDMA Configuration structure
20 * @frm_dly: Frame delay
21 * @gen_lock: Whether in gen-lock mode
22 * @master: Master that it syncs to
23 * @frm_cnt_en: Enable frame count enable
24 * @park: Whether wants to park
25 * @park_frm: Frame to park on
26 * @coalesc: Interrupt coalescing threshold
27 * @delay: Delay counter
28 * @reset: Reset Channel
29 * @ext_fsync: External Frame Sync source
30 */
31struct xilinx_vdma_config {
32 int frm_dly;
33 int gen_lock;
34 int master;
35 int frm_cnt_en;
36 int park;
37 int park_frm;
38 int coalesc;
39 int delay;
40 int reset;
41 int ext_fsync;
42};
43
Kedareswara rao Appanac0bba3a2016-04-07 10:59:43 +053044/**
45 * enum xdma_ip_type: DMA IP type.
46 *
47 * XDMA_TYPE_AXIDMA: Axi dma ip.
Kedareswara rao Appana07b0e7d2016-04-07 10:59:45 +053048 * XDMA_TYPE_CDMA: Axi cdma ip.
Kedareswara rao Appanac0bba3a2016-04-07 10:59:43 +053049 * XDMA_TYPE_VDMA: Axi vdma ip.
50 *
51 */
52enum xdma_ip_type {
53 XDMA_TYPE_AXIDMA = 0,
Kedareswara rao Appana07b0e7d2016-04-07 10:59:45 +053054 XDMA_TYPE_CDMA,
Kedareswara rao Appanac0bba3a2016-04-07 10:59:43 +053055 XDMA_TYPE_VDMA,
56};
57
Srikanth Thokala9cd43602014-04-23 20:23:26 +053058int xilinx_vdma_channel_set_config(struct dma_chan *dchan,
59 struct xilinx_vdma_config *cfg);
60
61#endif