diff --git a/drivers/soc/qcom/pil-q6v5.c b/drivers/soc/qcom/pil-q6v5.c index fb64cac6e73e..764760726caf 100644 --- a/drivers/soc/qcom/pil-q6v5.c +++ b/drivers/soc/qcom/pil-q6v5.c @@ -102,6 +102,12 @@ int pil_q6v5_make_proxy_votes(struct pil_desc *pil) goto out; } + ret = clk_prepare_enable(drv->qpic_clk); + if (ret) { + dev_err(pil->dev, "Failed to vote for qpic clk\n"); + goto err_qpic_vote; + } + ret = clk_prepare_enable(drv->pnoc_clk); if (ret) { dev_err(pil->dev, "Failed to vote for pnoc(rc:%d)\n", ret); @@ -171,6 +177,8 @@ err_prng_vote: err_qdss_vote: clk_disable_unprepare(drv->pnoc_clk); err_pnoc_vote: + clk_disable_unprepare(drv->qpic_clk); +err_qpic_vote: clk_disable_unprepare(drv->xo); out: return ret; @@ -197,6 +205,7 @@ void pil_q6v5_remove_proxy_votes(struct pil_desc *pil) regulator_set_load(drv->vreg_cx, 0); regulator_set_voltage(drv->vreg_cx, 0, INT_MAX); clk_disable_unprepare(drv->xo); + clk_disable_unprepare(drv->qpic_clk); clk_disable_unprepare(drv->pnoc_clk); clk_disable_unprepare(drv->qdss_clk); clk_disable_unprepare(drv->prng_clk); @@ -767,6 +776,10 @@ struct q6v5_data *pil_q6v5_init(struct platform_device *pdev) if (IS_ERR(drv->xo)) return ERR_CAST(drv->xo); + drv->qpic_clk = devm_clk_get(&pdev->dev, "qpic"); + if (IS_ERR(drv->qpic_clk)) + drv->qpic_clk = NULL; + if (of_property_read_bool(pdev->dev.of_node, "qcom,pnoc-clk-vote")) { drv->pnoc_clk = devm_clk_get(&pdev->dev, "pnoc_clk"); if (IS_ERR(drv->pnoc_clk)) diff --git a/drivers/soc/qcom/pil-q6v5.h b/drivers/soc/qcom/pil-q6v5.h index 175ad8faeb6e..ea6f666bdc50 100644 --- a/drivers/soc/qcom/pil-q6v5.h +++ b/drivers/soc/qcom/pil-q6v5.h @@ -29,6 +29,7 @@ struct q6v5_data { struct clk *qdss_clk; struct clk *prng_clk; struct clk *axis2_clk; + struct clk *qpic_clk; void __iomem *axi_halt_base; /* Halt base of q6, mss, * nc are in same 4K page */