All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/4] USB: MUSB: Enable MUSB for OMAP4 in Kconfig
@ 2010-02-25  6:35 Maulik Mankad
       [not found] ` <1267079758-14480-1-git-send-email-x0082077-l0cyMroinI0@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Maulik Mankad @ 2010-02-25  6:35 UTC (permalink / raw)
  To: linux-usb
  Cc: linux-omap, Maulik Mankad, Felipe Balbi, Greg Kroah-Hartman,
	David Brownell

This patch adds the OMAP4 Kconfig options for MUSB.

Signed-off-by: Maulik Mankad <x0082077@ti.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: David Brownell <david-b@pacbell.net
---
Index: mainline/drivers/usb/musb/Kconfig
===================================================================
--- mainline.orig/drivers/usb/musb/Kconfig
+++ mainline/drivers/usb/musb/Kconfig
@@ -38,6 +38,7 @@ config USB_MUSB_SOC
 	default y if ARCH_DAVINCI
 	default y if ARCH_OMAP2430
 	default y if ARCH_OMAP34XX
+	default y if ARCH_OMAP4
 	default y if (BF54x && !BF544)
 	default y if (BF52x && !BF522 && !BF523)
 
@@ -50,6 +51,9 @@ comment "OMAP 243x high speed USB suppor
 comment "OMAP 343x high speed USB support"
 	depends on USB_MUSB_HDRC && ARCH_OMAP34XX
 
+comment "OMAP 44xx high speed USB support"
+	depends on USB_MUSB_HDRC && ARCH_OMAP4
+
 comment "Blackfin high speed USB Support"
 	depends on USB_MUSB_HDRC && ((BF54x && !BF544) || (BF52x && !BF522 && !BF523))
 
@@ -153,7 +157,7 @@ config MUSB_PIO_ONLY
 config USB_INVENTRA_DMA
 	bool
 	depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
-	default ARCH_OMAP2430 || ARCH_OMAP34XX || BLACKFIN
+	default ARCH_OMAP2430 || ARCH_OMAP34XX || BLACKFIN || ARCH_OMAP4
 	help
 	  Enable DMA transfers using Mentor's engine.
 

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

* Re: [PATCH 2/4] USB: MUSB: Enable MUSB for OMAP4 in Kconfig
       [not found] ` <1267079758-14480-1-git-send-email-x0082077-l0cyMroinI0@public.gmane.org>
@ 2010-02-25 18:48   ` Tony Lindgren
  2010-02-26  0:42     ` Olof Johansson
  0 siblings, 1 reply; 9+ messages in thread
From: Tony Lindgren @ 2010-02-25 18:48 UTC (permalink / raw)
  To: Maulik Mankad
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi,
	Greg Kroah-Hartman, David Brownell

* Maulik Mankad <x0082077-l0cyMroinI0@public.gmane.org> [100224 22:33]:
> This patch adds the OMAP4 Kconfig options for MUSB.
> 
> Signed-off-by: Maulik Mankad <x0082077-l0cyMroinI0@public.gmane.org>
> Cc: Felipe Balbi <felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
> Cc: Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>
> Cc: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org
> ---
> Index: mainline/drivers/usb/musb/Kconfig
> ===================================================================
> --- mainline.orig/drivers/usb/musb/Kconfig
> +++ mainline/drivers/usb/musb/Kconfig
> @@ -38,6 +38,7 @@ config USB_MUSB_SOC
>  	default y if ARCH_DAVINCI
>  	default y if ARCH_OMAP2430
>  	default y if ARCH_OMAP34XX
> +	default y if ARCH_OMAP4
>  	default y if (BF54x && !BF544)
>  	default y if (BF52x && !BF522 && !BF523)
>  
> @@ -50,6 +51,9 @@ comment "OMAP 243x high speed USB suppor
>  comment "OMAP 343x high speed USB support"
>  	depends on USB_MUSB_HDRC && ARCH_OMAP34XX
>  
> +comment "OMAP 44xx high speed USB support"
> +	depends on USB_MUSB_HDRC && ARCH_OMAP4
> +
>  comment "Blackfin high speed USB Support"
>  	depends on USB_MUSB_HDRC && ((BF54x && !BF544) || (BF52x && !BF522 && !BF523))
>  
> @@ -153,7 +157,7 @@ config MUSB_PIO_ONLY
>  config USB_INVENTRA_DMA
>  	bool
>  	depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
> -	default ARCH_OMAP2430 || ARCH_OMAP34XX || BLACKFIN
> +	default ARCH_OMAP2430 || ARCH_OMAP34XX || BLACKFIN || ARCH_OMAP4
>  	help
>  	  Enable DMA transfers using Mentor's engine.

