Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5acc97db authored by Suman Anna's avatar Suman Anna Committed by Laurent Pinchart
Browse files

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: default avatarSuman Anna <s-anna@ti.com>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
parent 2ac6133b
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -34,6 +34,9 @@
#include "omap-iopgtable.h"
#include "omap-iopgtable.h"
#include "omap-iommu.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)				\
#define for_each_iotlb_cr(obj, n, __i, cr)				\
	for (__i = 0;							\
	for (__i = 0;							\
	     (__i < (n)) && (cr = __iotlb_read_cr((obj), __i), true);	\
	     (__i < (n)) && (cr = __iotlb_read_cr((obj), __i), true);	\
+0 −3
Original line number Original line Diff line number Diff line
@@ -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. */
/* to find an entry in the second-level page table. */
#define iopte_index(da)		(((da) >> IOPTE_SHIFT) & (PTRS_PER_IOPTE - 1))
#define iopte_index(da)		(((da) >> IOPTE_SHIFT) & (PTRS_PER_IOPTE - 1))
#define iopte_offset(iopgd, da)	(iopgd_page_vaddr(iopgd) + iopte_index(da))
#define iopte_offset(iopgd, da)	(iopgd_page_vaddr(iopgd) + iopte_index(da))

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