@@ -20,10 +20,6 @@
* DEALINGS IN THE SOFTWARE.
*/
-#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)
-#include <asm/dma-iommu.h>
-#endif
-
#include <core/tegra.h>
#ifdef CONFIG_NOUVEAU_PLATFORM_DRIVER
#include "priv.h"
@@ -110,19 +106,8 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
unsigned long pgsize_bitmap;
int ret;
-#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)
- if (dev->archdata.mapping) {
- struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev);
-
- arm_iommu_release_mapping(mapping);
- arm_iommu_detach_device(dev);
-
- if (dev->archdata.dma_coherent)
- set_dma_ops(dev, &arm_coherent_dma_ops);
- else
- set_dma_ops(dev, &arm_dma_ops);
- }
-#endif
+ /* make sure we can use the IOMMU exclusively */
+ dma_iommu_detach_device(dev);
if (!tdev->func->iommu_bit)
return;