From: Carl Huang <cjhuang@codeaurora.org>
To: ath11k@lists.infradead.org
Subject: [PATCH qca6390-bringup] ath11k: enable internal sleep clock
Date: Fri, 20 Dec 2019 11:28:48 +0800 [thread overview]
Message-ID: <1576812528-24979-1-git-send-email-cjhuang@codeaurora.org> (raw)
For QCA6390 on x86 and non-qcom platfrom, host need explicitly tell firmware
to use internal sleep clock. Some QCA6390 modules have OTP burnt with external
sleep clock selected, and these moduesl usually can't work normally on
these platforms unless firmware selects internal sleep clock.
Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/qmi.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
index d96446c..6612637 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -14,6 +14,8 @@
#define BDF_FILE_NAME_PREFIX "bdwlan"
#define MAX_M3_FILE_NAME_LENGTH 13
#define DEFAULT_M3_FILE_NAME "m3.bin"
+#define SLEEP_CLOCK_SELECT_INTERNAL_BIT 0x02
+#define HOST_CSTATE_BIT 0x04
static struct qmi_elem_info qmi_wlanfw_host_cap_req_msg_v01_ei[] = {
{
@@ -1537,6 +1539,15 @@ static int ath11k_qmi_host_cap_send(struct ath11k_base *ab)
req.cal_done_valid = 1;
req.cal_done = ab->qmi.cal_done;
+ req.nm_modem_valid = 1;
+ /*notify firmware that os is X86*/
+ req.nm_modem |= HOST_CSTATE_BIT;
+ /* notify firmware about the sleep clock selection,
+ * discussed with firmware, nm_modem_bit[1] used for this purpose
+ * x86 host driver should select internal sleep clock.
+ */
+ req.nm_modem |= SLEEP_CLOCK_SELECT_INTERNAL_BIT;
+
ret = qmi_txn_init(&ab->qmi.handle, &txn,
qmi_wlanfw_host_cap_resp_msg_v01_ei, &resp);
if (ret < 0)
--
2.7.4
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
next reply other threads:[~2019-12-20 3:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-20 3:28 Carl Huang [this message]
2019-12-20 14:18 ` [PATCH qca6390-bringup] ath11k: enable internal sleep clock Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1576812528-24979-1-git-send-email-cjhuang@codeaurora.org \
--to=cjhuang@codeaurora.org \
--cc=ath11k@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox