From patchwork Wed Aug 18 02:59:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Munegowda, Keshava" X-Patchwork-Id: 120181 X-Patchwork-Delegate: me@felipebalbi.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7IEwxJf012400 for ; Wed, 18 Aug 2010 14:59:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753783Ab0HRO6k (ORCPT ); Wed, 18 Aug 2010 10:58:40 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:57344 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753671Ab0HRO6j (ORCPT ); Wed, 18 Aug 2010 10:58:39 -0400 Received: from dlep36.itg.ti.com ([157.170.170.91]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id o7IEwdAS016878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 18 Aug 2010 09:58:39 -0500 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id o7IEwa6D014419; Wed, 18 Aug 2010 09:58:36 -0500 (CDT) Received: from localhost (a0393220-desktop.apr.dhcp.ti.com [172.24.137.6]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id o7IEwYf17330; Wed, 18 Aug 2010 09:58:34 -0500 (CDT) From: Keshava Munegowda To: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org Cc: Keshava Munegowda , Anand Gadiyar Subject: [PATCH 5/5] usb: ohci: don't hard-code TLL channel count Date: Wed, 18 Aug 2010 08:29:09 +0530 Message-Id: <1282100349-27514-1-git-send-email-keshava_mgowda@ti.com> X-Mailer: git-send-email 1.6.0.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 18 Aug 2010 14:59:07 +0000 (UTC) Index: kernel-omap4-base/drivers/usb/host/ohci-omap3.c =================================================================== --- kernel-omap4-base.orig/drivers/usb/host/ohci-omap3.c +++ kernel-omap4-base/drivers/usb/host/ohci-omap3.c @@ -245,7 +245,8 @@ static unsigned ohci_omap3_fslsmode(enum } } -static void ohci_omap3_tll_config(struct ohci_hcd_omap3 *omap) +static void ohci_omap3_tll_config(struct ohci_hcd_omap3 *omap, + u8 tll_channel_count) { u32 reg; int i; @@ -263,7 +264,7 @@ static void ohci_omap3_tll_config(struct * REVISIT: Only the 3-pin and 4-pin PHY modes have * actually been tested. */ - for (i = 0; i < OMAP_TLL_CHANNEL_COUNT; i++) { + for (i = 0; i < tll_channel_count; i++) { /* Enable only those channels that are actually used */ if (omap->port_mode[i] == OMAP_OHCI_PORT_MODE_UNUSED) @@ -422,7 +423,7 @@ static int omap3_start_ohci(struct ohci_ ohci_omap_writel(omap->uhh_base, OMAP_UHH_HOSTCONFIG, reg); dev_dbg(omap->dev, "UHH setup done, uhh_hostconfig=%x\n", reg); - ohci_omap3_tll_config(omap); + ohci_omap3_tll_config(omap, OMAP_TLL_CHANNEL_COUNT); return 0;