FYI, this needs to be updated as I have patches queued up
to replace ARCH_OMAP34XX and with ARCH_OMAP3. You might
want to check all these patches for that and make sure
they build and work with the omap-for-linus branch.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 2/4] USB: MUSB: Enable MUSB for OMAP4 in Kconfig
  2010-02-25 18:48   ` Tony Lindgren
@ 2010-02-26  0:42     ` Olof Johansson
  2010-02-26  8:40       ` Maulik
  0 siblings, 1 reply; 9+ messages in thread
From: Olof Johansson @ 2010-02-26  0:42 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Maulik Mankad, linux-usb, linux-omap, Felipe Balbi,
	Greg Kroah-Hartman, David Brownell

On Thu, Feb 25, 2010 at 10:48:34AM -0800, Tony Lindgren wrote:
> * Maulik Mankad <x0082077@ti.com> [100224 22:33]:
> > This patch adds the OMAP4 Kconfig options for MUSB.
> > 
> > Signed-off-by: Maulik Mankad <x0082077@ti.com>
> > Cc: Felipe Balbi <felipe.balbi@nokia.com>
> > Cc: Greg Kroah-Hartman <gregkh@suse.de>
> > Cc: David Brownell <david-b@pacbell.net
> > ---
> > Index: mainline/drivers/usb/musb/Kconfig
> > ===================================================================
> > --- mainline.orig/drivers/usb/musb/Kconfig
> > +++ mainline/drivers/usb/musb/Kconfig
> > @@ -38,6 +38,7 @@ config USB_MUSB_SOC
> >  	default y if ARCH_DAVINCI
> >  	default y if ARCH_OMAP2430
> >  	default y if ARCH_OMAP34XX
> > +	default y if ARCH_OMAP4
> >  	default y if (BF54x && !BF544)
> >  	default y if (BF52x && !BF522 && !BF523)
> >  
> > @@ -50,6 +51,9 @@ comment "OMAP 243x high speed USB suppor
> >  comment "OMAP 343x high speed USB support"
> >  	depends on USB_MUSB_HDRC && ARCH_OMAP34XX
> >  
> > +comment "OMAP 44xx high speed USB support"
> > +	depends on USB_MUSB_HDRC && ARCH_OMAP4
> > +
> >  comment "Blackfin high speed USB Support"
> >  	depends on USB_MUSB_HDRC && ((BF54x && !BF544) || (BF52x && !BF522 && !BF523))
> >  
> > @@ -153,7 +157,7 @@ config MUSB_PIO_ONLY
> >  config USB_INVENTRA_DMA
> >  	bool
> >  	depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
> > -	default ARCH_OMAP2430 || ARCH_OMAP34XX || BLACKFIN
> > +	default ARCH_OMAP2430 || ARCH_OMAP34XX || BLACKFIN || ARCH_OMAP4
> >  	help
> >  	  Enable DMA transfers using Mentor's engine.
> 
> FYI, this needs to be updated as I have patches queued up
> to replace ARCH_OMAP34XX and with ARCH_OMAP3. You might
> want to check all these patches for that and make sure
> they build and work with the omap-for-linus branch.

Adding more and more depends also doesn't scale well. It's time for
someone to switch the test around, add a ARCH_HAS_MUSB, select it on
the platforms that has it and make the config option depend on that,
similar to how (some) platforms to EHCI today.

(i.e. if there's a janitor out there reading this, feel free to go ahead
and do it. :-)


-Olof

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

* RE: [PATCH 2/4] USB: MUSB: Enable MUSB for OMAP4 in Kconfig
  2010-02-26  0:42     ` Olof Johansson
