Skip to content

Commit

Permalink
iommu/omap: Move to_iommu definition from omap-iopgtable.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Suman Anna authored and Laurent Pinchart committed Apr 16, 2014
1 parent 2ac6133 commit 5acc97d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions drivers/iommu/omap-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
#include "omap-iopgtable.h"
#include "omap-iommu.h"

#define to_iommu(dev) \
((struct omap_iommu *)platform_get_drvdata(to_platform_device(dev)))

#define for_each_iotlb_cr(obj, n, __i, cr) \
for (__i = 0; \
(__i < (n)) && (cr = __iotlb_read_cr((obj), __i), true); \
Expand Down
3 changes: 0 additions & 3 deletions drivers/iommu/omap-iopgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,3 @@ static inline phys_addr_t omap_iommu_translate(u32 d, u32 va, u32 mask)
/* to find an entry in the second-level page table. */
#define iopte_index(da) (((da) >> IOPTE_SHIFT) & (PTRS_PER_IOPTE - 1))
#define iopte_offset(iopgd, da) (iopgd_page_vaddr(iopgd) + iopte_index(da))

#define to_iommu(dev) \
(platform_get_drvdata(to_platform_device(dev)))

0 comments on commit 5acc97d

Please sign in to comment.