This source file includes following definitions.
- puv3_stop_dma
- puv3_resume_dma
1
2
3
4
5
6
7
8
9 #ifndef __MACH_PUV3_DMA_H__
10 #define __MACH_PUV3_DMA_H__
11
12
13
14
15 #define MAX_DMA_CHANNELS 6
16
17 typedef enum {
18 DMA_PRIO_HIGH = 0,
19 DMA_PRIO_MEDIUM = 1,
20 DMA_PRIO_LOW = 2
21 } puv3_dma_prio;
22
23
24
25
26
27 extern int puv3_request_dma(char *name,
28 puv3_dma_prio prio,
29 void (*irq_handler)(int, void *),
30 void (*err_handler)(int, void *),
31 void *data);
32
33 extern void puv3_free_dma(int dma_ch);
34
35 static inline void puv3_stop_dma(int ch)
36 {
37 writel(readl(DMAC_CONFIG(ch)) & ~DMAC_CONFIG_EN, DMAC_CONFIG(ch));
38 }
39
40 static inline void puv3_resume_dma(int ch)
41 {
42 writel(readl(DMAC_CONFIG(ch)) | DMAC_CONFIG_EN, DMAC_CONFIG(ch));
43 }
44
45 #endif