All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH repost 0/4] dmaengine/dw_dmac: enhancements to allow use
@ 2011-01-21 14:11 Jamie Iles
  2011-01-21 14:11 ` [PATCH repost 1/4] dmaengine/dw_dmac: don't scan descriptors if no xfers in progress Jamie Iles
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Jamie Iles @ 2011-01-21 14:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jamie Iles

This is a repost of the patch series previously posted back in November
last year to allow the DW_DMAC driver to be used on architectures other
than AV32 (there is still a dependency on AVR32 but I'll create a follow
up patch for this once we have a user in tree).

Jamie Iles (4):
  dmaengine/dw_dmac: don't scan descriptors if no xfers in progress
  dmaengine/dw_dmac: allow src/dst masters to be configured at runtime
  dmaengine/dw_dmac: provide a mechanism to indicate private devices
  avr32: at32ap700x: specify DMA src and dst masters

 arch/avr32/mach-at32ap/at32ap700x.c |    6 +++++
 drivers/dma/dw_dmac.c               |   36 +++++++++++++++++++++-------------
 include/linux/dw_dmac.h             |    5 ++++
 3 files changed, 33 insertions(+), 14 deletions(-)

-- 
1.7.3.4


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

* [PATCH repost 1/4] dmaengine/dw_dmac: don't scan descriptors if no xfers in progress
  2011-01-21 14:11 [PATCH repost 0/4] dmaengine/dw_dmac: enhancements to allow use Jamie Iles
@ 2011-01-21 14:11 ` Jamie Iles
  2011-01-21 14:11 ` [PATCH repost 2/4] dmaengine/dw_dmac: allow src/dst masters to be configured at runtime Jamie Iles
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: Jamie Iles @ 2011-01-21 14:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jamie Iles, Dan Williams, Jamie Iles

Some hardware (picoChip picoXCell in particular) sometimes has
the block transfer complete bit being set for a channel after the
whole transfer has completed. If we don't have any transfers in the
active list then don't bother to scan the descriptors. This often
happens in normal operation and doesn't require the channel to be
reset.

v2: cleanup whitespace

Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jamie Iles <jamie.iles@picochip.com>
---
 drivers/dma/dw_dmac.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index a3991ab..db22754 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -291,6 +291,9 @@ static void dwc_scan_descriptors(struct dw_dma *dw, struct dw_dma_chan *dwc)
 		return;
 	}
 
+	if (list_empty(&dwc->active_list))
+		return;
+
 	dev_vdbg(chan2dev(&dwc->chan), "scan_descriptors: llp=0x%x\n", llp);
 
 	list_for_each_entry_safe(desc, _desc, &dwc->active_list, desc_node) {
-- 
1.7.3.4


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

* [PATCH repost 2/4] dmaengine/dw_dmac: allow src/dst masters to be configured at runtime
  2011-01-21 14:11 [PATCH repost 0/4] dmaengine/dw_dmac: enhancements to allow use Jamie Iles
  2011-01-21 14:11 ` [PATCH repost 1/4] dmaengine/dw_dmac: don't scan descriptors if no xfers in progress Jamie Iles
@ 2011-01-21 14:11 ` Jamie Iles
  2011-01-24 14:54   ` Hans-Christian Egtvedt
  2011-01-21 14:11 ` [PATCH repost 3/4] dmaengine/dw_dmac: provide a mechanism to indicate private devices Jamie Iles
  2011-01-21 14:11 ` [PATCH repost 4/4] avr32: at32ap700x: specify DMA src and dst masters Jamie Iles
  3 siblings, 1 reply; 13+ messages in thread
From: Jamie Iles @ 2011-01-21 14:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jamie Iles, Dan Williams, Hans-Christian Egtvedt, Jamie Iles

Some platforms have flexible mastering capabilities and this needs
to be selected at runtime. If the platform has specified private
data in the form of the dw_dma_slave then fetch the source and
destination masters from here. If this isn't present, default to
the previous of 0 and 1.

