> -----Original Message-----
> From: David Brownell [mailto:[email protected]]
> Sent: Tuesday, April 07, 2009 12:01 AM
> To: Gupta, Ajay Kumar
> Cc: [email protected]; [email protected]; 
> [email protected]; [email protected]
> 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 <[email protected]>
---
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
==============================
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to