dmaengine: dw: split dma-dw.h to platform and private parts
[cascardo/linux.git] / drivers / dma / dw / internal.h
1 /*
2  * Driver for the Synopsys DesignWare DMA Controller
3  *
4  * Copyright (C) 2013 Intel Corporation
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  */
10
11 #ifndef _DW_DMAC_INTERNAL_H
12 #define _DW_DMAC_INTERNAL_H
13
14 #include <linux/device.h>
15
16 #include <linux/dma/dw.h>
17 #include <linux/platform_data/dma-dw.h>
18
19 #include "regs.h"
20
21 /**
22  * struct dw_dma_chip - representation of DesignWare DMA controller hardware
23  * @dev:                struct device of the DMA controller
24  * @irq:                irq line
25  * @regs:               memory mapped I/O space
26  * @clk:                hclk clock
27  * @dw:                 struct dw_dma that is filed by dw_dma_probe()
28  */
29 struct dw_dma_chip {
30         struct device   *dev;
31         int             irq;
32         void __iomem    *regs;
33         struct clk      *clk;
34         struct dw_dma   *dw;
35 };
36
37 /* Export to the platform drivers */
38 int dw_dma_probe(struct dw_dma_chip *chip, struct dw_dma_platform_data *pdata);
39 int dw_dma_remove(struct dw_dma_chip *chip);
40
41 void dw_dma_shutdown(struct dw_dma_chip *chip);
42
43 #ifdef CONFIG_PM_SLEEP
44
45 int dw_dma_suspend(struct dw_dma_chip *chip);
46 int dw_dma_resume(struct dw_dma_chip *chip);
47
48 #endif /* CONFIG_PM_SLEEP */
49
50 extern bool dw_dma_filter(struct dma_chan *chan, void *param);
51
52 #endif /* _DW_DMAC_INTERNAL_H */