]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00273673-3 dma: imx-sdma: Add event pending trigger interface
authorNicolin Chen <b42378@freescale.com>
Fri, 19 Apr 2013 09:18:53 +0000 (17:18 +0800)
committerJason Liu <r64343@freescale.com>
Wed, 30 Oct 2013 01:54:05 +0000 (09:54 +0800)
Add interface to allow other modules, like ASRC for example,
to trigger a dma request manually.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
drivers/dma/imx-sdma.c

index 263001bf268a6d8c1c5df05ef6913bee41ae61d0..e9af43c2b7c89800e9eafa800470269e64b3ba2d 100644 (file)
@@ -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,