RE: [PATCH 7/8] arm: omap: musb: pass board mode to usb_musb_init

2009-12-30 Thread Felipe Balbi
On Wed, 2009-12-30 at 10:14 +0530, Gupta, Ajay Kumar wrote:
> Hi,
> > -Original Message-
> > From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
> > ow...@vger.kernel.org] On Behalf Of Felipe Balbi
> > Sent: Monday, December 28, 2009 4:40 PM
> > To: Tony Lindgren
> > Cc: Linux OMAP Mailing List; Felipe Balbi
> > Subject: [PATCH 7/8] arm: omap: musb: pass board mode to usb_musb_init
> > 
> > each board will have a different mode which is peculiar
> > to that board.
> > 
> > Signed-off-by: Felipe Balbi 
> > ---
> 
> 
> > 
> >  #include 
> >  #include 
> > @@ -203,7 +204,7 @@ static void __init omap_2430sdp_init(void)
> > platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
> > omap_serial_init();
> > twl4030_mmc_init(mmc);
> > -   usb_musb_init(100);
> > +   usb_musb_init(MUSB_OTG, 100);
> 
> Similarly, we would need another parameter 'extvbus' which is required by
> OMAP3EVM Rev >= E. This way the parameter list would keep increasing and
> would look ugly.
> 
> So how about passing a "struct musb_board_data" structure completely ? It
> Can be generic across the musb platforms or we can have it only for OMAP
> platforms.


I suggested that off list already. We will add some void * to
musb_platform_data which would allow archs to pass whatever data
structure they want down to drivers/usb/musb/.c

-- 
balbi

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


RE: [PATCH 7/8] arm: omap: musb: pass board mode to usb_musb_init

2009-12-29 Thread Gupta, Ajay Kumar

Hi,
> -Original Message-
> From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
> ow...@vger.kernel.org] On Behalf Of Felipe Balbi
> Sent: Monday, December 28, 2009 4:40 PM
> To: Tony Lindgren
> Cc: Linux OMAP Mailing List; Felipe Balbi
> Subject: [PATCH 7/8] arm: omap: musb: pass board mode to usb_musb_init
> 
> each board will have a different mode which is peculiar
> to that board.
> 
> Signed-off-by: Felipe Balbi 
> ---


> 
>  #include 
>  #include 
> @@ -203,7 +204,7 @@ static void __init omap_2430sdp_init(void)
>   platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
>   omap_serial_init();
>   twl4030_mmc_init(mmc);
> - usb_musb_init(100);
> + usb_musb_init(MUSB_OTG, 100);

Similarly, we would need another parameter 'extvbus' which is required by
OMAP3EVM Rev >= E. This way the parameter list would keep increasing and
would look ugly.

So how about passing a "struct musb_board_data" structure completely ? It
Can be generic across the musb platforms or we can have it only for OMAP
platforms.

Ajay

>   board_smc91x_init();
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 7/8] arm: omap: musb: pass board mode to usb_musb_init

2009-12-29 Thread Tony Lindgren
* Felipe Balbi  [091228 03:10]:
> each board will have a different mode which is peculiar
> to that board.

The subject and description for this too should be updated
to say it fixes the mode.

Regards,

Tony
 
