Hi,

On Wed, 2009-12-30 at 16:29 +0530, Gupta, Ajay Kumar wrote:
> Hi,
> > -----Original Message-----
> > From: [email protected] [mailto:linux-omap-
> > [email protected]] On Behalf Of Mankad, Maulik Ojas
> > Sent: Wednesday, December 30, 2009 4:15 PM
> > To: [email protected]
> > Cc: [email protected]; Mankad, Maulik Ojas; Felipe Balbi; Tony
> > Lindgren; Greg Kroah-Hartman
> > Subject: [PATCH 1/2] ARM : OMAP: MUSB : Pass board specific data using a
> > structure
> > 
> > ARM : OMAP: MUSB :Pass board specific data from board file
> > 
> > This patch proposes to pass board specific data for MUSB
> > (like interface_type, mode etc) from board file by defining
> > board specific structure.
> > 
> > Each board file can define this structure based on
> > its requirement and pass this information to the
> > driver.
> > 
> > It addresses a comment from Felipe and thus help
> > by preventing addition of too many fields in
> > musb_platform_data.
> > 
> > Signed-off-by: Maulik Mankad <[email protected]>
> > Cc: Felipe Balbi <[email protected]>
> > Cc: Tony Lindgren <[email protected]>
> > Cc: Greg Kroah-Hartman <[email protected]>
> > 
> > Index: felipe_musb/arch/arm/mach-omap2/board-2430sdp.c
> > ===================================================================
> > --- felipe_musb.orig/arch/arm/mach-omap2/board-2430sdp.c
> > +++ felipe_musb/arch/arm/mach-omap2/board-2430sdp.c
> > @@ -195,6 +195,12 @@ static struct twl4030_hsmmc_info mmc[] _
> >     {}      /* Terminator */
> >  };
> > 
> > +static struct musb_omap_data omap2430sdp_data = {
> > +.interface_type    = MUSB_INTERFACE_ULPI,
> > +.mode              = MUSB_OTG,
> > +.power             = 100,
> > +}
> > +

fix the indentation.

> > -extern void usb_musb_init(enum musb_mode mode, unsigned power);
> > +struct musb_omap_data {
> > +u8 interface_type;
> > +u8 mode;
> > +u8 power;
> > +};
> 
> It's board data so how about 'struct omap_musb_board_data'.

good point.

> > +
> > +enum musb_interface        {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI};
> > +
> > +extern void usb_musb_init(void *);
> 
> Can be modified to:
> +extern void usb_musb_init(omap_musb_board_data *);

correct

> >     if (cpu_is_omap243x())
> >             musb_resources[0].start = OMAP243X_HS_BASE;
> >     else
> > @@ -88,15 +90,16 @@ void __init usb_musb_init(enum musb_mode
> >      * musb_core.c have been converted to use use clkdev.
> >      */
> >     musb_plat.clock = "ick";
> > -   musb_plat.power = power >> 1;
> > -   musb_plat.mode = mode;
> > +   musb_plat.arch_data = arch_data;
> 
> 
> Not needed.

why not ? we still want to pass interface_type down to omap2430.c,
right ?

> We don't need it as we will continue using 'power', 'mode', 'extvbus'
> From musb_plat only.

power and mode, yeah. extvbus is omap-only isn't it ? Then on omap2430.c
is interested in that ?!?

-- 
balbi

--
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