DMA Engine development
 help / color / mirror / Atom feed
From: pandith.n@intel.com
To: vkoul@kernel.org, eugeniy.paltsev@synopsys.com,
	dmaengine@vger.kernel.org
Cc: andriy.shevchenko@linux.intel.com,
	mallikarjunappa.sangannavar@intel.com,
	srikanth.thokala@intel.com, kenchappa.demakkanavar@intel.com,
	Pandith N <pandith.n@intel.com>
Subject: [PATCH V3 3/3] dmaengine: dw-axi-dmac: set coherent mask
Date: Fri,  1 Oct 2021 19:38:12 +0530	[thread overview]
Message-ID: <20211001140812.24977-4-pandith.n@intel.com> (raw)
In-Reply-To: <20211001140812.24977-1-pandith.n@intel.com>

From: Pandith N <pandith.n@intel.com>

Add support for setting dma coherent mask, dma mask is set to 64 bit

Signed-off-by: Pandith N <pandith.n@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

---

Changes from v1->v2:
Removed dt-binding to set coherent_bit_mask value.
---
 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index f46fd9895a13..79572ec532ef 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -212,12 +212,16 @@ static inline bool axi_chan_is_hw_enable(struct axi_dma_chan *chan)
 
 static void axi_dma_hw_init(struct axi_dma_chip *chip)
 {
+	int ret;
 	u32 i;
 
 	for (i = 0; i < chip->dw->hdata->nr_channels; i++) {
 		axi_chan_irq_disable(&chip->dw->chan[i], DWAXIDMAC_IRQ_ALL);
 		axi_chan_disable(&chip->dw->chan[i]);
 	}
+	ret = dma_set_mask_and_coherent(chip->dev, DMA_BIT_MASK(64));
+	if (ret)
+		dev_warn(chip->dev, "Unable to set coherent mask\n");
 }
 
 static u32 axi_chan_get_xfer_width(struct axi_dma_chan *chan, dma_addr_t src,
-- 
2.17.1


  parent reply	other threads:[~2021-10-01 14:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01 14:08 [PATCH V3 0/3] Add DMA support for transfers in multiple cases pandith.n
2021-10-01 14:08 ` [PATCH V3 1/3] dmaengine: dw-axi-dmac: support DMAX_NUM_CHANNELS > 8 pandith.n
2021-10-26 12:09   ` Geert Uytterhoeven
2021-10-26 13:22     ` N, Pandith
2021-10-01 14:08 ` [PATCH V3 2/3] dmaengine: dw-axi-dmac: Hardware handshake configuration pandith.n
2021-10-01 14:08 ` pandith.n [this message]
2021-10-18  6:44 ` [PATCH V3 0/3] Add DMA support for transfers in multiple cases 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=20211001140812.24977-4-pandith.n@intel.com \
    --to=pandith.n@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=eugeniy.paltsev@synopsys.com \
    --cc=kenchappa.demakkanavar@intel.com \
    --cc=mallikarjunappa.sangannavar@intel.com \
    --cc=srikanth.thokala@intel.com \
    --cc=vkoul@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