* [PATCH] musb: refresh nop transceiver support for musb @ 2009-04-06 13:34 Ajay Kumar Gupta 2009-04-06 13:44 ` Felipe Balbi 2009-04-06 19:36 ` David Brownell 0 siblings, 2 replies; 7+ messages in thread From: Ajay Kumar Gupta @ 2009-04-06 13:34 UTC (permalink / raw) To: linux-usb; +Cc: linux-omap, david-b, felipe.balbi, tony, Ajay Kumar Gupta As the parent patch for NOP transceiver got modified which now does the NOP device registration also so removing registration part from usb-musb.c file. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> --- Against latest linux-omap tree as on 6th April. arch/arm/mach-omap2/usb-musb.c | 20 ++------------------ 1 files changed, 2 insertions(+), 18 deletions(-) diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index 927c2d9..e932b8c 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c @@ -25,6 +25,7 @@ #include <linux/io.h> #include <linux/usb/musb.h> +#include <linux/usb/otg.h> #include <mach/hardware.h> #include <mach/irqs.h> @@ -145,20 +146,6 @@ static struct platform_device musb_device = { .resource = musb_resources, }; -#ifdef CONFIG_NOP_USB_XCEIV -static u64 nop_xceiv_dmamask = DMA_32BIT_MASK; - -static struct platform_device nop_xceiv_device = { - .name = "nop_usb_xceiv", - .id = -1, - .dev = { - .dma_mask = &nop_xceiv_dmamask, - .coherent_dma_mask = DMA_32BIT_MASK, - .platform_data = NULL, - }, -}; -#endif - void __init usb_musb_init(void) { if (cpu_is_omap243x()) { @@ -172,10 +159,7 @@ void __init usb_musb_init(void) musb_resources[0].end = musb_resources[0].start + SZ_8K - 1; #ifdef CONFIG_NOP_USB_XCEIV - if (platform_device_register(&nop_xceiv_device) < 0) { - printk(KERN_ERR "Unable to register NOP-XCEIV device\n"); - return; - } + usb_nop_xceiv_register(); #endif if (platform_device_register(&musb_device) < 0) { -- 1.6.0.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] musb: refresh nop transceiver support for musb 2009-04-06 13:34 [PATCH] musb: refresh nop transceiver support for musb Ajay Kumar Gupta @ 2009-04-06 13:44 ` Felipe Balbi 2009-04-06 14:08 ` Gupta, Ajay Kumar 2009-04-06 19:36 ` David Brownell 1 sibling, 1 reply; 7+ messages in thread From: Felipe Balbi @ 2009-04-06 13:44 UTC (permalink / raw) To: ext Ajay Kumar Gupta Cc: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, david-b@pacbell.net, Balbi Felipe (Nokia-D/Helsinki), tony@atomide.com On Mon, Apr 06, 2009 at 03:34:49PM +0200, Ajay Kumar Gupta wrote: > As the parent patch for NOP transceiver got modified which now does the > NOP device registration also so removing registration part from > usb-musb.c file. > > Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> > --- > Against latest linux-omap tree as on 6th April. > > arch/arm/mach-omap2/usb-musb.c | 20 ++------------------ > 1 files changed, 2 insertions(+), 18 deletions(-) > > diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c > index 927c2d9..e932b8c 100644 > --- a/arch/arm/mach-omap2/usb-musb.c > +++ b/arch/arm/mach-omap2/usb-musb.c > @@ -25,6 +25,7 @@ > #include <linux/io.h> > > #include <linux/usb/musb.h> > +#include <linux/usb/otg.h> > > #include <mach/hardware.h> > #include <mach/irqs.h> > @@ -145,20 +146,6 @@ static struct platform_device musb_device = { > .resource = musb_resources, > }; > > -#ifdef CONFIG_NOP_USB_XCEIV > -static u64 nop_xceiv_dmamask = DMA_32BIT_MASK; > - > -static struct platform_device nop_xceiv_device = { > - .name = "nop_usb_xceiv", > - .id = -1, > - .dev = { > - .dma_mask = &nop_xceiv_dmamask, > - .coherent_dma_mask = DMA_32BIT_MASK, > - .platform_data = NULL, > - }, > -}; > -#endif > - > void __init usb_musb_init(void) > { > if (cpu_is_omap243x()) { > @@ -172,10 +159,7 @@ void __init usb_musb_init(void) > musb_resources[0].end = musb_resources[0].start + SZ_8K - 1; > > #ifdef CONFIG_NOP_USB_XCEIV > - if (platform_device_register(&nop_xceiv_device) < 0) { > - printk(KERN_ERR "Unable to register NOP-XCEIV device\n"); > - return; > - } > + usb_nop_xceiv_register(); how about you move the ifdef also to the definition of usb_nop_xceiv_register(). It's probably in a header file somewhere so you: #ifdef CONFIG_NOP_USB_XCEIV extern void usb_nop_xceiv_register(); #else static inline void usb_nop_xceiv_register(void) {} #endif then you can remove the ifdef from usb-musb.c -- balbi ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] musb: refresh nop transceiver support for musb 2009-04-06 13:44 ` Felipe Balbi @ 2009-04-06 14:08 ` Gupta, Ajay Kumar 2009-04-06 14:16 ` Felipe Balbi [not found] ` <19F8576C6E063C45BE387C64729E73940427EE8F27-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org> 0 siblings, 2 replies; 7+ messages in thread From: Gupta, Ajay Kumar @ 2009-04-06 14:08 UTC (permalink / raw) To: felipe.balbi@nokia.com Cc: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, david-b@pacbell.net, tony@atomide.com > > void __init usb_musb_init(void) > > { > > if (cpu_is_omap243x()) { > > @@ -172,10 +159,7 @@ void __init usb_musb_init(void) > > musb_resources[0].end = musb_resources[0].start + SZ_8K - 1; > > > > #ifdef CONFIG_NOP_USB_XCEIV > > - if (platform_device_register(&nop_xceiv_device) < 0) { > > - printk(KERN_ERR "Unable to register NOP-XCEIV device\n"); > > - return; > > - } > > + usb_nop_xceiv_register(); > > how about you move the ifdef also to the definition of > usb_nop_xceiv_register(). It's probably in a header file somewhere so > you: It is at: include/linux/usb/otg.h, ============== #ifdef CONFIG_NOP_USB_XCEIV extern void usb_nop_xceiv_register(void); extern void usb_nop_xceiv_unregister(void); #endif ================ But one of the David's queued patch [1] removes the #ifdef part. [1] http://marc.info/?l=linux-usb&m=123852883820097&w=2 Is it ok to add it back in this patch? David, what's your comment on this? -Ajay > > #ifdef CONFIG_NOP_USB_XCEIV > extern void usb_nop_xceiv_register(); > #else > static inline void usb_nop_xceiv_register(void) {} > #endif > > then you can remove the ifdef from usb-musb.c > > -- > balbi ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] musb: refresh nop transceiver support for musb 2009-04-06 14:08 ` Gupta, Ajay Kumar @ 2009-04-06 14:16 ` Felipe Balbi [not found] ` <19F8576C6E063C45BE387C64729E73940427EE8F27-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org> 1 sibling, 0 replies; 7+ messages in thread From: Felipe Balbi @ 2009-04-06 14:16 UTC (permalink / raw) To: ext Gupta, Ajay Kumar Cc: Balbi Felipe (Nokia-D/Helsinki), linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, david-b@pacbell.net, tony@atomide.com On Mon, Apr 06, 2009 at 04:08:01PM +0200, Ajay Kumar Gupta wrote: > > > void __init usb_musb_init(void) > > > { > > > if (cpu_is_omap243x()) { > > > @@ -172,10 +159,7 @@ void __init usb_musb_init(void) > > > musb_resources[0].end = musb_resources[0].start + SZ_8K - 1; > > > > > > #ifdef CONFIG_NOP_USB_XCEIV > > > - if (platform_device_register(&nop_xceiv_device) < 0) { > > > - printk(KERN_ERR "Unable to register NOP-XCEIV device\n"); > > > - return; > > > - } > > > + usb_nop_xceiv_register(); > > > > how about you move the ifdef also to the definition of > > usb_nop_xceiv_register(). It's probably in a header file somewhere so > > you: > > It is at: include/linux/usb/otg.h, > ============== > #ifdef CONFIG_NOP_USB_XCEIV > extern void usb_nop_xceiv_register(void); > extern void usb_nop_xceiv_unregister(void); > #endif > ================ > But one of the David's queued patch [1] removes the #ifdef part. > [1] http://marc.info/?l=linux-usb&m=123852883820097&w=2 > > Is it ok to add it back in this patch? > > David, what's your comment on this? if the user doesn't select the nop transceiver, I guess that symbol should become a static inline doing nothing. What do you think Dave ? -- balbi ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <19F8576C6E063C45BE387C64729E73940427EE8F27-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>]
* Re: [PATCH] musb: refresh nop transceiver support for musb [not found] ` <19F8576C6E063C45BE387C64729E73940427EE8F27-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org> @ 2009-04-06 18:30 ` David Brownell 2009-04-07 4:38 ` Gupta, Ajay Kumar 0 siblings, 1 reply; 7+ messages in thread From: David Brownell @ 2009-04-06 18:30 UTC (permalink / raw) To: Gupta, Ajay Kumar Cc: felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org On Monday 06 April 2009, Gupta, Ajay Kumar wrote: > David, what's your comment on this? It was wrong to try registering the transceiver in the mach-map2/usb2.c file in any case. That's a board-specific issue for OMAP3; and TUSB60x0 chips have an integrated one. See http://marc.info/?l=linux-usb&m=123852898920405&w=2 So for example the RX51 board support (nyet in mainline) needs to register the NOP transceiver; and I think one more board, maybe the OMAP3 EVM, does too. - Dave p.s. This issue is *only* for the OMAP tree. -- 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] 7+ messages in thread
* RE: [PATCH] musb: refresh nop transceiver support for musb 2009-04-06 18:30 ` David Brownell @ 2009-04-07 4:38 ` Gupta, Ajay Kumar 0 siblings, 0 replies; 7+ messages in thread From: Gupta, Ajay Kumar @ 2009-04-07 4:38 UTC (permalink / raw) To: David Brownell Cc: felipe.balbi@nokia.com, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, tony@atomide.com > -----Original Message----- > From: David Brownell [mailto:david-b@pacbell.net] > Sent: Tuesday, April 07, 2009 12:01 AM > To: Gupta, Ajay Kumar > Cc: felipe.balbi@nokia.com; linux-usb@vger.kernel.org; linux-omap@vger.kernel.org; tony@atomide.com > Subject: Re: [PATCH] musb: refresh nop transceiver support for musb > > On Monday 06 April 2009, Gupta, Ajay Kumar wrote: > > David, what's your comment on this? > > It was wrong to try registering the transceiver in > the mach-map2/usb2.c file in any case. That's a > board-specific issue for OMAP3; and TUSB60x0 chips > have an integrated one. See I have updated the patch with below changes, -removed NOP transceiver code from arch/arm/mach-omap2/usb-musb.c -Added NOP transceiver at drivers/usb/musb/omap2430.c in musb_platform_init() same as done in davinci/BlackFin/tusb6010 in your queued patch. -Modified include/linux/usb/otg.h with Felipe's suggestion which removes the #ifdef from drivers/usb/musb/omap2430.c file. Please review this one attached below. ====== cut here ============== [PATCH] musb: refresh NOP transceiver support for OMAP35x EVM Removing NOP support code from usb-musb.c and adding its support at Drivers/usb/musb/omap2430.c. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> --- It is against latest l-o tree + Queued patches from David (21 patches). arch/arm/mach-omap2/usb-musb.c | 21 --------------------- drivers/usb/musb/omap2430.c | 4 ++++ include/linux/usb/otg.h | 6 +++++- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index 927c2d9..6f768d6 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c @@ -145,20 +145,6 @@ static struct platform_device musb_device = { .resource = musb_resources, }; -#ifdef CONFIG_NOP_USB_XCEIV -static u64 nop_xceiv_dmamask = DMA_32BIT_MASK; - -static struct platform_device nop_xceiv_device = { - .name = "nop_usb_xceiv", - .id = -1, - .dev = { - .dma_mask = &nop_xceiv_dmamask, - .coherent_dma_mask = DMA_32BIT_MASK, - .platform_data = NULL, - }, -}; -#endif - void __init usb_musb_init(void) { if (cpu_is_omap243x()) { @@ -171,13 +157,6 @@ void __init usb_musb_init(void) musb_resources[0].end = musb_resources[0].start + SZ_8K - 1; -#ifdef CONFIG_NOP_USB_XCEIV - if (platform_device_register(&nop_xceiv_device) < 0) { - printk(KERN_ERR "Unable to register NOP-XCEIV device\n"); - return; - } -#endif - if (platform_device_register(&musb_device) < 0) { printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n"); return; diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 3fbc807..abfe061 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -209,6 +209,9 @@ int __init musb_platform_init(struct musb *musb) omap_cfg_reg(AE5_2430_USB0HS_STP); #endif + /* OMAP35x EVM needs to regsiter NOP transceiver */ + usb_nop_xceiv_register(); + /* We require some kind of external transceiver, hooked * up through ULPI. TWL4030-family PMICs include one, * which needs a driver, drivers aren't always needed. @@ -313,5 +316,6 @@ int musb_platform_exit(struct musb *musb) clk_put(musb->clock); musb->clock = 0; + usb_nop_xceiv_unregister(); return 0; } diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index 2443c0e..9778268 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h @@ -82,9 +82,13 @@ struct otg_transceiver { extern int otg_set_transceiver(struct otg_transceiver *); /* sometimes transceivers are accessed only through e.g. ULPI */ +#ifdef CONFIG_NOP_USB_XCEIV extern void usb_nop_xceiv_register(void); extern void usb_nop_xceiv_unregister(void); - +#else +static inline void usb_nop_xceiv_register(void) {} +static inline void usb_nop_xceiv_unregister(void) {} +#endif /* for usb host and peripheral controller drivers */ extern struct otg_transceiver *otg_get_transceiver(void); -- 1.6.0.3 ============================== ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] musb: refresh nop transceiver support for musb 2009-04-06 13:34 [PATCH] musb: refresh nop transceiver support for musb Ajay Kumar Gupta 2009-04-06 13:44 ` Felipe Balbi @ 2009-04-06 19:36 ` David Brownell 1 sibling, 0 replies; 7+ messages in thread From: David Brownell @ 2009-04-06 19:36 UTC (permalink / raw) To: Ajay Kumar Gupta; +Cc: linux-usb, linux-omap, felipe.balbi, tony On Monday 06 April 2009, Ajay Kumar Gupta wrote: > As the parent patch for NOP transceiver got modified which now does the > NOP device registration also so removing registration part from > usb-musb.c file. > > Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> > --- > Against latest linux-omap tree as on 6th April. NAK -- see earlier comment > > arch/arm/mach-omap2/usb-musb.c | 20 ++------------------ > 1 files changed, 2 insertions(+), 18 deletions(-) > > diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c > index 927c2d9..e932b8c 100644 > --- a/arch/arm/mach-omap2/usb-musb.c > +++ b/arch/arm/mach-omap2/usb-musb.c > @@ -25,6 +25,7 @@ > #include <linux/io.h> > > #include <linux/usb/musb.h> > +#include <linux/usb/otg.h> > > #include <mach/hardware.h> > #include <mach/irqs.h> > @@ -145,20 +146,6 @@ static struct platform_device musb_device = { > .resource = musb_resources, > }; > > -#ifdef CONFIG_NOP_USB_XCEIV > -static u64 nop_xceiv_dmamask = DMA_32BIT_MASK; > - > -static struct platform_device nop_xceiv_device = { > - .name = "nop_usb_xceiv", > - .id = -1, > - .dev = { > - .dma_mask = &nop_xceiv_dmamask, > - .coherent_dma_mask = DMA_32BIT_MASK, > - .platform_data = NULL, > - }, > -}; > -#endif > - > void __init usb_musb_init(void) > { > if (cpu_is_omap243x()) { > @@ -172,10 +159,7 @@ void __init usb_musb_init(void) > musb_resources[0].end = musb_resources[0].start + SZ_8K - 1; > > #ifdef CONFIG_NOP_USB_XCEIV > - if (platform_device_register(&nop_xceiv_device) < 0) { > - printk(KERN_ERR "Unable to register NOP-XCEIV device\n"); > - return; > - } > + usb_nop_xceiv_register(); > #endif > > if (platform_device_register(&musb_device) < 0) { > -- > 1.6.0.3 > > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-04-07 4:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-06 13:34 [PATCH] musb: refresh nop transceiver support for musb Ajay Kumar Gupta
2009-04-06 13:44 ` Felipe Balbi
2009-04-06 14:08 ` Gupta, Ajay Kumar
2009-04-06 14:16 ` Felipe Balbi
[not found] ` <19F8576C6E063C45BE387C64729E73940427EE8F27-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2009-04-06 18:30 ` David Brownell
2009-04-07 4:38 ` Gupta, Ajay Kumar
2009-04-06 19:36 ` David Brownell
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox