diff options
author | Viresh Kumar <viresh.kumar@st.com> | 2012-02-01 05:42:18 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2012-02-22 07:45:36 -0500 |
commit | dcc043dc0c60046cf6b75ca04a462314cf64e2ba (patch) | |
tree | 8d670aa8a2f3a5293fc202971d2c9006bf43156b | |
parent | 7414a1b8b2b99093d6a271a1220557e87dc1ae94 (diff) |
dmaengine: Add flow controller information to dma_slave_config
Flow controller is programmable for few controllers and there are few
intelligent peripherals like, Synopsys JPEG controller, that needs to be a flow
controller of DMA transfers on dest side.
For this, currently two drivers, pl08x and dw_dmac, support flow controller to
be passed from platform to these drivers.
Perhaps, this should be a part of struct dma_slave_config. This patch adds
another field device_fc to this structure. User drivers must pass this as true
if they want to be flow controller of certain transfers.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
-rw-r--r-- | include/linux/dmaengine.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 679b349d9b66..7e640bf27d2d 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/uio.h> | 25 | #include <linux/uio.h> |
26 | #include <linux/scatterlist.h> | 26 | #include <linux/scatterlist.h> |
27 | #include <linux/bitmap.h> | 27 | #include <linux/bitmap.h> |
28 | #include <linux/types.h> | ||
28 | #include <asm/page.h> | 29 | #include <asm/page.h> |
29 | 30 | ||
30 | /** | 31 | /** |
@@ -331,6 +332,9 @@ enum dma_slave_buswidth { | |||
331 | * may or may not be applicable on memory sources. | 332 | * may or may not be applicable on memory sources. |
332 | * @dst_maxburst: same as src_maxburst but for destination target | 333 | * @dst_maxburst: same as src_maxburst but for destination target |
333 | * mutatis mutandis. | 334 | * mutatis mutandis. |
335 | * @device_fc: Flow Controller Settings. Only valid for slave channels. Fill | ||
336 | * with 'true' if peripheral should be flow controller. Direction will be | ||
337 | * selected at Runtime. | ||
334 | * | 338 | * |
335 | * This struct is passed in as configuration data to a DMA engine | 339 | * This struct is passed in as configuration data to a DMA engine |
336 | * in order to set up a certain channel for DMA transport at runtime. | 340 | * in order to set up a certain channel for DMA transport at runtime. |
@@ -357,6 +361,7 @@ struct dma_slave_config { | |||
357 | enum dma_slave_buswidth dst_addr_width; | 361 | enum dma_slave_buswidth dst_addr_width; |
358 | u32 src_maxburst; | 362 | u32 src_maxburst; |
359 | u32 dst_maxburst; | 363 | u32 dst_maxburst; |
364 | bool device_fc; | ||
360 | }; | 365 | }; |
361 | 366 | ||
362 | static inline const char *dma_chan_name(struct dma_chan *chan) | 367 | static inline const char *dma_chan_name(struct dma_chan *chan) |