|
@@ -27,9 +27,6 @@
|
|
|
|
|
|
#define NO_IOMMU 1
|
|
|
|
|
|
-static const struct of_device_id __iommu_of_table_sentinel
|
|
|
- __used __section(__iommu_of_table_end);
|
|
|
-
|
|
|
/**
|
|
|
* of_get_dma_window - Parse *dma-window property and returns 0 if found.
|
|
|
*
|
|
@@ -98,19 +95,6 @@ int of_get_dma_window(struct device_node *dn, const char *prefix, int index,
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(of_get_dma_window);
|
|
|
|
|
|
-static bool of_iommu_driver_present(struct device_node *np)
|
|
|
-{
|
|
|
- /*
|
|
|
- * If the IOMMU still isn't ready by the time we reach init, assume
|
|
|
- * it never will be. We don't want to defer indefinitely, nor attempt
|
|
|
- * to dereference __iommu_of_table after it's been freed.
|
|
|
- */
|
|
|
- if (system_state >= SYSTEM_RUNNING)
|
|
|
- return false;
|
|
|
-
|
|
|
- return of_match_node(&__iommu_of_table, np);
|
|
|
-}
|
|
|
-
|
|
|
static int of_iommu_xlate(struct device *dev,
|
|
|
struct of_phandle_args *iommu_spec)
|
|
|
{
|
|
@@ -120,8 +104,7 @@ static int of_iommu_xlate(struct device *dev,
|
|
|
|
|
|
ops = iommu_ops_from_fwnode(fwnode);
|
|
|
if ((ops && !ops->of_xlate) ||
|
|
|
- !of_device_is_available(iommu_spec->np) ||
|
|
|
- (!ops && !of_iommu_driver_present(iommu_spec->np)))
|
|
|
+ !of_device_is_available(iommu_spec->np))
|
|
|
return NO_IOMMU;
|
|
|
|
|
|
err = iommu_fwspec_init(dev, &iommu_spec->np->fwnode, ops);
|