diff options
author | Hiroshi Doyu <hdoyu@nvidia.com> | 2013-03-06 10:07:52 +0200 |
---|---|---|
committer | Harshada Kale <hkale@nvidia.com> | 2013-06-10 03:46:01 -0700 |
commit | 60a4be75a2e7bb399abc41f8c8495a8ea9d8daa5 (patch) | |
tree | b5eccf9f492697eb47762686af0c54536ae3b8ad | |
parent | 944befe19bba933b0d8d032d915776d91509bf79 (diff) |
iommu/tegra: smmu: BIND_DRIVER attaches device to IOMMU
BUS_NOTIFY_BIND_DRIVER needs to attach a devie to IOMMU when it's
removed at previous UNBOUND_DRIVER.
bug 1286500
Change-Id: Ide91e4ae0a54f835fc195854cd858fff7620418e
(cherry picked from commit df3f9065ae3dc3c0e736ca066c2402974328d89d)
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Reviewed-on: http://git-master/r/234113
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
-rw-r--r-- | drivers/iommu/tegra-smmu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c index e86b257fb177..f36287755cc9 100644 --- a/drivers/iommu/tegra-smmu.c +++ b/drivers/iommu/tegra-smmu.c @@ -33,6 +33,7 @@ #include <linux/debugfs.h> #include <linux/seq_file.h> #include <linux/of_iommu.h> +#include <linux/dma-mapping.h> #include <asm/page.h> #include <asm/cacheflush.h> @@ -1442,6 +1443,10 @@ static int tegra_smmu_device_notifier(struct notifier_block *nb, int err; switch (event) { + case BUS_NOTIFY_BIND_DRIVER: + if (get_dma_ops(dev) != &arm_dma_ops) + break; + /* FALLTHROUGH */ case BUS_NOTIFY_ADD_DEVICE: err = of_get_dma_window(dev->of_node, NULL, 0, NULL, &base, &size); |