v2: cleanup whitespace

Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Jamie Iles <jamie.iles@picochip.com>
---
 drivers/dma/dw_dmac.c   |   31 +++++++++++++++++--------------
 include/linux/dw_dmac.h |    2 ++
 2 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index db22754..a4cf261 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -32,15 +32,18 @@
  * which does not support descriptor writeback.
  */
 
-/* NOTE:  DMS+SMS is system-specific. We should get this information
- * from the platform code somehow.
- */
-#define DWC_DEFAULT_CTLLO	(DWC_CTLL_DST_MSIZE(0)		\
-				| DWC_CTLL_SRC_MSIZE(0)		\
-				| DWC_CTLL_DMS(0)		\
-				| DWC_CTLL_SMS(1)		\
-				| DWC_CTLL_LLP_D_EN		\
-				| DWC_CTLL_LLP_S_EN)
+#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;	\
+								\
+		(DWC_CTLL_DST_MSIZE(0)				\
+		 | DWC_CTLL_SRC_MSIZE(0)			\
+		 | DWC_CTLL_LLP_D_EN				\
+		 | DWC_CTLL_LLP_S_EN				\
+		 | DWC_CTLL_DMS(dms)				\
+		 | DWC_CTLL_SMS(sms));				\
+	})
 
 /*
  * This is configuration-dependent and usually a funny size like 4095.
@@ -591,7 +594,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
+	ctllo = DWC_DEFAULT_CTLLO(chan->private)
 			| DWC_CTLL_DST_WIDTH(dst_width)
 			| DWC_CTLL_SRC_WIDTH(src_width)
 			| DWC_CTLL_DST_INC
@@ -672,7 +675,7 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
 
 	switch (direction) {
 	case DMA_TO_DEVICE:
-		ctllo = (DWC_DEFAULT_CTLLO
+		ctllo = (DWC_DEFAULT_CTLLO(chan->private)
 				| DWC_CTLL_DST_WIDTH(reg_width)
 				| DWC_CTLL_DST_FIX
 				| DWC_CTLL_SRC_INC
@@ -717,7 +720,7 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
 		}
 		break;
 	case DMA_FROM_DEVICE:
-		ctllo = (DWC_DEFAULT_CTLLO
+		ctllo = (DWC_DEFAULT_CTLLO(chan->private)
 				| DWC_CTLL_SRC_WIDTH(reg_width)
 				| DWC_CTLL_DST_INC
 				| DWC_CTLL_SRC_FIX
@@ -1129,7 +1132,7 @@ struct dw_cyclic_desc *dw_dma_cyclic_prep(struct dma_chan *chan,
 		case DMA_TO_DEVICE:
 			desc->lli.dar = dws->tx_reg;
 			desc->lli.sar = buf_addr + (period_len * i);
-			desc->lli.ctllo = (DWC_DEFAULT_CTLLO
+			desc->lli.ctllo = (DWC_DEFAULT_CTLLO(chan->private)
 					| DWC_CTLL_DST_WIDTH(reg_width)
 					| DWC_CTLL_SRC_WIDTH(reg_width)
 					| DWC_CTLL_DST_FIX
@@ -1140,7 +1143,7 @@ struct dw_cyclic_desc *dw_dma_cyclic_prep(struct dma_chan *chan,
 		case DMA_FROM_DEVICE:
 			desc->lli.dar = buf_addr + (period_len * i);
 			desc->lli.sar = dws->rx_reg;
-			desc->lli.ctllo = (DWC_DEFAULT_CTLLO
+			desc->lli.ctllo = (DWC_DEFAULT_CTLLO(chan->private)
 					| DWC_CTLL_SRC_WIDTH(reg_width)
 					| DWC_CTLL_DST_WIDTH(reg_width)
 					| DWC_CTLL_DST_INC
diff --git a/include/linux/dw_dmac.h b/include/linux/dw_dmac.h
index c8aad71..8014eb8 100644
--- a/include/linux/dw_dmac.h
+++ b/include/linux/dw_dmac.h
@@ -52,6 +52,8 @@ struct dw_dma_slave {
 	enum dw_dma_slave_width	reg_width;
 	u32			cfg_hi;
 	u32			cfg_lo;
+	int			src_master;
+	int			dst_master;
 };
 
 /* Platform-configurable bits in CFG_HI */
