aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2018-02-15 12:25:07 +0000
committerVinod Koul <vinod.koul@intel.com>2018-03-01 14:14:27 +0530
commit9d31821fa9ca9a12e22e1238901ab12e295eec86 (patch)
treec85bf42c69f004071baabaf97b19499c34921227
parentLinux 4.16-rc1 (diff)
downloadlinux-dev-9d31821fa9ca9a12e22e1238901ab12e295eec86.tar.xz
linux-dev-9d31821fa9ca9a12e22e1238901ab12e295eec86.zip
dmaengine: qcom: bam_dma: make bam clk optional
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@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/qcom/bam_dma.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
index d076940e0c69..b79691fcc82d 100644
--- a/drivers/dma/qcom/bam_dma.c
+++ b/drivers/dma/qcom/bam_dma.c
@@ -1233,8 +1233,12 @@ 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);
+ if (IS_ERR(bdev->bamclk)) {
+ if (!bdev->controlled_remotely)
+ return PTR_ERR(bdev->bamclk);
+
+ bdev->bamclk = NULL;
+ }
ret = clk_prepare_enable(bdev->bamclk);
if (ret) {