]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
dmaengine: qcom: bam_dma: make bam clk optional
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Thu, 15 Feb 2018 12:25:07 +0000 (12:25 +0000)
committerVinod Koul <vinod.koul@intel.com>
Thu, 1 Mar 2018 08:44:27 +0000 (14:14 +0530)
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>
drivers/dma/qcom/bam_dma.c

index d076940e0c69ada23dc451367df9d71c88649dc7..b79691fcc82d2bf34f60d083f91294c81ff01b3f 100644 (file)
@@ -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) {