-- 
1.7.3.4


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

* [PATCH repost 3/4] dmaengine/dw_dmac: provide a mechanism to indicate private devices
  2011-01-21 14:11 [PATCH repost 0/4] dmaengine/dw_dmac: enhancements to allow use Jamie Iles
  2011-01-21 14:11 ` [PATCH repost 1/4] dmaengine/dw_dmac: don't scan descriptors if no xfers in progress Jamie Iles
  2011-01-21 14:11 ` [PATCH repost 2/4] dmaengine/dw_dmac: allow src/dst masters to be configured at runtime Jamie Iles
@ 2011-01-21 14:11 ` Jamie Iles
  2011-01-21 14:11 ` [PATCH repost 4/4] avr32: at32ap700x: specify DMA src and dst masters Jamie Iles
  3 siblings, 0 replies; 13+ messages in thread
From: Jamie Iles @ 2011-01-21 14:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jamie Iles, Dan Williams, Jamie Iles

Some platforms (e.g. Picochip PC3XX) have multiple DMA controllers
where some may be used for slave transfers and others for general
purpose memcpy type transfers. Add a .is_private boolean to the
platform data structure so that controllers can be marked as private
so that the DMA_PRIVATE capability will be set for that controller.

Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jamie Iles <jamie.iles@picochip.com>
---
 drivers/dma/dw_dmac.c   |    2 ++
 include/linux/dw_dmac.h |    3 +++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index a4cf261..08dab3b 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1341,6 +1341,8 @@ static int __init dw_probe(struct platform_device *pdev)
 
 	dma_cap_set(DMA_MEMCPY, dw->dma.cap_mask);
 	dma_cap_set(DMA_SLAVE, dw->dma.cap_mask);
+	if (pdata->is_private)
+		dma_cap_set(DMA_PRIVATE, dw->dma.cap_mask);
 	dw->dma.dev = &pdev->dev;
 	dw->dma.device_alloc_chan_resources = dwc_alloc_chan_resources;
 	dw->dma.device_free_chan_resources = dwc_free_chan_resources;
diff --git a/include/linux/dw_dmac.h b/include/linux/dw_dmac.h
index 8014eb8..deec66b 100644
--- a/include/linux/dw_dmac.h
+++ b/include/linux/dw_dmac.h
@@ -16,9 +16,12 @@
 /**
  * struct dw_dma_platform_data - Controller configuration parameters
  * @nr_channels: Number of channels supported by hardware (max 8)
+ * @is_private: The device channels should be marked as private and not for
+ *	by the general purpose DMA channel allocator.
  */
 struct dw_dma_platform_data {
 	unsigned int	nr_channels;
+	bool		is_private;
 };
 
 /**
-- 
1.7.3.4


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

* [PATCH repost 4/4] avr32: at32ap700x: specify DMA src and dst masters
  2011-01-21 14:11 [PATCH repost 0/4] dmaengine/dw_dmac: enhancements to allow use Jamie Iles
                   ` (2 preceding siblings ...)
  2011-01-21 14:11 ` [PATCH repost 3/4] dmaengine/dw_dmac: provide a mechanism to indicate private devices Jamie Iles
@ 2011-01-21 14:11 ` Jamie Iles
  2011-01-24 14:59   ` Hans-Christian Egtvedt
  2011-02-21 13:45   ` Hans-Christian Egtvedt
  3 siblings, 2 replies; 13+ messages in thread
From: Jamie Iles @ 2011-01-21 14:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jamie Iles, Hans-Christian Egtvedt, Dan Williams

Now that the dw_dmac DMA driver supports configurable source and
destination masters we need to specify which ones to use. This was
previously hardcoded to 0 and 1 respectively in the driver.

Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
 arch/avr32/mach-at32ap/at32ap700x.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index e67c999..2747cde 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -2048,6 +2048,8 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data,
 		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;
 	}
 
 	/* Check if DMA slave interface for playback should be configured. */
@@ -2056,6 +2058,8 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data,
 		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);
+		rx_dws->src_master = 0;
+		rx_dws->dst_master = 1;
 	}
 
 	if (platform_device_add_data(pdev, data,
@@ -2128,6 +2132,8 @@ at32_add_device_abdac(unsigned int id, struct atmel_abdac_pdata *data)
 	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;
 
 	if (platform_device_add_data(pdev, data,
 				sizeof(struct atmel_abdac_pdata)))
-- 
1.7.3.4


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

* Re: [PATCH repost 2/4] dmaengine/dw_dmac: allow src/dst masters to be configured at runtime
  2011-01-21 14:11 ` [PATCH repost 2/4] dmaengine/dw_dmac: allow src/dst masters to be configured at runtime Jamie Iles
@ 2011-01-24 14:54   ` Hans-Christian Egtvedt
  0 siblings, 0 replies; 13+ messages in thread
From: Hans-Christian Egtvedt @ 2011-01-24 14:54 UTC (permalink / raw)
  To: Jamie Iles; +Cc: linux-kernel, Dan Williams, Jamie Iles

On Fri, 2011-01-21 at 14:11 +0000, Jamie Iles wrote: 
> Some platforms have flexible mastering capabilities and this needs
> to be selected at runtime. If the platform has specified private
> data in the form of the dw_dma_slave then fetch the source and
> destination masters from here. If this isn't present, default to
> the previous of 0 and 1.
> 
> v2: cleanup whitespace
> 
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
> Signed-off-by: Jamie Iles <jamie.iles@picochip.com>

Acked-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>

<snipp>

-- 
Hans-Christian Egtvedt


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

* Re: [PATCH repost 4/4] avr32: at32ap700x: specify DMA src and dst masters
  2011-01-21 14:11 ` [PATCH repost 4/4] avr32: at32ap700x: specify DMA src and dst masters Jamie Iles
@ 2011-01-24 14:59   ` Hans-Christian Egtvedt
  2011-01-30  6:33     ` Dan Williams
  2011-02-21 13:45   ` Hans-Christian Egtvedt
  1 sibling, 1 reply; 13+ messages in thread
From: Hans-Christian Egtvedt @ 2011-01-24 14:59 UTC (permalink / raw)
  To: Jamie Iles; +Cc: linux-kernel, Dan Williams

On Fri, 2011-01-21 at 14:11 +0000, Jamie Iles wrote: 
> Now that the dw_dmac DMA driver supports configurable source and
> destination masters we need to specify which ones to use. This was
> previously hardcoded to 0 and 1 respectively in the driver.
> 
> Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>

Acked-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>

<snipp>

-- 
Hans-Christian Egtvedt


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

* Re: [PATCH repost 4/4] avr32: at32ap700x: specify DMA src and dst masters
  2011-01-24 14:59   ` Hans-Christian Egtvedt
@ 2011-01-30  6:33     ` Dan Williams
  2011-02-04 11:06       ` Jamie Iles
  0 siblings, 1 reply; 13+ messages in thread
From: Dan Williams @ 2011-01-30  6:33 UTC (permalink / raw)
  To: Hans-Christian Egtvedt; +Cc: Jamie Iles, linux-kernel

On Mon, Jan 24, 2011 at 6:59 AM, Hans-Christian Egtvedt
<hans-christian.egtvedt@atmel.com> wrote:
> On Fri, 2011-01-21 at 14:11 +0000, Jamie Iles wrote:
>> Now that the dw_dmac DMA driver supports configurable source and
>> destination masters we need to specify which ones to use. This was
>> previously hardcoded to 0 and 1 respectively in the driver.
>>
>> Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
>> Cc: Dan Williams <dan.j.williams@intel.com>
>> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
>
> Acked-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>

I applied 1-4 will try to submit for 2.6.38 as these were ready before
the merge window opened.

Thanks,
Dan

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

* Re: [PATCH repost 4/4] avr32: at32ap700x: specify DMA src and dst masters
  2011-01-30  6:33     ` Dan Williams
@ 2011-02-04 11:06       ` Jamie Iles
  0 siblings, 0 replies; 13+ messages in thread
From: Jamie Iles @ 2011-02-04 11:06 UTC (permalink / raw)
  To: Dan Williams; +Cc: Hans-Christian Egtvedt, Jamie Iles, linux-kernel

On Sat, Jan 29, 2011 at 10:33:26PM -0800, Dan Williams wrote:
> On Mon, Jan 24, 2011 at 6:59 AM, Hans-Christian Egtvedt
> <hans-christian.egtvedt@atmel.com> wrote:
> > On Fri, 2011-01-21 at 14:11 +0000, Jamie Iles wrote:
> >> Now that the dw_dmac DMA driver supports configurable source and
> >> destination masters we need to specify which ones to use. This was
> >> previously hardcoded to 0 and 1 respectively in the driver.
> >>
> >> Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
> >> Cc: Dan Williams <dan.j.williams@intel.com>
> >> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> >
> > Acked-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
> 
> I applied 1-4 will try to submit for 2.6.38 as these were ready before
> the merge window opened.

Thanks Dan!

Jamie

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

* Re: [PATCH repost 4/4] avr32: at32ap700x: specify DMA src and dst masters
  2011-01-21 14:11 ` [PATCH repost 4/4] avr32: at32ap700x: specify DMA src and dst masters Jamie Iles
  2011-01-24 14:59   ` Hans-Christian Egtvedt
@ 2011-02-21 13:45   ` Hans-Christian Egtvedt
  2011-02-21 14:45     ` Jamie Iles
  1 sibling, 1 reply; 13+ messages in thread
From: Hans-Christian Egtvedt @ 2011-02-21 13:45 UTC (permalink / raw)
  To: Jamie Iles; +Cc: linux-kernel, Dan Williams

On Fri, 2011-01-21 at 14:11 +0000, Jamie Iles wrote: 
> Now that the dw_dmac DMA driver supports configurable source and
> destination masters we need to specify which ones to use. This was
> previously hardcoded to 0 and 1 respectively in the driver.
> 
> Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> ---
>  arch/avr32/mach-at32ap/at32ap700x.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
> index e67c999..2747cde 100644
> --- a/arch/avr32/mach-at32ap/at32ap700x.c
> +++ b/arch/avr32/mach-at32ap/at32ap700x.c
> @@ -2048,6 +2048,8 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data,
>  		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;
>  	}
>  
>  	/* Check if DMA slave interface for playback should be configured. */
> @@ -2056,6 +2058,8 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data,
>  		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);
> +		rx_dws->src_master = 0;
> +		rx_dws->dst_master = 1;

Spotted by Nicolas Ferre, you use the wrong struct here, should be
tx_dws, not rx_dws.

<snipp>

-- 
Hans-Christian Egtvedt


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

* Re: [PATCH repost 4/4] avr32: at32ap700x: specify DMA src and dst masters
  2011-02-21 13:45   ` Hans-Christian Egtvedt
@ 2011-02-21 14:45     ` Jamie Iles
  2011-03-15 14:56       ` Jamie Iles
  0 siblings, 1 reply; 13+ messages in thread
From: Jamie Iles @ 2011-02-21 14:45 UTC (permalink / raw)
  To: Hans-Christian Egtvedt
  Cc: Jamie Iles, linux-kernel, Dan Williams, nicolas.ferre

On Mon, Feb 21, 2011 at 02:45:00PM +0100, Hans-Christian Egtvedt wrote:
> On Fri, 2011-01-21 at 14:11 +0000, Jamie Iles wrote: 
> > Now that the dw_dmac DMA driver supports configurable source and
> > destination masters we need to specify which ones to use. This was
> > previously hardcoded to 0 and 1 respectively in the driver.
> > 
> > Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
> > Cc: Dan Williams <dan.j.williams@intel.com>
> > Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> > ---
> >  arch/avr32/mach-at32ap/at32ap700x.c |    6 ++++++
> >  1 files changed, 6 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
> > index e67c999..2747cde 100644
> > --- a/arch/avr32/mach-at32ap/at32ap700x.c
> > +++ b/arch/avr32/mach-at32ap/at32ap700x.c
> > @@ -2048,6 +2048,8 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data,
> >  		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;
> >  	}
> >  
> >  	/* Check if DMA slave interface for playback should be configured. */
> > @@ -2056,6 +2058,8 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data,
> >  		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);
> > +		rx_dws->src_master = 0;
> > +		rx_dws->dst_master = 1;
> 
> Spotted by Nicolas Ferre, you use the wrong struct here, should be
> tx_dws, not rx_dws.

