Merge "icnss: Avoid DOMAIN_ATTR_ATOMIC setting during S1 bypass"

This commit is contained in:
Linux Build Service Account 2017-02-09 22:09:23 -08:00 committed by Gerrit - the friendly Code Review server
commit cbbf109dc4
4 changed files with 19 additions and 7 deletions

View file

@ -19,6 +19,7 @@ Required properties:
Optional properties:
- qcom,icnss-vadc: VADC handle for vph_pwr read APIs.
- qcom,icnss-adc_tm: VADC handle for vph_pwr notification APIs.
- qcom,smmu-s1-bypass: Boolean context flag to set SMMU to S1 bypass
Example:
@ -43,4 +44,5 @@ Example:
<0 140 0 /* CE10 */ >,
<0 141 0 /* CE11 */ >;
qcom,wlan-msa-memory = <0x200000>;
qcom,smmu-s1-bypass;
};

View file

@ -1458,6 +1458,7 @@
<0 424 0>, /* CE10 */
<0 425 0>; /* CE11 */
qcom,wlan-msa-memory = <0x100000>;
qcom,smmu-s1-bypass;
};
qcom,lpass@15700000 {

View file

@ -1891,6 +1891,7 @@
<0 424 0>, /* CE10 */
<0 425 0>; /* CE11 */
qcom,wlan-msa-memory = <0x100000>;
qcom,smmu-s1-bypass;
};
qcom,lpass@15700000 {

View file

@ -334,6 +334,7 @@ static struct icnss_priv {
struct ramdump_device *msa0_dump_dev;
bool is_wlan_mac_set;
struct icnss_wlan_mac_addr wlan_mac_addr;
bool bypass_s1_smmu;
} *penv;
static void icnss_pm_stay_awake(struct icnss_priv *priv)
@ -2914,13 +2915,15 @@ static int icnss_smmu_init(struct icnss_priv *priv)
goto map_fail;
}
ret = iommu_domain_set_attr(mapping->domain,
DOMAIN_ATTR_ATOMIC,
&atomic_ctx);
if (ret < 0) {
icnss_pr_err("Set atomic_ctx attribute failed, err = %d\n",
ret);
goto set_attr_fail;
if (!priv->bypass_s1_smmu) {
ret = iommu_domain_set_attr(mapping->domain,
DOMAIN_ATTR_ATOMIC,
&atomic_ctx);
if (ret < 0) {
icnss_pr_err("Set atomic_ctx attribute failed, err = %d\n",
ret);
goto set_attr_fail;
}
}
ret = iommu_domain_set_attr(mapping->domain,
@ -3666,6 +3669,11 @@ static int icnss_probe(struct platform_device *pdev)
if (ret == -EPROBE_DEFER)
goto out;
if (of_property_read_bool(pdev->dev.of_node, "qcom,smmu-s1-bypass"))
priv->bypass_s1_smmu = true;
icnss_pr_dbg("SMMU S1 BYPASS = %d\n", priv->bypass_s1_smmu);
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "membase");
if (!res) {
icnss_pr_err("Memory base not found in DT\n");