> Signed-off-by: Felipe Balbi 
> ---
>  arch/arm/mach-omap2/board-2430sdp.c  |3 ++-
>  arch/arm/mach-omap2/board-3430sdp.c  |3 ++-
>  arch/arm/mach-omap2/board-cm-t35.c   |3 ++-
>  arch/arm/mach-omap2/board-igep0020.c |3 ++-
>  arch/arm/mach-omap2/board-ldp.c  |3 ++-
>  arch/arm/mach-omap2/board-omap3beagle.c  |3 ++-
>  arch/arm/mach-omap2/board-omap3evm.c |3 ++-
>  arch/arm/mach-omap2/board-omap3pandora.c |3 ++-
>  arch/arm/mach-omap2/board-omap3touchbook.c   |3 ++-
>  arch/arm/mach-omap2/board-overo.c|3 ++-
>  arch/arm/mach-omap2/board-rx51.c |3 ++-
>  arch/arm/mach-omap2/board-zoom-peripherals.c |3 ++-
>  arch/arm/mach-omap2/usb-musb.c   |   13 -
>  arch/arm/plat-omap/include/plat/usb.h|3 ++-
>  14 files changed, 30 insertions(+), 22 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
> b/arch/arm/mach-omap2/board-2430sdp.c
> index d3857d6..45d3197 100644
> --- a/arch/arm/mach-omap2/board-2430sdp.c
> +++ b/arch/arm/mach-omap2/board-2430sdp.c
> @@ -23,6 +23,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include 
>  #include 
> @@ -203,7 +204,7 @@ static void __init omap_2430sdp_init(void)
>   platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
>   omap_serial_init();
>   twl4030_mmc_init(mmc);
> - usb_musb_init(100);
> + usb_musb_init(MUSB_OTG, 100);
>   board_smc91x_init();
>  
>   /* Turn off secondary LCD backlight */
> diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
> b/arch/arm/mach-omap2/board-3430sdp.c
> index 1d52fd1..37e7328 100644
> --- a/arch/arm/mach-omap2/board-3430sdp.c
> +++ b/arch/arm/mach-omap2/board-3430sdp.c
> @@ -24,6 +24,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include 
>  #include 
> @@ -664,7 +665,7 @@ static void __init omap_3430sdp_init(void)
>   ARRAY_SIZE(sdp3430_spi_board_info));
>   ads7846_dev_init();
>   omap_serial_init();
> - usb_musb_init(100);
> + usb_musb_init(MUSB_OTG, 100);
>   board_smc91x_init();
>   sdp3430_display_init();
>   enable_board_wakeup_source();
> diff --git a/arch/arm/mach-omap2/board-cm-t35.c 
> b/arch/arm/mach-omap2/board-cm-t35.c
> index 56922f4..9d5db6b 100644
> --- a/arch/arm/mach-omap2/board-cm-t35.c
> +++ b/arch/arm/mach-omap2/board-cm-t35.c
> @@ -27,6 +27,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include 
>  #include 
> @@ -585,7 +586,7 @@ static void __init cm_t35_init(void)
>   cm_t35_init_ethernet();
>   cm_t35_init_led();
>  
> - usb_musb_init(100);
> + usb_musb_init(MUSB_OTG, 100);
>  }
>  
>  MACHINE_START(CM_T35, "Compulab CM-T35")
> diff --git a/arch/arm/mach-omap2/board-igep0020.c 
> b/arch/arm/mach-omap2/board-igep0020.c
> index 16be1d5..6fc0608 100644
> --- a/arch/arm/mach-omap2/board-igep0020.c
> +++ b/arch/arm/mach-omap2/board-igep0020.c
> @@ -17,6 +17,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include 
>  #include 
> @@ -216,7 +217,7 @@ static void __init igep2_init(void)
>   omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
>   igep2_i2c_init();
>   omap_serial_init();
> - usb_musb_init(100);
> + usb_musb_init(MUSB_OTG, 100);
>  
>   igep2_init_smsc911x();
>  
> diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
> index ca2acd2..7e8c8a8 100644
> --- a/arch/arm/mach-omap2/board-ldp.c
> +++ b/arch/arm/mach-omap2/board-ldp.c
> @@ -27,6 +27,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include 
>  #include 
> @@ -394,7 +395,7 @@ static void __init omap_ldp_init(void)
>   ARRAY_SIZE(ldp_spi_board_info));
>   ads7846_dev_init();
>   omap_serial_init();
> - usb_musb_init(100);
> + usb_musb_init(MUSB_OTG, 100);
>  
>   twl4030_mmc_init(mmc);
>   /* link regulators to MMC adapters */
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
> b/arch/arm/mach-omap2/board-omap3beagle.c
> index 52f65e6..17f6381 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -23,6 +23,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include 
>  #include 
> @@ -443,7 +444,7 @@ static void __init omap3_beagle_init(void)
>   /* REVISIT leave DVI powered down until it's needed ... */
>   gpio_direction_output(170, true);
>  
> - usb_musb_init(100);
> + usb_musb_init(MUSB_OTG, 100);
>   usb_ehci_init(&ehci_pdata);
>   omap3beagle_flash_init();
>  
> diff --git a/arch/arm/mach-omap2/board-omap3evm.c 
> b/arch/arm/mach-omap2/board-omap3evm.c
> index c5fd85d..116000