Apologies, here's a patch to fix it up.

Jamie

8<--------

>From 9068d500450ad6f5189b9a71463851349700c505 Mon Sep 17 00:00:00 2001
From: Jamie Iles <jamie@jamieiles.com>
Date: Mon, 21 Feb 2011 14:38:32 +0000
Subject: [PATCH] avr32: at32ap700x: fix typo in DMA master configuration

Commit 4aa5f366431fe (avr32: at32ap700x: specify DMA src and dst
masters) specified the masters for the ac97c playback device
but incorrectly set them in the capture slave information rather
than playback.

Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
 arch/avr32/mach-at32ap/at32ap700x.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index 2747cde..4635c7c 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -2058,8 +2058,8 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data,
 		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);
-		rx_dws->src_master = 0;
-		rx_dws->dst_master = 1;
+		tx_dws->src_master = 0;
+		tx_dws->dst_master = 1;
 	}
 
 	if (platform_device_add_data(pdev, data,
-- 
1.7.4


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

* Re: [PATCH repost 4/4] avr32: at32ap700x: specify DMA src and dst masters
  2011-02-21 14:45     ` Jamie Iles
@ 2011-03-15 14:56       ` Jamie Iles
  2011-03-16  2:08         ` Koul, Vinod
  0 siblings, 1 reply; 13+ messages in thread
From: Jamie Iles @ 2011-03-15 14:56 UTC (permalink / raw)
  To: Jamie Iles
  Cc: Hans-Christian Egtvedt, linux-kernel, Dan Williams,
	nicolas.ferre, vinod.koul

On Mon, Feb 21, 2011 at 02:45:40PM +0000, Jamie Iles wrote:
> On Mon, Feb 21, 2011 at 02:45:00PM +0100, Hans-Christian Egtvedt wrote:
> > Spotted by Nicolas Ferre, you use the wrong struct here, should be
> > tx_dws, not rx_dws.
> 
> Apologies, here's a patch to fix it up.

Is anyone able to take this for the next merge?

Jamie

> 
> Jamie
> 
> 8<--------
> 
> From 9068d500450ad6f5189b9a71463851349700c505 Mon Sep 17 00:00:00 2001
> From: Jamie Iles <jamie@jamieiles.com>
> Date: Mon, 21 Feb 2011 14:38:32 +0000
> Subject: [PATCH] avr32: at32ap700x: fix typo in DMA master configuration
> 
> Commit 4aa5f366431fe (avr32: at32ap700x: specify DMA src and dst
> masters) specified the masters for the ac97c playback device
> but incorrectly set them in the capture slave information rather
> than playback.
> 
> Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> ---
>  arch/avr32/mach-at32ap/at32ap700x.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
> index 2747cde..4635c7c 100644
> --- a/arch/avr32/mach-at32ap/at32ap700x.c
> +++ b/arch/avr32/mach-at32ap/at32ap700x.c
> @@ -2058,8 +2058,8 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data,
>  		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);
> -		rx_dws->src_master = 0;
> -		rx_dws->dst_master = 1;
> +		tx_dws->src_master = 0;
> +		tx_dws->dst_master = 1;
>  	}
>  
>  	if (platform_device_add_data(pdev, data,
> -- 
> 1.7.4
> 

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

* Re: [PATCH repost 4/4] avr32: at32ap700x: specify DMA src and dst masters
  2011-03-15 14:56       ` Jamie Iles
@ 2011-03-16  2:08         ` Koul, Vinod
  0 siblings, 0 replies; 13+ messages in thread
From: Koul, Vinod @ 2011-03-16  2:08 UTC (permalink / raw)
  To: Jamie Iles
  Cc: Hans-Christian Egtvedt, linux-kernel, Williams, Dan J, nicolas.ferre

On Tue, 2011-03-15 at 20:26 +0530, Jamie Iles wrote:
> On Mon, Feb 21, 2011 at 02:45:40PM +0000, Jamie Iles wrote:
> > On Mon, Feb 21, 2011 at 02:45:00PM +0100, Hans-Christian Egtvedt wrote:
> > > Spotted by Nicolas Ferre, you use the wrong struct here, should be
> > > tx_dws, not rx_dws.
> > 
> > Apologies, here's a patch to fix it up.
> 
> Is anyone able to take this for the next merge?
> 
> Jamie
> 
> > 
> > Jamie
> > 
> > 8<--------
> > 
> > From 9068d500450ad6f5189b9a71463851349700c505 Mon Sep 17 00:00:00 2001
> > From: Jamie Iles <jamie@jamieiles.com>
> > Date: Mon, 21 Feb 2011 14:38:32 +0000
> > Subject: [PATCH] avr32: at32ap700x: fix typo in DMA master configuration
> > 
> > Commit 4aa5f366431fe (avr32: at32ap700x: specify DMA src and dst
> > masters) specified the masters for the ac97c playback device
> > but incorrectly set them in the capture slave information rather
> > than playback.
> > 
> > Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
> > Cc: Dan Williams <dan.j.williams@intel.com>
> > Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> > ---
> >  arch/avr32/mach-at32ap/at32ap700x.c |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
> > index 2747cde..4635c7c 100644
> > --- a/arch/avr32/mach-at32ap/at32ap700x.c
> > +++ b/arch/avr32/mach-at32ap/at32ap700x.c
> > @@ -2058,8 +2058,8 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data,
> >  		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);
> > -		rx_dws->src_master = 0;
> > -		rx_dws->dst_master = 1;
> > +		tx_dws->src_master = 0;
> > +		tx_dws->dst_master = 1;
> >  	}
> >  
> >  	if (platform_device_add_data(pdev, data,
> > -- 
> > 1.7.4
> > 
Looks good to me,

Acked-By: Vinod Koul <vinod.koul@intel.com>

Dan, please put this into you next queue as well

-- 
~Vinod


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

end of thread, other threads:[~2011-03-16  2:38 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-21 14:11 [PATCH repost 0/4] dmaengine/dw_dmac: enhancements to allow use Jamie Iles
2011-01-21 14:11 ` [PATCH repost 1/4] dmaengine/dw_dmac: don't scan descriptors if no xfers in progress Jamie Iles
2011-01-21 14:11 ` [PATCH repost 2/4] dmaengine/dw_dmac: allow src/dst masters to be configured at runtime Jamie Iles
2011-01-24 14:54   ` Hans-Christian Egtvedt
2011-01-21 14:11 ` [PATCH repost 3/4] dmaengine/dw_dmac: provide a mechanism to indicate private devices Jamie Iles
2011-01-21 14:11 ` [PATCH repost 4/4] avr32: at32ap700x: specify DMA src and dst masters Jamie Iles
2011-01-24 14:59   ` Hans-Christian Egtvedt
2011-01-30  6:33     ` Dan Williams
2011-02-04 11:06       ` Jamie Iles
2011-02-21 13:45   ` Hans-Christian Egtvedt
2011-02-21 14:45     ` Jamie Iles
2011-03-15 14:56       ` Jamie Iles
2011-03-16  2:08         ` Koul, Vinod

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.