linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V3 00/12] dmaengine: Pl08x and dw_dmac updates
@ 2012-02-01 10:42 Viresh Kumar
  2012-02-01 10:42 ` [PATCH V3 01/12] dmaengine/dw_dmac: Hibernation support in dw_dmac Viresh Kumar
                   ` (12 more replies)
  0 siblings, 13 replies; 15+ messages in thread
From: Viresh Kumar @ 2012-02-01 10:42 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: cjb, rmk+kernel, linus.walleij, ulf.hansson, linux-mmc,
	linux-kernel, egtvedt, hskinnemoen, kernel, perex,
	linux-arm-kernel, armando.visconti, shiraz.hashim, vipin.kumar,
	rajeev-dlh.kumar, deepak.sikri, vipulkumar.samar, amit.virdi,
	viresh.kumar, pratyush.anand, bhupesh.sharma, viresh.linux,
	bhavna.yadav, vincenzo.frascino, mirko.gardi

Hi Vinod/Dan,

   This patchset does following:
   - Includes earlier patchset sent by Rajeev for cleanly applying this patchset
   - Adds device_fc (device flow control) field in struct DMA_SLAVE_CONFIG
   - Fixes existing users of DMAENGINE for device_fc.
   - Updates pl08x driver according to that
   - Fixes few issues/bugs in dw_dmac driver
   - Adds DMA_SLAVE_CONFIG for dw_dmac driver
   - Fixes existing users of dw_dmac driver

Change History:
Since V2:
 - fix code comment in 2/12
 - fix commit log in 8/12

Since V1:
   - used dev_get_platdata() instead of platform_get_drvdata(), as
   that was
   incorrect
   - Lots of fixes in: dmaengine/dw_dmac: Add support for
   DMA_SLAVE_CONFIG
   - Additional patches:
   - dmaengine/dw_dmac: Add 64 bit access width support for
   slave xfers on
   mem side
   - Fix other kernel driver for device_fc
   and dw_dmac changes.

   Rebased-on:

   commit
   3506c0d507144d9b0f19efd5a56d289f70611179
   Author: Tushar Behera
   <tushar.behera@linaro.org>
   Date:   Tue Dec 6 16:15:54 2011 +0530

   DMA: PL330: Remove pm_runtime_xxx
   calls from pl330 probe/remove


Rajeev KUMAR (1):
  dmaengine/dw_dmac: Hibernation support in dw_dmac

Viresh Kumar (11):
  dmaengine: Add flow controller information to dma_slave_config
  dmaengine: Pass dma_slave_config .device_fc = NULL for all existing
    users
  dmaengine/amba-pl08x: Take flow controller info from DMA_SLAVE_CONFIG
  dmaengine/dw_dmac: Don't use magic number for total number of
    channels
  dmaengine/dw_dmac: Use dev_get_platdata() instead of accessing dev
    directly
  dmaengine/dw_dmac: Don't handle block interrupts
  dmaengine/dw_dmac: Unmap all memory buffers after completion of
    non-slave transfers
  dmaengine/dw_dmac: Add 64 bit access width support for slave xfers on
    mem side
  dmaengine/dw_dmac: Add support for DMA_SLAVE_CONFIG
  dmaengine/dw_dmac: Fix dw_dmac user drivers to adapt to slave_config
    changes
  dmaengine/dw_dmac: Remove unused fields in struct dw_dma_slave

 arch/avr32/mach-at32ap/at32ap700x.c             |   13 --
 arch/avr32/mach-at32ap/include/mach/atmel-mci.h |    7 -
 drivers/dma/amba-pl08x.c                        |    4 +-
 drivers/dma/dw_dmac.c                           |  232 +++++++++++++++--------
 drivers/dma/dw_dmac_regs.h                      |   15 ++
 drivers/mmc/host/atmel-mci.c                    |   24 ++-
 drivers/mmc/host/mmci.c                         |    2 +
 drivers/mmc/host/mxcmmc.c                       |    2 +
 drivers/spi/spi-dw-mid.c                        |    3 +
 drivers/spi/spi-pl022.c                         |    2 +
 drivers/tty/serial/amba-pl011.c                 |    3 +
 drivers/usb/musb/ux500_dma.c                    |    1 +
 include/linux/amba/pl08x.h                      |    8 +-
 include/linux/dmaengine.h                       |    5 +
 include/linux/dw_dmac.h                         |   38 ----
 sound/atmel/abdac.c                             |   18 ++-
 sound/atmel/ac97c.c                             |   41 ++++-
 sound/soc/imx/imx-pcm-dma-mx2.c                 |    3 +
 18 files changed, 255 insertions(+), 166 deletions(-)

-- 
1.7.8.110.g4cb5d


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH V3 01/12] dmaengine/dw_dmac: Hibernation support in dw_dmac
  2012-02-01 10:42 [PATCH V3 00/12] dmaengine: Pl08x and dw_dmac updates Viresh Kumar
@ 2012-02-01 10:42 ` Viresh Kumar
  2012-02-01 10:42 ` [PATCH V3 02/12] dmaengine: Add flow controller information to dma_slave_config Viresh Kumar
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Viresh Kumar @ 2012-02-01 10:42 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: cjb, rmk+kernel, linus.walleij, ulf.hansson, linux-mmc,
	linux-kernel, egtvedt, hskinnemoen, kernel, perex,
	linux-arm-kernel, armando.visconti, shiraz.hashim, vipin.kumar,
	rajeev-dlh.kumar, deepak.sikri, vipulkumar.samar, amit.virdi,
	viresh.kumar, pratyush.anand, bhupesh.sharma, viresh.linux,
	bhavna.yadav, vincenzo.frascino, mirko.gardi

From: Rajeev KUMAR <rajeev-dlh.kumar@st.com>

