@@ -131,20 +131,6 @@ config OMAP_MBOX_KFIFO_SIZE
This can also be changed at runtime (via the mbox_kfifo_size
module parameter).
-#can't be tristate; iommu api doesn't support un-registration
-config OMAP_IOMMU
- bool
- select IOMMU_API
-
-config OMAP_IOMMU_DEBUG
- tristate "Export OMAP IOMMU internals in DebugFS"
- depends on OMAP_IOMMU && DEBUG_FS
- help
- Select this to see extensive information about
- the internal state of OMAP IOMMU in debugfs.
-
- Say N unless you know you need this.
-
config OMAP_IOMMU_IVA2
bool
@@ -18,8 +18,6 @@ obj-$(CONFIG_ARCH_OMAP3) += omap_device.o
obj-$(CONFIG_ARCH_OMAP4) += omap_device.o
obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
-obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o
-obj-$(CONFIG_OMAP_IOMMU_DEBUG) += iommu-debug.o
obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
similarity index 100%
rename from arch/arm/plat-omap/iopgtable.h
rename to arch/arm/plat-omap/include/plat/iopgtable.h
@@ -1,3 +1,21 @@
# IOMMU_API always gets selected by whoever wants it.
config IOMMU_API
bool
+
+# can't be tristate; iommu api doesn't support un-registration
+config OMAP_IOMMU
+ bool
+ select IOMMU_API
+
+config OMAP_IOVMM
+ tristate
+ select OMAP_IOMMU
+
+config OMAP_IOMMU_DEBUG
+ tristate "Export OMAP IOMMU internals in DebugFS"
+ depends on OMAP_IOVMM && DEBUG_FS
+ help
+ Select this to see extensive information about
+ the internal state of OMAP IOMMU in debugfs.
+
+ Say N unless you know you need this.
@@ -1 +1,4 @@
obj-$(CONFIG_IOMMU_API) += iommu.o
+obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o
+obj-$(CONFIG_OMAP_IOVMM) += omap-iovmm.o
+obj-$(CONFIG_OMAP_IOMMU_DEBUG) += omap-iommu-debug.o
similarity index 99%
rename from arch/arm/plat-omap/iommu-debug.c
rename to drivers/iommu/omap-iommu-debug.c
@@ -21,7 +21,7 @@
#include <plat/iommu.h>
#include <plat/iovmm.h>
-#include "iopgtable.h"
+#include <plat/iopgtable.h>
#define MAXCOLUMN 100 /* for short messages */
similarity index 99%
rename from arch/arm/plat-omap/iommu.c
rename to drivers/iommu/omap-iommu.c
@@ -25,7 +25,7 @@
#include <plat/iommu.h>
-#include "iopgtable.h"
+#include <plat/iopgtable.h>
#define for_each_iotlb_cr(obj, n, __i, cr) \
for (__i = 0; \
similarity index 99%
rename from arch/arm/plat-omap/iovmm.c
rename to drivers/iommu/omap-iovmm.c
@@ -23,7 +23,7 @@
#include <plat/iommu.h>
#include <plat/iovmm.h>
-#include "iopgtable.h"
+#include <plat/iopgtable.h>
/*
* A device driver needs to create address mappings between:
@@ -761,7 +761,7 @@ source "drivers/media/video/m5mols/Kconfig"
config VIDEO_OMAP3
tristate "OMAP 3 Camera support (EXPERIMENTAL)"
- select OMAP_IOMMU
+ select OMAP_IOVMM
depends on VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API && ARCH_OMAP3 && EXPERIMENTAL
---help---
Driver for an OMAP 3 camera controller.
Move OMAP's iommu drivers to the dedicated iommu drivers folder. While OMAP's iovmm (virtual memory manager) driver does not strictly belong to the iommu drivers folder, move it there as well, because it's by no means OMAP-specific (in concept. technically it is still coupled with the omap iommu), and exposing it will ease its generalization, consolidation, or removal (once a generic virtual memory manager and allocator would materialize). Move omap's iommu debug driver to the generic folder as well, for the same reasons. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> --- arch/arm/plat-omap/Kconfig | 14 -------------- arch/arm/plat-omap/Makefile | 2 -- arch/arm/plat-omap/{ => include/plat}/iopgtable.h | 0 drivers/iommu/Kconfig | 18 ++++++++++++++++++ drivers/iommu/Makefile | 3 +++ .../iommu/omap-iommu-debug.c | 2 +- .../iommu.c => drivers/iommu/omap-iommu.c | 2 +- .../iovmm.c => drivers/iommu/omap-iovmm.c | 2 +- drivers/media/video/Kconfig | 2 +- 9 files changed, 25 insertions(+), 20 deletions(-) rename arch/arm/plat-omap/{ => include/plat}/iopgtable.h (100%) rename arch/arm/plat-omap/iommu-debug.c => drivers/iommu/omap-iommu-debug.c (99%) rename arch/arm/plat-omap/iommu.c => drivers/iommu/omap-iommu.c (99%) rename arch/arm/plat-omap/iovmm.c => drivers/iommu/omap-iovmm.c (99%)