All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 3/3] ARM:OMAP4 iommu:provide build support for omap4 iommu
@ 2009-08-04 22:32 Kanigeri, Hari
  2009-08-04 22:42 ` Russell King - ARM Linux
  0 siblings, 1 reply; 8+ messages in thread
From: Kanigeri, Hari @ 2009-08-04 22:32 UTC (permalink / raw)
  To: linux-omap, tony; +Cc: linux, Hiroshi DOYU, Shilimkar, Santosh

[-- Attachment #1: Type: text/plain, Size: 1369 bytes --]

This patch provides build support to build OMAP4
IOMMU module. This also adds the changes to Kconfig
file to make iommu option visible in menuconfig.

Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
---
 arch/arm/mach-omap2/Makefile |    2 +-
 arch/arm/plat-omap/Kconfig   |    7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 735bae5..59e0865 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -41,7 +41,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= clock34xx.o
 
 iommu-y					+= iommu2.o
 iommu-$(CONFIG_ARCH_OMAP3)		+= omap3-iommu.o
-
+iommu-$(CONFIG_ARCH_OMAP4)              += omap4-iommu.o
 obj-$(CONFIG_OMAP_IOMMU)		+= $(iommu-y)
 
 # Specific board support
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index efe85d0..50aaefb 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -118,8 +118,11 @@ config OMAP_MBOX_FWK
 	  DSP, IVA1.0 and IVA2 in OMAP1/2/3.
 
 config OMAP_IOMMU
-	tristate
-
+	tristate "iommu"
+	default y
+	help
+	  Select this option if you want to use IOMMU support for the
+	  Camera in OMAP3, and for Ducati processor in OMAP4.
 choice
         prompt "System timer"
 	default OMAP_MPU_TIMER
-- 
1.5.4.3

Thank you,
Best regards,
Hari


[-- Attachment #2: 0003-ARM-OMAP4-iommu-provide-build-support-for-omap4-iomm.patch --]
[-- Type: application/octet-stream, Size: 1511 bytes --]

From ba7a3821f39bf649cd8a067e76ee16a163e89895 Mon Sep 17 00:00:00 2001
From: Hari Kanigeri <h-kanigeri2@ti.com>
Date: Tue, 4 Aug 2009 17:19:15 -0500
Subject: [PATCH] ARM:OMAP4 iommu:provide build support for omap4 iommu

This patch provides build support to build OMAP4
IOMMU module. This also adds the changes to Kconfig
file to make iommu option visible in menuconfig.

Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
---
 arch/arm/mach-omap2/Makefile |    2 +-
 arch/arm/plat-omap/Kconfig   |    7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 735bae5..59e0865 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -41,7 +41,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= clock34xx.o
 
 iommu-y					+= iommu2.o
 iommu-$(CONFIG_ARCH_OMAP3)		+= omap3-iommu.o
-
+iommu-$(CONFIG_ARCH_OMAP4)              += omap4-iommu.o
 obj-$(CONFIG_OMAP_IOMMU)		+= $(iommu-y)
 
 # Specific board support
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index efe85d0..50aaefb 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -118,8 +118,11 @@ config OMAP_MBOX_FWK
 	  DSP, IVA1.0 and IVA2 in OMAP1/2/3.
 
 config OMAP_IOMMU
-	tristate
-
+	tristate "iommu"
+	default y
+	help
+	  Select this option if you want to use IOMMU support for the
+	  Camera in OMAP3, and for Ducati processor in OMAP4.
 choice
         prompt "System timer"
 	default OMAP_MPU_TIMER
-- 
1.5.4.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 3/3] ARM:OMAP4 iommu:provide build support for omap4 iommu
  2009-08-04 22:32 [PATCH v1 3/3] ARM:OMAP4 iommu:provide build support for omap4 iommu Kanigeri, Hari
@ 2009-08-04 22:42 ` Russell King - ARM Linux
  2009-08-05  4:35   ` Hiroshi DOYU
  0 siblings, 1 reply; 8+ messages in thread
From: Russell King - ARM Linux @ 2009-08-04 22:42 UTC (permalink / raw)
  To: Kanigeri, Hari; +Cc: linux-omap, tony, Hiroshi DOYU, Shilimkar, Santosh

On Tue, Aug 04, 2009 at 05:32:12PM -0500, Kanigeri, Hari wrote:
> diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
> index efe85d0..50aaefb 100644
> --- a/arch/arm/plat-omap/Kconfig
> +++ b/arch/arm/plat-omap/Kconfig
> @@ -118,8 +118,11 @@ config OMAP_MBOX_FWK
>  	  DSP, IVA1.0 and IVA2 in OMAP1/2/3.
>  
>  config OMAP_IOMMU
> -	tristate
> -
> +	tristate "iommu"

Insufficiently verbose description.  "OMAP IOMMU Support" would be
better.  I thought the idea here was to arrange for things to select
OMAP_IOMMU when they require it rather than offering it as a separate
configuration option.

The former way has the advantage that you don't need to know that you
need IOMMU support to (eg) use the Camera - enabling the Camera
should automatically enable IOMMU support.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 3/3] ARM:OMAP4 iommu:provide build support for omap4 iommu
  2009-08-04 22:42 ` Russell King - ARM Linux
@ 2009-08-05  4:35   ` Hiroshi DOYU
  2009-08-05  7:52     ` Russell King - ARM Linux
  2009-08-05 16:44     ` Kanigeri, Hari
  0 siblings, 2 replies; 8+ messages in thread
From: Hiroshi DOYU @ 2009-08-05  4:35 UTC (permalink / raw)
  To: h-kanigeri2; +Cc: linux-omap, tony, linux, santosh.shilimkar

From: ext Russell King - ARM Linux <linux@arm.linux.org.uk>
Subject: Re: [PATCH v1 3/3] ARM:OMAP4 iommu:provide build support for omap4 iommu
Date: Wed, 5 Aug 2009 00:42:41 +0200

> On Tue, Aug 04, 2009 at 05:32:12PM -0500, Kanigeri, Hari wrote:
> > diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
> > index efe85d0..50aaefb 100644
> > --- a/arch/arm/plat-omap/Kconfig
> > +++ b/arch/arm/plat-omap/Kconfig
> > @@ -118,8 +118,11 @@ config OMAP_MBOX_FWK
> >  	  DSP, IVA1.0 and IVA2 in OMAP1/2/3.
> >  
> >  config OMAP_IOMMU
> > -	tristate
> > -
> > +	tristate "iommu"
> 
> Insufficiently verbose description.  "OMAP IOMMU Support" would be
> better.  I thought the idea here was to arrange for things to select
> OMAP_IOMMU when they require it rather than offering it as a separate
> configuration option.
> 
> The former way has the advantage that you don't need to know that you
> need IOMMU support to (eg) use the Camera - enabling the Camera
> should automatically enable IOMMU support.

The following is the original discussion.

http://lists.arm.linux.org.uk/lurker/message/20090518.130233.3f238e72.en.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 3/3] ARM:OMAP4 iommu:provide build support for omap4 iommu
  2009-08-05  4:35   ` Hiroshi DOYU
