linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: joelf@ti.com (Joel Fernandes)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 3/6] ARM: edma: Add function to manually trigger an EDMA channel
Date: Thu, 29 Aug 2013 18:05:42 -0500	[thread overview]
Message-ID: <1377817545-18015-4-git-send-email-joelf@ti.com> (raw)
In-Reply-To: <1377817545-18015-1-git-send-email-joelf@ti.com>

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 <joelf@ti.com>
---
 arch/arm/common/edma.c             | 17 +++++++++++++++++
 include/linux/platform_data/edma.h |  2 ++
 2 files changed, 19 insertions(+)

diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
index 3567ba1..67e8cf5 100644
--- a/arch/arm/common/edma.c
+++ b/arch/arm/common/edma.c
@@ -1236,6 +1236,23 @@ void edma_resume(unsigned channel)
 }
 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
  * @channel: channel being activated
diff --git a/include/linux/platform_data/edma.h b/include/linux/platform_data/edma.h
index 57300fd..179fb91 100644
--- a/include/linux/platform_data/edma.h
+++ b/include/linux/platform_data/edma.h
@@ -180,4 +180,6 @@ struct edma_soc_info {
 	const s16	(*xbar_chans)[2];
 };
 
+int edma_trigger_channel(unsigned);
+
 #endif
-- 
1.8.1.2

  parent reply	other threads:[~2013-08-29 23:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29 23:05 [PATCH v4 0/6] dma: edma: Support scatter-lists of any length Joel Fernandes
2013-08-29 23:05 ` [PATCH v4 1/6] dma: edma: Setup parameters to DMA MAX_NR_SG at a time Joel Fernandes
2013-08-29 23:05 ` [PATCH v4 2/6] dma: edma: Write out and handle MAX_NR_SG at a given time Joel Fernandes
2013-09-03  4:08   ` Vinod Koul
2013-09-03 15:02     ` Joel Fernandes
2013-08-29 23:05 ` Joel Fernandes [this message]
2013-09-02 14:08   ` [PATCH v4 3/6] ARM: edma: Add function to manually trigger an EDMA channel Sekhar Nori
2013-08-29 23:05 ` [PATCH v4 4/6] dma: edma: Find missed events and issue them Joel Fernandes
2013-08-29 23:05 ` [PATCH v4 5/6] dma: edma: Leave linked to Null slot instead of DUMMY slot Joel Fernandes
2013-08-29 23:05 ` [PATCH v4 6/6] dma: edma: Remove limits on number of slots Joel Fernandes
2013-09-02 11:59 ` [PATCH v4 0/6] dma: edma: Support scatter-lists of any length Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1377817545-18015-4-git-send-email-joelf@ti.com \
    --to=joelf@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).