提交 9f0f4ae5 编写于 作者: J Janusz Krzysztofik 提交者: Mark Brown

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: NJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: NTony Lindgren <tony@atomide.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 e4aa8dd5
...@@ -1125,6 +1125,11 @@ int omap_dma_running(void) ...@@ -1125,6 +1125,11 @@ int omap_dma_running(void)
void omap_dma_link_lch(int lch_head, int lch_queue) void omap_dma_link_lch(int lch_head, int lch_queue)
{ {
if (omap_dma_in_1510_mode()) { if (omap_dma_in_1510_mode()) {
if (lch_head == lch_queue) {
dma_write(dma_read(CCR(lch_head)) | (3 << 8),
CCR(lch_head));
return;
}
printk(KERN_ERR "DMA linking is not supported in 1510 mode\n"); printk(KERN_ERR "DMA linking is not supported in 1510 mode\n");
BUG(); BUG();
return; return;
...@@ -1147,6 +1152,11 @@ EXPORT_SYMBOL(omap_dma_link_lch); ...@@ -1147,6 +1152,11 @@ EXPORT_SYMBOL(omap_dma_link_lch);
void omap_dma_unlink_lch(int lch_head, int lch_queue) void omap_dma_unlink_lch(int lch_head, int lch_queue)
{ {
if (omap_dma_in_1510_mode()) { if (omap_dma_in_1510_mode()) {
if (lch_head == lch_queue) {
dma_write(dma_read(CCR(lch_head)) & ~(3 << 8),
CCR(lch_head));
return;
}
printk(KERN_ERR "DMA linking is not supported in 1510 mode\n"); printk(KERN_ERR "DMA linking is not supported in 1510 mode\n");
BUG(); BUG();
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册