blob: 11538f96799a0c22b5e1d88d8658d245d7d932c3 [file] [log] [blame]
From f7b36b70b02e3a82938758b9975c41dbe6aa331d Mon Sep 17 00:00:00 2001
From: Viresh Kumar <viresh.kumar@st.com>
Date: Wed, 1 Feb 2012 16:12:18 +0530
Subject: 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>
(cherry picked from commit dcc043dc0c60046cf6b75ca04a462314cf64e2ba)
Signed-off-by: Simon Horman <horms@verge.net.au>
---
include/linux/dmaengine.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 18e71fd..b8b4a84 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -26,6 +26,7 @@
#include <linux/dma-mapping.h>
#include <linux/scatterlist.h>
#include <linux/bitmap.h>
+#include <linux/types.h>
#include <asm/page.h>
struct scatterlist;
@@ -334,6 +335,9 @@ enum dma_slave_buswidth {
* may or may not be applicable on memory sources.
* @dst_maxburst: same as src_maxburst but for destination target
* mutatis mutandis.
+ * @device_fc: Flow Controller Settings. Only valid for slave channels. Fill
+ * with 'true' if peripheral should be flow controller. Direction will be
+ * selected at Runtime.
*
* This struct is passed in as configuration data to a DMA engine
* in order to set up a certain channel for DMA transport at runtime.
@@ -360,6 +364,7 @@ struct dma_slave_config {
enum dma_slave_buswidth dst_addr_width;
u32 src_maxburst;
u32 dst_maxburst;
+ bool device_fc;
};
static inline const char *dma_chan_name(struct dma_chan *chan)
--
1.7.10.2.565.gbd578b5