]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: img-mdc: Add suspend / resume handling
authorEd Blake <ed.blake@sondrel.com>
Mon, 9 Oct 2017 14:40:26 +0000 (15:40 +0100)
committerVinod Koul <vinod.koul@intel.com>
Mon, 16 Oct 2017 06:45:30 +0000 (12:15 +0530)
commite8a7fb74dafcdecd52f5ec7aa48e7da45e02fbdb
tree0c3a0267897e3136dc5e25d314996050ddf39b96
parent2018862bdad13479b663e0e9615d7c6fcaa89285
dmaengine: img-mdc: Add suspend / resume handling

Add suspend / resume handling using suspend_late and resume_early, and
check that all channels are idle before suspending.

DMA drivers should use suspend_late / resume_early to ensure that all
DMA client devices are suspended before the DMA device itself, and that
client devices are resumed after the DMA device. This avoids suspending
the DMA device while transactions are still active.

It is the responsibility of client drivers to terminate all DMA
transactions in their suspend handlers, so there should be no active
transactions by the time suspend_late is called.

There's no need to save and restore registers for MDC during suspend /
resume, as all transactions will be terminated as a result of the
suspend, and all required registers are programmed anyway at the start
of any new transactions following resume.

Signed-off-by: Ed Blake <ed.blake@sondrel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/img-mdc-dma.c