@ 2010-02-26  8:40       ` Maulik
  2010-02-26 18:54         ` Olof Johansson
  0 siblings, 1 reply; 9+ messages in thread
From: Maulik @ 2010-02-26  8:40 UTC (permalink / raw)
  To: 'Olof Johansson', 'Tony Lindgren'
  Cc: linux-usb, linux-omap, 'Felipe Balbi',
	'Greg Kroah-Hartman', 'David Brownell'

> > @@ -153,7 +157,7 @@ config MUSB_PIO_ONLY
> >  config USB_INVENTRA_DMA
> >  	bool
> >  	depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
> > -	default ARCH_OMAP2430 || ARCH_OMAP34XX || BLACKFIN
> > +	default ARCH_OMAP2430 || ARCH_OMAP34XX || BLACKFIN || ARCH_OMAP4
> >  	help
> >  	  Enable DMA transfers using Mentor's engine.
> 
> FYI, this needs to be updated as I have patches queued up
> to replace ARCH_OMAP34XX and with ARCH_OMAP3. You might
> want to check all these patches for that and make sure
> they build and work with the omap-for-linus branch.

Tony,

I shall post a newer version after rebasing and fixing the comments. 
I believe your patches will soon make to mainline :-)

>>Adding more and more depends also doesn't scale well. It's time for
>>someone to switch the test around, add a ARCH_HAS_MUSB, select it on
>>the platforms that has it and make the config option depend on that,
>>similar to how (some) platforms to EHCI today.

>>(i.e. if there's a janitor out there reading this, feel free to go ahead
>>and do it. :-)

Olof,

We have such an option "USB_MUSB_SOC" that takes care of all platforms where
MUSB is present. But the Inventra DMA case is typical. Not all architectures
that have MUSB use Inventra DMA for e.g Davinci uses CPPI DMA.

Thanks,
Maulik


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

* Re: [PATCH 2/4] USB: MUSB: Enable MUSB for OMAP4 in Kconfig
  2010-02-26  8:40       ` Maulik
@ 2010-02-26 18:54         ` Olof Johansson
       [not found]           ` <20100226185414.GA10835-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Olof Johansson @ 2010-02-26 18:54 UTC (permalink / raw)
  To: Maulik
  Cc: 'Tony Lindgren',
	linux-usb, linux-omap, 'Felipe Balbi',
	'Greg Kroah-Hartman', 'David Brownell'

On Fri, Feb 26, 2010 at 02:10:31PM +0530, Maulik wrote:

> >>Adding more and more depends also doesn't scale well. It's time for
> >>someone to switch the test around, add a ARCH_HAS_MUSB, select it on
> >>the platforms that has it and make the config option depend on that,
> >>similar to how (some) platforms to EHCI today.
> 
> >>(i.e. if there's a janitor out there reading this, feel free to go ahead
> >>and do it. :-)
> 
> Olof,
> 
> We have such an option "USB_MUSB_SOC" that takes care of all platforms where
> MUSB is present. But the Inventra DMA case is typical. Not all architectures
> that have MUSB use Inventra DMA for e.g Davinci uses CPPI DMA.

Yeah, sorry. I didn't mean the INVENTRA_DMA config option as much as the top
MUSB one. So you should be able to switch to that instead of adding a check for
OMAP4 there then?

-Olof

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

* RE: [PATCH 2/4] USB: MUSB: Enable MUSB for OMAP4 in Kconfig
       [not found]           ` <20100226185414.GA10835-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
@ 2010-03-01  5:41             ` Maulik
       [not found]               ` <001b01cab901$dadec9a0$808918ac-wD+IZp/g4/2mHdYHvhjUOg@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Maulik @ 2010-03-01  5:41 UTC (permalink / raw)
  To: 'Olof Johansson'
  Cc: 'Tony Lindgren',
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, 'Felipe Balbi',
	'Greg Kroah-Hartman', 'David Brownell'

