public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Felipe Balbi <felipe.balbi@nokia.com>
Cc: tony@atomide.com, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org
Subject: Re: [patch-v2.6.33-rc2+ 02/12] arm: omap: musb: fix board power budget by passing it to usb_musb_init
Date: Wed, 30 Dec 2009 14:13:05 +0300	[thread overview]
Message-ID: <4B3B35C1.6060501@ru.mvista.com> (raw)
In-Reply-To: <1262127092-14878-3-git-send-email-felipe.balbi@nokia.com>

Hello.

Felipe Balbi wrote:

> each board might have a different charge pump and
> thus able to source more or less current on vbus
> so let power be easily configurable.
>
> Cc: linux-usb@vger.kernel.org
> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>

[...]

> diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
> index ba71f76..b4b8ccc 100644
> --- a/arch/arm/mach-omap2/usb-musb.c
> +++ b/arch/arm/mach-omap2/usb-musb.c
> @@ -124,12 +124,7 @@ static struct musb_hdrc_platform_data musb_plat = {
>  	/* .clock is set dynamically */
>  	.set_clock	= musb_set_clock,
>  	.config		= &musb_config,
> -
> -	/* REVISIT charge pump on TWL4030 can supply up to
> -	 * 100 mA ... but this value is board-specific, like
> -	 * "mode", and should be passed to usb_musb_init().
> -	 */
> -	.power		= 50,			/* up to 100 mA */
> +	/* .power	= DYNAMIC, */
>  };
>  
>  static u64 musb_dmamask = DMA_BIT_MASK(32);
> @@ -146,7 +141,7 @@ static struct platform_device musb_device = {
>  	.resource	= musb_resources,
>  };
>  
> -void __init usb_musb_init(void)
> +void __init usb_musb_init(unsigned power)
>  {
>  	if (cpu_is_omap243x())
>  		musb_resources[0].start = OMAP243X_HS_BASE;
> @@ -159,6 +154,7 @@ void __init usb_musb_init(void)
>  	 * musb_core.c have been converted to use use clkdev.
>  	 */
>  	musb_plat.clock = "ick";
> +	musb_plat.power = power >> 1;
>   

   Probably OMAP boards never supply much current, but otherwise capping 
the value of 'power' at 510 seems a good idea.

WBR, Sergei



  reply	other threads:[~2009-12-30 11:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-29 22:51 [patch-v2.6.33-rc2+ 00/12] arm omap patches for next -rc Felipe Balbi
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 01/12] arm: omap: musb: ioremap only what's ours Felipe Balbi
2009-12-29 23:51   ` Felipe Balbi
     [not found] ` <1262127092-14878-1-git-send-email-felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2009-12-29 22:51   ` [patch-v2.6.33-rc2+ 02/12] arm: omap: musb: fix board power budget by passing it to usb_musb_init Felipe Balbi
2009-12-30 11:13     ` Sergei Shtylyov [this message]
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 03/12] arm: omap: musb: fix board mode " Felipe Balbi
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 04/12] arm: omap1: mailbox: kill compile warning Felipe Balbi
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 05/12] arm: omap: gpmc: " Felipe Balbi
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 06/12] arm: omap: kill compile warning in irq.c Felipe Balbi
2010-01-05 20:20   ` Tony Lindgren
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 07/12] arm: omap: remove unused variables Felipe Balbi
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 08/12] arm: omap: io: kill compile warning Felipe Balbi
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 09/12] arm: omap: kill compile warning on board-4430-sdp.c Felipe Balbi
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 10/12] arm: omap: gpio: kill compile warning in gpio.c Felipe Balbi
2010-01-05 20:20   ` Tony Lindgren
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 11/12] arm: omap: mailbox: kill compile warning in mailbox.c Felipe Balbi
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 12/12] arm: omap: perseus: kill compile warning on board-perseus2.c Felipe Balbi

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=4B3B35C1.6060501@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=felipe.balbi@nokia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=tony@atomide.com \
    /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