Skip to content

Commit 9d31821

Browse files
Srinivas-KandagatlaVinod Koul
authored andcommitted
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 <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
1 parent 7928b2c commit 9d31821

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/dma/qcom/bam_dma.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,8 +1233,12 @@ static int bam_dma_probe(struct platform_device *pdev)
12331233
"qcom,controlled-remotely");
12341234

12351235
bdev->bamclk = devm_clk_get(bdev->dev, "bam_clk");
1236-
if (IS_ERR(bdev->bamclk))
1237-
return PTR_ERR(bdev->bamclk);
1236+
if (IS_ERR(bdev->bamclk)) {
1237+
if (!bdev->controlled_remotely)
1238+
return PTR_ERR(bdev->bamclk);
1239+
1240+
bdev->bamclk = NULL;
1241+
}
12381242

12391243
ret = clk_prepare_enable(bdev->bamclk);
12401244
if (ret) {

0 commit comments

Comments
 (0)