From patchwork Sun Nov 15 08:59:33 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Kumar Gupta X-Patchwork-Id: 60094 Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAF91ZSf003484 for ; Sun, 15 Nov 2009 09:01:36 GMT Received: from dlep34.itg.ti.com ([157.170.170.115]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id nAF8xrGF017242 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 15 Nov 2009 02:59:53 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id nAF8xoG6007340; Sun, 15 Nov 2009 02:59:50 -0600 (CST) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id A6E2C80627; Sun, 15 Nov 2009 02:59:49 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dbdp31.itg.ti.com (dbdp31.itg.ti.com [172.24.170.98]) by linux.omap.com (Postfix) with ESMTP id 3309780627 for ; Sun, 15 Nov 2009 02:59:43 -0600 (CST) Received: from psplinux050.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id nAF8xdAR029448; Sun, 15 Nov 2009 14:29:39 +0530 (IST) Received: from psplinux050.india.ti.com (localhost [127.0.0.1]) by psplinux050.india.ti.com (8.13.1/8.13.1) with ESMTP id nAF8xdgb001832; Sun, 15 Nov 2009 14:29:39 +0530 Received: (from a0393629@localhost) by psplinux050.india.ti.com (8.13.1/8.13.1/Submit) id nAF8xd9C001829; Sun, 15 Nov 2009 14:29:39 +0530 From: Ajay Kumar Gupta To: linux-omap@vger.kernel.org, davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH 2/7] musb: Get power (mA) from board data Date: Sun, 15 Nov 2009 14:29:33 +0530 Message-Id: <1258275578-1773-3-git-send-email-ajay.gupta@ti.com> X-Mailer: git-send-email 1.6.2.4 In-Reply-To: <1258275578-1773-2-git-send-email-ajay.gupta@ti.com> References: <1258275578-1773-1-git-send-email-ajay.gupta@ti.com> <1258275578-1773-2-git-send-email-ajay.gupta@ti.com> Cc: felipe.balbi@nokia.com X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com 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.