0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef _DMA_DW_H
0010 #define _DMA_DW_H
0011
0012 #include <linux/clk.h>
0013 #include <linux/device.h>
0014 #include <linux/dmaengine.h>
0015
0016 #include <linux/platform_data/dma-dw.h>
0017
0018 struct dw_dma;
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030 struct dw_dma_chip {
0031 struct device *dev;
0032 int id;
0033 int irq;
0034 void __iomem *regs;
0035 struct clk *clk;
0036 struct dw_dma *dw;
0037
0038 const struct dw_dma_platform_data *pdata;
0039 };
0040
0041
0042 #if IS_ENABLED(CONFIG_DW_DMAC_CORE)
0043 int dw_dma_probe(struct dw_dma_chip *chip);
0044 int dw_dma_remove(struct dw_dma_chip *chip);
0045 int idma32_dma_probe(struct dw_dma_chip *chip);
0046 int idma32_dma_remove(struct dw_dma_chip *chip);
0047 #else
0048 static inline int dw_dma_probe(struct dw_dma_chip *chip) { return -ENODEV; }
0049 static inline int dw_dma_remove(struct dw_dma_chip *chip) { return 0; }
0050 static inline int idma32_dma_probe(struct dw_dma_chip *chip) { return -ENODEV; }
0051 static inline int idma32_dma_remove(struct dw_dma_chip *chip) { return 0; }
0052 #endif
0053
0054 #endif