public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: kernel@pengutronix.de, Boris Brezillon <bbrezillon@kernel.org>,
	Richard Weinberger <richard@nod.at>,
	linux-mtd@lists.infradead.org, NXP Linux Team <linux-imx@nxp.com>,
	Fabio Estevam <festevam@gmail.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Han Xu <han.xu@nxp.com>, Shawn Guo <shawnguo@kernel.org>
Subject: Re: [PATCH 13/14] dma: mxs: rename custom flag
Date: Tue, 23 Apr 2019 10:55:19 +0530	[thread overview]
Message-ID: <20190423052519.GJ28103@vkoul-mobl> (raw)
In-Reply-To: <20190409113421.3037-14-s.hauer@pengutronix.de>

On 09-04-19, 13:34, Sascha Hauer wrote:
> The mxs dma driver uses the flags parameter in dmaengine_prep_slave_sg() for
> custom flags, but still uses the dmaengine specific names of the flags.
> Do a little bit better and at least give the flag a custom name.

after subsystem tag to dmaengine:

Acked-by: Vinod Koul <vkoul@kernel.org>

> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  drivers/dma/mxs-dma.c                      |  4 ++--
>  drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 17 +++++++++++------
>  include/linux/dma/mxs-dma.h                |  2 ++
>  3 files changed, 15 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c
> index 62ee9328aea1..c622bee7eb12 100644
> --- a/drivers/dma/mxs-dma.c
> +++ b/drivers/dma/mxs-dma.c
> @@ -541,7 +541,7 @@ static struct dma_async_tx_descriptor *mxs_dma_prep_slave_sg(
>  		ccw->bits = 0;
>  		ccw->bits |= CCW_IRQ;
>  		ccw->bits |= CCW_DEC_SEM;
> -		if (flags & DMA_CTRL_ACK)
> +		if (flags & MXS_DMA_CTRL_WAIT4END)
>  			ccw->bits |= CCW_WAIT4END;
>  		ccw->bits |= CCW_HALT_ON_TERM;
>  		ccw->bits |= CCW_TERM_FLUSH;
> @@ -573,7 +573,7 @@ static struct dma_async_tx_descriptor *mxs_dma_prep_slave_sg(
>  				ccw->bits &= ~CCW_CHAIN;
>  				ccw->bits |= CCW_IRQ;
>  				ccw->bits |= CCW_DEC_SEM;
> -				if (flags & DMA_CTRL_ACK)
> +				if (flags & MXS_DMA_CTRL_WAIT4END)
>  					ccw->bits |= CCW_WAIT4END;
>  			}
>  		}
> diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
> index cf016ec0b1c6..9f648b40197e 100644
> --- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
> +++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
> @@ -925,7 +925,8 @@ static int gpmi_send_command(struct gpmi_nand_data *this)
>  	sg_init_one(sgl, this->cmd_buffer, this->command_length);
>  	dma_map_sg(this->dev, sgl, 1, DMA_TO_DEVICE);
>  	desc = dmaengine_prep_slave_sg(channel,
> -				sgl, 1, DMA_MEM_TO_DEV, DMA_CTRL_ACK);
> +				sgl, 1, DMA_MEM_TO_DEV,
> +				MXS_DMA_CTRL_WAIT4END);
>  	if (!desc)
>  		return -EINVAL;
>  
> @@ -996,7 +997,8 @@ static int gpmi_send_data(struct gpmi_nand_data *this, const void *buf,
>  	/* [2] send DMA request */
>  	prepare_data_dma(this, buf, len, DMA_TO_DEVICE);
>  	desc = dmaengine_prep_slave_sg(channel, &this->data_sgl,
> -					1, DMA_MEM_TO_DEV, DMA_CTRL_ACK);
> +					1, DMA_MEM_TO_DEV,
> +					MXS_DMA_CTRL_WAIT4END);
>  	if (!desc)
>  		return -EINVAL;
>  
> @@ -1033,7 +1035,8 @@ static int gpmi_read_data(struct gpmi_nand_data *this, void *buf, int len)
>  	/* [2] : send DMA request */
>  	direct = prepare_data_dma(this, buf, len, DMA_FROM_DEVICE);
>  	desc = dmaengine_prep_slave_sg(channel, &this->data_sgl,
> -					1, DMA_DEV_TO_MEM, DMA_CTRL_ACK);
> +					1, DMA_DEV_TO_MEM,
> +					MXS_DMA_CTRL_WAIT4END);
>  	if (!desc)
>  		return -EINVAL;
>  
> @@ -1083,7 +1086,8 @@ static int gpmi_send_page(struct gpmi_nand_data *this,  dma_addr_t payload,
>  	pio[5] = auxiliary;
>  
>  	desc = mxs_dmaengine_prep_pio(channel, pio, ARRAY_SIZE(pio),
> -				      DMA_TRANS_NONE, DMA_CTRL_ACK);
> +				      DMA_TRANS_NONE,
> +				      MXS_DMA_CTRL_WAIT4END);
>  	if (!desc)
>  		return -EINVAL;
>  
> @@ -1140,7 +1144,8 @@ static int gpmi_read_page(struct gpmi_nand_data *this,
>  	pio[4] = payload;
>  	pio[5] = auxiliary;
>  	desc = mxs_dmaengine_prep_pio(channel, pio, ARRAY_SIZE(pio),
> -				      DMA_TRANS_NONE, DMA_CTRL_ACK);
> +				      DMA_TRANS_NONE,
> +				      MXS_DMA_CTRL_WAIT4END);
>  	if (!desc)
>  		return -EINVAL;
>  
> @@ -1157,7 +1162,7 @@ static int gpmi_read_page(struct gpmi_nand_data *this,
>  	pio[1] = 0;
>  	pio[2] = 0; /* clear GPMI_HW_GPMI_ECCCTRL, disable the BCH. */
>  	desc = mxs_dmaengine_prep_pio(channel, pio, 3, DMA_TRANS_NONE,
> -				      DMA_CTRL_ACK);
> +				      MXS_DMA_CTRL_WAIT4END);
>  	if (!desc)
>  		return -EINVAL;
>  
> diff --git a/include/linux/dma/mxs-dma.h b/include/linux/dma/mxs-dma.h
> index 092b2a7b92ac..4a33f2c8a682 100644
> --- a/include/linux/dma/mxs-dma.h
> +++ b/include/linux/dma/mxs-dma.h
> @@ -4,6 +4,8 @@
>  
>  #include <linux/dmaengine.h>
>  
> +#define MXS_DMA_CTRL_WAIT4END	BIT(31)
> +
>  /*
>   * The mxs dmaengine can do PIO transfers. We pass a pointer to the PIO words
>   * in the second argument to dmaengine_prep_slave_sg when the direction is
> -- 
> 2.20.1

-- 
~Vinod

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2019-04-23  5:25 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09 11:34 [PATCH v2 00/14] Implement exec_op for GPMI nand driver Sascha Hauer
2019-04-09 11:34 ` [PATCH 01/14] mtd: rawnand: export nand operation tracer Sascha Hauer
2019-04-17 10:22   ` Miquel Raynal
2019-04-09 11:34 ` [PATCH 02/14] mtd: rawnand: fsmc: Use nand_op_trace for operation tracing Sascha Hauer
2019-04-17 10:22   ` Miquel Raynal
2019-04-09 11:34 ` [PATCH 03/14] mtd: rawnand: gpmi: move all driver code into single file Sascha Hauer
2019-04-17 10:23   ` Miquel Raynal
2019-04-09 11:34 ` [PATCH 04/14] mtd: rawnand: gpmi: remove unused variable Sascha Hauer
2019-04-17 10:24   ` Miquel Raynal
2019-04-09 11:34 ` [PATCH 05/14] mtd: rawnand: gpmi: Remove unnecessary variables Sascha Hauer
2019-04-17 10:24   ` Miquel Raynal
2019-04-09 11:34 ` [PATCH 06/14] mtd: rawnand: gpmi: read buf in nand_read_page_op Sascha Hauer
2019-04-17 10:25   ` Miquel Raynal
2019-04-09 11:34 ` [PATCH 07/14] mtd: rawnand: gpmi: remove unused parameters Sascha Hauer
2019-04-17 10:26   ` Miquel Raynal
2019-04-09 11:34 ` [PATCH 08/14] mtd: rawnand: gpmi: Drop unnecessary restoring of previous chipselection Sascha Hauer
2019-04-17 10:27   ` Miquel Raynal
2019-04-09 11:34 ` [PATCH 09/14] mtd: rawnand: gpmi: use runtime PM to manage clocks Sascha Hauer
2019-04-17 10:28   ` Miquel Raynal
2019-04-09 11:34 ` [PATCH 10/14] dma: mxs: Drop unnecessary flag Sascha Hauer
2019-04-17  8:16   ` Miquel Raynal
2019-04-23  5:21     ` Vinod Koul
2019-04-23  5:22   ` Vinod Koul
2019-04-09 11:34 ` [PATCH 11/14] mtd: rawnand: gpmi: drop " Sascha Hauer
2019-04-17 10:28   ` Miquel Raynal
2019-04-09 11:34 ` [PATCH 12/14] dma: mxs: Add header file to be shared with gpmi nand driver Sascha Hauer
2019-04-23  5:24   ` Vinod Koul
2019-04-09 11:34 ` [PATCH 13/14] dma: mxs: rename custom flag Sascha Hauer
2019-04-23  5:25   ` Vinod Koul [this message]
2019-04-09 11:34 ` [PATCH 14/14] mtd: rawnand: gpmi: Implement exec_op Sascha Hauer
2019-04-17 10:33   ` Miquel Raynal
2019-04-24  7:09     ` Sascha Hauer
2019-04-29  7:23       ` Miquel Raynal

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=20190423052519.GJ28103@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=bbrezillon@kernel.org \
    --cc=festevam@gmail.com \
    --cc=han.xu@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-imx@nxp.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox