When SDMA is use for periphal data transfer, dma request is trigger by
FIFO level. If the SDMA is started after the start of periphal, SDMA
would miss the first pulse and be not able to trigger itself.
In this patch, add interface to trigger a dma request manully.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
*/
}
+void sdma_set_event_pending(struct dma_chan *chan)
+{
+ struct sdma_channel *sdmac = to_sdma_chan(chan);
+ struct sdma_engine *sdma = sdmac->sdma;
+ u32 reg;
+ u32 channel;
+
+ channel = sdmac->channel;
+ 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 38
static void sdma_add_scripts(struct sdma_engine *sdma,