summaryrefslogtreecommitdiffstats
path: root/drivers/dma/fsldma.h
diff options
context:
space:
mode:
authorHongbo Zhang <hongbo.zhang@freescale.com>2014-05-21 10:03:02 +0200
committerVinod Koul <vinod.koul@intel.com>2014-07-14 18:02:18 +0200
commit14c6a3333c8e885604fc98768d8b9a32e08110ac (patch)
tree5dae60ced4af6ade4439b656730d05e09c8ae393 /drivers/dma/fsldma.h
parentdmaengine: Freescale: use spin_lock_bh instead of spin_lock_irqsave (diff)
downloadlinux-14c6a3333c8e885604fc98768d8b9a32e08110ac.tar.xz
linux-14c6a3333c8e885604fc98768d8b9a32e08110ac.zip
dmaengine: Freescale: add suspend resume functions for DMA driver
This patch adds suspend and resume functions for Freescale DMA driver. Signed-off-by: Hongbo Zhang <hongbo.zhang@freescale.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/fsldma.h')
-rw-r--r--drivers/dma/fsldma.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/dma/fsldma.h b/drivers/dma/fsldma.h
index d56e83599825..f2e0c4dcf901 100644
--- a/drivers/dma/fsldma.h
+++ b/drivers/dma/fsldma.h
@@ -134,6 +134,17 @@ struct fsldma_device {
#define FSL_DMA_CHAN_PAUSE_EXT 0x00001000
#define FSL_DMA_CHAN_START_EXT 0x00002000
+#ifdef CONFIG_PM
+struct fsldma_chan_regs_save {
+ u32 mr;
+};
+
+enum fsldma_pm_state {
+ RUNNING = 0,
+ SUSPENDED,
+};
+#endif
+
struct fsldma_chan {
char name[8]; /* Channel name */
struct fsldma_chan_regs __iomem *regs;
@@ -148,6 +159,10 @@ struct fsldma_chan {
struct tasklet_struct tasklet;
u32 feature;
bool idle; /* DMA controller is idle */
+#ifdef CONFIG_PM
+ struct fsldma_chan_regs_save regs_save;
+ enum fsldma_pm_state pm_state;
+#endif
void (*toggle_ext_pause)(struct fsldma_chan *fsl_chan, int enable);
void (*toggle_ext_start)(struct fsldma_chan *fsl_chan, int enable);