public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Thierry Reding
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Jonathan Hunter
	<jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH v1 3/3] soc/tegra: fuse: Explicitly request DMA channel from APB DMA driver
Date: Tue, 26 Sep 2017 01:35:39 +0300	[thread overview]
Message-ID: <b43be9bcd588d5e4496d3efd6571f9f6561a7844.1506378772.git.digetx@gmail.com> (raw)
In-Reply-To: <27dadd0335aac71c9d4d613c33a6a1d0a285afa4.1506378772.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
In-Reply-To: <27dadd0335aac71c9d4d613c33a6a1d0a285afa4.1506378772.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Currently efuse driver requests DMA channel from an arbitrary DMA device,
it is not a problem since there is only one DMA provider for Tegra20 yet,
but it will become troublesome once another provider would be added.

Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/soc/tegra/fuse/fuse-tegra20.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/soc/tegra/fuse/fuse-tegra20.c b/drivers/soc/tegra/fuse/fuse-tegra20.c
index a33f48c06771..06ec3f9573e6 100644
--- a/drivers/soc/tegra/fuse/fuse-tegra20.c
+++ b/drivers/soc/tegra/fuse/fuse-tegra20.c
@@ -98,14 +98,9 @@ static u32 tegra20_fuse_read(struct tegra_fuse *fuse, unsigned int offset)
 
 static int tegra20_fuse_probe(struct tegra_fuse *fuse)
 {
-	dma_cap_mask_t mask;
-
-	dma_cap_zero(mask);
-	dma_cap_set(DMA_SLAVE, mask);
-
-	fuse->apbdma.chan = dma_request_channel(mask, NULL, NULL);
-	if (!fuse->apbdma.chan)
-		return -EPROBE_DEFER;
+	fuse->apbdma.chan = dma_request_chan(fuse->dev, "fuse");
+	if (IS_ERR(fuse->apbdma.chan))
+		return PTR_ERR(fuse->apbdma.chan);
 
 	fuse->apbdma.virt = dma_alloc_coherent(fuse->dev, sizeof(u32),
 					       &fuse->apbdma.phys,
-- 
2.14.1

  parent reply	other threads:[~2017-09-25 22:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25 22:35 [PATCH v1 1/3] soc/tegra: fuse: Fix reading registers using DMA on Tegra20 Dmitry Osipenko
     [not found] ` <27dadd0335aac71c9d4d613c33a6a1d0a285afa4.1506378772.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-25 22:35   ` [PATCH v1 2/3] ARM: dts: tegra20: Add DMA phandle to 'fuse' node Dmitry Osipenko
     [not found]     ` <8268404736bd3c254f8516109465bb8db4739c33.1506378772.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-26 20:54       ` Jon Hunter
     [not found]         ` <c0776324-95e9-9e4c-00ac-a415cb1cd9e3-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-09-26 21:25           ` Jon Hunter
     [not found]             ` <ce5c5242-8530-4b0e-dd2d-0a9ef1ac005e-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-09-26 21:54               ` Dmitry Osipenko
     [not found]                 ` <a5db226b-b177-f52f-3a53-5e65f5a27243-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-26 22:10                   ` Jon Hunter
     [not found]                     ` <59edd5b4-754a-93eb-8529-a5ff140c1a37-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-09-26 22:31                       ` Dmitry Osipenko
     [not found]                         ` <f8a0e6ab-8485-b60b-64ef-21574395b4d1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-26 22:40                           ` Dmitry Osipenko
2017-09-25 22:35   ` Dmitry Osipenko [this message]
2017-09-26 14:08   ` [PATCH v1 1/3] soc/tegra: fuse: Fix reading registers using DMA on Tegra20 Jon Hunter
     [not found]     ` <87d33561-d959-7444-552d-7226adf29eb4-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-09-26 16:08       ` Stephen Warren
     [not found]         ` <d6bd8251-421e-5bc9-ce99-2b6aee4640ce-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2017-09-26 17:31           ` Dmitry Osipenko
     [not found]             ` <9921a66d-90f0-5a69-2da3-dc2c355eb86a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-26 20:53               ` Jon Hunter

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=b43be9bcd588d5e4496d3efd6571f9f6561a7844.1506378772.git.digetx@gmail.com \
    --to=digetx-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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