1
2
3
4
5
6
7
8
9#ifndef __ASM_ARCH_MXC_DMA_H__
10#define __ASM_ARCH_MXC_DMA_H__
11
12#include <linux/scatterlist.h>
13#include <linux/device.h>
14#include <linux/dmaengine.h>
15
16
17
18
19enum sdma_peripheral_type {
20 IMX_DMATYPE_SSI,
21 IMX_DMATYPE_SSI_SP,
22 IMX_DMATYPE_MMC,
23 IMX_DMATYPE_SDHC,
24 IMX_DMATYPE_UART,
25 IMX_DMATYPE_UART_SP,
26 IMX_DMATYPE_FIRI,
27 IMX_DMATYPE_CSPI,
28 IMX_DMATYPE_CSPI_SP,
29 IMX_DMATYPE_SIM,
30 IMX_DMATYPE_ATA,
31 IMX_DMATYPE_CCM,
32 IMX_DMATYPE_EXT,
33 IMX_DMATYPE_MSHC,
34 IMX_DMATYPE_MSHC_SP,
35 IMX_DMATYPE_DSP,
36 IMX_DMATYPE_MEMORY,
37 IMX_DMATYPE_FIFO_MEMORY,
38 IMX_DMATYPE_SPDIF,
39 IMX_DMATYPE_IPU_MEMORY,
40 IMX_DMATYPE_ASRC,
41 IMX_DMATYPE_ESAI,
42 IMX_DMATYPE_SSI_DUAL,
43 IMX_DMATYPE_ASRC_SP,
44 IMX_DMATYPE_SAI,
45};
46
47enum imx_dma_prio {
48 DMA_PRIO_HIGH = 0,
49 DMA_PRIO_MEDIUM = 1,
50 DMA_PRIO_LOW = 2
51};
52
53struct imx_dma_data {
54 int dma_request;
55 int dma_request2;
56 enum sdma_peripheral_type peripheral_type;
57 int priority;
58};
59
60static inline int imx_dma_is_ipu(struct dma_chan *chan)
61{
62 return !strcmp(dev_name(chan->device->dev), "ipu-core");
63}
64
65static inline int imx_dma_is_general_purpose(struct dma_chan *chan)
66{
67 return !strcmp(chan->device->dev->driver->name, "imx-sdma") ||
68 !strcmp(chan->device->dev->driver->name, "imx-dma");
69}
70
71#endif
72