* [PATCH] dma: qcom: Add initialization of axi and core clocks
@ 2016-08-30 15:42 Iaroslav Gridin
2016-09-07 13:48 ` Stanimir Varbanov
0 siblings, 1 reply; 2+ messages in thread
From: Iaroslav Gridin @ 2016-08-30 15:42 UTC (permalink / raw)
To: vinod.koul
Cc: dan.j.williams, andy.gross, stanimir.varbanov, pramod.gurav,
arnd, okaya, dmaengine, linux-kernel, Voker57
From: Voker57 <voker57@gmail.com>
These initialization are missing and causing bam not to init
Signed-off-by: Iaroslav Gridin <voker57@gmail.com>
---
drivers/dma/qcom/bam_dma.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
index 03c4eb3..faae0c8 100644
--- a/drivers/dma/qcom/bam_dma.c
+++ b/drivers/dma/qcom/bam_dma.c
@@ -395,6 +395,8 @@ struct bam_device {
const struct reg_offset_data *layout;
struct clk *bamclk;
+ struct clk *axi_clk;
+ struct clk *core_clk;
int irq;
/* dma start transaction tasklet */
@@ -1189,6 +1191,25 @@ static int bam_dma_probe(struct platform_device *pdev)
return ret;
}
+ bdev->axi_clk = devm_clk_get(bdev->dev, "axi_clk");
+ if (IS_ERR(bdev->axi_clk))
+ bdev->axi_clk = NULL;
+
+ ret = clk_prepare_enable(bdev->axi_clk);
+ if (ret) {
+ dev_err(bdev->dev, "failed to prepare/enable axi clock\n");
+ return ret;
+ }
+
+ bdev->core_clk = devm_clk_get(bdev->dev, "core_clk");
+ if (IS_ERR(bdev->core_clk))
+ bdev->core_clk = NULL;
+
+ ret = clk_prepare_enable(bdev->core_clk);
+ if (ret) {
+ dev_err(bdev->dev, "failed to prepare/enable core clock\n");
+ return ret;
+ }
ret = bam_init(bdev);
if (ret)
goto err_disable_clk;
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dma: qcom: Add initialization of axi and core clocks
2016-08-30 15:42 [PATCH] dma: qcom: Add initialization of axi and core clocks Iaroslav Gridin
@ 2016-09-07 13:48 ` Stanimir Varbanov
0 siblings, 0 replies; 2+ messages in thread
From: Stanimir Varbanov @ 2016-09-07 13:48 UTC (permalink / raw)
To: Iaroslav Gridin, vinod.koul
Cc: dan.j.williams, andy.gross, stanimir.varbanov, pramod.gurav,
arnd, okaya, dmaengine, linux-kernel, linux-arm-msm,
Stephen Boyd
Hi Iaroslav,
Could you Cc linux-arm-msm ML next time.
Cc: Stephen and linux-arm-msm
Andy, Stephen probably we don't have conclusion about adding those two
clocks in bam driver but do you have some better ideas?
On 08/30/2016 06:42 PM, Iaroslav Gridin wrote:
> From: Voker57 <voker57@gmail.com>
>
> These initialization are missing and causing bam not to init
> Signed-off-by: Iaroslav Gridin <voker57@gmail.com>
> ---
> drivers/dma/qcom/bam_dma.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
> index 03c4eb3..faae0c8 100644
> --- a/drivers/dma/qcom/bam_dma.c
> +++ b/drivers/dma/qcom/bam_dma.c
> @@ -395,6 +395,8 @@ struct bam_device {
> const struct reg_offset_data *layout;
>
> struct clk *bamclk;
> + struct clk *axi_clk;
> + struct clk *core_clk;
> int irq;
>
> /* dma start transaction tasklet */
> @@ -1189,6 +1191,25 @@ static int bam_dma_probe(struct platform_device *pdev)
> return ret;
> }
>
> + bdev->axi_clk = devm_clk_get(bdev->dev, "axi_clk");
> + if (IS_ERR(bdev->axi_clk))
> + bdev->axi_clk = NULL;
> +
> + ret = clk_prepare_enable(bdev->axi_clk);
> + if (ret) {
> + dev_err(bdev->dev, "failed to prepare/enable axi clock\n");
> + return ret;
> + }
> +
> + bdev->core_clk = devm_clk_get(bdev->dev, "core_clk");
> + if (IS_ERR(bdev->core_clk))
> + bdev->core_clk = NULL;
> +
> + ret = clk_prepare_enable(bdev->core_clk);
> + if (ret) {
> + dev_err(bdev->dev, "failed to prepare/enable core clock\n");
> + return ret;
> + }
> ret = bam_init(bdev);
> if (ret)
> goto err_disable_clk;
>
regards,
Stan
--
regards,
Stan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-07 13:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-30 15:42 [PATCH] dma: qcom: Add initialization of axi and core clocks Iaroslav Gridin
2016-09-07 13:48 ` Stanimir Varbanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).