提交 9d31821f 编写于 作者: S Srinivas Kandagatla 提交者: Vinod Koul

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: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 7928b2cb
...@@ -1233,9 +1233,13 @@ static int bam_dma_probe(struct platform_device *pdev) ...@@ -1233,9 +1233,13 @@ static int bam_dma_probe(struct platform_device *pdev)
"qcom,controlled-remotely"); "qcom,controlled-remotely");
bdev->bamclk = devm_clk_get(bdev->dev, "bam_clk"); bdev->bamclk = devm_clk_get(bdev->dev, "bam_clk");
if (IS_ERR(bdev->bamclk)) if (IS_ERR(bdev->bamclk)) {
if (!bdev->controlled_remotely)
return PTR_ERR(bdev->bamclk); return PTR_ERR(bdev->bamclk);
bdev->bamclk = NULL;
}
ret = clk_prepare_enable(bdev->bamclk); ret = clk_prepare_enable(bdev->bamclk);
if (ret) { if (ret) {
dev_err(bdev->dev, "failed to prepare/enable clock\n"); dev_err(bdev->dev, "failed to prepare/enable clock\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册