dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandru Ardelean <alexandru.ardelean@analog.com>
To: <dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <vkoul@kernel.org>, <lars@metafoo.de>, <dan.j.williams@intel.com>,
	<ardeleanalex@gmail.com>,
	Alexandru Ardelean <alexandru.ardelean@analog.com>
Subject: [PATCH v2 2/6] dmaengine: axi-dmac: move active_descs list init after device-tree init
Date: Tue, 25 Aug 2020 15:48:36 +0300	[thread overview]
Message-ID: <20200825124840.43664-10-alexandru.ardelean@analog.com> (raw)
In-Reply-To: <20200825124840.43664-1-alexandru.ardelean@analog.com>

We want to enable the clock right after it is obtained. Then later we'll
want to read the core version via register-access (which requires the clock
to be enabled).

The initialization of the active_descs list can be postponed after reading
from registers (or reading the device-tree).

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
 drivers/dma/dma-axi-dmac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c
index 088c79137398..90a99bdffa2b 100644
--- a/drivers/dma/dma-axi-dmac.c
+++ b/drivers/dma/dma-axi-dmac.c
@@ -850,8 +850,6 @@ static int axi_dmac_probe(struct platform_device *pdev)
 	if (IS_ERR(dmac->clk))
 		return PTR_ERR(dmac->clk);
 
-	INIT_LIST_HEAD(&dmac->chan.active_descs);
-
 	of_channels = of_get_child_by_name(pdev->dev.of_node, "adi,channels");
 	if (of_channels == NULL)
 		return -ENODEV;
@@ -866,6 +864,8 @@ static int axi_dmac_probe(struct platform_device *pdev)
 	}
 	of_node_put(of_channels);
 
+	INIT_LIST_HEAD(&dmac->chan.active_descs);
+
 	pdev->dev.dma_parms = &dmac->dma_parms;
 	dma_set_max_seg_size(&pdev->dev, UINT_MAX);
 
-- 
2.17.1


  parent reply	other threads:[~2020-08-25 12:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25 12:48 [PATCH v2 0/6] dmaengine: axi-dmac: add support for reading bus attributes from register Alexandru Ardelean
2020-08-25 12:48 ` [PATCH v2 1/6] dmaengine: axi-dmac: move version read in probe Alexandru Ardelean
2020-08-25 12:48 ` [PATCH v2 2/6] dmaengine: axi-dmac: move active_descs list init after device-tree init Alexandru Ardelean
2020-08-25 12:48 ` [PATCH v2 3/6] dmaengine: axi-dmac: move clock enable earlier Alexandru Ardelean
2020-08-25 12:48 ` [PATCH v2 4/6] dmaengine: axi-dmac: wrap entire dt parse in a function Alexandru Ardelean
2020-08-25 12:48 ` [PATCH v2 5/6] dmaengine: axi-dmac: wrap channel parameter adjust into function Alexandru Ardelean
2020-08-25 12:48 ` [PATCH v2 6/6] dmaengine: axi-dmac: add support for reading bus attributes from registers Alexandru Ardelean
2020-08-25 12:48 ` [PATCH v2 0/6] dmaengine: axi-dmac: add support for reading bus attributes from register Alexandru Ardelean
2020-08-25 12:48 ` [PATCH v2 1/6] dmaengine: axi-dmac: move version read in probe Alexandru Ardelean
2020-08-25 12:48 ` Alexandru Ardelean [this message]
2020-08-25 12:48 ` [PATCH v2 3/6] dmaengine: axi-dmac: move clock enable earlier Alexandru Ardelean
2020-08-25 12:48 ` [PATCH v2 4/6] dmaengine: axi-dmac: wrap entire dt parse in a function Alexandru Ardelean
2020-08-25 12:48 ` [PATCH v2 5/6] dmaengine: axi-dmac: wrap channel parameter adjust into function Alexandru Ardelean
2020-08-25 12:48 ` [PATCH v2 6/6] dmaengine: axi-dmac: add support for reading bus attributes from registers Alexandru Ardelean
2020-08-25 14:46 ` [PATCH v2 0/6] dmaengine: axi-dmac: add support for reading bus attributes from register Vinod Koul
2020-08-25 15:14   ` Alexandru Ardelean
2020-08-25 15:20     ` Alexandru Ardelean

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=20200825124840.43664-10-alexandru.ardelean@analog.com \
    --to=alexandru.ardelean@analog.com \
    --cc=ardeleanalex@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).