diff options
author | Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> | 2009-08-23 11:56:12 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-08-24 18:05:25 -0400 |
commit | 9f0f4ae570a148c76be6e86c959c8d4ed912fb1f (patch) | |
tree | e80599d11a2f45e7c6bf5ab253fad0dd8b726ea9 | |
parent | e4aa8dd5cadca054a807278b04f67ce8e3b9dc42 (diff) |
ARM: OMAP: DMA: Add support for DMA channel self linking on OMAP1510
Implement DMA channel self linking on OMAP1510 using AUTO_INIT and REPEAT
flags of the DMA CCR register.
Created against linux-2.6.31-rc5.
Tested on Amstrad Delta.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | arch/arm/plat-omap/dma.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index def14ec265b3..da4cc5288db0 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -1125,6 +1125,11 @@ int omap_dma_running(void) | |||
1125 | void omap_dma_link_lch(int lch_head, int lch_queue) | 1125 | void omap_dma_link_lch(int lch_head, int lch_queue) |
1126 | { | 1126 | { |
1127 | if (omap_dma_in_1510_mode()) { | 1127 | if (omap_dma_in_1510_mode()) { |
1128 | if (lch_head == lch_queue) { | ||
1129 | dma_write(dma_read(CCR(lch_head)) | (3 << 8), | ||
1130 | CCR(lch_head)); | ||
1131 | return; | ||
1132 | } | ||
1128 | printk(KERN_ERR "DMA linking is not supported in 1510 mode\n"); | 1133 | printk(KERN_ERR "DMA linking is not supported in 1510 mode\n"); |
1129 | BUG(); | 1134 | BUG(); |
1130 | return; | 1135 | return; |
@@ -1147,6 +1152,11 @@ EXPORT_SYMBOL(omap_dma_link_lch); | |||
1147 | void omap_dma_unlink_lch(int lch_head, int lch_queue) | 1152 | void omap_dma_unlink_lch(int lch_head, int lch_queue) |
1148 | { | 1153 | { |
1149 | if (omap_dma_in_1510_mode()) { | 1154 | if (omap_dma_in_1510_mode()) { |
1155 | if (lch_head == lch_queue) { | ||
1156 | dma_write(dma_read(CCR(lch_head)) & ~(3 << 8), | ||
1157 | CCR(lch_head)); | ||
1158 | return; | ||
1159 | } | ||
1150 | printk(KERN_ERR "DMA linking is not supported in 1510 mode\n"); | 1160 | printk(KERN_ERR "DMA linking is not supported in 1510 mode\n"); |
1151 | BUG(); | 1161 | BUG(); |
1152 | return; | 1162 | return; |