[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180214144459.29813-2-srinivas.kandagatla@linaro.org>
Date: Wed, 14 Feb 2018 14:44:55 +0000
From: srinivas.kandagatla@...aro.org
To: vinod.koul@...el.com, andy.gross@...aro.org,
dmaengine@...r.kernel.org
Cc: robh+dt@...nel.org, mark.rutland@....com, david.brown@...aro.org,
dan.j.williams@...el.com, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-soc@...r.kernel.org, yanhe@...cinc.com,
ramkri@....qualcomm.com, sdharia@...cinc.com,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Subject: [PATCH v2 1/5] dmaengine: qcom: bam_dma: make bam clk optional
From: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
When BAM is remotely controlled it does not sound correct to control
its clk on Linux side. Make it optional, so that its not mandatory
for remote controlled BAM instances.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
---
drivers/dma/qcom/bam_dma.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
index d076940e0c69..ae4c7b6930b8 100644
--- a/drivers/dma/qcom/bam_dma.c
+++ b/drivers/dma/qcom/bam_dma.c
@@ -1233,13 +1233,14 @@ static int bam_dma_probe(struct platform_device *pdev)
"qcom,controlled-remotely");
bdev->bamclk = devm_clk_get(bdev->dev, "bam_clk");
- if (IS_ERR(bdev->bamclk))
- return PTR_ERR(bdev->bamclk);
-
- ret = clk_prepare_enable(bdev->bamclk);
- if (ret) {
- dev_err(bdev->dev, "failed to prepare/enable clock\n");
- return ret;
+ if (IS_ERR(bdev->bamclk)) {
+ bdev->bamclk = NULL;
+ } else {
+ ret = clk_prepare_enable(bdev->bamclk);
+ if (ret) {
+ dev_err(bdev->dev, "failed to prepare/enable clock\n");
+ return ret;
+ }
}
ret = bam_init(bdev);
--
2.15.1
Powered by blists - more mailing lists