#include <linux/clk.h>
 #include <linux/device.h>
 #include <linux/dma-direction.h>
-#include <linux/dma-iommu.h>
 #include <linux/dma-mapping.h>
 #include <linux/err.h>
 #include <linux/errno.h>
        if (!sun50i_domain)
                return NULL;
 
-       if (type == IOMMU_DOMAIN_DMA &&
-           iommu_get_dma_cookie(&sun50i_domain->domain))
-               goto err_free_domain;
-
        sun50i_domain->dt = (u32 *)__get_free_pages(GFP_KERNEL | __GFP_ZERO,
                                                    get_order(DT_SIZE));
        if (!sun50i_domain->dt)
-               goto err_put_cookie;
+               goto err_free_domain;
 
        refcount_set(&sun50i_domain->refcnt, 1);
 
 
        return &sun50i_domain->domain;
 
-err_put_cookie:
-       if (type == IOMMU_DOMAIN_DMA)
-               iommu_put_dma_cookie(&sun50i_domain->domain);
-
 err_free_domain:
        kfree(sun50i_domain);
 
        free_pages((unsigned long)sun50i_domain->dt, get_order(DT_SIZE));
        sun50i_domain->dt = NULL;
 
-       iommu_put_dma_cookie(domain);
-
        kfree(sun50i_domain);
 }