> Olof,
> 
> We have such an option "USB_MUSB_SOC" that takes care of all platforms
where
> MUSB is present. But the Inventra DMA case is typical. Not all
architectures
> that have MUSB use Inventra DMA for e.g Davinci uses CPPI DMA.

>>Yeah, sorry. I didn't mean the INVENTRA_DMA config option as much as the
>>top
>>MUSB one. So you should be able to switch to that instead of adding a
>>check for
>>OMAP4 there then?

Olof,
So you suggest adding something like below for OMAP4 and all others as well
right?

comment "OMAP 44xx high speed USB support"
        depends on USB_MUSB_HDRC && USB_MUSB_SOC

Regards,
Maulik

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 2/4] USB: MUSB: Enable MUSB for OMAP4 in Kconfig
       [not found]               ` <001b01cab901$dadec9a0$808918ac-wD+IZp/g4/2mHdYHvhjUOg@public.gmane.org>
@ 2010-03-01 15:43                 ` Olof Johansson
       [not found]                   ` <20100301154329.GA4154-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Olof Johansson @ 2010-03-01 15:43 UTC (permalink / raw)
  To: Maulik
  Cc: 'Tony Lindgren',
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, 'Felipe Balbi',
	'Greg Kroah-Hartman', 'David Brownell'

On Mon, Mar 01, 2010 at 11:11:29AM +0530, Maulik wrote:
> > Olof,
> > 
> > We have such an option "USB_MUSB_SOC" that takes care of all platforms
> where
> > MUSB is present. But the Inventra DMA case is typical. Not all
> architectures
> > that have MUSB use Inventra DMA for e.g Davinci uses CPPI DMA.
> 
> >>Yeah, sorry. I didn't mean the INVENTRA_DMA config option as much as the
> >>top
> >>MUSB one. So you should be able to switch to that instead of adding a
> >>check for
> >>OMAP4 there then?
> 
> Olof,
> So you suggest adding something like below for OMAP4 and all others as well
> right?
> 
> comment "OMAP 44xx high speed USB support"
>         depends on USB_MUSB_HDRC && USB_MUSB_SOC


Hmm. I must be missing something, but it looks odd to have both the
USB_MUSB_HDRC and USB_MUSB_SOC high-level config options, especially since
the depends are duplicated across them.

In general, options like these tend to scale badly:

config USB_MUSB_SOC
        boolean
        depends on USB_MUSB_HDRC
        default y if ARCH_DAVINCI
        default y if ARCH_OMAP2430
        default y if ARCH_OMAP34XX
        default y if (BF54x && !BF544)
        default y if (BF52x && !BF522 && !BF523)

I.e. every single platform needs to add a new line. It's better
to have a config option that is selected from the platform code
(arch/arm/mach-omap2/Kconfig for the specific SOC in this case), that
for example does a :

config ARCH_OMAP34XX
        bool "OMAP34xx Based System"
        depends on ARCH_OMAP3
        select USB_ARCH_HAS_EHCI
	select USB_ARCH_HAS_MUSB

and then just do the USB_MUSB_HDRC or USB_MUSB_SOC config option based on:

config USB_MUSB_SOC
	boolena
	depends on USB_ARCH_HAS_MUSB
	default y

That way a new platform doesn't need to change the common files.

I also don't see the direct need to provide a specific comment saying
"44xx high speed USB support" when you configure for 44xx. With the
work Tony is doing you can build one kernel that boots across OMAP2/3/4,
which comment should then be displayed? It's better to just do a generic
comment such as "OMAP on-chip OTG USB support"

The DMA config is also a bit confusing. I scratched my head over that one
a few times, the fact that one is described with OMAP in the name, and
the other one (INVENTRA) is the one actually used on newer OMAP platforms.


-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCH 2/4] USB: MUSB: Enable MUSB for OMAP4 in Kconfig
       [not found]                   ` <20100301154329.GA4154-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
@ 2010-03-10 10:17                     ` Maulik
       [not found]                       ` <00f701cac03a$da51cab0$808918ac-wD+IZp/g4/2mHdYHvhjUOg@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Maulik @ 2010-03-10 10:17 UTC (permalink / raw)
  To: 'Olof Johansson'
  Cc: 'Tony Lindgren',
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, 'Felipe Balbi',
	'Greg Kroah-Hartman', 'David Brownell'


