summaryrefslogtreecommitdiffstats
path: root/target/linux/qualcommax/patches-6.6/0908-remoteproc-qcom_q6v5_wcss-add-optional-qdss_at-clock.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/qualcommax/patches-6.6/0908-remoteproc-qcom_q6v5_wcss-add-optional-qdss_at-clock.patch')
-rw-r--r--target/linux/qualcommax/patches-6.6/0908-remoteproc-qcom_q6v5_wcss-add-optional-qdss_at-clock.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/target/linux/qualcommax/patches-6.6/0908-remoteproc-qcom_q6v5_wcss-add-optional-qdss_at-clock.patch b/target/linux/qualcommax/patches-6.6/0908-remoteproc-qcom_q6v5_wcss-add-optional-qdss_at-clock.patch
new file mode 100644
index 0000000000..cfc9adda04
--- /dev/null
+++ b/target/linux/qualcommax/patches-6.6/0908-remoteproc-qcom_q6v5_wcss-add-optional-qdss_at-clock.patch
@@ -0,0 +1,55 @@
+From 87dbcc69a7e3fe6ccddf4fe9bdbf51330f5e4a77 Mon Sep 17 00:00:00 2001
+From: Mantas Pucka <mantas@8devices.com>
+Date: Tue, 23 Jan 2024 11:04:04 +0200
+Subject: [PATCH] remoteproc: qcom_q6v5_wcss: add optional qdss_at clock
+
+IPQ6018 needs QDSS_AT clock enabled when loading wifi. Optionally enable it
+when provided by DT.
+
+Signed-off-by: Mantas Pucka <mantas@8devices.com>
+---
+ drivers/remoteproc/qcom_q6v5_wcss.c | 24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+--- a/drivers/remoteproc/qcom_q6v5_wcss.c
++++ b/drivers/remoteproc/qcom_q6v5_wcss.c
+@@ -120,6 +120,7 @@ struct q6v5_wcss {
+ struct clk *qdsp6ss_core_gfmux;
+ struct clk *lcc_bcr_sleep;
+ struct clk *prng_clk;
++ struct clk *qdss_clk;
+ struct regulator *cx_supply;
+ struct qcom_sysmon *sysmon;
+
+@@ -259,6 +260,9 @@ static int q6v5_wcss_start(struct rproc
+ return ret;
+ }
+
++ if (wcss->qdss_clk)
++ clk_prepare_enable(wcss->qdss_clk);
++
+ qcom_q6v5_prepare(&wcss->q6v5);
+
+ if (wcss->need_mem_protection) {
+@@ -772,6 +776,8 @@ static int q6v5_wcss_stop(struct rproc *
+ }
+
+ pas_done:
++ if (wcss->qdss_clk)
++ clk_disable_unprepare(wcss->qdss_clk);
+ clk_disable_unprepare(wcss->prng_clk);
+ qcom_q6v5_unprepare(&wcss->q6v5);
+
+@@ -981,6 +987,12 @@ static int ipq_init_clock(struct q6v5_wc
+ dev_err(wcss->dev, "Failed to get prng clock\n");
+ return ret;
+ }
++
++ wcss->qdss_clk = devm_clk_get(wcss->dev, "qdss");
++ if (IS_ERR(wcss->qdss_clk)) {
++ wcss->qdss_clk = NULL;
++ }
++
+ return 0;
+ }
+