@ 2009-08-05  7:52     ` Russell King - ARM Linux
  2009-08-05  9:15       ` Hiroshi DOYU
  2009-08-05 16:44     ` Kanigeri, Hari
  1 sibling, 1 reply; 8+ messages in thread
From: Russell King - ARM Linux @ 2009-08-05  7:52 UTC (permalink / raw)
  To: Hiroshi DOYU; +Cc: h-kanigeri2, linux-omap, tony, santosh.shilimkar

On Wed, Aug 05, 2009 at 07:35:38AM +0300, Hiroshi DOYU wrote:
> From: ext Russell King - ARM Linux <linux@arm.linux.org.uk>
> Subject: Re: [PATCH v1 3/3] ARM:OMAP4 iommu:provide build support for omap4 iommu
> Date: Wed, 5 Aug 2009 00:42:41 +0200
> 
> > On Tue, Aug 04, 2009 at 05:32:12PM -0500, Kanigeri, Hari wrote:
> > > diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
> > > index efe85d0..50aaefb 100644
> > > --- a/arch/arm/plat-omap/Kconfig
> > > +++ b/arch/arm/plat-omap/Kconfig
> > > @@ -118,8 +118,11 @@ config OMAP_MBOX_FWK
> > >  	  DSP, IVA1.0 and IVA2 in OMAP1/2/3.
> > >  
> > >  config OMAP_IOMMU
> > > -	tristate
> > > -
> > > +	tristate "iommu"
> > 
> > Insufficiently verbose description.  "OMAP IOMMU Support" would be
> > better.  I thought the idea here was to arrange for things to select
> > OMAP_IOMMU when they require it rather than offering it as a separate
> > configuration option.
> > 
> > The former way has the advantage that you don't need to know that you
> > need IOMMU support to (eg) use the Camera - enabling the Camera
> > should automatically enable IOMMU support.
> 
> The following is the original discussion.
> 
> http://lists.arm.linux.org.uk/lurker/message/20090518.130233.3f238e72.en.html

Quite.  I'm repeating myself.  So the question is why the original
discussion didn't produce a change.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 3/3] ARM:OMAP4 iommu:provide build support for omap4 iommu
  2009-08-05  7:52     ` Russell King - ARM Linux
