[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1374389896-32584-1-git-send-email-joelf@ti.com>
Date: Sun, 21 Jul 2013 01:58:16 -0500
From: Joel Fernandes <joelf@...com>
To: Tony Lindgren <tony@...mide.com>, Sekhar Nori <nsekhar@...com>,
Santosh Shilimkar <santosh.shilimkar@...com>,
Sricharan R <r.sricharan@...com>,
Rajendra Nayak <rnayak@...com>,
Lokesh Vutla <lokeshvutla@...com>,
Matt Porter <matt@...orter.com>,
Grant Likely <grant.likely@...retlab.ca>,
Rob Herring <rob.herring@...xeda.com>,
Vinod Koul <vinod.koul@...el.com>, Dan Williams <djbw@...com>,
Mark Brown <broonie@...aro.org>,
Benoit Cousson <benoit.cousson@...aro.org>,
Russell King <linux@....linux.org.uk>,
Arnd Bergmann <arnd@...db.de>, Balaji TK <balajitk@...com>,
Gururaja Hebbar <gururaja.hebbar@...com>,
Chris Ball <cjb@...top.org>,
Jason Kridner <jkridner@...gleboard.org>
CC: Linux OMAP List <linux-omap@...r.kernel.org>,
Linux ARM Kernel List <linux-arm-kernel@...ts.infradead.org>,
Linux DaVinci Kernel List
<davinci-linux-open-source@...ux.davincidsp.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux MMC List <linux-mmc@...r.kernel.org>,
Joel Fernandes <joelf@...com>
Subject: [RFC 3/5] 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: Joel Fernandes <joelf@...com>
---
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..205f5da 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)
+{
+ 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 */
+ edma_shadow0_write_array(ctlr, SH_ESR, j, mask);
+
+ pr_debug("EDMA: ESR%d %08x\n", j,
+ edma_shadow0_read_array(ctlr, SH_ESR, j));
+ return 0;
+}
+EXPORT_SYMBOL(edma_manual_trigger);
+
/**
* 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..0e11eca 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_manual_trigger(unsigned);
+
#endif
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists