RE: [PATCH 4/8] musb: Update setup_usb() call for all Davinci boards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
> -----Original Message-----
> From: Sergei Shtylyov [mailto:sshtylyov@xxxxxxxxxxxxx]
> Sent: Tuesday, November 17, 2009 9:24 PM
> To: Gupta, Ajay Kumar
> Cc: linux-usb@xxxxxxxxxxxxxxx; davinci-linux-open-
> source@xxxxxxxxxxxxxxxxxxxx; cooloney@xxxxxxxxxx; felipe.balbi@xxxxxxxxx;
> linux-omap@xxxxxxxxxxxxxxx; Gadiyar, Anand
> Subject: Re: [PATCH 4/8] musb: Update setup_usb() call for all Davinci
> boards
> 
> Ajay Kumar Gupta wrote:
> 
> > setup_usb() has been modified to pass board specific data so updating
> > this function call from all Davinci based boards.
> 
> > Added "struct device;" to fix below compilation warning for Davinci
> boards.
> > "musb.h: struct device, defined within parameter list"
> 
>     You should fix the missing #include in the musb.h, not band-aid it
> here...

Ok fine, As the error was only with Davinci and not with OMAP/Blackfin
So added here.

> 
> > Signed-off-by: Ajay Kumar Gupta <ajay.gupta@xxxxxx>
> 
> > diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-
> davinci/board-dm355-evm.c
> > index 77e8067..31c5741 100644
> > --- a/arch/arm/mach-davinci/board-dm355-evm.c
> > +++ b/arch/arm/mach-davinci/board-dm355-evm.c
> > @@ -24,6 +24,7 @@
> >  #include <media/tvp514x.h>
> >  #include <linux/spi/spi.h>
> >  #include <linux/spi/eeprom.h>
> > +#include <linux/usb/musb.h>
> >
> >  #include <asm/setup.h>
> >  #include <asm/mach-types.h>
> > @@ -317,6 +318,12 @@ static struct spi_board_info dm355_evm_spi_info[]
> __initconst = {
> >  	},
> >  };
> >
> > +/* musb board specific data */
> > +static struct musb_hdrc_board_data musb_bdata __initdata = {
> > +	.power = 250,	/* (power in mA)/2 */
> > +	.potpgt = 4,	/* (potpgt in msec)/2 */
> > +};
> > +
> >  static __init void dm355_evm_init(void)
> >  {
> >  	struct clk *aemif;
> > @@ -344,7 +351,7 @@ static __init void dm355_evm_init(void)
> >  	gpio_request(2, "usb_id_toggle");
> >  	gpio_direction_output(2, USB_ID_VALUE);
> >  	/* irlml6401 switches over 1A in under 8 msec */
> > -	setup_usb(500, 8);
> > +	setup_usb(&musb_bdata);
> 
>     Unfortunately, this will conflict with a patch queued for 2.6.33 in
> linux-davinci. Though in fact, it will render the part of this patch
> useless... :-/
> 
> > diff --git a/arch/arm/mach-davinci/include/mach/common.h
> b/arch/arm/mach-davinci/include/mach/common.h
> > index 1fd3917..dab784c 100644
> > --- a/arch/arm/mach-davinci/include/mach/common.h
> > +++ b/arch/arm/mach-davinci/include/mach/common.h
> > @@ -20,11 +20,14 @@ extern void davinci_irq_init(void);
> >  extern void __iomem *davinci_intc_base;
> >  extern int davinci_intc_type;
> >
> > +struct device;
> 
>     NAK. <linux/usb/musb.h> should be fixed instead.
> 
> > +#include <linux/usb/musb.h>
> > +
> >  /* parameters describe VBUS sourcing for host mode */
> > -extern void setup_usb(unsigned mA, unsigned potpgt_msec);
> > +extern void setup_usb(struct musb_hdrc_board_data *board_data);
> >
> >  /* parameters describe VBUS sourcing for host mode */
> > -extern void setup_usb(unsigned mA, unsigned potpgt_msec);
> > +extern void setup_usb(struct musb_hdrc_board_data *board_data);
> 
>     Don't you see -- these are duplicate? You could kill the second one.
> :-)

I saw, but though it could be some Davinci hack. I will remove it
in next version.

-Ajay
> 
>     BTW, the mentioned linux-davinci patch moved the declaration to
> <mach/usb.h> (and renamed the function too).
> 
> WBR, Sergei

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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux