From: Nicolin Chen Date: Fri, 19 Apr 2013 09:18:53 +0000 (+0800) Subject: ENGR00273673-3 dma: imx-sdma: Add event pending trigger interface X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c811e00692d9c876ff1fadc46941103cd9bc2127;p=karo-tx-linux.git 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 --- 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,