|
@@ -523,6 +523,19 @@ static int arm_smmu_iort_xlate(struct device *dev, u32 streamid,
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline bool iort_iommu_driver_enabled(u8 type)
|
|
|
|
+{
|
|
|
|
+ switch (type) {
|
|
|
|
+ case ACPI_IORT_NODE_SMMU_V3:
|
|
|
|
+ return IS_BUILTIN(CONFIG_ARM_SMMU_V3);
|
|
|
|
+ case ACPI_IORT_NODE_SMMU:
|
|
|
|
+ return IS_BUILTIN(CONFIG_ARM_SMMU);
|
|
|
|
+ default:
|
|
|
|
+ pr_warn("IORT node type %u does not describe an SMMU\n", type);
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
static const struct iommu_ops *iort_iommu_xlate(struct device *dev,
|
|
static const struct iommu_ops *iort_iommu_xlate(struct device *dev,
|
|
struct acpi_iort_node *node,
|
|
struct acpi_iort_node *node,
|
|
u32 streamid)
|
|
u32 streamid)
|