diff options
author | Suman Anna <s-anna@ti.com> | 2014-03-17 21:31:34 -0400 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-04-16 10:30:15 -0400 |
commit | 5acc97db94321343f42866f2da90c3b02095c374 (patch) | |
tree | 79600ed6f00b7d9d58e0c2bf794f2355e178b2c0 /drivers | |
parent | 2ac6133bf6280350105b3181bbed31fb183b9734 (diff) |
iommu/omap: Move to_iommu definition from omap-iopgtable.h
The to_iommu definition is used only locally to the omap-iommu.c
source file, and it has nothing to do with the page attributes
defined in omap-iopgtable.h. So, move the definition out of
omap-iopgtable.h header file.
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iommu/omap-iommu.c | 3 | ||||
-rw-r--r-- | drivers/iommu/omap-iopgtable.h | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index 7ce136da9c2d..78f32d13dd66 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c | |||
@@ -34,6 +34,9 @@ | |||
34 | #include "omap-iopgtable.h" | 34 | #include "omap-iopgtable.h" |
35 | #include "omap-iommu.h" | 35 | #include "omap-iommu.h" |
36 | 36 | ||
37 | #define to_iommu(dev) \ | ||
38 | ((struct omap_iommu *)platform_get_drvdata(to_platform_device(dev))) | ||
39 | |||
37 | #define for_each_iotlb_cr(obj, n, __i, cr) \ | 40 | #define for_each_iotlb_cr(obj, n, __i, cr) \ |
38 | for (__i = 0; \ | 41 | for (__i = 0; \ |
39 | (__i < (n)) && (cr = __iotlb_read_cr((obj), __i), true); \ | 42 | (__i < (n)) && (cr = __iotlb_read_cr((obj), __i), true); \ |
diff --git a/drivers/iommu/omap-iopgtable.h b/drivers/iommu/omap-iopgtable.h index b6f9a51746ca..f891683e3f05 100644 --- a/drivers/iommu/omap-iopgtable.h +++ b/drivers/iommu/omap-iopgtable.h | |||
@@ -93,6 +93,3 @@ static inline phys_addr_t omap_iommu_translate(u32 d, u32 va, u32 mask) | |||
93 | /* to find an entry in the second-level page table. */ | 93 | /* to find an entry in the second-level page table. */ |
94 | #define iopte_index(da) (((da) >> IOPTE_SHIFT) & (PTRS_PER_IOPTE - 1)) | 94 | #define iopte_index(da) (((da) >> IOPTE_SHIFT) & (PTRS_PER_IOPTE - 1)) |
95 | #define iopte_offset(iopgd, da) (iopgd_page_vaddr(iopgd) + iopte_index(da)) | 95 | #define iopte_offset(iopgd, da) (iopgd_page_vaddr(iopgd) + iopte_index(da)) |
96 | |||
97 | #define to_iommu(dev) \ | ||
98 | (platform_get_drvdata(to_platform_device(dev))) | ||