The suspend and resume implementation is through dev_pm_ops in dmac. So
in order to support hibernation, freeze, thaw, restore and poweroff
features are required.

Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Acked-by: Viresh Kumar <viresh.kumar@st.com>
---
 drivers/dma/dw_dmac.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 9b592b0..3a3d7ed 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1562,6 +1562,10 @@ static int dw_resume_noirq(struct device *dev)
 static const struct dev_pm_ops dw_dev_pm_ops = {
 	.suspend_noirq = dw_suspend_noirq,
 	.resume_noirq = dw_resume_noirq,
+	.freeze_noirq = dw_suspend_noirq,
+	.thaw_noirq = dw_resume_noirq,
+	.restore_noirq = dw_resume_noirq,
+	.poweroff_noirq = dw_suspend_noirq,
 };
 
 static struct platform_driver dw_driver = {
-- 
1.7.8.110.g4cb5d


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH V3 02/12] dmaengine: Add flow controller information to dma_slave_config
  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 ` 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
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Viresh Kumar @ 2012-02-01 10:42 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: cjb, rmk+kernel, linus.walleij, ulf.hansson, linux-mmc,
	linux-kernel, egtvedt, hskinnemoen, kernel, perex,
	linux-arm-kernel, armando.visconti, shiraz.hashim, vipin.kumar,
	rajeev-dlh.kumar, deepak.sikri, vipulkumar.samar, amit.virdi,
	viresh.kumar, pratyush.anand, bhupesh.sharma, viresh.linux,
	bhavna.yadav, vincenzo.frascino, mirko.gardi

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>
---
 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 5532bb8..edfaac9 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -25,6 +25,7 @@
 #include <linux/uio.h>
 #include <linux/scatterlist.h>
 #include <linux/bitmap.h>
+#include <linux/types.h>
 #include <asm/page.h>
 
 /**
@@ -330,6 +331,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.
@@ -356,6 +360,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.8.110.g4cb5d


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH V3 03/12] dmaengine: Pass dma_slave_config .device_fc = NULL for all existing users
  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 ` Viresh Kumar
  2012-02-01 10:42 ` [PATCH V3 04/12] dmaengine/amba-pl08x: Take flow controller info from DMA_SLAVE_CONFIG Viresh Kumar
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Viresh Kumar @ 2012-02-01 10:42 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: cjb, rmk+kernel, linus.walleij, ulf.hansson, linux-mmc,
	linux-kernel, egtvedt, hskinnemoen, kernel, perex,
	linux-arm-kernel, armando.visconti, shiraz.hashim, vipin.kumar,
	rajeev-dlh.kumar, deepak.sikri, vipulkumar.samar, amit.virdi,
	viresh.kumar, pratyush.anand, bhupesh.sharma, viresh.linux,
	bhavna.yadav, vincenzo.frascino, mirko.gardi

.device_fc is added in struct dma_slave_config recently. All user drivers, which
want DMA to be the flow controller must pass this field as false. As earlier
driver don't look to use this feature, mark it false for now.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/mmc/host/mmci.c         |    2 ++
 drivers/mmc/host/mxcmmc.c       |    2 ++
 drivers/spi/spi-dw-mid.c        |    3 +++
 drivers/spi/spi-pl022.c         |    2 ++
 drivers/tty/serial/amba-pl011.c |    3 +++
 drivers/usb/musb/ux500_dma.c    |    1 +
 sound/soc/imx/imx-pcm-dma-mx2.c |    3 +++
 7 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 0b44d6b..a6b7068 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -30,6 +30,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/amba/mmci.h>
 #include <linux/pm_runtime.h>
+#include <linux/types.h>
 
 #include <asm/div64.h>
 #include <asm/io.h>
@@ -370,6 +371,7 @@ static int mmci_dma_prep_data(struct mmci_host *host, struct mmc_data *data,
 		.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
 		.src_maxburst = variant->fifohalfsize >> 2, /* # of words */
 		.dst_maxburst = variant->fifohalfsize >> 2, /* # of words */
+		.device_fc = false,
 	};
 	struct dma_chan *chan;
 	struct dma_device *device;
diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
index a17bc12..231c75a 100644
--- a/drivers/mmc/host/mxcmmc.c
+++ b/drivers/mmc/host/mxcmmc.c
@@ -33,6 +33,7 @@
 #include <linux/gpio.h>
 #include <linux/regulator/consumer.h>
 #include <linux/dmaengine.h>
+#include <linux/types.h>
 
 #include <asm/dma.h>
 #include <asm/irq.h>
@@ -710,6 +711,7 @@ static int mxcmci_setup_dma(struct mmc_host *mmc)
 	config->src_addr_width = 4;
 	config->dst_maxburst = host->burstlen;
 	config->src_maxburst = host->burstlen;
+	config->device_fc = false;
 
 	return dmaengine_slave_config(host->dma, config);
 }
diff --git a/drivers/spi/spi-dw-mid.c b/drivers/spi/spi-dw-mid.c
index 8418eb0..04d6c1b 100644
--- a/drivers/spi/spi-dw-mid.c
+++ b/drivers/spi/spi-dw-mid.c
@@ -22,6 +22,7 @@
 #include <linux/interrupt.h>
 #include <linux/slab.h>
 #include <linux/spi/spi.h>
+#include <linux/types.h>
 
 #include "spi-dw.h"
 
@@ -136,6 +137,7 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change)
 	txconf.dst_maxburst = LNW_DMA_MSIZE_16;
 	txconf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
 	txconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
+	txconf.device_fc = false;
 
 	txchan->device->device_control(txchan, DMA_SLAVE_CONFIG,
 				       (unsigned long) &txconf);
@@ -158,6 +160,7 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change)
 	rxconf.src_maxburst = LNW_DMA_MSIZE_16;
 	rxconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
 	rxconf.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
+	rxconf.device_fc = false;
 
 	rxchan->device->device_control(rxchan, DMA_SLAVE_CONFIG,
 				       (unsigned long) &rxconf);
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index 95400fa..5125c0c 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -905,10 +905,12 @@ static int configure_dma(struct pl022 *pl022)
 	struct dma_slave_config rx_conf = {
 		.src_addr = SSP_DR(pl022->phybase),
 		.direction = DMA_DEV_TO_MEM,
+		.device_fc = false,
 	};
 	struct dma_slave_config tx_conf = {
 		.dst_addr = SSP_DR(pl022->phybase),
 		.direction = DMA_MEM_TO_DEV,
+		.device_fc = false,
 	};
 	unsigned int pages;
 	int ret;
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index e4d5a21..44d050d 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -51,6 +51,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/scatterlist.h>
 #include <linux/delay.h>
+#include <linux/types.h>
 
 #include <asm/io.h>
 #include <asm/sizes.h>
@@ -270,6 +271,7 @@ static void pl011_dma_probe_initcall(struct uart_amba_port *uap)
 		.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE,
 		.direction = DMA_MEM_TO_DEV,
 		.dst_maxburst = uap->fifosize >> 1,
+		.device_fc = false,
 	};
 	struct dma_chan *chan;
 	dma_cap_mask_t mask;
@@ -303,6 +305,7 @@ static void pl011_dma_probe_initcall(struct uart_amba_port *uap)
 			.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE,
 			.direction = DMA_DEV_TO_MEM,
 			.src_maxburst = uap->fifosize >> 1,
+			.device_fc = false,
 		};
 
 		chan = dma_request_channel(mask, plat->dma_filter, plat->dma_rx_param);
diff --git a/drivers/usb/musb/ux500_dma.c b/drivers/usb/musb/ux500_dma.c
index f8fd0dd..7694392 100644
--- a/drivers/usb/musb/ux500_dma.c
+++ b/drivers/usb/musb/ux500_dma.c
@@ -143,6 +143,7 @@ static bool ux500_configure_channel(struct dma_channel *channel,
 	slave_conf.dst_addr = usb_fifo_addr;
 	slave_conf.dst_addr_width = addr_width;
 	slave_conf.dst_maxburst = 16;
+	slave_conf.device_fc = false;
 
 	dma_chan->device->device_control(dma_chan, DMA_SLAVE_CONFIG,
 					     (unsigned long) &slave_conf);
diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c
index 7d28de9..9a0946c 100644
--- a/sound/soc/imx/imx-pcm-dma-mx2.c
+++ b/sound/soc/imx/imx-pcm-dma-mx2.c
@@ -21,6 +21,7 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/dmaengine.h>
+#include <linux/types.h>
 
 #include <sound/core.h>
 #include <sound/initval.h>
@@ -106,6 +107,8 @@ static int imx_ssi_dma_alloc(struct snd_pcm_substream *substream,
 		return 0;
 	}
 
+	slave_config.device_fc = false;
+
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
 		slave_config.direction = DMA_MEM_TO_DEV;
 		slave_config.dst_addr = dma_params->dma_addr;
-- 
1.7.8.110.g4cb5d


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH V3 04/12] dmaengine/amba-pl08x: Take flow controller info from DMA_SLAVE_CONFIG
  2012-02-01 10:42 [PATCH V3 00/12] dmaengine: Pl08x and dw_dmac updates Viresh Kumar
                   ` (2 preceding siblings ...)
  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
  2012-02-01 10:42 ` [PATCH V3 05/12] dmaengine/dw_dmac: Don't use magic number for total number of channels Viresh Kumar
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Viresh Kumar @ 2012-02-01 10:42 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: cjb, rmk+kernel, linus.walleij, ulf.hansson, linux-mmc,
	linux-kernel, egtvedt, hskinnemoen, kernel, perex,
	linux-arm-kernel, armando.visconti, shiraz.hashim, vipin.kumar,
	rajeev-dlh.kumar, deepak.sikri, vipulkumar.samar, amit.virdi,
	viresh.kumar, pratyush.anand, bhupesh.sharma, viresh.linux,
	bhavna.yadav, vincenzo.frascino, mirko.gardi

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


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH V3 05/12] dmaengine/dw_dmac: Don't use magic number for total number of channels
  2012-02-01 10:42 [PATCH V3 00/12] dmaengine: Pl08x and dw_dmac updates Viresh Kumar
                   ` (3 preceding siblings ...)
  2012-02-01 10:42 ` [PATCH V3 04/12] dmaengine/amba-pl08x: Take flow controller info from DMA_SLAVE_CONFIG Viresh Kumar
@ 2012-02-01 10:42 ` 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
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Viresh Kumar @ 2012-02-01 10:42 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: cjb, rmk+kernel, linus.walleij, ulf.hansson, linux-mmc,
	linux-kernel, egtvedt, hskinnemoen, kernel, perex,
	linux-arm-kernel, armando.visconti, shiraz.hashim, vipin.kumar,
	rajeev-dlh.kumar, deepak.sikri, vipulkumar.samar, amit.virdi,
	viresh.kumar, pratyush.anand, bhupesh.sharma, viresh.linux,
	bhavna.yadav, vincenzo.frascino, mirko.gardi

Total number of channels is passed in pdata->nr_channels variable, thus we must
not use magic number '7' for total number of channels.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
 drivers/dma/dw_dmac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 3a3d7ed..1577394 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1432,7 +1432,7 @@ static int __init dw_probe(struct platform_device *pdev)
 
 		/* 7 is highest priority & 0 is lowest. */
 		if (pdata->chan_priority == CHAN_PRIORITY_ASCENDING)
-			dwc->priority = 7 - i;
+			dwc->priority = pdata->nr_channels - i - 1;
 		else
 			dwc->priority = i;
 
