summaryrefslogtreecommitdiffstats
path: root/arch/arm/common
diff options
context:
space:
mode:
authorJoel Fernandes <joelf@ti.com>2013-08-29 18:05:42 -0500
committerVinod Koul <vinod.koul@intel.com>2013-09-04 18:38:46 +0530
commit96874b9a241c543e2f32d7bd7100af4416522cfb (patch)
tree7980dd7cbba2c8ce6fbe729bb4a6afedade3e97c /arch/arm/common
parent534070622d2c7fbc5cc929aa93541ccd0ae52ab1 (diff)
downloadop-kernel-dev-96874b9a241c543e2f32d7bd7100af4416522cfb.zip
op-kernel-dev-96874b9a241c543e2f32d7bd7100af4416522cfb.tar.gz
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@ti.com> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'arch/arm/common')
-rw-r--r--arch/arm/common/edma.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
index 39ad030..117f955 100644
--- a/arch/arm/common/edma.c
+++ b/arch/arm/common/edma.c
@@ -1235,6 +1235,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
OpenPOWER on IntegriCloud