diff options
Diffstat (limited to 'drivers/iommu/tegra-smmu.c')
| -rw-r--r-- | drivers/iommu/tegra-smmu.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c index a649f146d17b..fc178893789a 100644 --- a/drivers/iommu/tegra-smmu.c +++ b/drivers/iommu/tegra-smmu.c | |||
| @@ -34,13 +34,11 @@ | |||
| 34 | #include <linux/of_iommu.h> | 34 | #include <linux/of_iommu.h> |
| 35 | #include <linux/debugfs.h> | 35 | #include <linux/debugfs.h> |
| 36 | #include <linux/seq_file.h> | 36 | #include <linux/seq_file.h> |
| 37 | #include <linux/tegra-ahb.h> | ||
| 37 | 38 | ||
| 38 | #include <asm/page.h> | 39 | #include <asm/page.h> |
| 39 | #include <asm/cacheflush.h> | 40 | #include <asm/cacheflush.h> |
| 40 | 41 | ||
| 41 | #include <mach/iomap.h> | ||
| 42 | #include <mach/tegra-ahb.h> | ||
| 43 | |||
| 44 | enum smmu_hwgrp { | 42 | enum smmu_hwgrp { |
| 45 | HWGRP_AFI, | 43 | HWGRP_AFI, |
| 46 | HWGRP_AVPC, | 44 | HWGRP_AVPC, |
| @@ -696,10 +694,8 @@ static void __smmu_iommu_unmap(struct smmu_as *as, dma_addr_t iova) | |||
| 696 | *pte = _PTE_VACANT(iova); | 694 | *pte = _PTE_VACANT(iova); |
| 697 | FLUSH_CPU_DCACHE(pte, page, sizeof(*pte)); | 695 | FLUSH_CPU_DCACHE(pte, page, sizeof(*pte)); |
| 698 | flush_ptc_and_tlb(as->smmu, as, iova, pte, page, 0); | 696 | flush_ptc_and_tlb(as->smmu, as, iova, pte, page, 0); |
| 699 | if (!--(*count)) { | 697 | if (!--(*count)) |
| 700 | free_ptbl(as, iova); | 698 | free_ptbl(as, iova); |
| 701 | smmu_flush_regs(as->smmu, 0); | ||
| 702 | } | ||
| 703 | } | 699 | } |
| 704 | 700 | ||
| 705 | static void __smmu_iommu_map_pfn(struct smmu_as *as, dma_addr_t iova, | 701 | static void __smmu_iommu_map_pfn(struct smmu_as *as, dma_addr_t iova, |
| @@ -1054,6 +1050,7 @@ static int smmu_debugfs_stats_show(struct seq_file *s, void *v) | |||
| 1054 | stats[i], val, offs); | 1050 | stats[i], val, offs); |
| 1055 | } | 1051 | } |
| 1056 | seq_printf(s, "\n"); | 1052 | seq_printf(s, "\n"); |
| 1053 | dput(dent); | ||
| 1057 | 1054 | ||
| 1058 | return 0; | 1055 | return 0; |
| 1059 | } | 1056 | } |
| @@ -1233,6 +1230,7 @@ static int tegra_smmu_probe(struct platform_device *pdev) | |||
| 1233 | 1230 | ||
| 1234 | smmu_debugfs_create(smmu); | 1231 | smmu_debugfs_create(smmu); |
| 1235 | smmu_handle = smmu; | 1232 | smmu_handle = smmu; |
| 1233 | bus_set_iommu(&platform_bus_type, &smmu_iommu_ops); | ||
| 1236 | return 0; | 1234 | return 0; |
| 1237 | } | 1235 | } |
| 1238 | 1236 | ||
| @@ -1257,7 +1255,7 @@ const struct dev_pm_ops tegra_smmu_pm_ops = { | |||
| 1257 | }; | 1255 | }; |
| 1258 | 1256 | ||
| 1259 | #ifdef CONFIG_OF | 1257 | #ifdef CONFIG_OF |
| 1260 | static struct of_device_id tegra_smmu_of_match[] __devinitdata = { | 1258 | static struct of_device_id tegra_smmu_of_match[] = { |
| 1261 | { .compatible = "nvidia,tegra30-smmu", }, | 1259 | { .compatible = "nvidia,tegra30-smmu", }, |
| 1262 | { }, | 1260 | { }, |
| 1263 | }; | 1261 | }; |
| @@ -1275,9 +1273,8 @@ static struct platform_driver tegra_smmu_driver = { | |||
| 1275 | }, | 1273 | }, |
| 1276 | }; | 1274 | }; |
| 1277 | 1275 | ||
| 1278 | static int __devinit tegra_smmu_init(void) | 1276 | static int tegra_smmu_init(void) |
| 1279 | { | 1277 | { |
| 1280 | bus_set_iommu(&platform_bus_type, &smmu_iommu_ops); | ||
| 1281 | return platform_driver_register(&tegra_smmu_driver); | 1278 | return platform_driver_register(&tegra_smmu_driver); |
| 1282 | } | 1279 | } |
| 1283 | 1280 | ||
