1 From 87dbcc69a7e3fe6ccddf4fe9bdbf51330f5e4a77 Mon Sep 17 00:00:00 2001
2 From: Mantas Pucka <mantas@8devices.com>
3 Date: Tue, 23 Jan 2024 11:04:04 +0200
4 Subject: [PATCH] remoteproc: qcom_q6v5_wcss: add optional qdss_at clock
6 IPQ6018 needs QDSS_AT clock enabled when loading wifi. Optionally enable it
9 Signed-off-by: Mantas Pucka <mantas@8devices.com>
11 drivers/remoteproc/qcom_q6v5_wcss.c | 24 ++++++++++++++++++++++++
12 1 file changed, 24 insertions(+)
14 --- a/drivers/remoteproc/qcom_q6v5_wcss.c
15 +++ b/drivers/remoteproc/qcom_q6v5_wcss.c
16 @@ -120,6 +120,7 @@ struct q6v5_wcss {
17 struct clk *qdsp6ss_core_gfmux;
18 struct clk *lcc_bcr_sleep;
20 + struct clk *qdss_clk;
21 struct regulator *cx_supply;
22 struct qcom_sysmon *sysmon;
24 @@ -259,6 +260,9 @@ static int q6v5_wcss_start(struct rproc
29 + clk_prepare_enable(wcss->qdss_clk);
31 qcom_q6v5_prepare(&wcss->q6v5);
33 if (wcss->need_mem_protection) {
34 @@ -772,6 +776,8 @@ static int q6v5_wcss_stop(struct rproc *
39 + clk_disable_unprepare(wcss->qdss_clk);
40 clk_disable_unprepare(wcss->prng_clk);
41 qcom_q6v5_unprepare(&wcss->q6v5);
43 @@ -981,6 +987,12 @@ static int ipq_init_clock(struct q6v5_wc
44 dev_err(wcss->dev, "Failed to get prng clock\n");
48 + wcss->qdss_clk = devm_clk_get(wcss->dev, "qdss");
49 + if (IS_ERR(wcss->qdss_clk)) {
50 + wcss->qdss_clk = NULL;