From: joelf@ti.com (Joel Fernandes)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 05/12] ARM: edma: Add function to enable interrupt for a PaRAM slot
Date: Mon, 5 Aug 2013 11:14:50 -0500 [thread overview]
Message-ID: <1375719297-12871-6-git-send-email-joelf@ti.com> (raw)
In-Reply-To: <1375719297-12871-1-git-send-email-joelf@ti.com>
To prevent common programming errors, add a function to enable
interrupts correctly. Also keeps calling code more readable.
Signed-off-by: Joel Fernandes <joelf@ti.com>
---
arch/arm/common/edma.c | 15 +++++++++++++++
include/linux/platform_data/edma.h | 1 +
2 files changed, 16 insertions(+)
diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
index 6433b6c..aa43c49 100644
--- a/arch/arm/common/edma.c
+++ b/arch/arm/common/edma.c
@@ -1095,6 +1095,21 @@ void edma_set_transfer_params(unsigned slot,
EXPORT_SYMBOL(edma_set_transfer_params);
/**
+ * edma_enable_interrupt - enable interrupt on parameter RAM slot
+ * @slot: parameter RAM slot which is the link target
+ *
+ * The originating slot should not be part of any active DMA transfer.
+ */
+void edma_enable_interrupt(unsigned slot)
+{
+ pr_debug("Enabling interrupt on slot %d\n", slot);
+
+ edma_parm_modify(EDMA_CTLR(slot), PARM_OPT, EDMA_CHAN_SLOT(slot),
+ ~TCINTEN, TCINTEN);
+}
+EXPORT_SYMBOL(edma_enable_interrupt);
+
+/**
* edma_link - link one parameter RAM slot to another
* @from: parameter RAM slot originating the link
* @to: parameter RAM slot which is the link target
diff --git a/include/linux/platform_data/edma.h b/include/linux/platform_data/edma.h
index 57300fd..184ff5f 100644
--- a/include/linux/platform_data/edma.h
+++ b/include/linux/platform_data/edma.h
@@ -136,6 +136,7 @@ void edma_set_dest_index(unsigned slot, s16 dest_bidx, s16 dest_cidx);
void edma_set_transfer_params(unsigned slot, u16 acnt, u16 bcnt, u16 ccnt,
u16 bcnt_rld, enum sync_dimension sync_mode);
void edma_link(unsigned from, unsigned to);
+void edma_enable_interrupt(unsigned slot);
void edma_unlink(unsigned from);
/* calls that operate on an entire parameter RAM slot */
--
1.7.9.5
next prev parent reply other threads:[~2013-08-05 16:14 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 16:14 [PATCH v3 00/12] edma: Add support for SG lists of any length Joel Fernandes
2013-08-05 16:14 ` [PATCH v3 01/12] dma: edma: Setup parameters to DMA MAX_NR_SG at a time Joel Fernandes
2013-08-12 7:15 ` Sekhar Nori
2013-08-12 23:55 ` Joel Fernandes
2013-08-13 0:19 ` Joel Fernandes
2013-08-13 0:05 ` Joel Fernandes
2013-08-05 16:14 ` [PATCH v3 02/12] ARM: edma: Don't clear EMR of channel in edma_stop Joel Fernandes
2013-08-08 11:49 ` Sekhar Nori
2013-08-12 4:25 ` Sekhar Nori
2013-08-12 4:29 ` Joel Fernandes
2013-08-12 6:24 ` Sekhar Nori
2013-08-05 16:14 ` [PATCH v3 03/12] dma: edma: remove limits on number of slots Joel Fernandes
2013-08-12 7:17 ` Sekhar Nori
2013-08-05 16:14 ` [PATCH v3 04/12] dma: edma: Write out and handle MAX_NR_SG at a given time Joel Fernandes
2013-08-05 16:14 ` Joel Fernandes [this message]
2013-08-05 16:14 ` [PATCH v3 06/12] ARM: edma: Add pr_debug in edma_link Joel Fernandes
2013-08-05 16:14 ` [PATCH v3 07/12] dma: edma: Add function to dump a PaRAM set from PaRAM Joel Fernandes
2013-08-12 5:52 ` Sekhar Nori
2013-08-13 1:06 ` Joel Fernandes
2013-08-05 16:14 ` [PATCH v3 08/12] dma: edma: Add one more required slot to MAX slots Joel Fernandes
2013-08-12 5:56 ` Sekhar Nori
2013-08-12 13:31 ` Mark Brown
2013-08-12 18:19 ` Joel Fernandes
2013-08-13 1:08 ` Joel Fernandes
2013-08-05 16:14 ` [PATCH v3 09/12] dma: edma: Implement multiple linked sets for continuity Joel Fernandes
2013-08-12 18:56 ` Sekhar Nori
2013-08-13 1:00 ` Joel Fernandes
2013-08-05 16:14 ` [PATCH v3 10/12] dma: edma: Check if MAX_NR_SG is even in prep function Joel Fernandes
2013-08-05 16:14 ` [PATCH v3 11/12] dma: edma: Keep tracking of Pending interrupts (pending_acks) Joel Fernandes
2013-08-05 16:14 ` [PATCH v3 12/12] dma: edma: Return if nothing left todo in edma_execute Joel Fernandes
2013-08-16 5:57 ` [PATCH v3 00/12] edma: Add support for SG lists of any length Joel Fernandes
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=1375719297-12871-6-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).