Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 243575bd authored by Yue Ma's avatar Yue Ma
Browse files

cnss2: Bypass SMMU stage-1 by default



Bypass SMMU stage-1 till it is fully supported by WLAN driver and
device.

Change-Id: I186345c20f9b71171bba6acc8c5eaa689e39b51c
CRs-fixed: 2071634
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent abb697f2
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -222,6 +222,7 @@ static int cnss_pci_init_smmu(struct cnss_pci_data *pci_priv)
	struct device *dev;
	struct dma_iommu_mapping *mapping;
	int atomic_ctx = 1;
	int s1_bypass = 1;

	dev = &pci_priv->pci_dev->dev;

@@ -243,6 +244,15 @@ static int cnss_pci_init_smmu(struct cnss_pci_data *pci_priv)
		goto release_mapping;
	}

	ret = iommu_domain_set_attr(mapping->domain,
				    DOMAIN_ATTR_S1_BYPASS,
				    &s1_bypass);
	if (ret) {
		pr_err("Failed to set SMMU s1_bypass attribute, err = %d\n",
		       ret);
		goto release_mapping;
	}

	ret = arm_iommu_attach_device(dev, mapping);
	if (ret) {
		pr_err("Failed to attach SMMU device, err = %d\n", ret);