All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Vinod Koul <vinod.koul@intel.com>
Cc: dan.j.williams@intel.com, linux-kernel@vger.kernel.org,
	jaswinder.singh@linaro.org, 21cnbao@gmail.com,
	rmk@arm.linux.org.uk, Vinod Koul <vinod.koul@linux.intel.com>,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	Viresh Kumar <viresh.kumar@st.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Mika Westerberg <mika.westerberg@iki.fi>,
	H Hartley Sweeten <hartleys@visionengravers.com>,
	Li Yang <leoli@freescale.com>, Zhang Wei <zw@zh-kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Shawn Guo <shawn.guo@freescale.com>,
	Yong Wang <yong.y.wang@intel.com>,
	Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>,
	Boojin Kim <boojin.kim@samsung.com>,
	Barry Song <Baohua.Song@csr.com>
Subject: Re: [PATCH 02/10] dmaengine: move drivers to dma_transfer_direction
Date: Mon, 17 Oct 2011 11:58:58 +0200	[thread overview]
Message-ID: <4E9BFC62.1080102@atmel.com> (raw)
In-Reply-To: <1318570705-17595-3-git-send-email-vinod.koul@intel.com>

On 10/14/2011 07:38 AM, Vinod Koul :
> From: Vinod Koul <vinod.koul@linux.intel.com>
> 
> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
> Cc: Jassi Brar <jaswinder.singh@linaro.org>
> Cc: Russell King <rmk+kernel@arm.linux.org.uk>
> Cc: Viresh Kumar <viresh.kumar@st.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>

[..]

> index fcfa0a8..7968a81 100644
> --- a/drivers/dma/at_hdmac.c
> +++ b/drivers/dma/at_hdmac.c
> @@ -660,7 +660,7 @@ err_desc_get:
>   */
>  static struct dma_async_tx_descriptor *
>  atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
> -		unsigned int sg_len, enum dma_data_direction direction,
> +		unsigned int sg_len, enum dma_transfer_direction direction,
>  		unsigned long flags)
>  {
>  	struct at_dma_chan	*atchan = to_at_dma_chan(chan);
> @@ -678,7 +678,7 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
>  
>  	dev_vdbg(chan2dev(chan), "prep_slave_sg (%d): %s f0x%lx\n",
>  			sg_len,
> -			direction == DMA_TO_DEVICE ? "TO DEVICE" : "FROM DEVICE",
> +			direction == MEM_TO_DEV ? "TO DEVICE" : "FROM DEVICE",
>  			flags);
>  
>  	if (unlikely(!atslave || !sg_len)) {
> @@ -692,7 +692,7 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
>  	ctrlb = ATC_IEN;
>  
>  	switch (direction) {
> -	case DMA_TO_DEVICE:
> +	case MEM_TO_DEV:
>  		ctrla |=  ATC_DST_WIDTH(reg_width);
>  		ctrlb |=  ATC_DST_ADDR_MODE_FIXED
>  			| ATC_SRC_ADDR_MODE_INCR
> @@ -725,7 +725,7 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
>  			total_len += len;
>  		}
>  		break;
> -	case DMA_FROM_DEVICE:
> +	case DEV_TO_MEM:
>  		ctrla |=  ATC_SRC_WIDTH(reg_width);
>  		ctrlb |=  ATC_DST_ADDR_MODE_INCR
>  			| ATC_SRC_ADDR_MODE_FIXED
> @@ -787,7 +787,7 @@ err_desc_get:
>   */
>  static int
>  atc_dma_cyclic_check_values(unsigned int reg_width, dma_addr_t buf_addr,
> -		size_t period_len, enum dma_data_direction direction)
> +		size_t period_len, enum dma_transfer_direction direction)
>  {
>  	if (period_len > (ATC_BTSIZE_MAX << reg_width))
>  		goto err_out;
> @@ -795,7 +795,7 @@ atc_dma_cyclic_check_values(unsigned int reg_width, dma_addr_t buf_addr,
>  		goto err_out;
>  	if (unlikely(buf_addr & ((1 << reg_width) - 1)))
>  		goto err_out;
> -	if (unlikely(!(direction & (DMA_TO_DEVICE | DMA_FROM_DEVICE))))
> +	if (unlikely(!(direction & (DEV_TO_MEM | MEM_TO_DEV))))
>  		goto err_out;
>  
>  	return 0;
> @@ -810,7 +810,7 @@ err_out:
>  static int
>  atc_dma_cyclic_fill_desc(struct at_dma_slave *atslave, struct at_desc *desc,
>  		unsigned int period_index, dma_addr_t buf_addr,
> -		size_t period_len, enum dma_data_direction direction)
> +		size_t period_len, enum dma_transfer_direction direction)
>  {
>  	u32		ctrla;
>  	unsigned int	reg_width = atslave->reg_width;
> @@ -822,7 +822,7 @@ atc_dma_cyclic_fill_desc(struct at_dma_slave *atslave, struct at_desc *desc,
>  		| period_len >> reg_width;
>  
>  	switch (direction) {
> -	case DMA_TO_DEVICE:
> +	case MEM_TO_DEV:
>  		desc->lli.saddr = buf_addr + (period_len * period_index);
>  		desc->lli.daddr = atslave->tx_reg;
>  		desc->lli.ctrla = ctrla;
> @@ -833,7 +833,7 @@ atc_dma_cyclic_fill_desc(struct at_dma_slave *atslave, struct at_desc *desc,
>  				| ATC_DIF(AT_DMA_PER_IF);
>  		break;
>  
> -	case DMA_FROM_DEVICE:
> +	case DEV_TO_MEM:
>  		desc->lli.saddr = atslave->rx_reg;
>  		desc->lli.daddr = buf_addr + (period_len * period_index);
>  		desc->lli.ctrla = ctrla;
> @@ -861,7 +861,7 @@ atc_dma_cyclic_fill_desc(struct at_dma_slave *atslave, struct at_desc *desc,
>   */
>  static struct dma_async_tx_descriptor *
>  atc_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
> -		size_t period_len, enum dma_data_direction direction)
> +		size_t period_len, enum dma_transfer_direction direction)
>  {
>  	struct at_dma_chan	*atchan = to_at_dma_chan(chan);
>  	struct at_dma_slave	*atslave = chan->private;
> @@ -872,7 +872,7 @@ atc_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
>  	unsigned int		i;
>  
>  	dev_vdbg(chan2dev(chan), "prep_dma_cyclic: %s buf@0x%08x - %d (%d/%d)\n",
> -			direction == DMA_TO_DEVICE ? "TO DEVICE" : "FROM DEVICE",
> +			direction == MEM_TO_DEV ? "TO DEVICE" : "FROM DEVICE",
>  			buf_addr,
>  			periods, buf_len, period_len);
>  

For at_hdmac (Atmel DMA controller)

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Best regards,
-- 
Nicolas Ferre

  parent reply	other threads:[~2011-10-17 10:00 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-14  5:38 [PATCH 00/10] dmaengine: move to enum dma_transfer_direction Vinod Koul
2011-10-14  5:38 ` [PATCH 01/10] dmaengine: add new " Vinod Koul
2011-10-14  6:15   ` Barry Song
2011-10-15 12:46   ` Russell King
2011-10-15 14:22     ` Barry Song
2011-10-15 17:04     ` Vinod Koul
2011-10-14  5:38 ` [PATCH 02/10] dmaengine: move drivers to dma_transfer_direction Vinod Koul
2011-10-15 19:02   ` Mika Westerberg
2011-10-16 11:02   ` Linus Walleij
2011-10-17  5:28   ` Viresh Kumar
2011-10-17 13:15     ` Vinod Koul
2011-10-18  9:06       ` Viresh Kumar
2011-10-17  9:58   ` Nicolas Ferre [this message]
2011-10-17 12:52   ` Guennadi Liakhovetski
2011-10-18  2:48     ` Vinod Koul
2011-10-27 16:56     ` Vinod Koul
2011-11-21 12:20   ` Dan Carpenter
2011-11-21 16:03     ` Vinod Koul
2011-10-14  5:38 ` [PATCH 03/10] plat-samsung: move " Vinod Koul
2011-10-14  7:28   ` Kukjin Kim
2011-10-14 16:14     ` Vinod Koul
2011-10-14  5:38 ` [PATCH 04/10] media-video: " Vinod Koul
2011-10-17 12:52   ` Guennadi Liakhovetski
2011-10-14  5:38 ` [PATCH 05/10] carma: " Vinod Koul
2011-10-14  5:38 ` [PATCH 06/10] mmc-host: " Vinod Koul
2011-10-17  9:56   ` Nicolas Ferre
2011-10-17 12:59   ` Guennadi Liakhovetski
2011-10-14  5:38 ` [PATCH 07/10] spi, serial: " Vinod Koul
2011-10-15 19:00   ` Mika Westerberg
2011-10-16  8:01     ` Vinod Koul
2011-10-16  4:21   ` Grant Likely
2011-10-16  8:03     ` Vinod Koul
2011-10-14  5:38 ` [PATCH 08/10] sound-soc: " Vinod Koul
2011-10-14  9:40   ` Mark Brown
2011-10-14  5:38 ` [PATCH 09/10] USB: " Vinod Koul
2011-10-14  7:20   ` Felipe Balbi
2011-10-14  7:17     ` Vinod Koul
2011-10-14 11:01   ` Jassi Brar
2011-10-14 16:13     ` Vinod Koul
2011-10-14  5:38 ` [PATCH 10/10] net-ks8842: " Vinod Koul
2011-10-14 16:39 ` [PATCH v2 1/2] USB-musb: " Vinod Koul
2011-11-08 14:02   ` Felipe Balbi
2011-11-08 14:07     ` Felipe Balbi
2011-11-08 16:12       ` Vinod Koul
2011-11-09  6:09   ` Felipe Balbi
2011-11-09  8:38     ` Mian Yousaf Kaukab
2011-10-14 16:39 ` [PATCH 2/2] USB-renesas: " Vinod Koul
2011-11-08 14:02   ` Felipe Balbi
2011-11-09  6:10   ` Felipe Balbi
2011-11-10  0:06     ` Kuninori Morimoto
2011-11-10  0:06     ` Kuninori Morimoto
2011-11-17  9:19 ` [PATCH 00/10] dmaengine: move to enum dma_transfer_direction Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E9BFC62.1080102@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=21cnbao@gmail.com \
    --cc=Baohua.Song@csr.com \
    --cc=boojin.kim@samsung.com \
    --cc=dan.j.williams@intel.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=hartleys@visionengravers.com \
    --cc=jaswinder.singh@linaro.org \
    --cc=leoli@freescale.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@iki.fi \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=rmk@arm.linux.org.uk \
    --cc=s.hauer@pengutronix.de \
    --cc=shawn.guo@freescale.com \
    --cc=tomoya-linux@dsn.lapis-semi.com \
    --cc=vinod.koul@intel.com \
    --cc=vinod.koul@linux.intel.com \
    --cc=viresh.kumar@st.com \
    --cc=yong.y.wang@intel.com \
    --cc=zw@zh-kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is 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.