diff options
author | Joel Fernandes <joelf@ti.com> | 2013-08-29 18:05:42 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-09-04 18:38:46 +0530 |
commit | 96874b9a241c543e2f32d7bd7100af4416522cfb (patch) | |
tree | 7980dd7cbba2c8ce6fbe729bb4a6afedade3e97c | |
parent | 534070622d2c7fbc5cc929aa93541ccd0ae52ab1 (diff) | |
download | linux-96874b9a241c543e2f32d7bd7100af4416522cfb.tar.gz linux-96874b9a241c543e2f32d7bd7100af4416522cfb.tar.bz2 linux-96874b9a241c543e2f32d7bd7100af4416522cfb.zip |
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>
-rw-r--r-- | arch/arm/common/edma.c | 17 | ||||
-rw-r--r-- | include/linux/platform_data/edma.h | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index 39ad030ac0c7..117f955a2a06 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 diff --git a/include/linux/platform_data/edma.h b/include/linux/platform_data/edma.h index 57300fd7cc03..179fb91bb5f2 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 |