diff mbox

[2/7] musb: Get power (mA) from board data

Message ID 1258275578-1773-3-git-send-email-ajay.gupta@ti.com (mailing list archive)
State Superseded
Headers show

Commit Message

Ajay Kumar Gupta Nov. 15, 2009, 8:59 a.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index a80441d..e89c6b1 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -124,12 +124,6 @@  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 */
 };
 
 static u64 musb_dmamask = DMA_BIT_MASK(32);
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 3a61ddb..818ccda 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2033,7 +2033,9 @@  bad_config:
 		if (is_otg_enabled(musb))
 			hcd->self.otg_port = 1;
 		musb->xceiv->host = &hcd->self;
-		hcd->power_budget = 2 * (plat->power ? : 250);
+		if (plat->board_data)
+			hcd->power_budget =
+				2 * (plat->board_data->power ? : 250);
 	}
 
 	/* For the host-only role, we can activate right away.