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

Commit 97e9c6f5 authored by Yue Ma's avatar Yue Ma Committed by Matt Wagantall
Browse files

cnss: Set new attribute when attach to SMMU driver



Set DOMAIN_ATTR_ATOMIC attribute when attach to SMMU driver so that
it can handle atomic DMA map/unmap operations for WLAN.

Change-Id: Id31faf5aec10d0e08430df14910c0220e80ff57e
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent d44831bc
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -1290,6 +1290,7 @@ static int cnss_smmu_init(struct device *dev)
	struct dma_iommu_mapping *mapping;
	int order = 0;
	int disable_htw = 1;
	int atomic_ctx = 1;
	int ret;

	mapping = arm_iommu_create_mapping(&platform_bus_type,
@@ -1306,7 +1307,17 @@ static int cnss_smmu_init(struct device *dev)
			      DOMAIN_ATTR_COHERENT_HTW_DISABLE,
			      &disable_htw);
	if (ret) {
		pr_err("%s: set attributes failed, err = %d\n", __func__, ret);
		pr_err("%s: set disable_htw attribute failed, err = %d\n",
			__func__, ret);
		goto set_attr_fail;
	}

	ret = iommu_domain_set_attr(mapping->domain,
				    DOMAIN_ATTR_ATOMIC,
				    &atomic_ctx);
	if (ret) {
		pr_err("%s: set atomic_ctx attribute failed, err = %d\n",
			__func__, ret);
		goto set_attr_fail;
	}