linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ohad Ben-Cohen <ohad@wizery.com>
To: linux-media@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Cc: laurent.pinchart@ideasonboard.com, Hiroshi.DOYU@nokia.com,
	arnd@arndb.de, davidb@codeaurora.org, Joerg.Roedel@amd.com,
	Ohad Ben-Cohen <ohad@wizery.com>
Subject: [RFC 5/6] omap: iommu/iovmm: move to dedicated iommu folder
Date: Fri,  3 Jun 2011 01:27:42 +0300	[thread overview]
Message-ID: <1307053663-24572-6-git-send-email-ohad@wizery.com> (raw)
In-Reply-To: <1307053663-24572-1-git-send-email-ohad@wizery.com>

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%)

diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index 1bb1981..14f067f 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -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
 
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index f0233e6..9852622 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -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
diff --git a/arch/arm/plat-omap/iopgtable.h b/arch/arm/plat-omap/include/plat/iopgtable.h
similarity index 100%
rename from arch/arm/plat-omap/iopgtable.h
rename to arch/arm/plat-omap/include/plat/iopgtable.h
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 2c5dfb4..57378ac 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -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.
diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile
index 241ba4c..c094875 100644
--- a/drivers/iommu/Makefile
+++ b/drivers/iommu/Makefile
@@ -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
diff --git a/arch/arm/plat-omap/iommu-debug.c b/drivers/iommu/omap-iommu-debug.c
similarity index 99%
rename from arch/arm/plat-omap/iommu-debug.c
rename to drivers/iommu/omap-iommu-debug.c
index f07cf2f..0f8c8dd 100644
--- a/arch/arm/plat-omap/iommu-debug.c
+++ b/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 */
 
diff --git a/arch/arm/plat-omap/iommu.c b/drivers/iommu/omap-iommu.c
similarity index 99%
rename from arch/arm/plat-omap/iommu.c
rename to drivers/iommu/omap-iommu.c
index f06e99c..1526fea 100644
--- a/arch/arm/plat-omap/iommu.c
+++ b/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;							\
diff --git a/arch/arm/plat-omap/iovmm.c b/drivers/iommu/omap-iovmm.c
similarity index 99%
rename from arch/arm/plat-omap/iovmm.c
rename to drivers/iommu/omap-iovmm.c
index 80bb2b6..42f4a2c 100644
--- a/arch/arm/plat-omap/iovmm.c
+++ b/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:
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index bb53de7..4945f91 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -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.
-- 
1.7.1


  parent reply	other threads:[~2011-06-02 22:31 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-02 22:27 [RFC 0/6] iommu: generic api migration and grouping Ohad Ben-Cohen
2011-06-02 22:27 ` [RFC 1/6] omap: iommu: generic iommu api migration Ohad Ben-Cohen
2011-06-07  9:22   ` Laurent Pinchart
2011-06-07 11:19     ` Ohad Ben-Cohen
2011-06-07 11:40       ` Laurent Pinchart
2011-06-07 12:27         ` Ohad Ben-Cohen
2011-06-02 22:27 ` [RFC 2/6] omap: iovmm: " Ohad Ben-Cohen
2011-06-07  9:05   ` Laurent Pinchart
2011-06-07 10:28     ` Ohad Ben-Cohen
2011-06-07 11:26       ` Laurent Pinchart
2011-06-07 13:46         ` Ohad Ben-Cohen
2011-06-08 10:46           ` Laurent Pinchart
2011-06-09  6:42             ` Ohad Ben-Cohen
2011-06-02 22:27 ` [RFC 3/6] media: omap3isp: " Ohad Ben-Cohen
2011-06-02 22:27 ` [RFC 4/6] drivers: iommu: move to a dedicated folder Ohad Ben-Cohen
2011-06-02 22:27 ` Ohad Ben-Cohen [this message]
2011-06-02 22:27 ` [RFC 6/6] msm: iommu: move to dedicated iommu drivers folder Ohad Ben-Cohen
2011-06-02 23:57 ` [RFC 0/6] iommu: generic api migration and grouping Kyungmin Park
2011-06-05 19:43   ` Ohad Ben-Cohen
2011-06-03 15:53 ` Arnd Bergmann
2011-06-05 19:39   ` Ohad Ben-Cohen
2011-06-06  9:10     ` Arnd Bergmann
2011-06-06 15:17       ` Ohad Ben-Cohen
2011-06-06 10:09 ` Roedel, Joerg
2011-06-06 15:15   ` Ohad Ben-Cohen
2011-06-06 15:35     ` Roedel, Joerg
2011-06-06 16:36       ` Ohad Ben-Cohen
2011-06-06 19:20         ` Roedel, Joerg
2011-06-06 20:09           ` Ohad Ben-Cohen
2011-06-07  7:52             ` Roedel, Joerg
2011-06-07  9:22               ` Ohad Ben-Cohen
2011-06-07  9:58                 ` Roedel, Joerg
2011-06-07 10:30                   ` Ohad Ben-Cohen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1307053663-24572-6-git-send-email-ohad@wizery.com \
    --to=ohad@wizery.com \
    --cc=Hiroshi.DOYU@nokia.com \
    --cc=Joerg.Roedel@amd.com \
    --cc=arnd@arndb.de \
    --cc=davidb@codeaurora.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).