Thread (30 messages) 30 messages, 2 authors, 2013-08-02

[PATCH 3/9] ARM: edma: Add function to manually trigger an EDMA channel

From: Sekhar Nori <hidden>
Date: 2013-07-30 05:19:14
Also in: linux-mmc, linux-omap, lkml

On Monday 29 July 2013 06:59 PM, Joel Fernandes wrote:
quoted hunk ↗ jump to hunk
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: Joel Fernandes <redacted>
---
 arch/arm/common/edma.c             |   21 +++++++++++++++++++++
 include/linux/platform_data/edma.h |    2 ++
 2 files changed, 23 insertions(+)
diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
index 3567ba1..10995b2 100644
--- a/arch/arm/common/edma.c
+++ b/arch/arm/common/edma.c
@@ -1236,6 +1236,27 @@ void edma_resume(unsigned channel)
 }
 EXPORT_SYMBOL(edma_resume);
 
+int edma_manual_trigger(unsigned channel)
edma_trigger_channel() maybe? Brings consistency with
edma_alloc_channel() edma_free_channel() etc.
+{
+	unsigned ctlr;
+	int j;
+	unsigned int mask;
+
+	ctlr = EDMA_CTLR(channel);
+	channel = EDMA_CHAN_SLOT(channel);
+	mask = BIT(channel & 0x1f);
+
+	j = channel >> 5;
+
+	/* EDMA channels without event association */
May be actually check for no-event association before you trigger in
software? You can do that by looking at unused channel list, no?
+	edma_shadow0_write_array(ctlr, SH_ESR, j, mask);
edma_shadow0_write_array(ctlr, SH_ESR, channel >> 5, mask) is no less
readable, but I leave it to you.

Thanks,
Sekhar
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help