diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2011-08-18 16:55:27 +0200 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2011-09-28 10:07:40 +0530 |
commit | 7a1cd9ad87979744e1510782b25c38feb9602739 (patch) | |
tree | 93dd2e114d474096fd654707d61a9e0f96a52a6b /drivers/dma/shdma.h | |
parent | b4dae6e1adaedc9c343b5f00332312d649600bdc (diff) | |
download | op-kernel-dev-7a1cd9ad87979744e1510782b25c38feb9602739.zip op-kernel-dev-7a1cd9ad87979744e1510782b25c38feb9602739.tar.gz |
dma: shdma: transfer based runtime PM
Currently the shdma dmaengine driver uses runtime PM to save power, when
no channel on the specific controller is requested by a user. This patch
switches the driver to count individual DMA transfers. That way the
controller can be powered down between transfers, even if some of its
channels are in use.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma/shdma.h')
-rw-r--r-- | drivers/dma/shdma.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/dma/shdma.h b/drivers/dma/shdma.h index dc56576..2b55a27 100644 --- a/drivers/dma/shdma.h +++ b/drivers/dma/shdma.h @@ -23,6 +23,12 @@ struct device; +enum dmae_pm_state { + DMAE_PM_ESTABLISHED, + DMAE_PM_BUSY, + DMAE_PM_PENDING, +}; + struct sh_dmae_chan { dma_cookie_t completed_cookie; /* The maximum cookie completed */ spinlock_t desc_lock; /* Descriptor operation lock */ @@ -38,6 +44,7 @@ struct sh_dmae_chan { u32 __iomem *base; char dev_id[16]; /* unique name per DMAC of channel */ int pm_error; + enum dmae_pm_state pm_state; }; struct sh_dmae_device { |