Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ath10k: Don't call SCM interface for statically mapped msa region

For some targets ex: QCS404, SCM permissions for MSA region is
statically configured in TrustZone fw. Add SCM call disable option
for such targets to avoid duplicate permissions.

Testing: Tested on WCN3990 HW
Tested FW: WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1

Signed-off-by: Govind Singh <govinds@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

authored by

Govind Singh and committed by
Kalle Valo
ab000ea6 6ca71a10

+10
+9
drivers/net/wireless/ath/ath10k/qmi.c
··· 84 84 int ret; 85 85 int i; 86 86 87 + if (qmi->msa_fixed_perm) 88 + return 0; 89 + 87 90 for (i = 0; i < qmi->nr_mem_region; i++) { 88 91 ret = ath10k_qmi_map_msa_permission(qmi, &qmi->mem_region[i]); 89 92 if (ret) ··· 104 101 static void ath10k_qmi_remove_msa_permission(struct ath10k_qmi *qmi) 105 102 { 106 103 int i; 104 + 105 + if (qmi->msa_fixed_perm) 106 + return; 107 107 108 108 for (i = 0; i < qmi->nr_mem_region; i++) 109 109 ath10k_qmi_unmap_msa_permission(qmi, &qmi->mem_region[i]); ··· 1040 1034 } 1041 1035 qmi->msa_mem_size = msa_size; 1042 1036 } 1037 + 1038 + if (of_property_read_bool(dev->of_node, "qcom,msa-fixed-perm")) 1039 + qmi->msa_fixed_perm = true; 1043 1040 1044 1041 ath10k_dbg(ar, ATH10K_DBG_QMI, "msa pa: %pad , msa va: 0x%p\n", 1045 1042 &qmi->msa_pa,
+1
drivers/net/wireless/ath/ath10k/qmi.h
··· 104 104 bool fw_ready; 105 105 char fw_build_timestamp[MAX_TIMESTAMP_LEN + 1]; 106 106 struct ath10k_qmi_cal_data cal_data[MAX_NUM_CAL_V01]; 107 + bool msa_fixed_perm; 107 108 }; 108 109 109 110 int ath10k_qmi_wlan_enable(struct ath10k *ar,