@ 2009-08-05  9:15       ` Hiroshi DOYU
  0 siblings, 0 replies; 8+ messages in thread
From: Hiroshi DOYU @ 2009-08-05  9:15 UTC (permalink / raw)
  To: h-kanigeri2, linux; +Cc: linux-omap, tony, santosh.shilimkar

From: ext Russell King - ARM Linux <linux@arm.linux.org.uk>
Subject: Re: [PATCH v1 3/3] ARM:OMAP4 iommu:provide build support for omap4 iommu
Date: Wed, 5 Aug 2009 09:52:20 +0200

> On Wed, Aug 05, 2009 at 07:35:38AM +0300, Hiroshi DOYU wrote:
> > From: ext Russell King - ARM Linux <linux@arm.linux.org.uk>
> > Subject: Re: [PATCH v1 3/3] ARM:OMAP4 iommu:provide build support for omap4 iommu
> > Date: Wed, 5 Aug 2009 00:42:41 +0200
> > 
> > > On Tue, Aug 04, 2009 at 05:32:12PM -0500, Kanigeri, Hari wrote:
> > > > diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
> > > > index efe85d0..50aaefb 100644
> > > > --- a/arch/arm/plat-omap/Kconfig
> > > > +++ b/arch/arm/plat-omap/Kconfig
> > > > @@ -118,8 +118,11 @@ config OMAP_MBOX_FWK
> > > >  	  DSP, IVA1.0 and IVA2 in OMAP1/2/3.
> > > >  
> > > >  config OMAP_IOMMU
> > > > -	tristate
> > > > -
> > > > +	tristate "iommu"
> > > 
> > > Insufficiently verbose description.  "OMAP IOMMU Support" would be
> > > better.  I thought the idea here was to arrange for things to select
> > > OMAP_IOMMU when they require it rather than offering it as a separate
> > > configuration option.
> > > 
> > > The former way has the advantage that you don't need to know that you
> > > need IOMMU support to (eg) use the Camera - enabling the Camera
> > > should automatically enable IOMMU support.
> > 
> > The following is the original discussion.
> > 
> > http://lists.arm.linux.org.uk/lurker/message/20090518.130233.3f238e72.en.html
> 
> Quite.  I'm repeating myself.  So the question is why the original
> discussion didn't produce a change.

The original discussion was applied and can be kept for OMAP4 as well like:

config SOME_NEW_DEVICE_USE_IOMMU
       ...
       select OMAP_IOMMU
       ...

Just setting the above select line would be ok. For example,

http://marc.info/?l=linux-omap&m=124867965731465&w=2

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH v1 3/3] ARM:OMAP4 iommu:provide build support for omap4 iommu
  2009-08-05  4:35   ` Hiroshi DOYU
  2009-08-05  7:52     ` Russell King - ARM Linux
@ 2009-08-05 16:44     ` Kanigeri, Hari
  2009-08-05 20:22       ` Russell King - ARM Linux
  1 sibling, 1 reply; 8+ messages in thread
From: Kanigeri, Hari @ 2009-08-05 16:44 UTC (permalink / raw)
  To: Hiroshi DOYU, linux; +Cc: linux-omap, tony, Shilimkar, Santosh

Hi Russell and Hiroshi,

Thanks for your comments. Please see my below comments.

> -----Original Message-----
> From: Hiroshi DOYU [mailto:Hiroshi.DOYU@nokia.com]
> Sent: Tuesday, August 04, 2009 11:36 PM
> To: Kanigeri, Hari
> Cc: linux-omap@vger.kernel.org; tony@atomide.com; linux@arm.linux.org.uk;
> Shilimkar, Santosh
> Subject: Re: [PATCH v1 3/3] ARM:OMAP4 iommu:provide build support for
> omap4 iommu
> 
> From: ext Russell King - ARM Linux <linux@arm.linux.org.uk>
> Subject: Re: [PATCH v1 3/3] ARM:OMAP4 iommu:provide build support for
> omap4 iommu
> Date: Wed, 5 Aug 2009 00:42:41 +0200
> 
> > On Tue, Aug 04, 2009 at 05:32:12PM -0500, Kanigeri, Hari wrote:
> > > diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
> > > index efe85d0..50aaefb 100644
> > > --- a/arch/arm/plat-omap/Kconfig
> > > +++ b/arch/arm/plat-omap/Kconfig
> > > @@ -118,8 +118,11 @@ config OMAP_MBOX_FWK
> > >  	  DSP, IVA1.0 and IVA2 in OMAP1/2/3.
> > >
> > >  config OMAP_IOMMU
> > > -	tristate
> > > -
> > > +	tristate "iommu"
> >
> > Insufficiently verbose description.  "OMAP IOMMU Support" would be
> > better.  I thought the idea here was to arrange for things to select
> > OMAP_IOMMU when they require it rather than offering it as a separate
> > configuration option.
> >
> > The former way has the advantage that you don't need to know that you
> > need IOMMU support to (eg) use the Camera - enabling the Camera
> > should automatically enable IOMMU support.
> 
> The following is the original discussion.
> 
> http://lists.arm.linux.org.uk/lurker/message/20090518.130233.3f238e72.en.h
> tml

-- I agree with your comments from OMAP3 point of view. 
For OMAP4, I guess Camera is not going to use IOMMU module. IOMMU modules will be used only by the IPC that are communicating with 2 remote Cores (Ducati and Tesla). Having said this, there might not be any clients of IOMMU in the Kernel space as we are looking at the option of using the IOMMU as a character driver from User-space. For this reason, I think we should have the configuration option to build iommu. Please let me know your comments.

Thank you,
Best regards,
Hari



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 3/3] ARM:OMAP4 iommu:provide build support for omap4 iommu
  2009-08-05 16:44     ` Kanigeri, Hari
@ 2009-08-05 20:22       ` Russell King - ARM Linux
  2009-08-06  2:33         ` Kanigeri, Hari
  0 siblings, 1 reply; 8+ messages in thread
From: Russell King - ARM Linux @ 2009-08-05 20:22 UTC (permalink / raw)
  To: Kanigeri, Hari; +Cc: Hiroshi DOYU, linux-omap, tony, Shilimkar, Santosh

On Wed, Aug 05, 2009 at 11:44:53AM -0500, Kanigeri, Hari wrote:
> -- I agree with your comments from OMAP3 point of view. 
> For OMAP4, I guess Camera is not going to use IOMMU module. IOMMU
> modules will be used only by the IPC that are communicating with 2
> remote Cores (Ducati and Tesla).

