From: vkoul@kernel.org (Vinod)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] dmaengine: xilinx_dma: Fix 64-bit simple CDMA transfer
Date: Tue, 21 Aug 2018 21:25:53 +0530 [thread overview]
Message-ID: <20180821155553.GI2388@vkoul-mobl> (raw)
In-Reply-To: <1532688639-32230-4-git-send-email-radhey.shyam.pandey@xilinx.com>
On 27-07-18, 16:20, Radhey Shyam Pandey wrote:
> In AXI CDMA simple mode also pass MSB bits of source and destination
> address to xilinx_write function. This fixes simple CDMA operation
> mode using 64-bit addressing.
>
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> drivers/dma/xilinx/xilinx_dma.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
> index a37871e..2e15d86 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -1245,8 +1245,10 @@ static void xilinx_cdma_start_transfer(struct xilinx_dma_chan *chan)
>
> hw = &segment->hw;
>
> - xilinx_write(chan, XILINX_CDMA_REG_SRCADDR, hw->src_addr);
> - xilinx_write(chan, XILINX_CDMA_REG_DSTADDR, hw->dest_addr);
> + xilinx_write(chan, XILINX_CDMA_REG_SRCADDR, (dma_addr_t)
> + ((u64)hw->src_addr_msb << 32 | hw->src_addr));
so this is:
(dma_addr_t)((u64)hw->src_addr_msb << 32 | hw->src_addr)
what is src_addr data type? I think its u32. It would be better to
update xilinx_write() to take u64 and not dma_addr_t.
> + xilinx_write(chan, XILINX_CDMA_REG_DSTADDR, (dma_addr_t)
> + ((u64)hw->dest_addr_msb << 32 | hw->dest_addr));
>
> /* Start the transfer */
> dma_ctrl_write(chan, XILINX_DMA_REG_BTT,
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe dmaengine" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
~Vinod
next prev parent reply other threads:[~2018-08-21 15:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-27 10:50 [PATCH 0/3] dmaengine: xilinx_dma: Minor fix and refactoring Radhey Shyam Pandey
2018-07-27 10:50 ` [PATCH 1/3] dmaengine: xilinx_dma: Refactor axidma channel allocation Radhey Shyam Pandey
2018-08-21 7:31 ` Appana Durga Kedareswara Rao
2018-07-27 10:50 ` [PATCH 2/3] dmaengine: xilinx_dma: Refactor axidma channel validation Radhey Shyam Pandey
2018-08-21 15:50 ` Vinod
2018-08-28 13:03 ` Radhey Shyam Pandey
2018-07-27 10:50 ` [PATCH 3/3] dmaengine: xilinx_dma: Fix 64-bit simple CDMA transfer Radhey Shyam Pandey
2018-08-21 15:55 ` Vinod [this message]
2018-08-28 14:03 ` Radhey Shyam Pandey
2018-08-29 4:01 ` Vinod
2018-08-29 17:05 ` Radhey Shyam Pandey
2018-09-07 12:08 ` Radhey Shyam Pandey
2018-09-11 7:41 ` Vinod
2018-09-11 9:31 ` Radhey Shyam Pandey
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=20180821155553.GI2388@vkoul-mobl \
--to=vkoul@kernel.org \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).