From: Vinod Koul <vkoul@kernel.org>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Colin Ian King <colin.king@intel.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Dan Carpenter <dan.carpenter@oracle.com>,
dmaengine@vger.kernel.org,
Chris Paterson <Chris.Paterson2@renesas.com>,
Biju Das <biju.das@bp.renesas.com>,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v2] dmaengine: sh: rz-dmac: Set DMA transfer parameters based on the direction
Date: Mon, 11 Apr 2022 16:25:00 +0530 [thread overview]
Message-ID: <YlQJBPmECe2AkpOJ@matsya> (raw)
In-Reply-To: <20220409165348.46080-1-biju.das.jz@bp.renesas.com>
On 09-04-22, 17:53, Biju Das wrote:
> Client drivers configure DMA transfer parameters based on the DMA
> transfer direction.
>
> This patch sets corresponding parameters in rz_dmac_config() based
> on the DMA transfer direction.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v1->v2:
> * Updated commit description
> ---
> drivers/dma/sh/rz-dmac.c | 26 +++++++++++++-------------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/dma/sh/rz-dmac.c b/drivers/dma/sh/rz-dmac.c
> index ee2872e7d64c..de57ae006879 100644
> --- a/drivers/dma/sh/rz-dmac.c
> +++ b/drivers/dma/sh/rz-dmac.c
> @@ -597,24 +597,24 @@ static int rz_dmac_config(struct dma_chan *chan,
> struct dma_slave_config *config)
> {
> struct rz_dmac_chan *channel = to_rz_dmac_chan(chan);
> - u32 val;
> + u32 val, data_sz;
>
> - channel->src_per_address = config->src_addr;
> - channel->src_word_size = config->src_addr_width;
> - channel->dst_per_address = config->dst_addr;
> - channel->dst_word_size = config->dst_addr_width;
> -
> - val = rz_dmac_ds_to_val_mapping(config->dst_addr_width);
> - if (val == CHCFG_DS_INVALID)
> - return -EINVAL;
> -
> - channel->chcfg |= CHCFG_FILL_DDS(val);
> + if (config->direction == DMA_DEV_TO_MEM) {
This is a deprecated field, pls do not use this...
Above code is correct and then based on direction of the descriptor you
would use either src or dstn parameters
--
~Vinod
next prev parent reply other threads:[~2022-04-11 10:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-09 16:53 [PATCH v2] dmaengine: sh: rz-dmac: Set DMA transfer parameters based on the direction Biju Das
2022-04-11 10:55 ` Vinod Koul [this message]
2022-04-11 11:06 ` Biju Das
2022-04-11 11:26 ` 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=YlQJBPmECe2AkpOJ@matsya \
--to=vkoul@kernel.org \
--cc=Chris.Paterson2@renesas.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=biju.das@bp.renesas.com \
--cc=colin.king@intel.com \
--cc=dan.carpenter@oracle.com \
--cc=dmaengine@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
/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