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

Commit e078ce91 authored by Patrick Daly's avatar Patrick Daly
Browse files

iommu: arm-smmu: Remove unnecessary power_on call



arm_smmu_map_sg() calls arm_smmu_unmap() on error, and the later
already enables the clocks it requires. No other part of
arm_smmu_map_sg() requires accessing hardware registers.

Change-Id: Ifaee2224548097c9ebed6d616269ede8e24e4fd3
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent 7f377fe3
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -2405,10 +2405,6 @@ static size_t arm_smmu_map_sg(struct iommu_domain *domain, unsigned long iova,
	if (!ops)
		return -ENODEV;

	ret = arm_smmu_domain_power_on(domain, smmu_domain->smmu);
	if (ret)
		return ret;

	arm_smmu_secure_domain_lock(smmu_domain);

	__saved_iova_start = iova;
@@ -2449,7 +2445,6 @@ static size_t arm_smmu_map_sg(struct iommu_domain *domain, unsigned long iova,
		iova = __saved_iova_start;
	}
	arm_smmu_secure_domain_unlock(smmu_domain);
	arm_smmu_domain_power_off(domain, smmu_domain->smmu);
	return iova - __saved_iova_start;
}