>Hmm. I must be missing something, but it looks odd to have both the
>USB_MUSB_HDRC and USB_MUSB_SOC high-level config options, especially since
>the depends are duplicated across them.

>In general, options like these tend to scale badly:

>config USB_MUSB_SOC
 >       boolean
 >       depends on USB_MUSB_HDRC
 >       default y if ARCH_DAVINCI
 >       default y if ARCH_OMAP2430
 >      default y if ARCH_OMAP34XX
 >       default y if (BF54x && !BF544)
 >       default y if (BF52x && !BF522 && !BF523)

>I.e. every single platform needs to add a new line. It's better
>to have a config option that is selected from the platform code
>(arch/arm/mach-omap2/Kconfig for the specific SOC in this case), that

Olof,

I agree with this. Since this change will impact many platforms it will
require thorough testing and review. Can we have OMAP4 MUSB driver support 
queued up without this Kconfig enhancement? I believe the driver patches can

go in independent of this enhancement.

Regards,
Maulik


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 2/4] USB: MUSB: Enable MUSB for OMAP4 in Kconfig
       [not found]                       ` <00f701cac03a$da51cab0$808918ac-wD+IZp/g4/2mHdYHvhjUOg@public.gmane.org>
@ 2010-03-10 18:27                         ` Olof Johansson
  0 siblings, 0 replies; 9+ messages in thread
From: Olof Johansson @ 2010-03-10 18:27 UTC (permalink / raw)
  To: Maulik
  Cc: 'Tony Lindgren',
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, 'Felipe Balbi',
	'Greg Kroah-Hartman', 'David Brownell'

On Wed, Mar 10, 2010 at 03:47:08PM +0530, Maulik wrote:
> 
> >Hmm. I must be missing something, but it looks odd to have both the
> >USB_MUSB_HDRC and USB_MUSB_SOC high-level config options, especially since
> >the depends are duplicated across them.
> 
> >In general, options like these tend to scale badly:
> 
> >config USB_MUSB_SOC
>  >       boolean
>  >       depends on USB_MUSB_HDRC
>  >       default y if ARCH_DAVINCI
>  >       default y if ARCH_OMAP2430
>  >      default y if ARCH_OMAP34XX
>  >       default y if (BF54x && !BF544)
>  >       default y if (BF52x && !BF522 && !BF523)
> 
> >I.e. every single platform needs to add a new line. It's better
> >to have a config option that is selected from the platform code
> >(arch/arm/mach-omap2/Kconfig for the specific SOC in this case), that
> 
> Olof,
> 
> I agree with this. Since this change will impact many platforms it will
> require thorough testing and review. Can we have OMAP4 MUSB driver support 
> queued up without this Kconfig enhancement? I believe the driver patches can
> go in independent of this enhancement.

Yeah, they can go in. It was more a comment in case someone's looking for
janitorial things to do.


-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2010-03-10 18:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-25  6:35 [PATCH 2/4] USB: MUSB: Enable MUSB for OMAP4 in Kconfig Maulik Mankad
     [not found] ` <1267079758-14480-1-git-send-email-x0082077-l0cyMroinI0@public.gmane.org>
2010-02-25 18:48   ` Tony Lindgren
2010-02-26  0:42     ` Olof Johansson
2010-02-26  8:40       ` Maulik
2010-02-26 18:54         ` Olof Johansson
     [not found]           ` <20100226185414.GA10835-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2010-03-01  5:41             ` Maulik
     [not found]               ` <001b01cab901$dadec9a0$808918ac-wD+IZp/g4/2mHdYHvhjUOg@public.gmane.org>
2010-03-01 15:43                 ` Olof Johansson
     [not found]                   ` <20100301154329.GA4154-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2010-03-10 10:17                     ` Maulik
     [not found]                       ` <00f701cac03a$da51cab0$808918ac-wD+IZp/g4/2mHdYHvhjUOg@public.gmane.org>
2010-03-10 18:27                         ` Olof Johansson

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.