In which case what you do is:

config OMAP_CAMERA
	...
	select OMAP_IOMMU if ARCH_OMAP3

which means the IOMMU support will only be built if the camera is enabled
and we're building for OMAP3.

However, if the OMAP3 hardware uses the IOMMU but the OMAP4 hardware
doesn't, I'd hazard a guess (and it's only a guess) that the drivers
will be soo different that squeezing them into one file/config option
would be silly.

> Having said this, there might not
> be any clients of IOMMU in the Kernel space as we are looking at
> the option of using the IOMMU as a character driver from User-space.
> For this reason, I think we should have the configuration option to
> build iommu. Please let me know your comments.

In which case, the IOMMU character driver can select the core IOMMU
support.

Making symbols which are 'selected' visible causes problems - you
can't disable them and you can't work out why they're being
forcefully enabled, which just annoys people who are trying to
configure the kernel.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH v1 3/3] ARM:OMAP4 iommu:provide build support for omap4 iommu
  2009-08-05 20:22       ` Russell King - ARM Linux
@ 2009-08-06  2:33         ` Kanigeri, Hari
  0 siblings, 0 replies; 8+ messages in thread
From: Kanigeri, Hari @ 2009-08-06  2:33 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Hiroshi DOYU, linux-omap, tony, Shilimkar, Santosh

Russell,

Thanks for your comments.

Thank you,
Best regards,
Hari

> -----Original Message-----
> From: Russell King - ARM Linux [mailto:linux@arm.linux.org.uk]
> Sent: Wednesday, August 05, 2009 3:23 PM
> To: Kanigeri, Hari
> Cc: Hiroshi DOYU; linux-omap@vger.kernel.org; tony@atomide.com; Shilimkar,
> Santosh
> Subject: Re: [PATCH v1 3/3] ARM:OMAP4 iommu:provide build support for
> omap4 iommu
> 
> On Wed, Aug 05, 2009 at 11:44:53AM -0500, Kanigeri, Hari wrote:
> > -- I agree with your comments from OMAP3 point of view.
> > For OMAP4, I guess Camera is not going to use IOMMU module. IOMMU
> > modules will be used only by the IPC that are communicating with 2
> > remote Cores (Ducati and Tesla).
> 
> In which case what you do is:
> 
> config OMAP_CAMERA
> 	...
> 	select OMAP_IOMMU if ARCH_OMAP3
> 
> which means the IOMMU support will only be built if the camera is enabled
> and we're building for OMAP3.
> 
> However, if the OMAP3 hardware uses the IOMMU but the OMAP4 hardware
> doesn't, I'd hazard a guess (and it's only a guess) that the drivers
> will be soo different that squeezing them into one file/config option
> would be silly.
> 
> > Having said this, there might not
> > be any clients of IOMMU in the Kernel space as we are looking at
> > the option of using the IOMMU as a character driver from User-space.
> > For this reason, I think we should have the configuration option to
> > build iommu. Please let me know your comments.
> 
> In which case, the IOMMU character driver can select the core IOMMU
> support.
> 
> Making symbols which are 'selected' visible causes problems - you
> can't disable them and you can't work out why they're being
> forcefully enabled, which just annoys people who are trying to
> configure the kernel.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-08-06  2:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-04 22:32 [PATCH v1 3/3] ARM:OMAP4 iommu:provide build support for omap4 iommu Kanigeri, Hari
2009-08-04 22:42 ` Russell King - ARM Linux
2009-08-05  4:35   ` Hiroshi DOYU
2009-08-05  7:52     ` Russell King - ARM Linux
2009-08-05  9:15       ` Hiroshi DOYU
2009-08-05 16:44     ` Kanigeri, Hari
2009-08-05 20:22       ` Russell King - ARM Linux
2009-08-06  2:33         ` Kanigeri, Hari

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.