-- 
1.7.8.110.g4cb5d


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH V3 06/12] dmaengine/dw_dmac: Use dev_get_platdata() instead of accessing dev directly
  2012-02-01 10:42 [PATCH V3 00/12] dmaengine: Pl08x and dw_dmac updates Viresh Kumar
                   ` (4 preceding siblings ...)
  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 ` Viresh Kumar
  2012-02-01 10:42 ` [PATCH V3 07/12] dmaengine/dw_dmac: Don't handle block interrupts Viresh Kumar
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Viresh Kumar @ 2012-02-01 10:42 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: cjb, rmk+kernel, linus.walleij, ulf.hansson, linux-mmc,
	linux-kernel, egtvedt, hskinnemoen, kernel, perex,
	linux-arm-kernel, armando.visconti, shiraz.hashim, vipin.kumar,
	rajeev-dlh.kumar, deepak.sikri, vipulkumar.samar, amit.virdi,
	viresh.kumar, pratyush.anand, bhupesh.sharma, viresh.linux,
	bhavna.yadav, vincenzo.frascino, mirko.gardi

Use already defined function dev_get_platdata() instead of accessing
pdev->dev.data.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
 drivers/dma/dw_dmac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 1577394..f3aecb3 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1369,7 +1369,7 @@ static int __init dw_probe(struct platform_device *pdev)
 	int			err;
 	int			i;
 
-	pdata = pdev->dev.platform_data;
+	pdata = dev_get_platdata(&pdev->dev);
 	if (!pdata || pdata->nr_channels > DW_DMA_MAX_NR_CHANNELS)
 		return -EINVAL;
 
-- 
1.7.8.110.g4cb5d


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH V3 07/12] dmaengine/dw_dmac: Don't handle block interrupts
  2012-02-01 10:42 [PATCH V3 00/12] dmaengine: Pl08x and dw_dmac updates Viresh Kumar
                   ` (5 preceding siblings ...)
  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 ` 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
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Viresh Kumar @ 2012-02-01 10:42 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: cjb, rmk+kernel, linus.walleij, ulf.hansson, linux-mmc,
	linux-kernel, egtvedt, hskinnemoen, kernel, perex,
	linux-arm-kernel, armando.visconti, shiraz.hashim, vipin.kumar,
	rajeev-dlh.kumar, deepak.sikri, vipulkumar.samar, amit.virdi,
	viresh.kumar, pratyush.anand, bhupesh.sharma, viresh.linux,
	bhavna.yadav, vincenzo.frascino, mirko.gardi

Block interrupts give interrupt on completion of every LLI, which is actually
too much interrupts. This is just not required for current functioning of
dw_dmac.

So, just don't handle them at all.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
 drivers/dma/dw_dmac.c |   36 ++++++------------------------------
 1 files changed, 6 insertions(+), 30 deletions(-)

diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index f3aecb3..5d7b199 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -192,7 +192,6 @@ static void dwc_initialize(struct dw_dma_chan *dwc)
 
 	/* Enable interrupts */
 	channel_set_bit(dw, MASK.XFER, dwc->mask);
-	channel_set_bit(dw, MASK.BLOCK, dwc->mask);
 	channel_set_bit(dw, MASK.ERROR, dwc->mask);
 
 	dwc->initialized = true;
@@ -329,12 +328,6 @@ static void dwc_scan_descriptors(struct dw_dma *dw, struct dw_dma_chan *dwc)
 	unsigned long flags;
 
 	spin_lock_irqsave(&dwc->lock, flags);
-	/*
-	 * Clear block interrupt flag before scanning so that we don't
-	 * miss any, and read LLP before RAW_XFER to ensure it is
-	 * valid if we decide to scan the list.
-	 */
-	dma_writel(dw, CLEAR.BLOCK, dwc->mask);
 	llp = channel_readl(dwc, LLP);
 	status_xfer = dma_readl(dw, RAW.XFER);
 
@@ -470,17 +463,16 @@ EXPORT_SYMBOL(dw_dma_get_dst_addr);
 
 /* called with dwc->lock held and all DMAC interrupts disabled */
 static void dwc_handle_cyclic(struct dw_dma *dw, struct dw_dma_chan *dwc,
-		u32 status_block, u32 status_err, u32 status_xfer)
+		u32 status_err, u32 status_xfer)
 {
 	unsigned long flags;
 
-	if (status_block & dwc->mask) {
+	if (dwc->mask) {
 		void (*callback)(void *param);
 		void *callback_param;
 
 		dev_vdbg(chan2dev(&dwc->chan), "new cyclic period llp 0x%08x\n",
 				channel_readl(dwc, LLP));
-		dma_writel(dw, CLEAR.BLOCK, dwc->mask);
 
 		callback = dwc->cdesc->period_callback;
 		callback_param = dwc->cdesc->period_callback_param;
@@ -520,7 +512,6 @@ static void dwc_handle_cyclic(struct dw_dma *dw, struct dw_dma_chan *dwc,
 		channel_writel(dwc, CTL_LO, 0);
 		channel_writel(dwc, CTL_HI, 0);
 
-		dma_writel(dw, CLEAR.BLOCK, dwc->mask);
 		dma_writel(dw, CLEAR.ERROR, dwc->mask);
 		dma_writel(dw, CLEAR.XFER, dwc->mask);
 
@@ -537,36 +528,29 @@ static void dw_dma_tasklet(unsigned long data)
 {
 	struct dw_dma *dw = (struct dw_dma *)data;
 	struct dw_dma_chan *dwc;
-	u32 status_block;
 	u32 status_xfer;
 	u32 status_err;
 	int i;
 
-	status_block = dma_readl(dw, RAW.BLOCK);
 	status_xfer = dma_readl(dw, RAW.XFER);
 	status_err = dma_readl(dw, RAW.ERROR);
 
-	dev_vdbg(dw->dma.dev, "tasklet: status_block=%x status_err=%x\n",
-			status_block, status_err);
+	dev_vdbg(dw->dma.dev, "tasklet: status_err=%x\n", status_err);
 
 	for (i = 0; i < dw->dma.chancnt; i++) {
 		dwc = &dw->chan[i];
 		if (test_bit(DW_DMA_IS_CYCLIC, &dwc->flags))
-			dwc_handle_cyclic(dw, dwc, status_block, status_err,
-					status_xfer);
+			dwc_handle_cyclic(dw, dwc, status_err, status_xfer);
 		else if (status_err & (1 << i))
 			dwc_handle_error(dw, dwc);
-		else if ((status_block | status_xfer) & (1 << i))
+		else if (status_xfer & (1 << i))
 			dwc_scan_descriptors(dw, dwc);
 	}
 
 	/*
-	 * Re-enable interrupts. Block Complete interrupts are only
-	 * enabled if the INT_EN bit in the descriptor is set. This
-	 * will trigger a scan before the whole list is done.
+	 * Re-enable interrupts.
 	 */
 	channel_set_bit(dw, MASK.XFER, dw->all_chan_mask);
-	channel_set_bit(dw, MASK.BLOCK, dw->all_chan_mask);
 	channel_set_bit(dw, MASK.ERROR, dw->all_chan_mask);
 }
 
@@ -583,7 +567,6 @@ static irqreturn_t dw_dma_interrupt(int irq, void *dev_id)
 	 * softirq handler.
 	 */
 	channel_clear_bit(dw, MASK.XFER, dw->all_chan_mask);
-	channel_clear_bit(dw, MASK.BLOCK, dw->all_chan_mask);
 	channel_clear_bit(dw, MASK.ERROR, dw->all_chan_mask);
 
 	status = dma_readl(dw, STATUS_INT);
@@ -594,7 +577,6 @@ static irqreturn_t dw_dma_interrupt(int irq, void *dev_id)
 
 		/* Try to recover */
 		channel_clear_bit(dw, MASK.XFER, (1 << 8) - 1);
-		channel_clear_bit(dw, MASK.BLOCK, (1 << 8) - 1);
 		channel_clear_bit(dw, MASK.SRC_TRAN, (1 << 8) - 1);
 		channel_clear_bit(dw, MASK.DST_TRAN, (1 << 8) - 1);
 		channel_clear_bit(dw, MASK.ERROR, (1 << 8) - 1);
@@ -1068,7 +1050,6 @@ static void dwc_free_chan_resources(struct dma_chan *chan)
 
 	/* Disable interrupts */
 	channel_clear_bit(dw, MASK.XFER, dwc->mask);
-	channel_clear_bit(dw, MASK.BLOCK, dwc->mask);
 	channel_clear_bit(dw, MASK.ERROR, dwc->mask);
 
 	spin_unlock_irqrestore(&dwc->lock, flags);
@@ -1120,7 +1101,6 @@ int dw_dma_cyclic_start(struct dma_chan *chan)
 		return -EBUSY;
 	}
 
-	dma_writel(dw, CLEAR.BLOCK, dwc->mask);
 	dma_writel(dw, CLEAR.ERROR, dwc->mask);
 	dma_writel(dw, CLEAR.XFER, dwc->mask);
 
@@ -1322,7 +1302,6 @@ void dw_dma_cyclic_free(struct dma_chan *chan)
 	while (dma_readl(dw, CH_EN) & dwc->mask)
 		cpu_relax();
 
-	dma_writel(dw, CLEAR.BLOCK, dwc->mask);
 	dma_writel(dw, CLEAR.ERROR, dwc->mask);
 	dma_writel(dw, CLEAR.XFER, dwc->mask);
 
@@ -1347,7 +1326,6 @@ static void dw_dma_off(struct dw_dma *dw)
 	dma_writel(dw, CFG, 0);
 
 	channel_clear_bit(dw, MASK.XFER, dw->all_chan_mask);
-	channel_clear_bit(dw, MASK.BLOCK, dw->all_chan_mask);
 	channel_clear_bit(dw, MASK.SRC_TRAN, dw->all_chan_mask);
 	channel_clear_bit(dw, MASK.DST_TRAN, dw->all_chan_mask);
 	channel_clear_bit(dw, MASK.ERROR, dw->all_chan_mask);
@@ -1449,13 +1427,11 @@ static int __init dw_probe(struct platform_device *pdev)
 
 	/* Clear/disable all interrupts on all channels. */
 	dma_writel(dw, CLEAR.XFER, dw->all_chan_mask);
-	dma_writel(dw, CLEAR.BLOCK, dw->all_chan_mask);
 	dma_writel(dw, CLEAR.SRC_TRAN, dw->all_chan_mask);
 	dma_writel(dw, CLEAR.DST_TRAN, dw->all_chan_mask);
 	dma_writel(dw, CLEAR.ERROR, dw->all_chan_mask);
 
 	channel_clear_bit(dw, MASK.XFER, dw->all_chan_mask);
-	channel_clear_bit(dw, MASK.BLOCK, dw->all_chan_mask);
 	channel_clear_bit(dw, MASK.SRC_TRAN, dw->all_chan_mask);
 	channel_clear_bit(dw, MASK.DST_TRAN, dw->all_chan_mask);
 	channel_clear_bit(dw, MASK.ERROR, dw->all_chan_mask);
-- 
1.7.8.110.g4cb5d


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH V3 08/12] dmaengine/dw_dmac: Unmap all memory buffers after completion of non-slave transfers
  2012-02-01 10:42 [PATCH V3 00/12] dmaengine: Pl08x and dw_dmac updates Viresh Kumar
                   ` (6 preceding siblings ...)
  2012-02-01 10:42 ` [PATCH V3 07/12] dmaengine/dw_dmac: Don't handle block interrupts Viresh Kumar
@ 2012-02-01 10:42 ` Viresh Kumar
  2012-02-02 12:15   ` Russell King - ARM Linux
  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
                   ` (4 subsequent siblings)
  12 siblings, 1 reply; 15+ messages in thread
From: Viresh Kumar @ 2012-02-01 10:42 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: cjb, rmk+kernel, linus.walleij, ulf.hansson, linux-mmc,
	linux-kernel, egtvedt, hskinnemoen, kernel, perex,
	linux-arm-kernel, armando.visconti, shiraz.hashim, vipin.kumar,
	rajeev-dlh.kumar, deepak.sikri, vipulkumar.samar, amit.virdi,
	viresh.kumar, pratyush.anand, bhupesh.sharma, viresh.linux,
	bhavna.yadav, vincenzo.frascino, mirko.gardi

Currently, after completion of transfer, source address or destination address
of only the first LLI descriptor is unmapped. And length passed for unmap is
total length of all descriptors in the list. Which means unmapping code assumed
that the memory buffers pointed to by the descriptors will be physically
contiguous, which might not be the case.

This patch intends to fix this wrong expectation of dw_dmac. Now, first desc
will not contain total length of transfer. But individual descriptors will
contain their individual lengths. Finally, we will call unmap for all
descriptors.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
 drivers/dma/dw_dmac.c |   49 +++++++++++++++++++++++++++++++------------------
 1 files changed, 31 insertions(+), 18 deletions(-)

diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 5d7b199..49d477c 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -231,6 +231,14 @@ static void dwc_dostart(struct dw_dma_chan *dwc, struct dw_desc *first)
 
 /*----------------------------------------------------------------------*/
 
+#define dw_dmac_unmap(utype, _desc, _child, _buf, _dir)			\
+do {									\
+	list_for_each_entry(_child, &_desc->tx_list, desc_node)		\
+		dma_unmap_##utype(parent, _child->lli._buf,		\
+				_child->len, _dir);			\
+	dma_unmap_##utype(parent, _desc->lli._buf, _desc->len, _dir);	\
+} while (0)
+
 static void
 dwc_descriptor_complete(struct dw_dma_chan *dwc, struct dw_desc *desc,
 		bool callback_required)
@@ -264,19 +272,19 @@ dwc_descriptor_complete(struct dw_dma_chan *dwc, struct dw_desc *desc,
 		struct device *parent = chan2parent(&dwc->chan);
 		if (!(txd->flags & DMA_COMPL_SKIP_DEST_UNMAP)) {
 			if (txd->flags & DMA_COMPL_DEST_UNMAP_SINGLE)
-				dma_unmap_single(parent, desc->lli.dar,
-						desc->len, DMA_FROM_DEVICE);
+				dw_dmac_unmap(single, desc, child, dar,
+						DMA_FROM_DEVICE);
 			else
-				dma_unmap_page(parent, desc->lli.dar,
-						desc->len, DMA_FROM_DEVICE);
+				dw_dmac_unmap(page, desc, child, dar,
+						DMA_FROM_DEVICE);
 		}
 		if (!(txd->flags & DMA_COMPL_SKIP_SRC_UNMAP)) {
 			if (txd->flags & DMA_COMPL_SRC_UNMAP_SINGLE)
-				dma_unmap_single(parent, desc->lli.sar,
-						desc->len, DMA_TO_DEVICE);
+				dw_dmac_unmap(single, desc, child, sar,
+						DMA_TO_DEVICE);
 			else
-				dma_unmap_page(parent, desc->lli.sar,
-						desc->len, DMA_TO_DEVICE);
+				dw_dmac_unmap(page, desc, child, sar,
+						DMA_TO_DEVICE);
 		}
 	}
 
@@ -676,6 +684,7 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
 		desc->lli.dar = dest + offset;
 		desc->lli.ctllo = ctllo;
 		desc->lli.ctlhi = xfer_count;
+		desc->len = xfer_count << src_width;
 
 		if (!first) {
 			first = desc;
@@ -701,7 +710,6 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
 			DMA_TO_DEVICE);
 
 	first->txd.flags = flags;
-	first->len = len;
 
 	return &first->txd;
 
@@ -725,7 +733,6 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
 	unsigned int		mem_width;
 	unsigned int		i;
 	struct scatterlist	*sg;
-	size_t			total_len = 0;
 
 	dev_vdbg(chan2dev(chan), "prep_dma_slave\n");
 
@@ -774,6 +781,7 @@ slave_sg_todev_fill_desc:
 			}
 
 			desc->lli.ctlhi = dlen >> mem_width;
+			desc->len = dlen;
 
 			if (!first) {
 				first = desc;
@@ -787,7 +795,6 @@ slave_sg_todev_fill_desc:
 						&first->tx_list);
 			}
 			prev = desc;
-			total_len += dlen;
 
 			if (len)
 				goto slave_sg_todev_fill_desc;
@@ -831,6 +838,7 @@ slave_sg_fromdev_fill_desc:
 				len = 0;
 			}
 			desc->lli.ctlhi = dlen >> reg_width;
+			desc->len = dlen;
 
 			if (!first) {
 				first = desc;
@@ -844,7 +852,6 @@ slave_sg_fromdev_fill_desc:
 						&first->tx_list);
 			}
 			prev = desc;
-			total_len += dlen;
 
 			if (len)
 				goto slave_sg_fromdev_fill_desc;
@@ -863,8 +870,6 @@ slave_sg_fromdev_fill_desc:
 			prev->txd.phys, sizeof(prev->lli),
 			DMA_TO_DEVICE);
 
-	first->len = total_len;
-
 	return &first->txd;
 
 err_desc_get:
@@ -950,11 +955,19 @@ dwc_tx_status(struct dma_chan *chan,
 		ret = dma_async_is_complete(cookie, last_complete, last_used);
 	}
 
-	if (ret != DMA_SUCCESS)
-		dma_set_tx_state(txstate, last_complete, last_used,
-				dwc_first_active(dwc)->len);
-	else
+	if (ret != DMA_SUCCESS) {
+		struct dw_desc *desc, *child;
+		unsigned int len;
+
+		desc = dwc_first_active(dwc);
+		len = desc->len;
+		list_for_each_entry(child, &desc->tx_list, desc_node)
+			len += child->len;
+
+		dma_set_tx_state(txstate, last_complete, last_used, len);
+	} else {
 		dma_set_tx_state(txstate, last_complete, last_used, 0);
+	}
 
 	if (dwc->paused)
 		return DMA_PAUSED;
