diff options
Diffstat (limited to 'arch/arm/plat-omap/dma.c')
-rw-r--r-- | arch/arm/plat-omap/dma.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index c76ed8bff838..49803cc18787 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -36,9 +36,10 @@ | |||
36 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
37 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
38 | 38 | ||
39 | #include <plat/cpu.h> | 39 | #include <plat-omap/dma-omap.h> |
40 | #include <plat/dma.h> | 40 | |
41 | #include <plat/tc.h> | 41 | #include "../mach-omap1/soc.h" |
42 | #include "../mach-omap2/soc.h" | ||
42 | 43 | ||
43 | /* | 44 | /* |
44 | * MAX_LOGICAL_DMA_CH_COUNT: the maximum number of logical DMA | 45 | * MAX_LOGICAL_DMA_CH_COUNT: the maximum number of logical DMA |
@@ -175,6 +176,7 @@ static inline void set_gdma_dev(int req, int dev) | |||
175 | #define omap_writel(val, reg) do {} while (0) | 176 | #define omap_writel(val, reg) do {} while (0) |
176 | #endif | 177 | #endif |
177 | 178 | ||
179 | #ifdef CONFIG_ARCH_OMAP1 | ||
178 | void omap_set_dma_priority(int lch, int dst_port, int priority) | 180 | void omap_set_dma_priority(int lch, int dst_port, int priority) |
179 | { | 181 | { |
180 | unsigned long reg; | 182 | unsigned long reg; |
@@ -203,18 +205,22 @@ void omap_set_dma_priority(int lch, int dst_port, int priority) | |||
203 | l |= (priority & 0xf) << 8; | 205 | l |= (priority & 0xf) << 8; |
204 | omap_writel(l, reg); | 206 | omap_writel(l, reg); |
205 | } | 207 | } |
208 | } | ||
209 | #endif | ||
206 | 210 | ||
207 | if (cpu_class_is_omap2()) { | 211 | #ifdef CONFIG_ARCH_OMAP2PLUS |
208 | u32 ccr; | 212 | void omap_set_dma_priority(int lch, int dst_port, int priority) |
213 | { | ||
214 | u32 ccr; | ||
209 | 215 | ||
210 | ccr = p->dma_read(CCR, lch); | 216 | ccr = p->dma_read(CCR, lch); |
211 | if (priority) | 217 | if (priority) |
212 | ccr |= (1 << 6); | 218 | ccr |= (1 << 6); |
213 | else | 219 | else |
214 | ccr &= ~(1 << 6); | 220 | ccr &= ~(1 << 6); |
215 | p->dma_write(ccr, CCR, lch); | 221 | p->dma_write(ccr, CCR, lch); |
216 | } | ||
217 | } | 222 | } |
223 | #endif | ||
218 | EXPORT_SYMBOL(omap_set_dma_priority); | 224 | EXPORT_SYMBOL(omap_set_dma_priority); |
219 | 225 | ||
220 | void omap_set_dma_transfer_params(int lch, int data_type, int elem_count, | 226 | void omap_set_dma_transfer_params(int lch, int data_type, int elem_count, |