提交 96874b9a 编写于 作者: J Joel Fernandes 提交者: Vinod Koul

ARM: edma: Add function to manually trigger an EDMA channel

Manual trigger for events missed as a result of splitting a
scatter gather list and DMA'ing it in batches. Add a helper
function to trigger a channel incase any such events are missed.
Signed-off-by: NJoel Fernandes <joelf@ti.com>
Acked-by: NSekhar Nori <nsekhar@ti.com>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 53407062
...@@ -1235,6 +1235,23 @@ void edma_resume(unsigned channel) ...@@ -1235,6 +1235,23 @@ void edma_resume(unsigned channel)
} }
EXPORT_SYMBOL(edma_resume); EXPORT_SYMBOL(edma_resume);
int edma_trigger_channel(unsigned channel)
{
unsigned ctlr;
unsigned int mask;
ctlr = EDMA_CTLR(channel);
channel = EDMA_CHAN_SLOT(channel);
mask = BIT(channel & 0x1f);
edma_shadow0_write_array(ctlr, SH_ESR, (channel >> 5), mask);
pr_debug("EDMA: ESR%d %08x\n", (channel >> 5),
edma_shadow0_read_array(ctlr, SH_ESR, (channel >> 5)));
return 0;
}
EXPORT_SYMBOL(edma_trigger_channel);
/** /**
* edma_start - start dma on a channel * edma_start - start dma on a channel
* @channel: channel being activated * @channel: channel being activated
......
...@@ -180,4 +180,6 @@ struct edma_soc_info { ...@@ -180,4 +180,6 @@ struct edma_soc_info {
const s16 (*xbar_chans)[2]; const s16 (*xbar_chans)[2];
}; };
int edma_trigger_channel(unsigned);
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册