From: viresh.kumar@st.com (Viresh Kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V3 04/12] dmaengine/amba-pl08x: Take flow controller info from DMA_SLAVE_CONFIG
Date: Wed, 1 Feb 2012 16:12:20 +0530 [thread overview]
Message-ID: <c60812d9d0d0c6b93f59da973650e01c92b17ebd.1328091915.git.viresh.kumar@st.com> (raw)
In-Reply-To: <cover.1328091915.git.viresh.kumar@st.com>
Flow controller information is passed now from DMA_SLAVE_CONFIG option. This
patch makes changes in pl08x driver to use device_fc from it instead of platform
data.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/dma/amba-pl08x.c | 4 +++-
include/linux/amba/pl08x.h | 8 ++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index 9ebceca..e1a71f0 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -1139,6 +1139,8 @@ static int dma_set_runtime_config(struct dma_chan *chan,
cctl |= burst << PL080_CONTROL_SB_SIZE_SHIFT;
cctl |= burst << PL080_CONTROL_DB_SIZE_SHIFT;
+ plchan->device_fc = config->device_fc;
+
if (plchan->runtime_direction == DMA_DEV_TO_MEM) {
plchan->src_addr = config->src_addr;
plchan->src_cctl = pl08x_cctl(cctl) | PL080_CONTROL_DST_INCR |
@@ -1370,7 +1372,7 @@ static struct dma_async_tx_descriptor *pl08x_prep_slave_sg(
return NULL;
}
- if (plchan->cd->device_fc)
+ if (plchan->device_fc)
tmp = (direction == DMA_MEM_TO_DEV) ? PL080_FLOW_MEM2PER_PER :
PL080_FLOW_PER2MEM_PER;
else
diff --git a/include/linux/amba/pl08x.h b/include/linux/amba/pl08x.h
index 033f6aa..2c58853 100644
--- a/include/linux/amba/pl08x.h
+++ b/include/linux/amba/pl08x.h
@@ -47,9 +47,6 @@ enum {
* @muxval: a number usually used to poke into some mux regiser to
* mux in the signal to this channel
* @cctl_opt: default options for the channel control register
- * @device_fc: Flow Controller Settings for ccfg register. Only valid for slave
- * channels. Fill with 'true' if peripheral should be flow controller. Direction
- * will be selected at Runtime.
* @addr: source/target address in physical memory for this DMA channel,
* can be the address of a FIFO register for burst requests for example.
* This can be left undefined if the PrimeCell API is used for configuring
@@ -68,7 +65,6 @@ struct pl08x_channel_data {
int max_signal;
u32 muxval;
u32 cctl;
- bool device_fc;
dma_addr_t addr;
bool circular_buffer;
bool single;
@@ -183,6 +179,9 @@ enum pl08x_dma_chan_state {
* @host: a pointer to the host (internal use)
* @state: whether the channel is idle, paused, running etc
* @slave: whether this channel is a device (slave) or for memcpy
+ * @device_fc: Flow Controller Settings for ccfg register. Only valid for slave
+ * channels. Fill with 'true' if peripheral should be flow controller. Direction
+ * will be selected at Runtime.
* @waiting: a TX descriptor on this channel which is waiting for a physical
* channel to become available
*/
@@ -205,6 +204,7 @@ struct pl08x_dma_chan {
struct pl08x_driver_data *host;
enum pl08x_dma_chan_state state;
bool slave;
+ bool device_fc;
struct pl08x_txd *waiting;
};
--
1.7.8.110.g4cb5d
next prev parent reply other threads:[~2012-02-01 10:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 10:42 [PATCH V3 00/12] dmaengine: Pl08x and dw_dmac updates Viresh Kumar
2012-02-01 10:42 ` [PATCH V3 01/12] dmaengine/dw_dmac: Hibernation support in dw_dmac Viresh Kumar
2012-02-01 10:42 ` [PATCH V3 02/12] dmaengine: Add flow controller information to dma_slave_config Viresh Kumar
2012-02-01 10:42 ` [PATCH V3 03/12] dmaengine: Pass dma_slave_config .device_fc = NULL for all existing users Viresh Kumar
2012-02-01 10:42 ` Viresh Kumar [this message]
2012-02-01 10:42 ` [PATCH V3 05/12] dmaengine/dw_dmac: Don't use magic number for total number of channels Viresh Kumar
2012-02-01 10:42 ` [PATCH V3 06/12] dmaengine/dw_dmac: Use dev_get_platdata() instead of accessing dev directly Viresh Kumar
2012-02-01 10:42 ` [PATCH V3 07/12] dmaengine/dw_dmac: Don't handle block interrupts Viresh Kumar
2012-02-01 10:42 ` [PATCH V3 08/12] dmaengine/dw_dmac: Unmap all memory buffers after completion of non-slave transfers Viresh Kumar
2012-02-02 12:15 ` Russell King - ARM Linux
2012-02-06 8:11 ` Viresh Kumar
2012-02-01 10:42 ` [PATCH V3 09/12] dmaengine/dw_dmac: Add 64 bit access width support for slave xfers on mem side Viresh Kumar
2012-02-01 10:42 ` [PATCH V3 10/12] dmaengine/dw_dmac: Add support for DMA_SLAVE_CONFIG Viresh Kumar
2012-02-01 10:42 ` [PATCH V3 11/12] dmaengine/dw_dmac: Fix dw_dmac user drivers to adapt to slave_config changes Viresh Kumar
2012-02-01 10:42 ` [PATCH V3 12/12] dmaengine/dw_dmac: Remove unused fields in struct dw_dma_slave Viresh Kumar
2012-02-22 12:51 ` [PATCH V3 00/12] dmaengine: Pl08x and dw_dmac updates Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c60812d9d0d0c6b93f59da973650e01c92b17ebd.1328091915.git.viresh.kumar@st.com \
--to=viresh.kumar@st.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).