dma: pl330: Implement the DMA channel PAUSE/RESUME interfaces
authorHuang Chao <chao7.huang@samsung.com>
Tue, 24 Jun 2014 05:01:46 +0000 (13:01 +0800)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:59:55 +0000 (11:59 +0900)
commit3fcbdb162c1081f2641981f54b2938a61e23f456
treeafdf077474b9dd718853a50b337983ed5037b9db
parent2fc5a29f7e7504541807ef18dfbe6a6dbb6dea64
dma: pl330: Implement the DMA channel PAUSE/RESUME interfaces

This patch implements the DMA_PAUSE/DMA_RESUME interfaces in pl330 DMAC
driver, which will call the dma pause/resume operations to set the dma
channel status respectively.

When DMA_PAUSE is called from dma subsystem during audio playback, the
DMAC should halt the transfer execution of the channel thread and wait
for the resume event occurs, which is specified by the event number in
INTEN register. The channel thread is stalled by the DMAWFE instruction.
After that, when DMA_RESUME is called, which means that the resume event
occurs, this patch will signal an interrupt to send the DMASEV instruction
and restart the channel thread, and then the channel thread moves to the
Executing state and the DMAC clears the event.

Change-Id: I5d990f0efb31b7e37673a060fdcbc9002b6ea488
Signed-off-by: Huang Chao <chao7.huang@samsung.com>
drivers/dma/pl330.c