-- 
1.7.8.110.g4cb5d


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH V3 09/12] dmaengine/dw_dmac: Add 64 bit access width support for slave xfers on mem side
  2012-02-01 10:42 [PATCH V3 00/12] dmaengine: Pl08x and dw_dmac updates Viresh Kumar
                   ` (7 preceding siblings ...)
  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-01 10:42 ` Viresh Kumar
  2012-02-01 10:42 ` [PATCH V3 10/12] dmaengine/dw_dmac: Add support for DMA_SLAVE_CONFIG Viresh Kumar
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Viresh Kumar @ 2012-02-01 10:42 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: cjb, rmk+kernel, linus.walleij, ulf.hansson, linux-mmc,
	linux-kernel, egtvedt, hskinnemoen, kernel, perex,
	linux-arm-kernel, armando.visconti, shiraz.hashim, vipin.kumar,
	rajeev-dlh.kumar, deepak.sikri, vipulkumar.samar, amit.virdi,
	viresh.kumar, pratyush.anand, bhupesh.sharma, viresh.linux,
	bhavna.yadav, vincenzo.frascino, mirko.gardi

64 bit transfers are possible on both sides in slave transfers (memory as well
as peripherals). This patch adds support for it memory side 64 bit transfers.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
 drivers/dma/dw_dmac.c |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 49d477c..44d8069 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -756,8 +756,14 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
 
 			mem = sg_phys(sg);
 			len = sg_dma_len(sg);
-			mem_width = 2;
-			if (unlikely(mem & 3 || len & 3))
+
+			if (!((mem | len) & 7))
+				mem_width = 3;
+			else if (!((mem | len) & 3))
+				mem_width = 2;
+			else if (!((mem | len) & 1))
+				mem_width = 1;
+			else
 				mem_width = 0;
 
 slave_sg_todev_fill_desc:
@@ -814,8 +820,14 @@ slave_sg_todev_fill_desc:
 
 			mem = sg_phys(sg);
 			len = sg_dma_len(sg);
-			mem_width = 2;
-			if (unlikely(mem & 3 || len & 3))
+
+			if (!((mem | len) & 7))
+				mem_width = 3;
+			else if (!((mem | len) & 3))
+				mem_width = 2;
+			else if (!((mem | len) & 1))
+				mem_width = 1;
+			else
 				mem_width = 0;
 
 slave_sg_fromdev_fill_desc:
-- 
1.7.8.110.g4cb5d


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH V3 10/12] dmaengine/dw_dmac: Add support for DMA_SLAVE_CONFIG
  2012-02-01 10:42 [PATCH V3 00/12] dmaengine: Pl08x and dw_dmac updates Viresh Kumar
                   ` (8 preceding siblings ...)
  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 ` 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
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Viresh Kumar @ 2012-02-01 10:42 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: cjb, rmk+kernel, linus.walleij, ulf.hansson, linux-mmc,
	linux-kernel, egtvedt, hskinnemoen, kernel, perex,
	linux-arm-kernel, armando.visconti, shiraz.hashim, vipin.kumar,
	rajeev-dlh.kumar, deepak.sikri, vipulkumar.samar, amit.virdi,
	viresh.kumar, pratyush.anand, bhupesh.sharma, viresh.linux,
	bhavna.yadav, vincenzo.frascino, mirko.gardi

This patch adds support for DMA_SLAVE_CONFIG in dwc DMAC controller. Fields in
struct dw_dma_slave for passing similar data are preserved in this patch untill
all existing users are fixed.

That will be handled later in this patchset.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
 drivers/dma/dw_dmac.c      |  119 +++++++++++++++++++++++++++++++++-----------
 drivers/dma/dw_dmac_regs.h |    3 +
 2 files changed, 93 insertions(+), 29 deletions(-)

diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 44d8069..ccfb03b 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -9,6 +9,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/bitops.h>
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/dmaengine.h>
@@ -33,19 +34,23 @@
  * which does not support descriptor writeback.
  */
 
-#define DWC_DEFAULT_CTLLO(private) ({				\
-		struct dw_dma_slave *__slave = (private);	\
-		int dms = __slave ? __slave->dst_master : 0;	\
-		int sms = __slave ? __slave->src_master : 1;	\
-		u8 smsize = __slave ? __slave->src_msize : DW_DMA_MSIZE_16; \
-		u8 dmsize = __slave ? __slave->dst_msize : DW_DMA_MSIZE_16; \
+#define DWC_DEFAULT_CTLLO(_chan) ({				\
+		struct dw_dma_slave *__slave = (_chan->private);	\
+		struct dw_dma_chan *_dwc = to_dw_dma_chan(_chan);	\
+		struct dma_slave_config	*_sconfig = &_dwc->dma_sconfig;	\
+		int _dms = __slave ? __slave->dst_master : 0;	\
+		int _sms = __slave ? __slave->src_master : 1;	\
+		u8 _smsize = __slave ? _sconfig->src_maxburst :	\
+			DW_DMA_MSIZE_16;			\
+		u8 _dmsize = __slave ? _sconfig->dst_maxburst :	\
+			DW_DMA_MSIZE_16;			\
 								\
-		(DWC_CTLL_DST_MSIZE(dmsize)			\
-		 | DWC_CTLL_SRC_MSIZE(smsize)			\
+		(DWC_CTLL_DST_MSIZE(_dmsize)			\
+		 | DWC_CTLL_SRC_MSIZE(_smsize)			\
 		 | DWC_CTLL_LLP_D_EN				\
 		 | DWC_CTLL_LLP_S_EN				\
-		 | DWC_CTLL_DMS(dms)				\
-		 | DWC_CTLL_SMS(sms));				\
+		 | DWC_CTLL_DMS(_dms)				\
+		 | DWC_CTLL_SMS(_sms));				\
 	})
 
 /*
@@ -664,7 +669,7 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
 	else
 		src_width = dst_width = 0;
 
-	ctllo = DWC_DEFAULT_CTLLO(chan->private)
+	ctllo = DWC_DEFAULT_CTLLO(chan)
 			| DWC_CTLL_DST_WIDTH(dst_width)
 			| DWC_CTLL_SRC_WIDTH(src_width)
 			| DWC_CTLL_DST_INC
@@ -725,6 +730,7 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
 {
 	struct dw_dma_chan	*dwc = to_dw_dma_chan(chan);
 	struct dw_dma_slave	*dws = chan->private;
+	struct dma_slave_config	*sconfig = &dwc->dma_sconfig;
 	struct dw_desc		*prev;
 	struct dw_desc		*first;
 	u32			ctllo;
@@ -739,17 +745,20 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
 	if (unlikely(!dws || !sg_len))
 		return NULL;
 
-	reg_width = dws->reg_width;
 	prev = first = NULL;
 
 	switch (direction) {
 	case DMA_MEM_TO_DEV:
-		ctllo = (DWC_DEFAULT_CTLLO(chan->private)
+		reg_width = __fls(sconfig->dst_addr_width);
+		reg = sconfig->dst_addr;
+		ctllo = (DWC_DEFAULT_CTLLO(chan)
 				| DWC_CTLL_DST_WIDTH(reg_width)
 				| DWC_CTLL_DST_FIX
-				| DWC_CTLL_SRC_INC
-				| DWC_CTLL_FC(dws->fc));
-		reg = dws->tx_reg;
+				| DWC_CTLL_SRC_INC);
+
+		ctllo |= sconfig->device_fc ? DWC_CTLL_FC(DW_DMA_FC_P_M2P) :
+			DWC_CTLL_FC(DW_DMA_FC_D_M2P);
+
 		for_each_sg(sgl, sg, sg_len, i) {
 			struct dw_desc	*desc;
 			u32		len, dlen, mem;
@@ -807,13 +816,16 @@ slave_sg_todev_fill_desc:
 		}
 		break;
 	case DMA_DEV_TO_MEM:
-		ctllo = (DWC_DEFAULT_CTLLO(chan->private)
+		reg_width = __fls(sconfig->src_addr_width);
+		reg = sconfig->src_addr;
+		ctllo = (DWC_DEFAULT_CTLLO(chan)
 				| DWC_CTLL_SRC_WIDTH(reg_width)
 				| DWC_CTLL_DST_INC
-				| DWC_CTLL_SRC_FIX
-				| DWC_CTLL_FC(dws->fc));
+				| DWC_CTLL_SRC_FIX);
+
+		ctllo |= sconfig->device_fc ? DWC_CTLL_FC(DW_DMA_FC_P_P2M) :
+			DWC_CTLL_FC(DW_DMA_FC_D_P2M);
 
-		reg = dws->rx_reg;
 		for_each_sg(sgl, sg, sg_len, i) {
 			struct dw_desc	*desc;
 			u32		len, dlen, mem;
@@ -889,6 +901,39 @@ err_desc_get:
 	return NULL;
 }
 
+/*
+ * Fix sconfig's burst size according to dw_dmac. We need to convert them as:
+ * 1 -> 0, 4 -> 1, 8 -> 2, 16 -> 3.
+ *
+ * NOTE: burst size 2 is not supported by controller.
+ *
+ * This can be done by finding least significant bit set: n & (n - 1)
+ */
+static inline void convert_burst(u32 *maxburst)
+{
+	if (*maxburst > 1)
+		*maxburst = fls(*maxburst) - 2;
+	else
+		*maxburst = 0;
+}
+
+static int
+set_runtime_config(struct dma_chan *chan, struct dma_slave_config *sconfig)
+{
+	struct dw_dma_chan *dwc = to_dw_dma_chan(chan);
+
+	/* Check if it is chan is configured for slave transfers */
+	if (!chan->private)
+		return -EINVAL;
+
+	memcpy(&dwc->dma_sconfig, sconfig, sizeof(*sconfig));
+
+	convert_burst(&dwc->dma_sconfig.src_maxburst);
+	convert_burst(&dwc->dma_sconfig.dst_maxburst);
+
+	return 0;
+}
+
 static int dwc_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
 		       unsigned long arg)
 {
@@ -938,8 +983,11 @@ static int dwc_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
 		/* Flush all pending and queued descriptors */
 		list_for_each_entry_safe(desc, _desc, &list, desc_node)
 			dwc_descriptor_complete(dwc, desc, false);
-	} else
+	} else if (cmd == DMA_SLAVE_CONFIG) {
+		return set_runtime_config(chan, (struct dma_slave_config *)arg);
+	} else {
 		return -ENXIO;
+	}
 
 	return 0;
 }
@@ -1180,11 +1228,11 @@ struct dw_cyclic_desc *dw_dma_cyclic_prep(struct dma_chan *chan,
 		enum dma_transfer_direction direction)
 {
 	struct dw_dma_chan		*dwc = to_dw_dma_chan(chan);
+	struct dma_slave_config		*sconfig = &dwc->dma_sconfig;
 	struct dw_cyclic_desc		*cdesc;
 	struct dw_cyclic_desc		*retval = NULL;
 	struct dw_desc			*desc;
 	struct dw_desc			*last = NULL;
-	struct dw_dma_slave		*dws = chan->private;
 	unsigned long			was_cyclic;
 	unsigned int			reg_width;
 	unsigned int			periods;
@@ -1208,7 +1256,12 @@ struct dw_cyclic_desc *dw_dma_cyclic_prep(struct dma_chan *chan,
 	}
 
 	retval = ERR_PTR(-EINVAL);
-	reg_width = dws->reg_width;
+
+	if (direction == DMA_MEM_TO_DEV)
+		reg_width = __ffs(sconfig->dst_addr_width);
+	else
+		reg_width = __ffs(sconfig->src_addr_width);
+
 	periods = buf_len / period_len;
 
 	/* Check for too big/unaligned periods and unaligned DMA buffer. */
@@ -1241,26 +1294,34 @@ struct dw_cyclic_desc *dw_dma_cyclic_prep(struct dma_chan *chan,
 
 		switch (direction) {
 		case DMA_MEM_TO_DEV:
-			desc->lli.dar = dws->tx_reg;
+			desc->lli.dar = sconfig->dst_addr;
 			desc->lli.sar = buf_addr + (period_len * i);
-			desc->lli.ctllo = (DWC_DEFAULT_CTLLO(chan->private)
+			desc->lli.ctllo = (DWC_DEFAULT_CTLLO(chan)
 					| DWC_CTLL_DST_WIDTH(reg_width)
 					| DWC_CTLL_SRC_WIDTH(reg_width)
 					| DWC_CTLL_DST_FIX
 					| DWC_CTLL_SRC_INC
-					| DWC_CTLL_FC(dws->fc)
 					| DWC_CTLL_INT_EN);
+
+			desc->lli.ctllo |= sconfig->device_fc ?
+				DWC_CTLL_FC(DW_DMA_FC_P_M2P) :
+				DWC_CTLL_FC(DW_DMA_FC_D_M2P);
+
 			break;
 		case DMA_DEV_TO_MEM:
 			desc->lli.dar = buf_addr + (period_len * i);
-			desc->lli.sar = dws->rx_reg;
-			desc->lli.ctllo = (DWC_DEFAULT_CTLLO(chan->private)
+			desc->lli.sar = sconfig->src_addr;
+			desc->lli.ctllo = (DWC_DEFAULT_CTLLO(chan)
 					| DWC_CTLL_SRC_WIDTH(reg_width)
 					| DWC_CTLL_DST_WIDTH(reg_width)
 					| DWC_CTLL_DST_INC
 					| DWC_CTLL_SRC_FIX
-					| DWC_CTLL_FC(dws->fc)
 					| DWC_CTLL_INT_EN);
+
+			desc->lli.ctllo |= sconfig->device_fc ?
+				DWC_CTLL_FC(DW_DMA_FC_P_P2M) :
+				DWC_CTLL_FC(DW_DMA_FC_D_P2M);
+
 			break;
 		default:
 			break;
diff --git a/drivers/dma/dw_dmac_regs.h b/drivers/dma/dw_dmac_regs.h
index 5eef694..2005d30 100644
--- a/drivers/dma/dw_dmac_regs.h
+++ b/drivers/dma/dw_dmac_regs.h
@@ -153,6 +153,9 @@ struct dw_dma_chan {
 	struct dw_cyclic_desc	*cdesc;
 
 	unsigned int		descs_allocated;
+
+	/* configuration passed via DMA_SLAVE_CONFIG */
+	struct dma_slave_config dma_sconfig;
 };
 
 static inline struct dw_dma_chan_regs __iomem *
-- 
1.7.8.110.g4cb5d


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH V3 11/12] dmaengine/dw_dmac: Fix dw_dmac user drivers to adapt to slave_config changes
  2012-02-01 10:42 [PATCH V3 00/12] dmaengine: Pl08x and dw_dmac updates Viresh Kumar
                   ` (9 preceding siblings ...)
  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 ` 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
  12 siblings, 0 replies; 15+ messages in thread
From: Viresh Kumar @ 2012-02-01 10:42 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: cjb, rmk+kernel, linus.walleij, ulf.hansson, linux-mmc,
	linux-kernel, egtvedt, hskinnemoen, kernel, perex,
	linux-arm-kernel, armando.visconti, shiraz.hashim, vipin.kumar,
	rajeev-dlh.kumar, deepak.sikri, vipulkumar.samar, amit.virdi,
	viresh.kumar, pratyush.anand, bhupesh.sharma, viresh.linux,
	bhavna.yadav, vincenzo.frascino, mirko.gardi

There are few existing user drivers of dw_dmac. They will break as soon as we
remove unused fields from struct dw_dma_slave. This patch focuses to fix these
user drivers to use dma_slave_config() routine.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
 arch/avr32/mach-at32ap/at32ap700x.c             |   13 -------
 arch/avr32/mach-at32ap/include/mach/atmel-mci.h |    7 ----
 drivers/mmc/host/atmel-mci.c                    |   24 +++++++++----
 sound/atmel/abdac.c                             |   18 ++++++++--
 sound/atmel/ac97c.c                             |   41 ++++++++++++++++++----
 5 files changed, 63 insertions(+), 40 deletions(-)

diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index 7fbf0dc..d05936b 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -1353,7 +1353,6 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
 		goto fail;
 
 	slave->sdata.dma_dev = &dw_dmac0_device.dev;
-	slave->sdata.reg_width = DW_DMA_SLAVE_WIDTH_32BIT;
 	slave->sdata.cfg_hi = (DWC_CFGH_SRC_PER(0)
 				| DWC_CFGH_DST_PER(1));
 	slave->sdata.cfg_lo &= ~(DWC_CFGL_HS_DST_POL
@@ -2048,27 +2047,19 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data,
 	/* Check if DMA slave interface for capture should be configured. */
 	if (flags & AC97C_CAPTURE) {
 		rx_dws->dma_dev = &dw_dmac0_device.dev;
-		rx_dws->reg_width = DW_DMA_SLAVE_WIDTH_16BIT;
 		rx_dws->cfg_hi = DWC_CFGH_SRC_PER(3);
 		rx_dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL);
 		rx_dws->src_master = 0;
 		rx_dws->dst_master = 1;
-		rx_dws->src_msize = DW_DMA_MSIZE_1;
-		rx_dws->dst_msize = DW_DMA_MSIZE_1;
-		rx_dws->fc = DW_DMA_FC_D_P2M;
 	}
 
 	/* Check if DMA slave interface for playback should be configured. */
 	if (flags & AC97C_PLAYBACK) {
 		tx_dws->dma_dev = &dw_dmac0_device.dev;
-		tx_dws->reg_width = DW_DMA_SLAVE_WIDTH_16BIT;
 		tx_dws->cfg_hi = DWC_CFGH_DST_PER(4);
 		tx_dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL);
 		tx_dws->src_master = 0;
 		tx_dws->dst_master = 1;
-		tx_dws->src_msize = DW_DMA_MSIZE_1;
-		tx_dws->dst_msize = DW_DMA_MSIZE_1;
-		tx_dws->fc = DW_DMA_FC_D_M2P;
 	}
 
 	if (platform_device_add_data(pdev, data,
@@ -2138,14 +2129,10 @@ at32_add_device_abdac(unsigned int id, struct atmel_abdac_pdata *data)
 	dws = &data->dws;
 
 	dws->dma_dev = &dw_dmac0_device.dev;
-	dws->reg_width = DW_DMA_SLAVE_WIDTH_32BIT;
 	dws->cfg_hi = DWC_CFGH_DST_PER(2);
 	dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL);
 	dws->src_master = 0;
 	dws->dst_master = 1;
-	dws->src_msize = DW_DMA_MSIZE_1;
-	dws->dst_msize = DW_DMA_MSIZE_1;
-	dws->fc = DW_DMA_FC_D_M2P;
 
 	if (platform_device_add_data(pdev, data,
 				sizeof(struct atmel_abdac_pdata)))
diff --git a/arch/avr32/mach-at32ap/include/mach/atmel-mci.h b/arch/avr32/mach-at32ap/include/mach/atmel-mci.h
index a9b3896..4bba585 100644
--- a/arch/avr32/mach-at32ap/include/mach/atmel-mci.h
+++ b/arch/avr32/mach-at32ap/include/mach/atmel-mci.h
@@ -14,11 +14,4 @@ struct mci_dma_data {
 #define	slave_data_ptr(s)	(&(s)->sdata)
 #define find_slave_dev(s)	((s)->sdata.dma_dev)
 
-#define	setup_dma_addr(s, t, r)	do {		\
-	if (s) {				\
-		(s)->sdata.tx_reg = (t);	\
-		(s)->sdata.rx_reg = (r);	\
-	}					\
-} while (0)
-
 #endif /* __MACH_ATMEL_MCI_H */
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index fcfe1eb..3ba865d 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -24,6 +24,7 @@
 #include <linux/seq_file.h>
 #include <linux/slab.h>
 #include <linux/stat.h>
+#include <linux/types.h>
 
 #include <linux/mmc/host.h>
 #include <linux/mmc/sdio.h>
@@ -173,6 +174,7 @@ struct atmel_mci {
 
 	struct atmel_mci_dma	dma;
 	struct dma_chan		*data_chan;
+	struct dma_slave_config	dma_conf;
 
 	u32			cmd_status;
 	u32			data_status;
@@ -863,15 +865,16 @@ atmci_prepare_data_dma(struct atmel_mci *host, struct mmc_data *data)
 
 	if (data->flags & MMC_DATA_READ) {
 		direction = DMA_FROM_DEVICE;
-		slave_dirn = DMA_DEV_TO_MEM;
+		host->dma_conf.direction = slave_dirn = DMA_DEV_TO_MEM;
 	} else {
 		direction = DMA_TO_DEVICE;
-		slave_dirn = DMA_MEM_TO_DEV;
+		host->dma_conf.direction = slave_dirn = DMA_MEM_TO_DEV;
 	}
 
 	sglen = dma_map_sg(chan->device->dev, data->sg,
 			data->sg_len, direction);
 
+	dmaengine_slave_config(chan, &host->dma_conf);
 	desc = chan->device->device_prep_slave_sg(chan,
 			data->sg, sglen, slave_dirn,
 			DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
@@ -1957,22 +1960,27 @@ static void atmci_configure_dma(struct atmel_mci *host)
 	if (pdata && find_slave_dev(pdata->dma_slave)) {
 		dma_cap_mask_t mask;
 
-		setup_dma_addr(pdata->dma_slave,
-			       host->mapbase + ATMCI_TDR,
-			       host->mapbase + ATMCI_RDR);
-
 		/* Try to grab a DMA channel */
 		dma_cap_zero(mask);
 		dma_cap_set(DMA_SLAVE, mask);
 		host->dma.chan =
 			dma_request_channel(mask, atmci_filter, pdata->dma_slave);
 	}
-	if (!host->dma.chan)
+	if (!host->dma.chan) {
 		dev_notice(&host->pdev->dev, "DMA not available, using PIO\n");
-	else
+	} else {
 		dev_info(&host->pdev->dev,
 					"Using %s for DMA transfers\n",
 					dma_chan_name(host->dma.chan));
+
+		host->dma_conf.src_addr = host->mapbase + ATMCI_RDR;
+		host->dma_conf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+		host->dma_conf.src_maxburst = 1;
+		host->dma_conf.dst_addr = host->mapbase + ATMCI_TDR;
+		host->dma_conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+		host->dma_conf.dst_maxburst = 1;
+		host->dma_conf.device_fc = false;
+	}
 }
 
 static inline unsigned int atmci_get_version(struct atmel_mci *host)
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c
index 4fa1dbd..f7c2bb0 100644
--- a/sound/atmel/abdac.c
+++ b/sound/atmel/abdac.c
@@ -16,6 +16,7 @@
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/types.h>
 #include <linux/io.h>
 
 #include <sound/core.h>
@@ -467,15 +468,24 @@ static int __devinit atmel_abdac_probe(struct platform_device *pdev)
 	snd_card_set_dev(card, &pdev->dev);
 
 	if (pdata->dws.dma_dev) {
-		struct dw_dma_slave *dws = &pdata->dws;
 		dma_cap_mask_t mask;
 
-		dws->tx_reg = regs->start + DAC_DATA;
-
 		dma_cap_zero(mask);
 		dma_cap_set(DMA_SLAVE, mask);
 
-		dac->dma.chan = dma_request_channel(mask, filter, dws);
+		dac->dma.chan = dma_request_channel(mask, filter, &pdata->dws);
+		if (dac->dma.chan) {
+			struct dma_slave_config dma_conf = {
+				.dst_addr = regs->start + DAC_DATA,
+				.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
+				.src_maxburst = 1,
+				.dst_maxburst = 1,
+				.direction = DMA_MEM_TO_DEV,
+				.device_fc = false,
+			};
+
+			dmaengine_slave_config(dac->dma.chan, &dma_conf);
+		}
 	}
 	if (!pdata->dws.dma_dev || !dac->dma.chan) {
 		dev_dbg(&pdev->dev, "DMA not available\n");
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c
index cd9428b..15f47e3 100644
--- a/sound/atmel/ac97c.c
+++ b/sound/atmel/ac97c.c
@@ -20,6 +20,7 @@
 #include <linux/platform_device.h>
 #include <linux/mutex.h>
 #include <linux/gpio.h>
+#include <linux/types.h>
 #include <linux/io.h>
 
 #include <sound/core.h>
@@ -1010,16 +1011,28 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev)
 
 	if (cpu_is_at32ap7000()) {
 		if (pdata->rx_dws.dma_dev) {
-			struct dw_dma_slave *dws = &pdata->rx_dws;
 			dma_cap_mask_t mask;
 
-			dws->rx_reg = regs->start + AC97C_CARHR + 2;
-
 			dma_cap_zero(mask);
 			dma_cap_set(DMA_SLAVE, mask);
 
 			chip->dma.rx_chan = dma_request_channel(mask, filter,
-								dws);
+								&pdata->rx_dws);
+			if (chip->dma.rx_chan) {
+				struct dma_slave_config dma_conf = {
+					.src_addr = regs->start + AC97C_CARHR +
+						2,
+					.src_addr_width =
+						DMA_SLAVE_BUSWIDTH_2_BYTES,
+					.src_maxburst = 1,
+					.dst_maxburst = 1,
+					.direction = DMA_DEV_TO_MEM,
+					.device_fc = false,
+				};
+
+				dmaengine_slave_config(chip->dma.rx_chan,
+						&dma_conf);
+			}
 
 			dev_info(&chip->pdev->dev, "using %s for DMA RX\n",
 				dev_name(&chip->dma.rx_chan->dev->device));
@@ -1027,16 +1040,28 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev)
 		}
 
 		if (pdata->tx_dws.dma_dev) {
-			struct dw_dma_slave *dws = &pdata->tx_dws;
 			dma_cap_mask_t mask;
 
-			dws->tx_reg = regs->start + AC97C_CATHR + 2;
-
 			dma_cap_zero(mask);
 			dma_cap_set(DMA_SLAVE, mask);
 
 			chip->dma.tx_chan = dma_request_channel(mask, filter,
-								dws);
+								&pdata->tx_dws);
+			if (chip->dma.tx_chan) {
+				struct dma_slave_config dma_conf = {
+					.dst_addr = regs->start + AC97C_CATHR +
+						2,
+					.dst_addr_width =
+						DMA_SLAVE_BUSWIDTH_2_BYTES,
+					.src_maxburst = 1,
+					.dst_maxburst = 1,
+					.direction = DMA_MEM_TO_DEV,
+					.device_fc = false,
+				};
+
+				dmaengine_slave_config(chip->dma.tx_chan,
+						&dma_conf);
+			}
 
 			dev_info(&chip->pdev->dev, "using %s for DMA TX\n",
 				dev_name(&chip->dma.tx_chan->dev->device));
-- 
1.7.8.110.g4cb5d


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH V3 12/12] dmaengine/dw_dmac: Remove unused fields in struct dw_dma_slave
  2012-02-01 10:42 [PATCH V3 00/12] dmaengine: Pl08x and dw_dmac updates Viresh Kumar
                   ` (10 preceding siblings ...)
  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 ` Viresh Kumar
  2012-02-22 12:51 ` [PATCH V3 00/12] dmaengine: Pl08x and dw_dmac updates Vinod Koul
  12 siblings, 0 replies; 15+ messages in thread
