#include <linux/debugfs.h>
 #include <linux/init.h>
 #include <linux/io.h>
+#include <linux/iommu.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/pci.h>
        destroy_workqueue(qm->wq);
 }
 
+static void sec_iommu_used_check(struct sec_dev *sec)
+{
+       struct iommu_domain *domain;
+       struct device *dev = &sec->qm.pdev->dev;
+
+       domain = iommu_get_domain_for_dev(dev);
+
+       /* Check if iommu is used */
+       sec->iommu_used = false;
+       if (domain) {
+               if (domain->type & __IOMMU_DOMAIN_PAGING)
+                       sec->iommu_used = true;
+               dev_info(dev, "SMMU Opened, the iommu type = %u\n",
+                       domain->type);
+       }
+}
+
 static int sec_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 {
        struct sec_dev *sec;
        pci_set_drvdata(pdev, sec);
 
        sec->ctx_q_num = ctx_q_num;
+       sec_iommu_used_check(sec);
 
        qm = &sec->qm;