* [PATCH v3 0/2] Don't call SCM interface for statically mapped msa region
@ 2020-01-03 13:44 ` Govind Singh
0 siblings, 0 replies; 10+ messages in thread
From: Govind Singh @ 2020-01-03 13:44 UTC (permalink / raw)
To: robh, devicetree, ath10k; +Cc: linux-wireless, Govind Singh
For some targets ex: SC7180/QCS404, SCM permissions for MSA region is
statically configured in TrustZone fw. Add SCM call disable option
for such targets to avoid duplicate permissions.
Change since v2:
rename flag to "qcom,msa-fixed-perm".
Change since v1:
Added devicetree list for review.
Govind Singh (2):
dt: bindings: add dt entry flag to skip SCM call for msa region
ath10k: Don't call SCM interface for statically mapped msa region
.../devicetree/bindings/net/wireless/qcom,ath10k.txt | 4 ++++
drivers/net/wireless/ath/ath10k/qmi.c | 9 +++++++++
drivers/net/wireless/ath/ath10k/qmi.h | 1 +
3 files changed, 14 insertions(+)
--
2.22.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 0/2] Don't call SCM interface for statically mapped msa region
@ 2020-01-03 13:44 ` Govind Singh
0 siblings, 0 replies; 10+ messages in thread
From: Govind Singh @ 2020-01-03 13:44 UTC (permalink / raw)
To: robh, devicetree, ath10k; +Cc: Govind Singh, linux-wireless
For some targets ex: SC7180/QCS404, SCM permissions for MSA region is
statically configured in TrustZone fw. Add SCM call disable option
for such targets to avoid duplicate permissions.
Change since v2:
rename flag to "qcom,msa-fixed-perm".
Change since v1:
Added devicetree list for review.
Govind Singh (2):
dt: bindings: add dt entry flag to skip SCM call for msa region
ath10k: Don't call SCM interface for statically mapped msa region
.../devicetree/bindings/net/wireless/qcom,ath10k.txt | 4 ++++
drivers/net/wireless/ath/ath10k/qmi.c | 9 +++++++++
drivers/net/wireless/ath/ath10k/qmi.h | 1 +
3 files changed, 14 insertions(+)
--
2.22.0
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 1/2] dt: bindings: add dt entry flag to skip SCM call for msa region
2020-01-03 13:44 ` Govind Singh
@ 2020-01-03 13:44 ` Govind Singh
-1 siblings, 0 replies; 10+ messages in thread
From: Govind Singh @ 2020-01-03 13:44 UTC (permalink / raw)
To: robh, devicetree, ath10k; +Cc: linux-wireless, Govind Singh
Add boolean context flag to disable SCM call for statically
mapped msa region.
Signed-off-by: Govind Singh <govinds@codeaurora.org>
---
.../devicetree/bindings/net/wireless/qcom,ath10k.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
index 017128394a3e..633366dc33da 100644
--- a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
+++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
@@ -88,6 +88,9 @@ Optional properties:
of the host capability QMI request
- qcom,xo-cal-data: xo cal offset to be configured in xo trim register.
+- qcom,msa-fixed-perm: Boolean context flag to disable SCM call for statically
+ mapped msa region.
+
Example (to supply PCI based wifi block details):
In this example, the node is defined as child node of the PCI controller.
@@ -185,4 +188,5 @@ wifi@18000000 {
vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
memory-region = <&wifi_msa_mem>;
iommus = <&apps_smmu 0x0040 0x1>;
+ qcom,msa-fixed-perm;
};
--
2.22.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v3 1/2] dt: bindings: add dt entry flag to skip SCM call for msa region
@ 2020-01-03 13:44 ` Govind Singh
0 siblings, 0 replies; 10+ messages in thread
From: Govind Singh @ 2020-01-03 13:44 UTC (permalink / raw)
To: robh, devicetree, ath10k; +Cc: Govind Singh, linux-wireless
Add boolean context flag to disable SCM call for statically
mapped msa region.
Signed-off-by: Govind Singh <govinds@codeaurora.org>
---
.../devicetree/bindings/net/wireless/qcom,ath10k.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
index 017128394a3e..633366dc33da 100644
--- a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
+++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
@@ -88,6 +88,9 @@ Optional properties:
of the host capability QMI request
- qcom,xo-cal-data: xo cal offset to be configured in xo trim register.
+- qcom,msa-fixed-perm: Boolean context flag to disable SCM call for statically
+ mapped msa region.
+
Example (to supply PCI based wifi block details):
In this example, the node is defined as child node of the PCI controller.
@@ -185,4 +188,5 @@ wifi@18000000 {
vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
memory-region = <&wifi_msa_mem>;
iommus = <&apps_smmu 0x0040 0x1>;
+ qcom,msa-fixed-perm;
};
--
2.22.0
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v3 2/2] ath10k: Don't call SCM interface for statically mapped msa region
2020-01-03 13:44 ` Govind Singh
@ 2020-01-03 13:44 ` Govind Singh
-1 siblings, 0 replies; 10+ messages in thread
From: Govind Singh @ 2020-01-03 13:44 UTC (permalink / raw)
To: robh, devicetree, ath10k; +Cc: linux-wireless, Govind Singh
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>
---
drivers/net/wireless/ath/ath10k/qmi.c | 9 +++++++++
drivers/net/wireless/ath/ath10k/qmi.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c
index 637f83ef65f8..1b91de70c8d6 100644
--- a/drivers/net/wireless/ath/ath10k/qmi.c
+++ b/drivers/net/wireless/ath/ath10k/qmi.c
@@ -84,6 +84,9 @@ static int ath10k_qmi_setup_msa_permissions(struct ath10k_qmi *qmi)
int ret;
int i;
+ if (qmi->msa_fixed_perm)
+ return 0;
+
for (i = 0; i < qmi->nr_mem_region; i++) {
ret = ath10k_qmi_map_msa_permission(qmi, &qmi->mem_region[i]);
if (ret)
@@ -102,6 +105,9 @@ static void ath10k_qmi_remove_msa_permission(struct ath10k_qmi *qmi)
{
int i;
+ if (qmi->msa_fixed_perm)
+ return;
+
for (i = 0; i < qmi->nr_mem_region; i++)
ath10k_qmi_unmap_msa_permission(qmi, &qmi->mem_region[i]);
}
@@ -1018,6 +1024,9 @@ static int ath10k_qmi_setup_msa_resources(struct ath10k_qmi *qmi, u32 msa_size)
qmi->msa_mem_size = msa_size;
}
+ if (of_property_read_bool(dev->of_node, "qcom,msa-fixed-perm"))
+ qmi->msa_fixed_perm = true;
+
ath10k_dbg(ar, ATH10K_DBG_QMI, "msa pa: %pad , msa va: 0x%p\n",
&qmi->msa_pa,
qmi->msa_va);
diff --git a/drivers/net/wireless/ath/ath10k/qmi.h b/drivers/net/wireless/ath/ath10k/qmi.h
index 40aafb875ed0..dc257375f161 100644
--- a/drivers/net/wireless/ath/ath10k/qmi.h
+++ b/drivers/net/wireless/ath/ath10k/qmi.h
@@ -104,6 +104,7 @@ struct ath10k_qmi {
bool fw_ready;
char fw_build_timestamp[MAX_TIMESTAMP_LEN + 1];
struct ath10k_qmi_cal_data cal_data[MAX_NUM_CAL_V01];
+ bool msa_fixed_perm;
};
int ath10k_qmi_wlan_enable(struct ath10k *ar,
--
2.22.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v3 2/2] ath10k: Don't call SCM interface for statically mapped msa region
@ 2020-01-03 13:44 ` Govind Singh
0 siblings, 0 replies; 10+ messages in thread
From: Govind Singh @ 2020-01-03 13:44 UTC (permalink / raw)
To: robh, devicetree, ath10k; +Cc: Govind Singh, linux-wireless
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>
---
drivers/net/wireless/ath/ath10k/qmi.c | 9 +++++++++
drivers/net/wireless/ath/ath10k/qmi.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c
index 637f83ef65f8..1b91de70c8d6 100644
--- a/drivers/net/wireless/ath/ath10k/qmi.c
+++ b/drivers/net/wireless/ath/ath10k/qmi.c
@@ -84,6 +84,9 @@ static int ath10k_qmi_setup_msa_permissions(struct ath10k_qmi *qmi)
int ret;
int i;
+ if (qmi->msa_fixed_perm)
+ return 0;
+
for (i = 0; i < qmi->nr_mem_region; i++) {
ret = ath10k_qmi_map_msa_permission(qmi, &qmi->mem_region[i]);
if (ret)
@@ -102,6 +105,9 @@ static void ath10k_qmi_remove_msa_permission(struct ath10k_qmi *qmi)
{
int i;
+ if (qmi->msa_fixed_perm)
+ return;
+
for (i = 0; i < qmi->nr_mem_region; i++)
ath10k_qmi_unmap_msa_permission(qmi, &qmi->mem_region[i]);
}
@@ -1018,6 +1024,9 @@ static int ath10k_qmi_setup_msa_resources(struct ath10k_qmi *qmi, u32 msa_size)
qmi->msa_mem_size = msa_size;
}
+ if (of_property_read_bool(dev->of_node, "qcom,msa-fixed-perm"))
+ qmi->msa_fixed_perm = true;
+
ath10k_dbg(ar, ATH10K_DBG_QMI, "msa pa: %pad , msa va: 0x%p\n",
&qmi->msa_pa,
qmi->msa_va);
diff --git a/drivers/net/wireless/ath/ath10k/qmi.h b/drivers/net/wireless/ath/ath10k/qmi.h
index 40aafb875ed0..dc257375f161 100644
--- a/drivers/net/wireless/ath/ath10k/qmi.h
+++ b/drivers/net/wireless/ath/ath10k/qmi.h
@@ -104,6 +104,7 @@ struct ath10k_qmi {
bool fw_ready;
char fw_build_timestamp[MAX_TIMESTAMP_LEN + 1];
struct ath10k_qmi_cal_data cal_data[MAX_NUM_CAL_V01];
+ bool msa_fixed_perm;
};
int ath10k_qmi_wlan_enable(struct ath10k *ar,
--
2.22.0
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/2] dt: bindings: add dt entry flag to skip SCM call for msa region
2020-01-03 13:44 ` Govind Singh
@ 2020-01-04 0:59 ` Rob Herring
-1 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2020-01-04 0:59 UTC (permalink / raw)
To: Govind Singh; +Cc: robh, devicetree, ath10k, linux-wireless, Govind Singh
On Fri, 3 Jan 2020 19:14:13 +0530, Govind Singh wrote:
> Add boolean context flag to disable SCM call for statically
> mapped msa region.
>
> Signed-off-by: Govind Singh <govinds@codeaurora.org>
> ---
> .../devicetree/bindings/net/wireless/qcom,ath10k.txt | 4 ++++
> 1 file changed, 4 insertions(+)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/2] dt: bindings: add dt entry flag to skip SCM call for msa region
@ 2020-01-04 0:59 ` Rob Herring
0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2020-01-04 0:59 UTC (permalink / raw)
To: Govind Singh; +Cc: robh, linux-wireless, ath10k, devicetree
On Fri, 3 Jan 2020 19:14:13 +0530, Govind Singh wrote:
> Add boolean context flag to disable SCM call for statically
> mapped msa region.
>
> Signed-off-by: Govind Singh <govinds@codeaurora.org>
> ---
> .../devicetree/bindings/net/wireless/qcom,ath10k.txt | 4 ++++
> 1 file changed, 4 insertions(+)
>
Acked-by: Rob Herring <robh@kernel.org>
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/2] dt: bindings: add dt entry flag to skip SCM call for msa region
2020-01-03 13:44 ` Govind Singh
(?)
(?)
@ 2020-01-26 10:36 ` Kalle Valo
-1 siblings, 0 replies; 10+ messages in thread
From: Kalle Valo @ 2020-01-26 10:36 UTC (permalink / raw)
To: Govind Singh; +Cc: robh, devicetree, ath10k, linux-wireless, Govind Singh
Govind Singh <govinds@codeaurora.org> wrote:
> Add boolean context flag to disable SCM call for statically
> mapped msa region.
>
> Signed-off-by: Govind Singh <govinds@codeaurora.org>
> Acked-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2 patches applied to ath-next branch of ath.git, thanks.
6ca71a10aee8 dt: bindings: add dt entry flag to skip SCM call for msa region
ab000ea6a393 ath10k: Don't call SCM interface for statically mapped msa region
--
https://patchwork.kernel.org/patch/11316913/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/2] dt: bindings: add dt entry flag to skip SCM call for msa region
2020-01-03 13:44 ` Govind Singh
` (2 preceding siblings ...)
(?)
@ 2020-01-26 10:36 ` Kalle Valo
-1 siblings, 0 replies; 10+ messages in thread
From: Kalle Valo @ 2020-01-26 10:36 UTC (permalink / raw)
To: Govind Singh; +Cc: robh, linux-wireless, ath10k, devicetree
Govind Singh <govinds@codeaurora.org> wrote:
> Add boolean context flag to disable SCM call for statically
> mapped msa region.
>
> Signed-off-by: Govind Singh <govinds@codeaurora.org>
> Acked-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2 patches applied to ath-next branch of ath.git, thanks.
6ca71a10aee8 dt: bindings: add dt entry flag to skip SCM call for msa region
ab000ea6a393 ath10k: Don't call SCM interface for statically mapped msa region
--
https://patchwork.kernel.org/patch/11316913/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-01-26 10:36 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-03 13:44 [PATCH v3 0/2] Don't call SCM interface for statically mapped msa region Govind Singh
2020-01-03 13:44 ` Govind Singh
2020-01-03 13:44 ` [PATCH v3 1/2] dt: bindings: add dt entry flag to skip SCM call for " Govind Singh
2020-01-03 13:44 ` Govind Singh
2020-01-04 0:59 ` Rob Herring
2020-01-04 0:59 ` Rob Herring
2020-01-26 10:36 ` Kalle Valo
2020-01-26 10:36 ` Kalle Valo
2020-01-03 13:44 ` [PATCH v3 2/2] ath10k: Don't call SCM interface for statically mapped " Govind Singh
2020-01-03 13:44 ` Govind Singh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.