linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Iaroslav Gridin <voker57@gmail.com>
To: vinod.koul@intel.com
Cc: dan.j.williams@intel.com, andy.gross@linaro.org,
	stanimir.varbanov@linaro.org, pramod.gurav@linaro.org,
	arnd@arndb.de, okaya@codeaurora.org, dmaengine@vger.kernel.org,
	linux-kernel@vger.kernel.org, Voker57 <voker57@gmail.com>
Subject: [PATCH] dma: qcom: Add initialization of axi and core clocks
Date: Tue, 30 Aug 2016 18:42:23 +0300	[thread overview]
Message-ID: <20160830154223.15129-1-voker57@gmail.com> (raw)

From: Voker57 <voker57@gmail.com>

These initialization are missing and causing bam not to init
Signed-off-by: Iaroslav Gridin <voker57@gmail.com>
---
 drivers/dma/qcom/bam_dma.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
index 03c4eb3..faae0c8 100644
--- a/drivers/dma/qcom/bam_dma.c
+++ b/drivers/dma/qcom/bam_dma.c
@@ -395,6 +395,8 @@ struct bam_device {
 	const struct reg_offset_data *layout;
 
 	struct clk *bamclk;
+	struct clk *axi_clk;
+	struct clk *core_clk;
 	int irq;
 
 	/* dma start transaction tasklet */
@@ -1189,6 +1191,25 @@ static int bam_dma_probe(struct platform_device *pdev)
 		return ret;
 	}
 
+	bdev->axi_clk = devm_clk_get(bdev->dev, "axi_clk");
+	if (IS_ERR(bdev->axi_clk))
+		bdev->axi_clk = NULL;
+
+	ret = clk_prepare_enable(bdev->axi_clk);
+	if (ret) {
+		dev_err(bdev->dev, "failed to prepare/enable axi clock\n");
+		return ret;
+	}
+
+	bdev->core_clk = devm_clk_get(bdev->dev, "core_clk");
+	if (IS_ERR(bdev->core_clk))
+		bdev->core_clk = NULL;
+
+	ret = clk_prepare_enable(bdev->core_clk);
+	if (ret) {
+		dev_err(bdev->dev, "failed to prepare/enable core clock\n");
+		return ret;
+	}
 	ret = bam_init(bdev);
 	if (ret)
 		goto err_disable_clk;
-- 
2.9.3

             reply	other threads:[~2016-08-30 15:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-30 15:42 Iaroslav Gridin [this message]
2016-09-07 13:48 ` [PATCH] dma: qcom: Add initialization of axi and core clocks Stanimir Varbanov

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=20160830154223.15129-1-voker57@gmail.com \
    --to=voker57@gmail.com \
    --cc=andy.gross@linaro.org \
    --cc=arnd@arndb.de \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=okaya@codeaurora.org \
    --cc=pramod.gurav@linaro.org \
    --cc=stanimir.varbanov@linaro.org \
    --cc=vinod.koul@intel.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;
as well as URLs for NNTP newsgroup(s).