From: Viresh Kumar @ 2012-02-01 10:42 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: cjb, rmk+kernel, linus.walleij, ulf.hansson, linux-mmc,
	linux-kernel, egtvedt, hskinnemoen, kernel, perex,
	linux-arm-kernel, armando.visconti, shiraz.hashim, vipin.kumar,
	rajeev-dlh.kumar, deepak.sikri, vipulkumar.samar, amit.virdi,
	viresh.kumar, pratyush.anand, bhupesh.sharma, viresh.linux,
	bhavna.yadav, vincenzo.frascino, mirko.gardi

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
 drivers/dma/dw_dmac_regs.h |   12 ++++++++++++
 include/linux/dw_dmac.h    |   38 --------------------------------------
 2 files changed, 12 insertions(+), 38 deletions(-)

diff --git a/drivers/dma/dw_dmac_regs.h b/drivers/dma/dw_dmac_regs.h
index 2005d30..eec0481 100644
--- a/drivers/dma/dw_dmac_regs.h
+++ b/drivers/dma/dw_dmac_regs.h
@@ -13,6 +13,18 @@
 
 #define DW_DMA_MAX_NR_CHANNELS	8
 
+/* flow controller */
+enum dw_dma_fc {
+	DW_DMA_FC_D_M2M,
+	DW_DMA_FC_D_M2P,
+	DW_DMA_FC_D_P2M,
+	DW_DMA_FC_D_P2P,
+	DW_DMA_FC_P_P2M,
+	DW_DMA_FC_SP_P2P,
+	DW_DMA_FC_P_M2P,
+	DW_DMA_FC_DP_P2P,
+};
+
 /*
  * Redefine this macro to handle differences between 32- and 64-bit
  * addressing, big vs. little endian, etc.
diff --git a/include/linux/dw_dmac.h b/include/linux/dw_dmac.h
index f2c64f9..2412e02 100644
--- a/include/linux/dw_dmac.h
+++ b/include/linux/dw_dmac.h
@@ -31,18 +31,6 @@ struct dw_dma_platform_data {
 	unsigned char	chan_priority;
 };
 
-/**
- * enum dw_dma_slave_width - DMA slave register access width.
- * @DMA_SLAVE_WIDTH_8BIT: Do 8-bit slave register accesses
- * @DMA_SLAVE_WIDTH_16BIT: Do 16-bit slave register accesses
- * @DMA_SLAVE_WIDTH_32BIT: Do 32-bit slave register accesses
- */
-enum dw_dma_slave_width {
-	DW_DMA_SLAVE_WIDTH_8BIT,
-	DW_DMA_SLAVE_WIDTH_16BIT,
-	DW_DMA_SLAVE_WIDTH_32BIT,
-};
-
 /* bursts size */
 enum dw_dma_msize {
 	DW_DMA_MSIZE_1,
@@ -55,47 +43,21 @@ enum dw_dma_msize {
 	DW_DMA_MSIZE_256,
 };
 
-/* flow controller */
-enum dw_dma_fc {
-	DW_DMA_FC_D_M2M,
-	DW_DMA_FC_D_M2P,
-	DW_DMA_FC_D_P2M,
-	DW_DMA_FC_D_P2P,
-	DW_DMA_FC_P_P2M,
-	DW_DMA_FC_SP_P2P,
-	DW_DMA_FC_P_M2P,
-	DW_DMA_FC_DP_P2P,
-};
-
 /**
  * struct dw_dma_slave - Controller-specific information about a slave
  *
  * @dma_dev: required DMA master device
- * @tx_reg: physical address of data register used for
- *	memory-to-peripheral transfers
- * @rx_reg: physical address of data register used for
- *	peripheral-to-memory transfers
- * @reg_width: peripheral register width
  * @cfg_hi: Platform-specific initializer for the CFG_HI register
  * @cfg_lo: Platform-specific initializer for the CFG_LO register
  * @src_master: src master for transfers on allocated channel.
  * @dst_master: dest master for transfers on allocated channel.
- * @src_msize: src burst size.
- * @dst_msize: dest burst size.
- * @fc: flow controller for DMA transfer
  */
 struct dw_dma_slave {
 	struct device		*dma_dev;
-	dma_addr_t		tx_reg;
-	dma_addr_t		rx_reg;
-	enum dw_dma_slave_width	reg_width;
 	u32			cfg_hi;
 	u32			cfg_lo;
 	u8			src_master;
 	u8			dst_master;
-	u8			src_msize;
-	u8			dst_msize;
-	u8			fc;
 };
 
 /* Platform-configurable bits in CFG_HI */
-- 
1.7.8.110.g4cb5d


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH V3 08/12] dmaengine/dw_dmac: Unmap all memory buffers after completion of non-slave transfers
  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
  0 siblings, 0 replies; 15+ messages in thread
