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

Commit 2457d049 authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "iommu/arm-smmu: Work around ARM DMA configuration" into msm-4.8

parents d1f3fabe 4f79b144
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -2088,6 +2088,16 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev)
		return -ENXIO;
	}

	/*
	 * FIXME: The arch/arm DMA API code tries to attach devices to its own
	 * domains between of_xlate() and add_device() - we have no way to cope
	 * with that, so until ARM gets converted to rely on groups and default
	 * domains, just say no (but more politely than by dereferencing NULL).
	 * This should be at least a WARN_ON once that's sorted.
	 */
	if (!fwspec->iommu_priv)
		return -ENODEV;

	smmu = fwspec_smmu(fwspec);

	/* Enable Clocks and Power */