diff options
| author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2014-09-23 10:18:11 -0400 |
|---|---|---|
| committer | Vinod Koul <vinod.koul@intel.com> | 2014-10-15 11:01:04 -0400 |
| commit | 3d588f83e4d6a5230d9094b97d38621cbaa9a972 (patch) | |
| tree | 376a10e65eef40977b14439e212d9b8a49c732e9 | |
| parent | 46e8c83c83c06b90ebc000df481c2fdcee79a141 (diff) | |
dmaengine: dw: split dma-dw.h to platform and private parts
The introduced include/linux/dma/dw.h is going to contain the private
extensions and structures which are shared for dw_dmac users in the kernel.
Meanwhile include/linux/platform_data/dma-dw.h keeps only platform related data
types and definitions.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
| -rw-r--r-- | drivers/dma/dw/internal.h | 2 | ||||
| -rw-r--r-- | include/linux/dma/dw.h | 37 | ||||
| -rw-r--r-- | include/linux/platform_data/dma-dw.h | 27 | ||||
| -rw-r--r-- | sound/atmel/abdac.c | 4 | ||||
| -rw-r--r-- | sound/atmel/ac97c.c | 1 |
5 files changed, 47 insertions, 24 deletions
diff --git a/drivers/dma/dw/internal.h b/drivers/dma/dw/internal.h index 82258a167a0e..9a886e3c31d3 100644 --- a/drivers/dma/dw/internal.h +++ b/drivers/dma/dw/internal.h | |||
| @@ -12,6 +12,8 @@ | |||
| 12 | #define _DW_DMAC_INTERNAL_H | 12 | #define _DW_DMAC_INTERNAL_H |
| 13 | 13 | ||
| 14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
| 15 | |||
| 16 | #include <linux/dma/dw.h> | ||
| 15 | #include <linux/platform_data/dma-dw.h> | 17 | #include <linux/platform_data/dma-dw.h> |
| 16 | 18 | ||
| 17 | #include "regs.h" | 19 | #include "regs.h" |
diff --git a/include/linux/dma/dw.h b/include/linux/dma/dw.h new file mode 100644 index 000000000000..24756130eadb --- /dev/null +++ b/include/linux/dma/dw.h | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | /* | ||
| 2 | * Driver for the Synopsys DesignWare DMA Controller | ||
| 3 | * | ||
| 4 | * Copyright (C) 2007 Atmel Corporation | ||
| 5 | * Copyright (C) 2010-2011 ST Microelectronics | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | #ifndef _DMA_DW_H | ||
| 12 | #define _DMA_DW_H | ||
| 13 | |||
| 14 | #include <linux/dmaengine.h> | ||
| 15 | |||
| 16 | /* DMA API extensions */ | ||
| 17 | struct dw_desc; | ||
| 18 | |||
| 19 | struct dw_cyclic_desc { | ||
| 20 | struct dw_desc **desc; | ||
| 21 | unsigned long periods; | ||
| 22 | void (*period_callback)(void *param); | ||
| 23 | void *period_callback_param; | ||
| 24 | }; | ||
| 25 | |||
| 26 | struct dw_cyclic_desc *dw_dma_cyclic_prep(struct dma_chan *chan, | ||
| 27 | dma_addr_t buf_addr, size_t buf_len, size_t period_len, | ||
| 28 | enum dma_transfer_direction direction); | ||
| 29 | void dw_dma_cyclic_free(struct dma_chan *chan); | ||
| 30 | int dw_dma_cyclic_start(struct dma_chan *chan); | ||
| 31 | void dw_dma_cyclic_stop(struct dma_chan *chan); | ||
| 32 | |||
| 33 | dma_addr_t dw_dma_get_src_addr(struct dma_chan *chan); | ||
| 34 | |||
| 35 | dma_addr_t dw_dma_get_dst_addr(struct dma_chan *chan); | ||
| 36 | |||
| 37 | #endif /* _DMA_DW_H */ | ||
diff --git a/include/linux/platform_data/dma-dw.h b/include/linux/platform_data/dma-dw.h index d0c97da66e22..d8155c005242 100644 --- a/include/linux/platform_data/dma-dw.h +++ b/include/linux/platform_data/dma-dw.h | |||
| @@ -8,10 +8,10 @@ | |||
| 8 | * it under the terms of the GNU General Public License version 2 as | 8 | * it under the terms of the GNU General Public License version 2 as |
| 9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
| 10 | */ | 10 | */ |
| 11 | #ifndef DW_DMAC_H | 11 | #ifndef _PLATFORM_DATA_DMA_DW_H |
| 12 | #define DW_DMAC_H | 12 | #define _PLATFORM_DATA_DMA_DW_H |
| 13 | 13 | ||
| 14 | #include <linux/dmaengine.h> | 14 | #include <linux/device.h> |
| 15 | 15 | ||
| 16 | /** | 16 | /** |
| 17 | * struct dw_dma_slave - Controller-specific information about a slave | 17 | * struct dw_dma_slave - Controller-specific information about a slave |
| @@ -56,23 +56,4 @@ struct dw_dma_platform_data { | |||
| 56 | unsigned char data_width[4]; | 56 | unsigned char data_width[4]; |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | /* DMA API extensions */ | 59 | #endif /* _PLATFORM_DATA_DMA_DW_H */ |
| 60 | struct dw_cyclic_desc { | ||
| 61 | struct dw_desc **desc; | ||
| 62 | unsigned long periods; | ||
| 63 | void (*period_callback)(void *param); | ||
| 64 | void *period_callback_param; | ||
| 65 | }; | ||
| 66 | |||
| 67 | struct dw_cyclic_desc *dw_dma_cyclic_prep(struct dma_chan *chan, | ||
| 68 | dma_addr_t buf_addr, size_t buf_len, size_t period_len, | ||
| 69 | enum dma_transfer_direction direction); | ||
| 70 | void dw_dma_cyclic_free(struct dma_chan *chan); | ||
| 71 | int dw_dma_cyclic_start(struct dma_chan *chan); | ||
| 72 | void dw_dma_cyclic_stop(struct dma_chan *chan); | ||
| 73 | |||
| 74 | dma_addr_t dw_dma_get_src_addr(struct dma_chan *chan); | ||
| 75 | |||
| 76 | dma_addr_t dw_dma_get_dst_addr(struct dma_chan *chan); | ||
| 77 | |||
| 78 | #endif /* DW_DMAC_H */ | ||
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c index 154a7c44e38d..31061e3521d4 100644 --- a/sound/atmel/abdac.c +++ b/sound/atmel/abdac.c | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | */ | 9 | */ |
| 10 | #include <linux/clk.h> | 10 | #include <linux/clk.h> |
| 11 | #include <linux/bitmap.h> | 11 | #include <linux/bitmap.h> |
| 12 | #include <linux/platform_data/dma-dw.h> | ||
| 13 | #include <linux/dmaengine.h> | 12 | #include <linux/dmaengine.h> |
| 14 | #include <linux/dma-mapping.h> | 13 | #include <linux/dma-mapping.h> |
| 15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
| @@ -25,6 +24,9 @@ | |||
| 25 | #include <sound/pcm_params.h> | 24 | #include <sound/pcm_params.h> |
| 26 | #include <sound/atmel-abdac.h> | 25 | #include <sound/atmel-abdac.h> |
| 27 | 26 | ||
| 27 | #include <linux/platform_data/dma-dw.h> | ||
| 28 | #include <linux/dma/dw.h> | ||
| 29 | |||
| 28 | /* DAC register offsets */ | 30 | /* DAC register offsets */ |
| 29 | #define DAC_DATA 0x0000 | 31 | #define DAC_DATA 0x0000 |
| 30 | #define DAC_CTRL 0x0008 | 32 | #define DAC_CTRL 0x0008 |
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index 1dfb35afef8f..b59427d5a697 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #include <sound/memalloc.h> | 32 | #include <sound/memalloc.h> |
| 33 | 33 | ||
| 34 | #include <linux/platform_data/dma-dw.h> | 34 | #include <linux/platform_data/dma-dw.h> |
| 35 | #include <linux/dma/dw.h> | ||
| 35 | 36 | ||
| 36 | #include <mach/cpu.h> | 37 | #include <mach/cpu.h> |
| 37 | 38 | ||
