diff options
author | Nicolin Chen <b42378@freescale.com> | 2013-04-19 17:18:53 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 08:00:51 -0500 |
commit | 2834b2638cebb008bb68104ea35690dbcc9b147e (patch) | |
tree | 94caad5a994f8309a7a5b883a3de1ee88b510bb3 /drivers/dma | |
parent | d597be0a1e03d5659c66e71b1f6ffd2d8c03460b (diff) |
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 <b42378@freescale.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/imx-sdma.c | 15 |
1 files changed, 15 insertions, 0 deletions
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, |