From c811e00692d9c876ff1fadc46941103cd9bc2127 Mon Sep 17 00:00:00 2001 From: Nicolin Chen Date: Fri, 19 Apr 2013 17:18:53 +0800 Subject: [PATCH] ENGR00273673-3 dma: imx-sdma: Add event pending trigger interface Add interface to allow other modules, like ASRC for example, to trigger a dma request manually. Signed-off-by: Nicolin Chen --- drivers/dma/imx-sdma.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 263001bf268a..e9af43c2b7c8 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1146,6 +1146,21 @@ static void sdma_issue_pending(struct dma_chan *chan) sdma_enable_channel(sdma, sdmac->channel); } +void sdma_set_event_pending(struct dma_chan *chan) +{ + struct sdma_channel *sdmac = to_sdma_chan(chan); + struct sdma_engine *sdma = sdmac->sdma; + u32 channel = sdmac->channel; + u32 reg; + + reg = readl_relaxed(sdma->regs + SDMA_H_EVTPEND); + reg |= 1 << channel; + writel_relaxed(reg, sdma->regs + SDMA_H_EVTPEND); + + return; +} +EXPORT_SYMBOL(sdma_set_event_pending); + #define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1 37 static void sdma_add_scripts(struct sdma_engine *sdma, -- 2.39.5