public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Ajay Kumar Gupta <ajay.gupta@ti.com>
Cc: linux-usb@vger.kernel.org,
	davinci-linux-open-source@linux.davincidsp.com,
	cooloney@kernel.org, felipe.balbi@nokia.com,
	linux-omap@vger.kernel.org, gadiyar@ti.com
Subject: Re: [PATCH 4/8] musb: Update setup_usb() call for all Davinci boards
Date: Tue, 17 Nov 2009 18:53:35 +0300	[thread overview]
Message-ID: <4B02C6FF.6050806@ru.mvista.com> (raw)
In-Reply-To: <1258470596-24321-5-git-send-email-ajay.gupta@ti.com>

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

> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>

> 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. :-)

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

WBR, Sergei

  parent reply	other threads:[~2009-11-17 15:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-17 15:09 [PATCH 0/8] musb: Add structure 'musb_hdrc_board_data' Ajay Kumar Gupta
2009-11-17 15:09 ` [PATCH 1/8] musb: Add structure to get board specific data Ajay Kumar Gupta
2009-11-17 15:09   ` [PATCH 2/8] musb: Get power (mA) from board data Ajay Kumar Gupta
2009-11-17 15:09     ` [PATCH 3/8] musb: Update musb_init() call for all OMAP3 boards Ajay Kumar Gupta
2009-11-17 15:09       ` [PATCH 4/8] musb: Update setup_usb() call for all Davinci boards Ajay Kumar Gupta
2009-11-17 15:09         ` [PATCH 5/8] musb: Add 'extvbus' in musb_hdrc_board_data Ajay Kumar Gupta
2009-11-17 15:09           ` [PATCH 6/8] musb: set 'extvbus = 0' for OMAP3 boards Ajay Kumar Gupta
2009-11-17 15:09             ` [PATCH 7/8] musb: set 'extvbus = 0' for Davinci boards Ajay Kumar Gupta
     [not found]               ` <1258470596-24321-8-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2009-11-17 15:09                 ` [PATCH 8/8] musb: set 'extvbus = 0' for Blackfin boards Ajay Kumar Gupta
     [not found]                   ` <1258470596-24321-9-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2009-11-17 16:13                     ` Sergei Shtylyov
2009-11-17 16:01               ` [PATCH 7/8] musb: set 'extvbus = 0' for Davinci boards Sergei Shtylyov
2009-11-17 16:01             ` [PATCH 6/8] musb: set 'extvbus = 0' for OMAP3 boards Sergei Shtylyov
2009-11-17 15:53         ` Sergei Shtylyov [this message]
     [not found]           ` <4B02C6FF.6050806-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2009-11-18  4:09             ` [PATCH 4/8] musb: Update setup_usb() call for all Davinci boards Gupta, Ajay Kumar
     [not found]         ` <1258470596-24321-5-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2009-11-17 16:03           ` Sergei Shtylyov
2009-11-17 16:10         ` Sergei Shtylyov
     [not found]       ` <1258470596-24321-4-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2009-11-17 16:30         ` [PATCH 3/8] musb: Update musb_init() call for all OMAP3 boards Sergei Shtylyov
     [not found]           ` <4B02CFC1.3090601-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2009-11-18  4:04             ` Gupta, Ajay Kumar
     [not found]     ` <1258470596-24321-3-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2009-11-17 15:42       ` [PATCH 2/8] musb: Get power (mA) from board data Sergei Shtylyov
     [not found]         ` <4B02C45C.4060407-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2009-11-18  4:12           ` Gupta, Ajay Kumar
     [not found]   ` <1258470596-24321-2-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2009-11-17 15:35     ` [PATCH 1/8] musb: Add structure to get board specific data Sergei Shtylyov
2009-11-17 15:56   ` Sergei Shtylyov
     [not found] ` <1258470596-24321-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2009-11-18 14:20   ` [PATCH 0/8] musb: Add structure 'musb_hdrc_board_data' Sergei Shtylyov
     [not found]     ` <4B040293.1020501-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2009-11-19  5:51       ` Gupta, Ajay Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B02C6FF.6050806@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=ajay.gupta@ti.com \
    --cc=cooloney@kernel.org \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=felipe.balbi@nokia.com \
    --cc=gadiyar@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox