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-...@vger.kernel.org
Signed-off-by: Felipe Balbi <felipe.ba...@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


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

Reply via email to