From: Russell King - ARM Linux @ 2012-02-02 12:15 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: vinod.koul, dan.j.williams, rajeev-dlh.kumar, bhupesh.sharma,
	linus.walleij, mirko.gardi, perex, vipin.kumar, vipulkumar.samar,
	egtvedt, pratyush.anand, deepak.sikri, cjb, hskinnemoen,
	bhavna.yadav, armando.visconti, shiraz.hashim, amit.virdi,
	vincenzo.frascino, ulf.hansson, linux-arm-kernel, linux-mmc,
	linux-kernel, viresh.linux, kernel

On Wed, Feb 01, 2012 at 04:12:24PM +0530, Viresh Kumar wrote:
> Currently, after completion of transfer, source address or destination address
> of only the first LLI descriptor is unmapped. And length passed for unmap is
> total length of all descriptors in the list. Which means unmapping code assumed
> that the memory buffers pointed to by the descriptors will be physically
> contiguous, which might not be the case.
> 
> This patch intends to fix this wrong expectation of dw_dmac. Now, first desc
> will not contain total length of transfer. But individual descriptors will
> contain their individual lengths. Finally, we will call unmap for all
> descriptors.

I'm still unconvinced that this is anywhere close to correct.

Look.  DMA engines only automatically unmap when they're being used by the
async_tx stuff for memcpy's, and RAID computation offload, and the like.
These work with individual single buffers, not scatterlists.  These will
not be fragmented.

If the caller mapped it with a single or page mapping, then the DMA engine
ABSOLUTELY MUST unmap it with the equivalent unmapping function _with the
same arguments_ which were used to map it - and certainly not doing it
piece meal on multiple small bits of the buffer.  The whole buffer entirely
in one go.  Even if the DMA engine driver decides internally to split the
buffer into smaller chunks.

The DMA API demands that the following will always be satisfied:

	dma = dma_map_single(dev, addr, len, dir);

	dma_unmap_single(dev, dma, len, dir);

where those arguments passed into dma_unmap_single() are those which were
passed into/outof dma_map_single() _totally_ _unmodified_.

The same is true for dma_map_page()..dma_unmap_page().

> 
> Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
> ---
>  drivers/dma/dw_dmac.c |   49 +++++++++++++++++++++++++++++++------------------
>  1 files changed, 31 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
> index 5d7b199..49d477c 100644
> --- a/drivers/dma/dw_dmac.c
> +++ b/drivers/dma/dw_dmac.c
> @@ -231,6 +231,14 @@ static void dwc_dostart(struct dw_dma_chan *dwc, struct dw_desc *first)
>  
>  /*----------------------------------------------------------------------*/
>  
> +#define dw_dmac_unmap(utype, _desc, _child, _buf, _dir)			\
> +do {									\
> +	list_for_each_entry(_child, &_desc->tx_list, desc_node)		\
> +		dma_unmap_##utype(parent, _child->lli._buf,		\
> +				_child->len, _dir);			\
> +	dma_unmap_##utype(parent, _desc->lli._buf, _desc->len, _dir);	\
> +} while (0)
> +
>  static void
>  dwc_descriptor_complete(struct dw_dma_chan *dwc, struct dw_desc *desc,
>  		bool callback_required)
> @@ -264,19 +272,19 @@ dwc_descriptor_complete(struct dw_dma_chan *dwc, struct dw_desc *desc,
>  		struct device *parent = chan2parent(&dwc->chan);
>  		if (!(txd->flags & DMA_COMPL_SKIP_DEST_UNMAP)) {
>  			if (txd->flags & DMA_COMPL_DEST_UNMAP_SINGLE)
> -				dma_unmap_single(parent, desc->lli.dar,
> -						desc->len, DMA_FROM_DEVICE);
> +				dw_dmac_unmap(single, desc, child, dar,
> +						DMA_FROM_DEVICE);
>  			else
> -				dma_unmap_page(parent, desc->lli.dar,
> -						desc->len, DMA_FROM_DEVICE);
> +				dw_dmac_unmap(page, desc, child, dar,
> +						DMA_FROM_DEVICE);
>  		}
>  		if (!(txd->flags & DMA_COMPL_SKIP_SRC_UNMAP)) {
>  			if (txd->flags & DMA_COMPL_SRC_UNMAP_SINGLE)
> -				dma_unmap_single(parent, desc->lli.sar,
> -						desc->len, DMA_TO_DEVICE);
> +				dw_dmac_unmap(single, desc, child, sar,
> +						DMA_TO_DEVICE);
>  			else
> -				dma_unmap_page(parent, desc->lli.sar,
> -						desc->len, DMA_TO_DEVICE);
> +				dw_dmac_unmap(page, desc, child, sar,
> +						DMA_TO_DEVICE);
>  		}
>  	}
>  
> @@ -676,6 +684,7 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
>  		desc->lli.dar = dest + offset;
>  		desc->lli.ctllo = ctllo;
>  		desc->lli.ctlhi = xfer_count;
> +		desc->len = xfer_count << src_width;
>  
>  		if (!first) {
>  			first = desc;
> @@ -701,7 +710,6 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
>  			DMA_TO_DEVICE);
>  
>  	first->txd.flags = flags;
> -	first->len = len;
>  
>  	return &first->txd;
>  
> @@ -725,7 +733,6 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
>  	unsigned int		mem_width;
>  	unsigned int		i;
>  	struct scatterlist	*sg;
> -	size_t			total_len = 0;
>  
>  	dev_vdbg(chan2dev(chan), "prep_dma_slave\n");
>  
> @@ -774,6 +781,7 @@ slave_sg_todev_fill_desc:
>  			}
>  
>  			desc->lli.ctlhi = dlen >> mem_width;
> +			desc->len = dlen;
>  
>  			if (!first) {
>  				first = desc;
> @@ -787,7 +795,6 @@ slave_sg_todev_fill_desc:
>  						&first->tx_list);
>  			}
>  			prev = desc;
> -			total_len += dlen;
>  
>  			if (len)
>  				goto slave_sg_todev_fill_desc;
> @@ -831,6 +838,7 @@ slave_sg_fromdev_fill_desc:
>  				len = 0;
>  			}
>  			desc->lli.ctlhi = dlen >> reg_width;
> +			desc->len = dlen;
>  
>  			if (!first) {
>  				first = desc;
> @@ -844,7 +852,6 @@ slave_sg_fromdev_fill_desc:
>  						&first->tx_list);
>  			}
>  			prev = desc;
> -			total_len += dlen;
>  
>  			if (len)
>  				goto slave_sg_fromdev_fill_desc;
> @@ -863,8 +870,6 @@ slave_sg_fromdev_fill_desc:
>  			prev->txd.phys, sizeof(prev->lli),
>  			DMA_TO_DEVICE);
>  
> -	first->len = total_len;
> -
>  	return &first->txd;
>  
>  err_desc_get:
> @@ -950,11 +955,19 @@ dwc_tx_status(struct dma_chan *chan,
>  		ret = dma_async_is_complete(cookie, last_complete, last_used);
>  	}
>  
> -	if (ret != DMA_SUCCESS)
> -		dma_set_tx_state(txstate, last_complete, last_used,
> -				dwc_first_active(dwc)->len);
> -	else
> +	if (ret != DMA_SUCCESS) {
> +		struct dw_desc *desc, *child;
> +		unsigned int len;
> +
> +		desc = dwc_first_active(dwc);
> +		len = desc->len;
> +		list_for_each_entry(child, &desc->tx_list, desc_node)
> +			len += child->len;
> +
> +		dma_set_tx_state(txstate, last_complete, last_used, len);
> +	} else {
>  		dma_set_tx_state(txstate, last_complete, last_used, 0);
> +	}
>  
>  	if (dwc->paused)
>  		return DMA_PAUSED;
> -- 
> 1.7.8.110.g4cb5d
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH V3 00/12] dmaengine: Pl08x and dw_dmac updates
  2012-02-01 10:42 [PATCH V3 00/12] dmaengine: Pl08x and dw_dmac updates Viresh Kumar
                   ` (11 preceding siblings ...)
  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 ` Vinod Koul
  12 siblings, 0 replies; 15+ messages in thread
From: Vinod Koul @ 2012-02-22 12:51 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: dan.j.williams, cjb, rmk+kernel, linus.walleij, ulf.hansson,
	linux-mmc, linux-kernel, egtvedt, hskinnemoen, kernel, perex,
	linux-arm-kernel, armando.visconti, shiraz.hashim, vipin.kumar,
	rajeev-dlh.kumar, deepak.sikri, vipulkumar.samar, amit.virdi,
	pratyush.anand, bhupesh.sharma, viresh.linux, bhavna.yadav,
	vincenzo.frascino, mirko.gardi

On Wed, 2012-02-01 at 16:12 +0530, Viresh Kumar wrote:
> Hi Vinod/Dan,
> 
>    This patchset does following:
>    - Includes earlier patchset sent by Rajeev for cleanly applying this patchset
>    - Adds device_fc (device flow control) field in struct DMA_SLAVE_CONFIG
>    - Fixes existing users of DMAENGINE for device_fc.
>    - Updates pl08x driver according to that
>    - Fixes few issues/bugs in dw_dmac driver
>    - Adds DMA_SLAVE_CONFIG for dw_dmac driver
>    - Fixes existing users of dw_dmac driver
> 
> Change History:
> Since V2:
>  - fix code comment in 2/12
>  - fix commit log in 8/12
> 
> Since V1:
>    - used dev_get_platdata() instead of platform_get_drvdata(), as
>    that was
>    incorrect
>    - Lots of fixes in: dmaengine/dw_dmac: Add support for
>    DMA_SLAVE_CONFIG
>    - Additional patches:
>    - dmaengine/dw_dmac: Add 64 bit access width support for
>    slave xfers on
>    mem side
>    - Fix other kernel driver for device_fc
>    and dw_dmac changes.
> 
>    Rebased-on:
> 
>    commit
>    3506c0d507144d9b0f19efd5a56d289f70611179
>    Author: Tushar Behera
>    <tushar.behera@linaro.org>
>    Date:   Tue Dec 6 16:15:54 2011 +0530
> 
>    DMA: PL330: Remove pm_runtime_xxx
>    calls from pl330 probe/remove
> 
> 
> Rajeev KUMAR (1):
>   dmaengine/dw_dmac: Hibernation support in dw_dmac
> 
> Viresh Kumar (11):
>   dmaengine: Add flow controller information to dma_slave_config
>   dmaengine: Pass dma_slave_config .device_fc = NULL for all existing
>     users
>   dmaengine/amba-pl08x: Take flow controller info from DMA_SLAVE_CONFIG
>   dmaengine/dw_dmac: Don't use magic number for total number of
>     channels
>   dmaengine/dw_dmac: Use dev_get_platdata() instead of accessing dev
>     directly
>   dmaengine/dw_dmac: Don't handle block interrupts
>   dmaengine/dw_dmac: Unmap all memory buffers after completion of
>     non-slave transfers
>   dmaengine/dw_dmac: Add 64 bit access width support for slave xfers on
>     mem side
>   dmaengine/dw_dmac: Add support for DMA_SLAVE_CONFIG
>   dmaengine/dw_dmac: Fix dw_dmac user drivers to adapt to slave_config
>     changes
>   dmaengine/dw_dmac: Remove unused fields in struct dw_dma_slave
> 
>  arch/avr32/mach-at32ap/at32ap700x.c             |   13 --
>  arch/avr32/mach-at32ap/include/mach/atmel-mci.h |    7 -
>  drivers/dma/amba-pl08x.c                        |    4 +-
>  drivers/dma/dw_dmac.c                           |  232 +++++++++++++++--------
>  drivers/dma/dw_dmac_regs.h                      |   15 ++
>  drivers/mmc/host/atmel-mci.c                    |   24 ++-
>  drivers/mmc/host/mmci.c                         |    2 +
>  drivers/mmc/host/mxcmmc.c                       |    2 +
>  drivers/spi/spi-dw-mid.c                        |    3 +
>  drivers/spi/spi-pl022.c                         |    2 +
>  drivers/tty/serial/amba-pl011.c                 |    3 +
>  drivers/usb/musb/ux500_dma.c                    |    1 +
>  include/linux/amba/pl08x.h                      |    8 +-
>  include/linux/dmaengine.h                       |    5 +
>  include/linux/dw_dmac.h                         |   38 ----
>  sound/atmel/abdac.c                             |   18 ++-
>  sound/atmel/ac97c.c                             |   41 ++++-
>  sound/soc/imx/imx-pcm-dma-mx2.c                 |    3 +
>  18 files changed, 255 insertions(+), 166 deletions(-)
> 
applied all, except 8/12

-- 
~Vinod


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-02-22 12:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH V3 04/12] dmaengine/amba-pl08x: Take flow controller info from DMA_SLAVE_CONFIG Viresh Kumar
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-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

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).